protected void DeteleButton_Click(object sender, MessageBoxEventArgs e) { if (UserControl_DeteleButton_Click != null) { UserControl_DeteleButton_Click(sender, e); } }
private void ShowMessageBox(MessageBoxEventArgs args) { MessageBoxButton buttons; MessageBoxImage image; switch (args.Type) { case MessageBoxType.Information: buttons = MessageBoxButton.OK; image = MessageBoxImage.Information; break; case MessageBoxType.Warning: buttons = MessageBoxButton.OK; image = MessageBoxImage.Warning; break; case MessageBoxType.Error: buttons = MessageBoxButton.OK; image = MessageBoxImage.Error; break; case MessageBoxType.Question: buttons = MessageBoxButton.YesNo; image = MessageBoxImage.Question; break; default: throw new ArgumentOutOfRangeException(); } // TODO return ButtonResult? _dialogService.ShowMessageBox(args.Message, buttons, image, result => args.Callback?.Invoke(result == ButtonResult.OK || result == ButtonResult.Yes)); }
public void OnActionMenu(MessageBoxEventArgs e) { if (ActionMenu != null) { ActionMenu(this, e); } }
public void OnActionNext(MessageBoxEventArgs e) { if (ActionNext != null) { ActionNext(this, e); } }
private void RestartController(Object sender, MessageBoxEventArgs e) { if (e.DialogResult == DialogResult.Yes) { this.rwSystem.Controller.Restart(); } //ErrorHandler.AddErrorMessage("MichaelLog",string.Format("{0},{1},{2}",e.ButtonText,e.DialogResult,e.State)); }
private void OnMessageBoxRequest(object sender, MessageBoxEventArgs e) { MessageBoxResult r = MessageBox.Show(e.MessageBoxText, e.Caption, e.MessageBoxButton, e.MessageBoxImage); if (e.ResultAction != null) { e.ResultAction(r); } }
private void _controller_ConfirmAction(object sender, MessageBoxEventArgs e) { if (_controller.CheckModifications()) { if (MessageBox.Show("You currently have unsaved changes. " + e.Message, "保存されてないぞ!", MessageBoxButtons.OKCancel) != DialogResult.OK) { e.Cancel = true; } } }
private void ViewModel_MessageBoxRequest(object sender, MessageBoxEventArgs e) { MessageBoxEx msgBox = new MessageBoxEx() { Owner = this }; MessageBoxExViewModel vm = msgBox.ViewModel as MessageBoxExViewModel; vm.Title = e.Title; vm.Text = e.Text; vm.Buttons = e.Buttons; vm.Icon = e.Icon; msgBox.ShowDialog(); e.Callback?.Invoke(vm.Result); }
protected void DeteleButton_Click(object sender, MessageBoxEventArgs e) { if (e.Result == MessageBoxResult.Yes) { if (!AuthorizationRules.TemplateResolution(ActionType.delete, Session["SystemUser.objID"].ToString(), Frame.TemplateList.SelectedDataKey["objID"].ToString())) { Frame.WarningMessageBox.Show(); return; } Frame.TemplateListSource.Delete(); Frame.TemplateList.ClearSelection(); EnableItems(false); } }
/// <summary> /// Show message e.Text with media e.Media to player. /// </summary> /// <param name="sender">Sender.</param> /// <param name="e">Event arguments.</param> public void OnShowMessageBox(Object sender, MessageBoxEventArgs args) { var bar = SupportActionBar; var ft = this.SupportFragmentManager.BeginTransaction(); var activeFragment = this.SupportFragmentManager.FindFragmentByTag("active"); // There could be only one dialog on screen if (screenStack.Peek() is GameDialogScreen) { screenStack.Pop(); } // Now push new dialog to screen screenStack.Push(new GameDialogScreen(args.Descriptor)); bar.SetDisplayHomeAsUpEnabled(false); ft.SetTransition(global::Android.Support.V4.App.FragmentTransaction.TransitNone); ft.Replace(Resource.Id.fragment, screenStack.Peek(), "active"); ft.Commit(); }
private void Service_RequestConfirmCloseMessageDialog(object sender, MessageBoxEventArgs e) { System.Windows.MessageBoxResult result = MessageBox.Show(e.Message, e.Title, MessageBoxButton.YesNoCancel, MessageBoxImage.Information); switch (result) { case System.Windows.MessageBoxResult.Yes: e.Result = MessageBoxResult.Yes; break; case System.Windows.MessageBoxResult.No: e.Result = MessageBoxResult.No; break; case System.Windows.MessageBoxResult.Cancel: e.Result = MessageBoxResult.Cancel; break; default: e.Result = MessageBoxResult.None; break; } }
private void Core_MessageBoxRequested(object sender, MessageBoxEventArgs e) { // Displays the message box. ShowMessageBox(e.Descriptor); }
protected void OnMessageBoxRequested(MessageBoxEventArgs e) { MessageBoxRequested?.Invoke(this, e); }
private void MessageBoxRequested(object sender, MessageBoxEventArgs e) { e.Show(this); }
private void Document_RequestConfirmCloseMessageDialog(object sender, MessageBoxEventArgs e) { var service = FileDocumentDialogService.GetService("Kucl.Test.Wpf"); service.RaiseRequestConfirmCloseMessageDialog(e); }
/// <summary> /// Show message e.Text with media e.Media to player. /// </summary> /// <param name="sender">Sender.</param> /// <param name="e">Event arguments.</param> public void OnShowMessageBox(Object sender, MessageBoxEventArgs args) { var bar = SupportActionBar; var ft = this.SupportFragmentManager.BeginTransaction (); var activeFragment = this.SupportFragmentManager.FindFragmentByTag("active"); bar.SetDisplayHomeAsUpEnabled (false); ft.SetTransition (global::Android.Support.V4.App.FragmentTransaction.TransitNone); ft.Replace (Resource.Id.fragment, new ScreenDialog (args.Descriptor), "active"); ft.Commit (); // Delete last fragment // if (activeFragment != null) // activeFragment.Dispose(); }
/// <summary> /// Raises the show message box event. /// </summary> /// <param name="sender">Sender of event.</param> /// <param name="args">Message box event arguments.</param> public void OnShowMessageBox(object sender, MessageBoxEventArgs args) { this.ShowScreen(ScreenType.Dialog, args); }
public MessageBox(MessageBoxEventArgs args) { this.args = args; InitializeComponent(); }
public void ShowMessageBox(MessageBoxEventArgs e) { MessageBoxRequest?.Invoke(this, e); }
private void ViewModelOnRequestMessageBox(object sender, MessageBoxEventArgs e) { e.Result = MessageBox.Show(this, e.Text, e.Title, e.Buttons, e.Icon); e.Handled = true; }
/// <summary> /// Show message e.Text with media e.Media to player. /// </summary> /// <param name="sender">Sender.</param> /// <param name="e">Event arguments.</param> public void OnShowMessageBox(Object sender, MessageBoxEventArgs args) { var bar = SupportActionBar; var ft = this.SupportFragmentManager.BeginTransaction (); var activeFragment = this.SupportFragmentManager.FindFragmentByTag("active"); // There could be only one dialog on screen if (screenStack.Peek() is GameDialogScreen) screenStack.Pop(); // Now push new dialog to screen screenStack.Push(new GameDialogScreen (args.Descriptor)); bar.SetDisplayHomeAsUpEnabled (false); ft.SetTransition (global::Android.Support.V4.App.FragmentTransaction.TransitNone); ft.Replace (Resource.Id.fragment, screenStack.Peek(), "active"); ft.Commit (); }
public static void InvokeMessageBoxEvent(MessageBoxEventArgs args) { MessageBoxEvent?.Invoke(args); }
void MessageBox_ShowMessageBox(object sender, MessageBoxEventArgs e) { var window = new MessageBox(e) { Owner = Application.Current.MainWindow }; window.ShowDialog(); }
private void ViewModel_MessageBoxRequest(object sender, MessageBoxEventArgs e) { e.Show(this); }
private void MainWindow_MessageBoxRequest(object sender, MessageBoxEventArgs e) { e.Show(); }
private void EventSink_MessageBoxEvent(MessageBoxEventArgs args) { ClientManager.Post(() => ActivatePanelWithMessage(args.Message)); }
void MessageBoxRequest(object sender, MessageBoxEventArgs e) { e.Show(); }
public void OnShowMessageBox(Object sender, MessageBoxEventArgs args) { ShowScreen(ScreenType.Dialog, args); }