BaseForm.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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.Windows.Forms;
  9. namespace UAS_MES_NEW.CustomControl.BaseForm
  10. {
  11. public partial class BaseForm : Form
  12. {
  13. public BaseForm()
  14. {
  15. InitializeComponent();
  16. try { UAS_MES_NEW.I18n.LanguageManager.Localize(this); } catch { }
  17. }
  18. private void BaseForm_Load(object sender, EventArgs e)
  19. {
  20. if (!DesignMode)
  21. {
  22. Main main = Application.OpenForms["Main"] as Main;
  23. main.TopMost = false;
  24. }
  25. }
  26. private void BaseForm_FormClosing(object sender, FormClosingEventArgs e)
  27. {
  28. if (!DesignMode)
  29. {
  30. //Main main = Application.OpenForms["Main"] as Main;
  31. //main.TopMost = (main.Controls["headBar1"].Controls["AlwaysTop"] as CheckBox).Checked;
  32. }
  33. }
  34. }
  35. }