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