/// <inheritdoc />
 public MessageGlobalWithResponse(MessageActions action, string name, string[] arguments = null)
 {
     Action = action;
     AddArgument(name);
     if (arguments != null)
     {
         AddArgument(arguments);
     }
 }
        /// <inheritdoc />
        public MessageElementWithResponse(INode node, MessageActions action, params object[] args)
        {
            AddArgument(node.GetUuid());

            foreach (var o in args)
            {
                AddArgument(o);
            }
        }
示例#3
0
        /// <inheritdoc />
        public MessageGlobal(MessageActions action, string name, string[] arguments = null)
        {
            Action = action;

            AddArgument(name);

            var argList = new List <string>(arguments ?? Array.Empty <string>());

            foreach (var argument in argList)
            {
                AddArgument(argument);
            }
        }
示例#4
0
        /// <inheritdoc />
        public MessageElement(INode node, MessageActions action, params object[] args)
        {
            Action = action;

            if (node != null)
            {
                AddArgument(node.GetUuid());
            }

            foreach (var o in args)
            {
                AddArgument(o);
            }
        }
示例#5
0
        public MessageActions ShowMessage(string title, string message, MessageActions action)
        {
            var msgButton =
                action == (MessageActions.Ok | MessageActions.Cancel) ? MessageBoxButton.OKCancel :
                action == (MessageActions.Yes | MessageActions.No) ? MessageBoxButton.YesNo :
                action == (MessageActions.Yes | MessageActions.No | MessageActions.Cancel) ? MessageBoxButton.YesNoCancel :
                MessageBoxButton.OK;
            var result = MessageBox.Show(message, title, msgButton);

            return(result == MessageBoxResult.OK ? MessageActions.Ok :
                   result == MessageBoxResult.Yes ? MessageActions.Yes :
                   result == MessageBoxResult.No ? MessageActions.No :
                   result == MessageBoxResult.Cancel ? MessageActions.Cancel :
                   MessageActions.None);
        }
示例#6
0
        private void ShowWritingEMailForm(EMailMessage Message, string AccountId, MessageActions Action)
        {
            if (Message == null)
            {
                MessageBox.Show("There was an error retrieving the email.");
                return;
            }

            WritingForm  wForm   = new WritingForm(Message, Action, AccountId);
            DialogResult dResult = wForm.ShowDialog();

            if (dResult == DialogResult.OK)
            {
                client.SendEMail(AccountId, wForm.Message);
            }
            SetDataGridFocus();
        }
示例#7
0
        public WritingForm(EMailMessage Message, MessageActions Action, string AccountId)
            : this()
        {
            if (Message == null)
            {
                MessageBox.Show("Error Retrieving Message");
                return;
            }

            if (AccountId == null || AccountId == string.Empty)
            {
                this.DialogResult = DialogResult.Cancel;
                this.Close();
            }

            this.message   = Message;
            this.action    = Action;
            this.accountId = AccountId;

            SetUpEMail();

            FillControls();
        }
示例#8
0
        private void ShowReadingEMailForm(EMailMessage Message, string AccountId, int MessageNumber)
        {
            if (Message == null)
            {
                MessageBox.Show("There was an error retrieving the email.");
                return;
            }

            ReadingForm  rForm = new ReadingForm(Message, client.ConfigurationObject.Accounts[AccountId].SendEnabled);
            DialogResult dr    = rForm.ShowDialog();

            if (dr == DialogResult.OK)
            {
                MessageActions action = rForm.Action;
                if (action == MessageActions.Delete)
                {
                    DeleteMessage(AccountId, MessageNumber);
                    return;
                }

                ShowWritingEMailForm(Message, AccountId, action);
            }
            SetDataGridFocus();
        }
示例#9
0
        private void ShowWritingEMailForm(int MessageNumber, string AccountId, MessageActions Action)
        {
            EMailMessage email = client.RetrieveEMail(AccountId, MessageNumber);

            ShowWritingEMailForm(email, AccountId, Action);
        }
示例#10
0
        //public event EventHandler ForwardListSelected;

        public MessageActions ShowMessage(string title, string message, MessageActions action)
        {
            return(mainGrid.ShowMessage(title, message, action));
        }
示例#11
0
 private ReadingForm()
 {
     InitializeComponent();
     action = MessageActions.DoNothing;
 }
示例#12
0
 private void CloseMessageFor(MessageActions Action)
 {
     this.action       = Action;
     this.DialogResult = DialogResult.OK;
     this.Close();
 }
示例#13
0
 private void OnMyClick()
 {
     this.Visibility = Visibility.Collapsed;
     MessageActions.ShowKeyboard(true);
 }
示例#14
0
        //public event EventHandler ForwardListSelected;

        public MessageActions ShowMessage(string title, string message, MessageActions action)
        {
            throw new NotImplementedException();
        }