SubForm.cs 766 B

12345678910111213141516171819202122232425262728293031
  1. using System;
  2. using System.Windows.Forms;
  3. namespace Optimizer {
  4. public sealed partial class SubForm : Form {
  5. public SubForm() {
  6. InitializeComponent();
  7. CheckForIllegalCrossThreadCalls = false;
  8. this.DoubleBuffered = true;
  9. OptionsHelper.ApplyTheme(this);
  10. btnStart.Focus();
  11. btnStart.Select();
  12. }
  13. internal void SetTip(string tip) {
  14. txtInfo.Text = tip;
  15. btnStart.Focus();
  16. btnStart.Select();
  17. }
  18. private void btnStart_Click(object sender, EventArgs e) {
  19. this.Close();
  20. }
  21. private void SubForm_Load(object sender, EventArgs e) {
  22. OptionsHelper.ApplyTheme(this);
  23. }
  24. }
  25. }