public linkedNotes(string _textToCheck, notes _n) { InitializeComponent(); this.KeyPreview = true; this.KeyDown += new KeyEventHandler(linkedNotes_KeyDown); parseLinks(_textToCheck); n = _n; }
void Form1_KeyDown(object sender, KeyEventArgs e) { if (Settings.s.ok == false) { return; } if (e.KeyCode.ToString() == Settings.s.modWindow) { Modules.calculateMod cm = new Modules.calculateMod(); cm.ShowDialog(); } if (e.KeyCode.ToString() == Settings.s.conditionWindow) { Modules.conditions cd = new Modules.conditions(); cd.ShowDialog(); } if (e.KeyCode.ToString() == Settings.s.noteWindow) { Modules.notes nt = new Modules.notes(); nt.ShowDialog(); } if (e.KeyCode.ToString() == "S") { Modules.keyconfig kc = new Modules.keyconfig(); kc.ShowDialog(); } if (e.KeyCode.ToString() == Settings.s.dicerollWindow) { Modules.diceRoller dr = new Modules.diceRoller(); dr.ShowDialog(); } }