private void AllButtonEnable(bool enable) { FolderSelectBtn.Invoke((MethodInvoker) delegate { FolderSelectBtn.Enabled = enable; }); FileSelectBtn.Invoke((MethodInvoker) delegate { FileSelectBtn.Enabled = enable; }); AllClearBtn.Invoke((MethodInvoker) delegate { AllClearBtn.Enabled = enable; }); UploadBtn.Invoke((MethodInvoker) delegate { UploadBtn.Enabled = enable; }); }
// Zorgen dat het toetsenbord gebruikt kan worden private void NumPadInput(object sender, KeyPressEventArgs e) { switch (e.KeyChar.ToString()) { case "0": ZeroBtn.PerformClick(); break; case "1": OneBtn.PerformClick(); break; case "2": TwoBtn.PerformClick(); break; case "3": ThreeBtn.PerformClick(); break; case "4": FourBtn.PerformClick(); break; case "5": FiveBtn.PerformClick(); break; case "6": SixBtn.PerformClick(); break; case "7": SevenBtn.PerformClick(); break; case "8": EightBtn.PerformClick(); break; case "9": NineBtn.PerformClick(); break; case "*": TimesBtn.PerformClick(); break; case "/": DivideBtn.PerformClick(); break; case "-": SubtractBtn.PerformClick(); break; case "+": Addbtn.PerformClick(); break; case ",": DecimalBtn.PerformClick(); break; case ".": DecimalBtn.PerformClick(); break; case "c": ClearBtn.PerformClick(); break; // Twee keer op de "c" toets op het toetsenbord klikken voor een All Clear case "c" + "c": AllClearBtn.PerformClick(); break; default: break; } // De "Enter" toets op het toetsenbord de functie van de "=" toets toewijzen if (e.KeyChar == (char)Keys.Enter) { EqualBtn.PerformClick(); } }