public static void ShowForm(ICoreServCtrl coreServ)
        {
            FormModifyServerSettings form = null;

            if (_instant == null || _instant.IsDisposed)
            {
                VgcApis.Misc.UI.Invoke(() =>
                {
                    form = new FormModifyServerSettings();
                });
            }

            lock (formInstanLocker)
            {
                if (_instant == null || _instant.IsDisposed)
                {
                    _instant = form;
                    form     = null;
                }
            }

            VgcApis.Misc.UI.Invoke(() =>
            {
                form?.Close();
                var inst = _instant;
                if (inst != null)
                {
                    inst.InitControls(coreServ);
                    inst.Show();
                    inst.Activate();
                }
            });
        }
Beispiel #2
0
 public static void ShowForm(ICoreServCtrl coreServ)
 {
     lock (formInstanLocker)
     {
         if (_instant == null || _instant.IsDisposed)
         {
             _instant = new FormModifyServerSettings();
         }
         _instant.InitControls(coreServ);
         _instant.Show();
         _instant.Activate();
     }
 }