本文整理汇总了C#中GalaSoft.MvvmLight.Messaging.NotificationMessage类的典型用法代码示例。如果您正苦于以下问题:C# NotificationMessage类的具体用法?C# NotificationMessage怎么用?C# NotificationMessage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NotificationMessage类属于GalaSoft.MvvmLight.Messaging命名空间,在下文中一共展示了NotificationMessage类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: CreateIndexMessageHandler
private void CreateIndexMessageHandler(NotificationMessage<CreateIndexViewModel> message)
{
if (message.Notification == Constants.CreateIndexMessage || message.Notification == Constants.RecreateIndexMessage)
{
this.Close();
}
}
开发者ID:stefanocastriotta,项目名称:MDbGui.Net,代码行数:7,代码来源:CreateIndexDialog.xaml.cs
示例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);
}
开发者ID:RohanRon,项目名称:Friend-App,代码行数:27,代码来源:TimerPageViewModel.cs
示例3: InitialAction
private void InitialAction(NotificationMessage<object> obj)
{
if (obj.Target.ToString()=="Load"&&obj.Notification=="OpenWindow")
{
LoadProjects();
}
}
开发者ID:newlifechou,项目名称:MaterialCalculator,代码行数:7,代码来源:LoadViewModel.cs
示例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;
};*/
}
开发者ID:jscote,项目名称:Meezure,代码行数:33,代码来源:AllMeasurements.xaml.cs
示例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;
}
}
}));
}
开发者ID:B-Rich,项目名称:Ozeki-Auto-Dialer,代码行数:30,代码来源:LoginWindow.xaml.cs
示例6: OnNotificationReceived
private void OnNotificationReceived(NotificationMessage obj)
{
UiBeginInvoke(()=>
{
NotificationText = obj.Notification;
});
}
开发者ID:heartszhang,项目名称:WeiZhi3,代码行数:7,代码来源:NotificationControl.xaml.cs
示例7: UpdateDocumentMessageHandler
private void UpdateDocumentMessageHandler(NotificationMessage<ReplaceOneViewModel> message)
{
if (message.Notification == Constants.UpdateDocumentMessage)
{
this.Close();
}
}
开发者ID:stefanocastriotta,项目名称:MDbGui.Net,代码行数:7,代码来源:UpdateDocumentView.xaml.cs
示例8: CreateCollectionMessageHandler
private void CreateCollectionMessageHandler(NotificationMessage<CreateCollectionViewModel> message)
{
if (message.Notification == Constants.CreateCollectionMessage)
{
this.Close();
}
}
开发者ID:stefanocastriotta,项目名称:MDbGui.Net,代码行数:7,代码来源:CreateCollectionDialog.xaml.cs
示例9: NotificationMessageReceived
private void NotificationMessageReceived(NotificationMessage msg)
{
//if (msg.Notification == "AddDeviceSimView")
//{
// ImageStart.Source = (ImageSource)FindResource("");
//}
}
开发者ID:parinya-chav,项目名称:DevicesSimulation,代码行数:7,代码来源:DeviceSimulatorView.xaml.cs
示例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();
}
}));
}
开发者ID:B-Rich,项目名称:Ozeki-Call-Center-Client,代码行数:30,代码来源:App.xaml.cs
示例11: NotificationMessageReceived
private void NotificationMessageReceived(NotificationMessage msg)
{
if (msg.Notification != ChatViewShow) return;
var chatView = new ChatView();
Hide();
chatView.ShowDialog();
Close();
}
开发者ID:AntonLapshin,项目名称:csharp,代码行数:8,代码来源:AuthorizationView.xaml.cs
示例12: NotificationMessageReceived
private void NotificationMessageReceived(NotificationMessage notificationMessage)
{
if (notificationMessage.Notification == "OpenFileWindow")
{
var openFile = new OpenFile();
openFile.ShowDialog();
}
}
开发者ID:MetaFight,项目名称:6502Net,代码行数:8,代码来源:MainWindow.xaml.cs
示例13: ProjectDatabaseTransitionMessageReceived
private void ProjectDatabaseTransitionMessageReceived(NotificationMessage msg)
{
if (msg.Notification == "ShowProjectDeviceDatabase")
{
var projectDeviceDatabaseView = new ProjectDeviceDatabaseView();
projectDeviceDatabaseView.Show();
}
}
开发者ID:ajr85,项目名称:FxTesting,代码行数:8,代码来源:MainWindow.xaml.cs
示例14: AddCategoryTransitionMessageReceived
private void AddCategoryTransitionMessageReceived(NotificationMessage msg)
{
if (msg.Notification == "ShowAddCategory")
{
var addCategoryView = new AddCategoryView();
addCategoryView.Show();
}
}
开发者ID:ajr85,项目名称:FxTesting,代码行数:8,代码来源:DeviceDatabaseView.xaml.cs
示例15: NotificationMessageReceived
private void NotificationMessageReceived(NotificationMessage<ViewModelBase> currentView)
{
CurrentView = currentView.Content;
if(currentView.Notification.Equals("TournamentViewModel"))
{
TournamentViewModel = (TournamentViewModel) currentView.Content;
}
}
开发者ID:JonasL91,项目名称:Pair-Up,代码行数:8,代码来源:AppViewModel.cs
示例16: RefreshScreen
private void RefreshScreen(NotificationMessage obj)
{
if (obj.Notification != MessageNames.UpdateDebugScreens || Engine == null)
return;
if (Application.Current != null)
Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(Refresh));
}
开发者ID:MetaFight,项目名称:dotnetNES,代码行数:8,代码来源:NameTablesViewModel.cs
示例17: AddSignalTypeTransitionMessageReceived
private void AddSignalTypeTransitionMessageReceived(NotificationMessage msg)
{
if (msg.Notification == "ShowAddSignalType")
{
var addSignalTypeView = new AddSignalTypeView();
addSignalTypeView.Show();
}
}
开发者ID:ajr85,项目名称:FxTesting,代码行数:8,代码来源:DeviceDatabaseView.xaml.cs
示例18: DeviceDatabaseTransitionMessageReceived
private void DeviceDatabaseTransitionMessageReceived(NotificationMessage msg)
{
if (msg.Notification == "ShowDeviceDatabase")
{
var deviceDatabaseView = new DeviceDatabaseView();
deviceDatabaseView.Show();
}
}
开发者ID:ajr85,项目名称:FxTesting,代码行数:8,代码来源:MainWindow.xaml.cs
示例19: BsonParseExceptionMessageHandler
private void BsonParseExceptionMessageHandler(NotificationMessage<BsonExtensions.BsonParseException> message)
{
if (message.Notification == Constants.InsertParseException && message.Sender == this.DataContext && message.Content.PropertyName == Constants.InsertProperty)
{
insertEditor.CaretOffset = message.Content.Position;
insertEditor.Focus();
}
}
开发者ID:stefanocastriotta,项目名称:MDbGui.Net,代码行数:8,代码来源:InsertView.xaml.cs
示例20: AddSupplierTransitionMessageReceived
private void AddSupplierTransitionMessageReceived(NotificationMessage msg)
{
if (msg.Notification == "ShowAddSupplier")
{
var addSupplierViewView = new AddSupplierView();
addSupplierViewView.Show();
}
}
开发者ID:ajr85,项目名称:FxTesting,代码行数:8,代码来源:DeviceDatabaseView.xaml.cs
注:本文中的GalaSoft.MvvmLight.Messaging.NotificationMessage类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论