Ejemplo n.º 1
0
        public TokenMsgMode()
        {
            _command     = "Msg Mode";
            _description = "Change between ADV and NVL";
            _length      = 2;

            Value = (MsgMode)Tokenizer.ReadUInt8(1); if (!Enum.IsDefined(typeof(MsgMode), Value))
            {
                throw new ArgumentOutOfRangeException();
            }

            UpdateData();
        }
Ejemplo n.º 2
0
 private void ShowMessage(string message, MsgMode msgMode)
 {
     switch (msgMode)
     {
         case MsgMode.Success:
             MessageBox.Show(this, message, "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
             break;
         case MsgMode.Error:
             MessageBox.Show(this, message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
             break;
         case MsgMode.Warning:
             MessageBox.Show(this, message, "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
             break;
     }
 }
Ejemplo n.º 3
0
        private void ShowMessage(string message, MsgMode msgMode)
        {
            ShowMessageMethod call = delegate(string mess, MsgMode msgModeDelegate)
            {
                switch (msgModeDelegate)
                {
                    case MsgMode.Success:
                        if (MessageBox.Show(this, mess, TitleMsgInfo.Success, MessageBoxButtons.OK, MessageBoxIcon.Information) == DialogResult.OK)
                        {
                            td.Abort();
                        }
                        break;
                    case MsgMode.Error:
                        if (MessageBox.Show(this, mess, TitleMsgInfo.Error, MessageBoxButtons.OK, MessageBoxIcon.Error) == DialogResult.OK)
                        {
                            td.Abort();
                        }
                        break;
                    case MsgMode.Warning:
                        if (MessageBox.Show(this, mess, TitleMsgInfo.Warning, MessageBoxButtons.OK, MessageBoxIcon.Warning) == DialogResult.OK)
                        {
                            //td.Abort();
                            this.Close();
                        }
                        break;
                }

            };
            this.Invoke(call, new object[] { message, msgMode });
        }