Exemplo n.º 1
0
        private void MetroWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            try
            {
                if (MessageBox.Show("需要重启软件使更改的设置生效!", "确认信息", MessageBoxButton.OKCancel) != MessageBoxResult.OK)
                {
                    e.Cancel = true;
                    return;
                }

                g_WinSetPLC = null;
            }
            catch (Exception ex)
            {
                Log.L_I.WriteError(NameClass, ex);
            }
        }
Exemplo n.º 2
0
 public static WinSetPLC GetWinInst(out bool blNew)
 {
     blNew = false;
     try
     {
         if (g_WinSetPLC == null)
         {
             blNew       = true;
             g_WinSetPLC = new WinSetPLC();
         }
         return(g_WinSetPLC);
     }
     catch (Exception ex)
     {
         Log.L_I.WriteError("WinSetPLC", ex);
         return(null);
     }
 }