Opening links by holding the shift key

This commit is contained in:
Sigmanor 2017-02-05 22:38:26 +02:00
parent 25545a8de7
commit 302636701d

View file

@ -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;
}
}