mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 06:43:51 +02:00
--debug, tray launch DevTools, fix right click paste
This commit is contained in:
@@ -12,7 +12,7 @@ namespace VRCX
|
|||||||
public void OnBeforeContextMenu(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, IMenuModel model)
|
public void OnBeforeContextMenu(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, IMenuModel model)
|
||||||
{
|
{
|
||||||
// remove default right click
|
// remove default right click
|
||||||
if (!parameters.TypeFlags.HasFlag(ContextMenuType.Selection))
|
if (!parameters.TypeFlags.HasFlag(ContextMenuType.Selection) && !parameters.TypeFlags.HasFlag(ContextMenuType.Editable))
|
||||||
model.Clear();
|
model.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -23,7 +23,6 @@ namespace VRCX
|
|||||||
|
|
||||||
public void OnContextMenuDismissed(IWebBrowser browserControl, IBrowser browser, IFrame frame)
|
public void OnContextMenuDismissed(IWebBrowser browserControl, IBrowser browser, IFrame frame)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool RunContextMenu(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, IMenuModel model, IRunContextMenuCallback callback)
|
public bool RunContextMenu(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, IMenuModel model, IRunContextMenuCallback callback)
|
||||||
|
|||||||
36
MainForm.Designer.cs
generated
36
MainForm.Designer.cs
generated
@@ -28,7 +28,7 @@ namespace VRCX
|
|||||||
#region Windows Form 디자이너에서 생성한 코드
|
#region Windows Form 디자이너에서 생성한 코드
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 디자이너 지원에 필요한 메서드입니다.
|
/// 디자이너 지원에 필요한 메서드입니다.
|
||||||
/// 이 메서드의 내용을 코드 편집기로 수정하지 마세요.
|
/// 이 메서드의 내용을 코드 편집기로 수정하지 마세요.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
@@ -36,49 +36,58 @@ namespace VRCX
|
|||||||
this.components = new System.ComponentModel.Container();
|
this.components = new System.ComponentModel.Container();
|
||||||
this.TrayMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
|
this.TrayMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||||
this.TrayMenu_Open = new System.Windows.Forms.ToolStripMenuItem();
|
this.TrayMenu_Open = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.TrayMenu_DevTools = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.TrayMenu_Separator = new System.Windows.Forms.ToolStripSeparator();
|
this.TrayMenu_Separator = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.TrayMenu_Quit = new System.Windows.Forms.ToolStripMenuItem();
|
this.TrayMenu_Quit = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.TrayIcon = new System.Windows.Forms.NotifyIcon(this.components);
|
this.TrayIcon = new System.Windows.Forms.NotifyIcon(this.components);
|
||||||
this.TrayMenu.SuspendLayout();
|
this.TrayMenu.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// TrayMenu
|
// TrayMenu
|
||||||
//
|
//
|
||||||
this.TrayMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
this.TrayMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
this.TrayMenu_Open,
|
this.TrayMenu_Open,
|
||||||
|
this.TrayMenu_DevTools,
|
||||||
this.TrayMenu_Separator,
|
this.TrayMenu_Separator,
|
||||||
this.TrayMenu_Quit});
|
this.TrayMenu_Quit});
|
||||||
this.TrayMenu.Name = "TrayMenu";
|
this.TrayMenu.Name = "TrayMenu";
|
||||||
this.TrayMenu.Size = new System.Drawing.Size(132, 54);
|
this.TrayMenu.Size = new System.Drawing.Size(132, 54);
|
||||||
//
|
//
|
||||||
// TrayMenu_Open
|
// TrayMenu_Open
|
||||||
//
|
//
|
||||||
this.TrayMenu_Open.Name = "TrayMenu_Open";
|
this.TrayMenu_Open.Name = "TrayMenu_Open";
|
||||||
this.TrayMenu_Open.Size = new System.Drawing.Size(131, 22);
|
this.TrayMenu_Open.Size = new System.Drawing.Size(131, 22);
|
||||||
this.TrayMenu_Open.Text = "Open";
|
this.TrayMenu_Open.Text = "Open";
|
||||||
this.TrayMenu_Open.Click += new System.EventHandler(this.TrayMenu_Open_Click);
|
this.TrayMenu_Open.Click += new System.EventHandler(this.TrayMenu_Open_Click);
|
||||||
//
|
//
|
||||||
|
// TrayMenu_DevTools
|
||||||
|
//
|
||||||
|
this.TrayMenu_DevTools.Name = "TrayMenu_DevTools";
|
||||||
|
this.TrayMenu_DevTools.Size = new System.Drawing.Size(131, 22);
|
||||||
|
this.TrayMenu_DevTools.Text = "DevTools";
|
||||||
|
this.TrayMenu_DevTools.Click += new System.EventHandler(this.TrayMenu_DevTools_Click);
|
||||||
|
//
|
||||||
// TrayMenu_Separator
|
// TrayMenu_Separator
|
||||||
//
|
//
|
||||||
this.TrayMenu_Separator.Name = "TrayMenu_Separator";
|
this.TrayMenu_Separator.Name = "TrayMenu_Separator";
|
||||||
this.TrayMenu_Separator.Size = new System.Drawing.Size(128, 6);
|
this.TrayMenu_Separator.Size = new System.Drawing.Size(128, 6);
|
||||||
//
|
//
|
||||||
// TrayMenu_Quit
|
// TrayMenu_Quit
|
||||||
//
|
//
|
||||||
this.TrayMenu_Quit.Name = "TrayMenu_Quit";
|
this.TrayMenu_Quit.Name = "TrayMenu_Quit";
|
||||||
this.TrayMenu_Quit.Size = new System.Drawing.Size(131, 22);
|
this.TrayMenu_Quit.Size = new System.Drawing.Size(131, 22);
|
||||||
this.TrayMenu_Quit.Text = "Quit VRCX";
|
this.TrayMenu_Quit.Text = "Quit VRCX";
|
||||||
this.TrayMenu_Quit.Click += new System.EventHandler(this.TrayMenu_Quit_Click);
|
this.TrayMenu_Quit.Click += new System.EventHandler(this.TrayMenu_Quit_Click);
|
||||||
//
|
//
|
||||||
// TrayIcon
|
// TrayIcon
|
||||||
//
|
//
|
||||||
this.TrayIcon.ContextMenuStrip = this.TrayMenu;
|
this.TrayIcon.ContextMenuStrip = this.TrayMenu;
|
||||||
this.TrayIcon.Text = "VRCX";
|
this.TrayIcon.Text = "VRCX";
|
||||||
this.TrayIcon.Visible = true;
|
this.TrayIcon.Visible = true;
|
||||||
this.TrayIcon.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.TrayIcon_MouseDoubleClick);
|
this.TrayIcon.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.TrayIcon_MouseDoubleClick);
|
||||||
//
|
//
|
||||||
// MainForm
|
// MainForm
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||||
this.ClientSize = new System.Drawing.Size(842, 561);
|
this.ClientSize = new System.Drawing.Size(842, 561);
|
||||||
@@ -100,6 +109,7 @@ namespace VRCX
|
|||||||
|
|
||||||
private System.Windows.Forms.ContextMenuStrip TrayMenu;
|
private System.Windows.Forms.ContextMenuStrip TrayMenu;
|
||||||
private System.Windows.Forms.ToolStripMenuItem TrayMenu_Open;
|
private System.Windows.Forms.ToolStripMenuItem TrayMenu_Open;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem TrayMenu_DevTools;
|
||||||
private System.Windows.Forms.ToolStripSeparator TrayMenu_Separator;
|
private System.Windows.Forms.ToolStripSeparator TrayMenu_Separator;
|
||||||
private System.Windows.Forms.ToolStripMenuItem TrayMenu_Quit;
|
private System.Windows.Forms.ToolStripMenuItem TrayMenu_Quit;
|
||||||
private System.Windows.Forms.NotifyIcon TrayIcon;
|
private System.Windows.Forms.NotifyIcon TrayIcon;
|
||||||
|
|||||||
10
MainForm.cs
10
MainForm.cs
@@ -54,7 +54,8 @@ namespace VRCX
|
|||||||
|
|
||||||
Browser.IsBrowserInitializedChanged += (A, B) =>
|
Browser.IsBrowserInitializedChanged += (A, B) =>
|
||||||
{
|
{
|
||||||
// Browser.ShowDevTools();
|
if (Program.LaunchDebug)
|
||||||
|
Browser.ShowDevTools();
|
||||||
};
|
};
|
||||||
|
|
||||||
Util.ApplyJavascriptBindings(Browser.JavascriptObjectRepository);
|
Util.ApplyJavascriptBindings(Browser.JavascriptObjectRepository);
|
||||||
@@ -166,9 +167,14 @@ namespace VRCX
|
|||||||
Focus();
|
Focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void TrayMenu_DevTools_Click(object sender, System.EventArgs e)
|
||||||
|
{
|
||||||
|
Instance.Browser.ShowDevTools();
|
||||||
|
}
|
||||||
|
|
||||||
private void TrayMenu_Quit_Click(object sender, System.EventArgs e)
|
private void TrayMenu_Quit_Click(object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
Application.Exit();
|
Application.Exit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15,6 +15,7 @@ namespace VRCX
|
|||||||
public static string BaseDirectory { get; private set; }
|
public static string BaseDirectory { get; private set; }
|
||||||
public static string AppDataDirectory { get; private set; }
|
public static string AppDataDirectory { get; private set; }
|
||||||
public static string ConfigLocation;
|
public static string ConfigLocation;
|
||||||
|
public static bool LaunchDebug;
|
||||||
|
|
||||||
static Program()
|
static Program()
|
||||||
{
|
{
|
||||||
@@ -86,4 +87,4 @@ namespace VRCX
|
|||||||
SQLite.Instance.Exit();
|
SQLite.Instance.Exit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,8 +27,11 @@ namespace VRCX
|
|||||||
if (arg.Length > 12 && arg.Substring(0, 12) == "/uri=vrcx://")
|
if (arg.Length > 12 && arg.Substring(0, 12) == "/uri=vrcx://")
|
||||||
LaunchCommand = arg.Substring(12);
|
LaunchCommand = arg.Substring(12);
|
||||||
|
|
||||||
if (arg.Length > 12 && arg.Substring(0, 8) == "--config")
|
if (arg.Length > 8 && arg.Substring(0, 8) == "--config")
|
||||||
Program.ConfigLocation = arg.Substring(9);
|
Program.ConfigLocation = arg.Substring(9);
|
||||||
|
|
||||||
|
if (arg.Length >= 7 && arg.Substring(0, 7) == "--debug")
|
||||||
|
Program.LaunchDebug = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (processList.Length > 1 && String.IsNullOrEmpty(LaunchCommand))
|
if (processList.Length > 1 && String.IsNullOrEmpty(LaunchCommand))
|
||||||
|
|||||||
Reference in New Issue
Block a user