mirror of
https://github.com/Crypto-Notepad/Crypto-Notepad.git
synced 2026-03-11 08:55:25 +00:00
Opening links by holding the shift key
This commit is contained in:
parent
25545a8de7
commit
302636701d
1 changed files with 15 additions and 1 deletions
|
|
@ -21,6 +21,7 @@ public partial class MainWindow : Form
|
|||
string[] args = Environment.GetCommandLineArgs();
|
||||
int caretPos = 0;
|
||||
string appName = Assembly.GetExecutingAssembly().GetName().Name + " – ";
|
||||
bool shiftPresed;
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
|
@ -1041,11 +1042,19 @@ private void customRTB_Click(object sender, EventArgs e)
|
|||
private void customRTB_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
caretPos = customRTB.SelectionStart;
|
||||
if (e.KeyCode == Keys.ShiftKey)
|
||||
{
|
||||
shiftPresed = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void customRTB_LinkClicked(object sender, LinkClickedEventArgs e)
|
||||
{
|
||||
Process.Start(e.LinkText);
|
||||
if (shiftPresed)
|
||||
{
|
||||
shiftPresed = false;
|
||||
Process.Start(e.LinkText);
|
||||
}
|
||||
}
|
||||
|
||||
void customRTB_DragDrop(object sender, DragEventArgs e)
|
||||
|
|
@ -1075,6 +1084,11 @@ void customRTB_DragDrop(object sender, DragEventArgs e)
|
|||
DecryptAES();
|
||||
}
|
||||
|
||||
private void customRTB_KeyUp(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.ShiftKey)
|
||||
{
|
||||
shiftPresed = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue