protected override void OnPropertyChanged(Data.AdvancedPropertyChangedEventArgs e) { if (_messageMediator == null) { return; } _messageMediator.SendMessage(new PropertyChangedMessage(this, e.PropertyName)); }
/// <summary> /// Method to send the Selected Item to Text Editor View /// </summary> private void OnDocMapSelectedCommandExecute() { if (SelectectedDocumentItem != null) { // Passing the currentFileName to differentiate the mediator message _messageMediator.SendMessage(SelectectedDocumentItem, CurrentViewModelUniqueIdentifier); } }
/// <summary> /// Method to invoke when the SaveRegex command is executed. /// </summary> private void OnSaveRegexExecute() { // Passing the currentFileName to differentiate the mediator message _messageMediator.SendMessage(RegexContent); // Close current window CloseViewModel(true); }
/// <summary> /// Method to invoke when the Browse command is executed. /// </summary> private void OnBrowseExecute() { var url = Url; if (!url.StartsWith("http://")) { url = "http://" + url; } _MessageMediator.SendMessage(url, typeof(BrowserDocumentViewModel).Name); //Title = string.Format("Browser: {0}", url); }
/// <summary> /// Method to invoke when the Browse command is executed. /// </summary> private void OnBrowseExecute() { var url = Url; if (!url.StartsWith("http://")) { url = "http://" + url; } _messageMediator.SendMessage(url, BrowserModule.Name); Title = string.Format("Browser: {0}", url); }
private void CheckMessage(string updateString) { var referenceDate = Messages.Count > 0 ? Messages.Max(x => x.DateReceived) : DateTime.Now; Messages = new ObservableCollection <MessageModel>(updateMessagesListTask .UpdateMessageList( Messages.ToList())); var message = Messages.FirstOrDefault(m => m.NewEmail && m.DateReceived >= referenceDate); if (message != null) { mediator.SendMessage(message, "newMessage"); } }
/// <summary> /// Method to invoke when the Plot command is executed. /// </summary> private void OnPlotExecute() { var plotVm = new PlotViewModel(from column in Columns select column.Title as string); if (_uiVisualizerService.ShowDialog(plotVm) ?? false) { var x = GetColumnByTitle(plotVm.XAxis); var y = GetColumnByTitle(plotVm.YAxis); var xvalues = new ObservableCollection <int>(from item in Items select Convert.ToInt32(item.Cells[x.ColumnIndex].Value)); var yvalues = new ObservableCollection <int>(from item in Items select Convert.ToInt32(item.Cells[y.ColumnIndex].Value)); _messageMediator.SendMessage(new Tuple <ObservableCollection <int>, ObservableCollection <int> >(xvalues, yvalues)); } }
public bool SendMessage(IMessageMediator messageMediator, string message, object tag) { return(messageMediator.SendMessage(message, tag)); }
public bool SendMessage(IMessageMediator messageMediator, string message, object tag) { return messageMediator.SendMessage(message, tag); }
/// <summary> /// Send the message. /// </summary> /// <param name="message">The message to be sent.</param> /// <param name="tag">The optional Catel mediator tag to be used.</param> /// <exception cref="ArgumentNullException">The <paramref name="message"/> is <c>null</c>.</exception> protected static void Send(TMessage message, object tag = null) { Argument.IsNotNull("message", message); _mediator.SendMessage(message, tag); }
private void OnFileDeleted(object sender, FileSystemEventArgs e) { mediator.SendMessage("File Deleted", "folderModified"); }