/// <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); } }
/// <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); } }
/// <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); } }
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); }
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(); }
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(); }
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(); }
private void ShowWritingEMailForm(int MessageNumber, string AccountId, MessageActions Action) { EMailMessage email = client.RetrieveEMail(AccountId, MessageNumber); ShowWritingEMailForm(email, AccountId, Action); }
//public event EventHandler ForwardListSelected; public MessageActions ShowMessage(string title, string message, MessageActions action) { return(mainGrid.ShowMessage(title, message, action)); }
private ReadingForm() { InitializeComponent(); action = MessageActions.DoNothing; }
private void CloseMessageFor(MessageActions Action) { this.action = Action; this.DialogResult = DialogResult.OK; this.Close(); }
private void OnMyClick() { this.Visibility = Visibility.Collapsed; MessageActions.ShowKeyboard(true); }
//public event EventHandler ForwardListSelected; public MessageActions ShowMessage(string title, string message, MessageActions action) { throw new NotImplementedException(); }