Exemple #1
0
        public static void ShowMsg(string Msg, bool IsError, Form ThisForm, bool Popup = false)
        {
            try
            {
                MainFrm ParentFrm = (MainFrm)ThisForm.Parent.Parent;
                ParentFrm.mbMembersInfo.Caption = Msg;
                if (IsError)
                    ParentFrm.mbMembersInfo.Appearance.ForeColor = System.Drawing.Color.Red;
                else
                    ParentFrm.mbMembersInfo.Appearance.ForeColor = System.Drawing.Color.Green;
                //ActionLog += String.Format("[{0}] [{1}] : ({2}){3}", DateTime.Now.ToShortTimeString(), ThisForm.Text, Msg, Environment.NewLine);
            }
            catch
            { }
            if (Popup)
            {
                FXFW.Logger.LogDetails logDetails = new FXFW.Logger.LogDetails() { message = Msg, Owner = ThisForm };
                if (IsError)
                    logDetails.OpType = FXFW.Logger.OpType.fail;
                else
                    logDetails.OpType = FXFW.Logger.OpType.success;

                FXFW.MSGBOXFrm popupMsg = new FXFW.MSGBOXFrm(logDetails, ThisForm);
                popupMsg.ShowDialog(ThisForm);
            }
        }
Exemple #2
0
 public static void ShowMsg(string Msg, bool IsError, Form ThisForm, bool Popup = false)
 {
     try
     {
         MainFrm ParentFrm = (MainFrm)ThisForm.Parent.Parent;
         ParentFrm.mbRetCenterInfo.Caption = Msg;
         if (IsError)
             ParentFrm.mbRetCenterInfo.Appearance.ForeColor = System.Drawing.Color.Red;
         else
             ParentFrm.mbRetCenterInfo.Appearance.ForeColor = System.Drawing.Color.Green;
         //ActionLog += String.Format("[{0}] [{1}] : ({2}){3}", DateTime.Now.ToShortTimeString(), ThisForm.Text, Msg, Environment.NewLine);
     }
     catch
     { }
     if (Popup)
     {
         FXFW.Logger.LogDetails logDetails = new FXFW.Logger.LogDetails() { message = Msg, Owner = ThisForm };
         
         DevExpress.XtraBars.Alerter.AlertInfo info = new DevExpress.XtraBars.Alerter.AlertInfo(Application.ProductName, Msg);
         if (IsError)
             info.Image = Properties.Resources.error;
         else
             info.Image = Properties.Resources.done;
         Alert.Show(ThisForm, info);
     }
 }