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); } }
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); } }