private void BaseMetroWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            try
            {
                LogOutEvent();   //注销事件

                RecoverHalWin(); //显示Halcon窗体
                g_WinFinShell = null;
            }
            catch (Exception ex)
            {
                Log.L_I.WriteError(NameClass, ex);
            }
        }
 public static WinFinShell GetWinInst(out bool blNew)
 {
     blNew = false;
     try
     {
         if (g_WinFinShell == null)
         {
             blNew         = true;
             g_WinFinShell = new WinFinShell();
         }
         return(g_WinFinShell);
     }
     catch (Exception ex)
     {
         Log.L_I.WriteError("WinFinShell", ex);
         return(null);
     }
 }