protected override void WndProc(ref Message m) { // Catch when a HotKey is pressed if (m.Msg == 0x0312) { int id = m.WParam.ToInt32(); // MessageBox.Show(string.Format("Hotkey #{0} pressed", id)); // Handle what will happen once a respective hotkey is pressed switch (id) { case 1: TextCopy prevLine = new TextCopy(); prevLine.GetPreviousLine(FormMain.GetRichText()); break; case 2: TextCopy getLine = new TextCopy(); getLine.GetCurrentLine(FormMain.GetRichText()); break; case 3: TextCopy nextLine = new TextCopy(); nextLine.GetNextLine(FormMain.GetRichText()); break; case 4: TextCopy copyOwnTextOne = new TextCopy(); copyOwnTextOne.CopyOwnText(FormMain.GetOwnTexts()[0]); break; case 5: TextCopy copyOwnTextTwo = new TextCopy(); copyOwnTextTwo.CopyOwnText(FormMain.GetOwnTexts()[1]); break; } } base.WndProc(ref m); }
private void buttonCNextLine_Click(object sender, EventArgs e) { TextCopy nextLine = new TextCopy(); labelCopyStatus.Text = nextLine.GetNextLine(textToCopy.Text); }