本文整理汇总了C#中GalaSoft.MvvmLight.Messaging.NotificationMessage类的典型用法代码示例。如果您正苦于以下问题:C# NotificationMessage类的具体用法?C# NotificationMessage怎么用?C# NotificationMessage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NotificationMessage类属于GalaSoft.MvvmLight.Messaging命名空间,在下文中一共展示了NotificationMessage类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateIndexMessageHandler
private void CreateIndexMessageHandler(NotificationMessage<CreateIndexViewModel> message)
{
if (message.Notification == Constants.CreateIndexMessage || message.Notification == Constants.RecreateIndexMessage)
{
this.Close();
}
}
示例2: NotifyMe
private void NotifyMe(NotificationMessage obj)
{
var notification = obj.Notification;
double result;
var parseresult= double.TryParse(notification, out result);
if (!parseresult) return;
timerValue = Convert.ToDouble(notification);
if (timerValue > 60)
{
MinuteValue = 01;
SecondsValue = timerValue - 60;
}
else if (timerValue < 60)
{
MinuteValue = 00;
SecondsValue = timerValue;
}
else
{
SecondsValue = 00;
MinuteValue = 1;
}
RaisePropertyChanged(()=> MinuteValue);
RaisePropertyChanged(()=>SecondsValue);
}
示例3: InitialAction
private void InitialAction(NotificationMessage<object> obj)
{
if (obj.Target.ToString()=="Load"&&obj.Notification=="OpenWindow")
{
LoadProjects();
}
}
示例4: AllMeasurements
public AllMeasurements ()
{
InitializeComponent ();
Master = _master = new FilterPage ();
_scope = App.AutoFacContainer.BeginLifetimeScope ();
var mainNav = new NavigationPage (_scope.Resolve<MeasurementPage>());
mainNav.Title = "Measurements";
var msg = new NotificationMessage<IDictionary<string, int>>(new Dictionary<string, int>(), _loadingMsgId);
msg.Content.Add("Mode", 0);
Messenger.Default.Send<NotificationMessage<IDictionary<string, int>>> (msg, _loadingMsgId);
Detail = mainNav;
this.Icon = "slideout.png";
Messenger.Default.Register<NotificationMessage<FilterViewModel>>(this, _loadingMsgId, m => IsPresented = false);
/*_master.PageSelectionChanged = (measurementTypeDefId) => {
IDictionary<string, int> msgSelectionChanged = new Dictionary<string, int>();
msgSelectionChanged.Add("DefinitionId", measurementTypeDefId);
msgSelectionChanged.Add("Mode", 0);
var page = App.NavigationService.MasterNavigateTo (MeasurementListPage.PageName, msgSelectionChanged);
Detail = new NavigationPage(page);
Detail.Title = page.Title;
IsPresented = false;
};*/
}
示例5: MessageReceived
private void MessageReceived(NotificationMessage notificationMessage)
{
Dispatcher.BeginInvoke(new Action(() =>
{
if (notificationMessage.Notification == Messages.ShowWaitWindow)
{
if (waitWindow != null)
waitWindow.Close();
waitWindow = new WaitWindow("Logging in, please wait...", true) {Owner = this};
waitWindow.ShowDialog();
}
else if (notificationMessage.Notification == Messages.NavigateToMainWindow)
{
if (waitWindow != null)
waitWindow.Close();
Close();
}
else if (notificationMessage.Notification == Messages.DismissWaitWindow)
{
if (waitWindow != null)
{
waitWindow.Close();
waitWindow = null;
}
}
}));
}
示例6: OnNotificationReceived
private void OnNotificationReceived(NotificationMessage obj)
{
UiBeginInvoke(()=>
{
NotificationText = obj.Notification;
});
}
示例7: UpdateDocumentMessageHandler
private void UpdateDocumentMessageHandler(NotificationMessage<ReplaceOneViewModel> message)
{
if (message.Notification == Constants.UpdateDocumentMessage)
{
this.Close();
}
}
示例8: CreateCollectionMessageHandler
private void CreateCollectionMessageHandler(NotificationMessage<CreateCollectionViewModel> message)
{
if (message.Notification == Constants.CreateCollectionMessage)
{
this.Close();
}
}
示例9: NotificationMessageReceived
private void NotificationMessageReceived(NotificationMessage msg)
{
//if (msg.Notification == "AddDeviceSimView")
//{
// ImageStart.Source = (ImageSource)FindResource("");
//}
}
示例10: MessageReceived
private void MessageReceived(NotificationMessage notificationMessage)
{
Dispatcher.BeginInvoke(new Action(() =>
{
if (notificationMessage.Notification == Messages.NavigateToMainWindow)
{
var settingsRepository = GalaSoft.MvvmLight.Ioc.SimpleIoc.Default.GetInstance<IGenericSettingsRepository<AppPreferences>>();
var settings = settingsRepository.GetSettings();
try
{
GalaSoft.MvvmLight.Ioc.SimpleIoc.Default.Register(() => new WcfCrmClient(settings.ConnectionProperties, settings.ClientCredential));
}
catch (Exception)
{ }
var mainWindow = new MainWindow();
mainWindow.Title = string.Format("{0} - {1} ({2})", "Call Center CRM", settings.ClientCredential.UserName, settings.ClientCredential.PhoneNumber);
mainWindow.Show();
Application.Current.MainWindow = mainWindow;
}
else if (notificationMessage.Notification == Messages.ShowAboutWindow)
{
var aboutWindow = new AboutWindow("Call Center CRM");
aboutWindow.ShowDialog();
}
}));
}
示例11: NotificationMessageReceived
private void NotificationMessageReceived(NotificationMessage msg)
{
if (msg.Notification != ChatViewShow) return;
var chatView = new ChatView();
Hide();
chatView.ShowDialog();
Close();
}
示例12: NotificationMessageReceived
private void NotificationMessageReceived(NotificationMessage notificationMessage)
{
if (notificationMessage.Notification == "OpenFileWindow")
{
var openFile = new OpenFile();
openFile.ShowDialog();
}
}
示例13: ProjectDatabaseTransitionMessageReceived
private void ProjectDatabaseTransitionMessageReceived(NotificationMessage msg)
{
if (msg.Notification == "ShowProjectDeviceDatabase")
{
var projectDeviceDatabaseView = new ProjectDeviceDatabaseView();
projectDeviceDatabaseView.Show();
}
}
示例14: AddCategoryTransitionMessageReceived
private void AddCategoryTransitionMessageReceived(NotificationMessage msg)
{
if (msg.Notification == "ShowAddCategory")
{
var addCategoryView = new AddCategoryView();
addCategoryView.Show();
}
}
示例15: NotificationMessageReceived
private void NotificationMessageReceived(NotificationMessage<ViewModelBase> currentView)
{
CurrentView = currentView.Content;
if(currentView.Notification.Equals("TournamentViewModel"))
{
TournamentViewModel = (TournamentViewModel) currentView.Content;
}
}