Skip to content

Commit

Permalink
up4.9
Browse files Browse the repository at this point in the history
  • Loading branch information
2dust committed Jan 29, 2021
1 parent 7885893 commit 6084173
Show file tree
Hide file tree
Showing 24 changed files with 2,396 additions and 477 deletions.
49 changes: 49 additions & 0 deletions v2rayN/v2rayN/Forms/MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 51 additions & 0 deletions v2rayN/v2rayN/Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1507,6 +1507,10 @@ private void RefreshRoutingsMenu()
for (int k = 0; k < config.routings.Count; k++)
{
var item = config.routings[k];
if (item.locked == true)
{
continue;
}
string name = item.remarks;

ToolStripMenuItem ts = new ToolStripMenuItem(name)
Expand Down Expand Up @@ -1542,5 +1546,52 @@ private void ts_Routing_Click(object sender, EventArgs e)
}
#endregion

#region MsgBoxMenu
private void menuMsgBoxSelectAll_Click(object sender, EventArgs e)
{
this.txtMsgBox.Focus();
this.txtMsgBox.SelectAll();
}

private void menuMsgBoxCopy_Click(object sender, EventArgs e)
{
var data = this.txtMsgBox.SelectedText.TrimEx();
Utils.SetClipboardData(data);
}

private void menuMsgBoxCopyAll_Click(object sender, EventArgs e)
{
var data = this.txtMsgBox.Text;
Utils.SetClipboardData(data);
}
private void menuMsgBoxAddRoutingRule_Click(object sender, EventArgs e)
{
menuMsgBoxCopy_Click(null, null);
tsbRoutingSetting_Click(null, null);
}

private void txtMsgBox_KeyDown(object sender, KeyEventArgs e)
{
if (e.Control)
{
switch (e.KeyCode)
{
case Keys.A:
menuMsgBoxSelectAll_Click(null, null);
break;
case Keys.C:
menuMsgBoxCopy_Click(null, null);
break;
case Keys.V:
menuMsgBoxAddRoutingRule_Click(null, null);
break;

}
}

}

#endregion

}
}
Loading

0 comments on commit 6084173

Please sign in to comment.