Beispiel #1
0
 public numerical_gpbwindows win_ng; //定义单击数值计算切换窗口
 public Main()
 {
     InitializeComponent();
     material_selection    = false;
     numercial_computation = false;
     material_selection    = navbar_material_change(material_selection, material_height);
     numercial_computation = navbar_numerical_change(numercial_computation, numerical_height);
     win_i  = new instrument();
     win_ng = new numerical_gpbwindows();
 }
Beispiel #2
0
 private readonly object _mylock = new object();//防止多创建win_ng窗体
 /// <summary>
 /// 显示win_ng
 /// </summary>
 private void win_ngShow(RLC.BaseRLC baseRLC)
 {
     lock (_mylock)
     {
         if (win_ng == null || win_ng.IsDisposed)
         {
             win_ng = new numerical_gpbwindows(baseRLC);
         }
         else
         {
             win_ng.BaseRLC = baseRLC;
         }
     }
     if (!childForm.Controls.Contains(win_ng))
     {
         win_ng.Show();
         childForm.Controls.Clear();
         childForm.Controls.Add(win_ng);
     }
 }