SubForm.cs 955 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. namespace Optimizer
  11. {
  12. public partial class SubForm : Form
  13. {
  14. public SubForm()
  15. {
  16. InitializeComponent();
  17. CheckForIllegalCrossThreadCalls = false;
  18. this.DoubleBuffered = true;
  19. Options.ApplyTheme(this);
  20. btnStart.Focus();
  21. btnStart.Select();
  22. }
  23. internal void SetTip(string tip)
  24. {
  25. txtInfo.Text = tip;
  26. btnStart.Focus();
  27. btnStart.Select();
  28. }
  29. private void btnStart_Click(object sender, EventArgs e)
  30. {
  31. this.Close();
  32. }
  33. private void SubForm_Load(object sender, EventArgs e)
  34. {
  35. Options.ApplyTheme(this);
  36. }
  37. }
  38. }