private void NotificationMessageActionHandler(NotificationMessageAction<MessageBoxResult> m) { if (m.Notification == Messages.Messages.SETTINGSIP_SAVE) { var result = MessageBox.Show("Do you want to save the settings?", "Save settings?", MessageBoxButton.YesNo, MessageBoxImage.Asterisk); m.Execute(result); } }
private void WindowOperation_MessageReceived(NotificationMessageAction msg) { if(msg.Notification == "OpenDebugTool") { debugTool = new DebugTool(); msg.Execute(); debugTool.Show(); } if (msg.Notification == "OpenConnectionSetup") { ConnectionSetupWindow = new ConnectionSetup(); msg.Execute(); ConnectionSetupWindow.ShowDialog(); } if (msg.Notification == "OpenHardwareSetup") { HardwareSetupWindow = new HardwareSetup(); msg.Execute(); HardwareSetupWindow.ShowDialog(); } if(msg.Notification == "CloseHardwareSettings") { if(HardwareSetupWindow != null) { Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Background, new System.Action(() => { HardwareSetupWindow.Close(); })); } } if(msg.Notification == "CloseConnectionSetup") { if(ConnectionSetupWindow != null) { Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Background, new System.Action(() => { ConnectionSetupWindow.Close(); })); } } }
private void HandleNotificationMessage(NotificationMessageAction<string> message) { // Execute a callback to send a reply to the sender. message.Execute("Success! (from App.xaml.cs)"); }
private void handleNotificationMessage(NotificationMessageAction<string> message) { message.Execute("Le message est arrivé dans le App.xaml.cs"); }
/// <summary> /// Callback message from VM_Tiles to get the preselected project name. /// </summary> /// <param name="msg">The callback message.</param> private void GetPreselectedProject(NotificationMessageAction<string> msg) { msg.Execute(PreselectedProject); }
private void OnMSG_CareOneConfig_SAVEDATA(NotificationMessageAction<DataOneRegistationInfo> action) { _dataInfo.Led_name = Led_name; _dataInfo.Latitude = Latitude; _dataInfo.Longitude = Longitude; action.Execute(_dataInfo); }
private void OnShowCustomReceiveSize(NotificationMessageAction<CustomReceiveResult> str) { CustomReceiveResult info = (CustomReceiveResult)str.Target; Window_SetCustomReceive setCustomReceiveWin = new Window_SetCustomReceive(info.Width,info.Height); bool? res = setCustomReceiveWin.ShowDialog(); int width = 0; int height = 0; setCustomReceiveWin.GetSetSize(out width, out height); CustomReceiveResult param = new CustomReceiveResult() { IsOK = res, Width = width, Height = height }; str.Execute(param); }
private void OnShowAddTimingAdjustBright(NotificationMessageAction<OneSmartBrightEasyConfig> info) { OneSmartBrightEasyConfig dataInfo = info.Target as OneSmartBrightEasyConfig; Window_AddTimingAdjustData winAddBrightTimingAdjustData = new Window_AddTimingAdjustData(dataInfo); bool? res = ShowInCenterParentWithRes(winAddBrightTimingAdjustData); if (res == true) { OneSmartBrightEasyConfig data = winAddBrightTimingAdjustData.GetOneSmartBrightOneItemConfig(); info.Execute(data); } }
private void OnShewWinPeripheralsConfig(NotificationMessageAction<PeripheralsSettingParam> info) { PeripheralsSettingParam dataInfo = info.Target as PeripheralsSettingParam; Window_PeripheralsConfig winPeripheralConfig = new Window_PeripheralsConfig(dataInfo); winPeripheralConfig.Owner = Application.Current.MainWindow; winPeripheralConfig.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner; if (winPeripheralConfig.ShowDialog() == true) { PeripheralsSettingParam data = winPeripheralConfig.GetPeripheralConfig(); info.Execute(data); } }
private void OnShowGuideTwo(NotificationMessageAction<ConfigurationData> info) { ConfigurationData dataInfo = info.Target as ConfigurationData; Frm_Guide_two frm_Guide_Two = new Frm_Guide_two(dataInfo.OperateType); frm_Guide_Two.Owner = Application.Current.MainWindow; frm_Guide_Two.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner; frm_Guide_Two.ShowDialog(); ConfigurationData data = frm_Guide_Two.GetConfigData(); if (data != null) { info.Execute(data); //////如果是要创建显示屏则创建 //if (dataInfo.OperateType == OperateScreenType.CreateScreen) //{ // MainWindow win = new MainWindow(data); // win.Owner = this; // win.ShowDialog(); //} ////如果是要更新显示屏,则返回信息 //else if (dataInfo.OperateType == OperateScreenType.UpdateScreen) //{ // info.Execute(data); //} } }
private void OnShowAddTimingAdjustBright(NotificationMessageAction<OneSmartBrightEasyConfig> info) { OneSmartBrightEasyConfig dataInfo = info.Target as OneSmartBrightEasyConfig; Window_AddTimingAdjustData winAddBrightTimingAdjustData = new Window_AddTimingAdjustData(dataInfo); winAddBrightTimingAdjustData.Owner = Application.Current.MainWindow; winAddBrightTimingAdjustData.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner; if (winAddBrightTimingAdjustData.ShowDialog() == true) { OneSmartBrightEasyConfig data = winAddBrightTimingAdjustData.GetOneSmartBrightOneItemConfig(); info.Execute(data); } }
private void OnShowFastSegmentation(NotificationMessageAction<FastSegmentParam> info) { FastSegmentParam dataInfo = info.Target as FastSegmentParam; Window_FastSegmentation winFastSegmentation = new Window_FastSegmentation(dataInfo); winFastSegmentation.Owner = Application.Current.MainWindow; winFastSegmentation.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner; if (winFastSegmentation.ShowDialog() == true) { FastSegmentParam data = winFastSegmentation.GetFastSegmentationInfo(); info.Execute(data); } }
private void OnShowFastSegmentation(NotificationMessageAction<FastSegmentParam> info) { FastSegmentParam dataInfo = info.Target as FastSegmentParam; Window_FastSegmentation winFastSegmentation = new Window_FastSegmentation(dataInfo); bool? res= ShowInCenterParentWithRes(winFastSegmentation); if (res==true) { FastSegmentParam data = winFastSegmentation.GetFastSegmentationInfo(); info.Execute(data); } }
private void ProcessCloudFoundryProviderMessage(NotificationMessageAction<ICloudFoundryProvider> message) { if (message.Notification.Equals(Messages.GetCloudFoundryProvider)) { message.Execute(this); } }
private void OnIsModifySenderType(NotificationMessageAction<SenderConfigInfo> info) { _modifySenderType=info; SenderConfigInfo senderConfigInfo = (SenderConfigInfo)info.Sender; string msg = ""; CommonStaticMethod.GetLanguageString("确定将发送卡型号改为 ", "Lang_StartUp_SureToModifySender", out msg); MessageBoxResult result= _smartLCTViewModeBase.ShowQuestionMessage(msg +" "+ senderConfigInfo.SenderTypeName.ToString(),MessageBoxButton.YesNo,MessageBoxImage.Question); if (result == MessageBoxResult.Yes) { _modifySenderType.Execute(senderConfigInfo); } }
private void HandleNotificationMessage(NotificationMessageAction<string> message) { message.Execute("Success (from App.xaml.cs)!"); }
private void OnShewWinPeripheralsConfig(NotificationMessageAction<PeripheralsSettingParam> info) { PeripheralsSettingParam dataInfo = info.Target as PeripheralsSettingParam; Window_PeripheralsConfig winPeripheralConfig = new Window_PeripheralsConfig(dataInfo); bool? res = ShowInCenterParentWithRes(winPeripheralConfig); if (res == true) { PeripheralsSettingParam data = winPeripheralConfig.GetPeripheralConfig(); info.Execute(data); } }