예제 #1
0
        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);
     }
 }
예제 #3
0
        /// <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);
        }
예제 #4
0
        /// <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);
        }
예제 #5
0
        /// <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);
        }
예제 #6
0
        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");
            }
        }
예제 #7
0
        /// <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));
            }
        }
예제 #8
0
 public bool SendMessage(IMessageMediator messageMediator, string message, object tag)
 {
     return(messageMediator.SendMessage(message, tag));
 }
예제 #9
0
 public bool SendMessage(IMessageMediator messageMediator, string message, object tag)
 {
     return messageMediator.SendMessage(message, tag);
 }
예제 #10
0
파일: MessageBase.cs 프로젝트: ziez/Catel
        /// <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);
        }
예제 #11
0
 private void OnFileDeleted(object sender, FileSystemEventArgs e)
 {
     mediator.SendMessage("File Deleted", "folderModified");
 }