// //--------------------------------------------------------------------------- // internal static void fn_ShowWarn(bool bShow, string sMsg = "") // { // m_sWarnMsg = sMsg; // if(bShow) m_bRqShowMsg = true; // else // { // m_bRqHideMsg = true ; // m_bRqShowMsg = false; // m_sWarnMsg = "" ; // } // } // //-------------------------------------------------------------------------- // internal static void fn_UpdateMsg () // { // if(m_bRqHideMsg) { // m_bRqHideMsg = false; // fn_ShowMsg(false); // } // // if(m_bRqShowMsg) // { // m_bRqShowMsg = false; // if (m_sWarnMsg != "") fn_ShowMsg(true, "Warning", m_sWarnMsg); // } // // } // //-------------------------------------------------------------------------- // public static bool fn_ShowMsg(bool bShow, String sTitle = "", String sMsg = "", int iKind = (int)EN_SHOW_MODE.Normal) // { // System.Windows.Forms.DialogResult dr = new System.Windows.Forms.DialogResult(); // // if (UserMsg != null) // { // UserMsg.Close(); // UserMsg = null; // } // // if (!bShow) return true; // // // UserMsg = new FormMessage(); // UserMsg.m_nKind = iKind; // UserMsg.m_sTitle = sTitle; // UserMsg.m_sMsg = sMsg; // UserMsg.Topmost = true; // // if (iKind == 0) { UserMsg.Show(); return false; } // // UserMsg.ShowDialog(); // // return dr == System.Windows.Forms.DialogResult.Yes; // // } //--------------------------------------------------------------------------- static public void fn_UserJog() { if (UserJog != null) { return; } UserJog = new FormJog(); UserJog.Topmost = true; UserJog.Show(); }
//--------------------------------------------------------------------------- static public void fn_UserJogClose() { if (UserJog == null) { return; } UserJog.Dispatcher.Invoke(DispatcherPriority.Normal, new Action(delegate() { UserJog.Close(); UserJog = null; })); }