//--------------------------------------------------------------------------- public bool fn_SetMsg(string msg, string caption, EN_MSG_TYPE type = 0) { m_bResult = false; string sCaption = caption; //Type에 따라 Button Display menuOk.Visibility = Visibility.Hidden; menuCancel.Visibility = Visibility.Hidden; menuOk_1.Visibility = Visibility.Hidden; if (type == EN_MSG_TYPE.Info) { menuOk_1.Visibility = Visibility.Visible; if (sCaption == "") { sCaption = "CONFIRM"; } } else if (type == EN_MSG_TYPE.Check) { menuOk.Visibility = Visibility.Visible; menuCancel.Visibility = Visibility.Visible; if (sCaption == "") { sCaption = "CHECK"; } } else if (type == EN_MSG_TYPE.Warning) { menuOk_1.Visibility = Visibility.Visible; if (sCaption == "") { sCaption = "WARNING"; } } this.Title = sCaption;//caption; lbMsg.Content = msg; return(true); }
static public bool fn_UserMsg(string msg, EN_MSG_TYPE type, string caption, EN_SHOW_MODE modal) { bool rtn = false; if (SEQ._bRun && (SEQ._iStep > 13 && SEQ._iStep < 16)) { return(false); //JUNG/200418/Check Run } if (UserMsg.IsVisible) { //UserMsg.Topmost = true; //UserMsg.Show(); fn_UserMsgClose(); //return false; } // UserMsg.Dispatcher.Invoke(DispatcherPriority.Normal, new Action(delegate() { UserMsg.fn_SetMsg(msg, caption, type); fn_WriteLog(msg); //JUNG/200922 //사용할 메서드 및 동작 if (modal == EN_SHOW_MODE.Modal || type == EN_MSG_TYPE.Check) { UserMsg.ShowDialog(); } else { //UserMsg.Topmost = true; UserMsg.Show(); } rtn = UserMsg._bResult || (UserMsg.DialogResult.HasValue && UserMsg.DialogResult.Value); })); return(rtn); }
//--------------------------------------------------------------------------- /** * <summary> * User Message Display * </summary> * <param name="caption"> Caption Message </param> * <param name="msg"> Message </param> * <param name="type"> Message </param> * @author 정지완(JUNGJIWAN) * @date 2020/01/31 20:14 */ static public bool fn_UserMsg(string msg, EN_MSG_TYPE type, string caption = "") { return(fn_UserMsg(msg, type, caption, EN_SHOW_MODE.Normal)); }