private void Save() { if ((connectionViewModel.ConnectionType != EditingInfo.ConnectionType) || (connectionViewModel.ConnectionString != EditingInfo.ConnectionString)) { if (EditingInfo.ConnectionString.IsEmptyConnectionString()) { EditingInfo.ShouldUpdateConnectionString = true; } else if (ShowMessage != null) { var args = new ShowMessageEventArgs("Would you like to save the change to the connection string?", "Save", MessageBoxButton.YesNoCancel, MessageBoxImage.Question); ShowMessage(this, args); switch (args.MessageResponse) { case MessageBoxResult.Cancel: return; case MessageBoxResult.Yes: EditingInfo.ShouldUpdateConnectionString = true; break; } } EditingInfo.ConnectionType = connectionViewModel.ConnectionType; EditingInfo.ConnectionString = connectionViewModel.ConnectionString; } EditingInfo.TableName = TableName; EditingInfo.TableColumns = new DatabaseModel.Columns(TableColumns.Select(c => c.Column)); DialogResult = true; }
private void OnShowConfirm() { var showMessageEventArgs = new ShowMessageEventArgs(); NotificationConfirm.Notify(showMessageEventArgs); Debug.WriteLine(showMessageEventArgs.MessageBoxResult); }
protected virtual void OnShowMessage(ShowMessageEventArgs e) { var handler = this.Events["ShowMessage"] as EventHandler <ShowMessageEventArgs>; if (handler != null) { handler(this, e); } }
protected virtual void OnShowMessage(ShowMessageEventArgs e) { var Handler = ShowMessage; if (Handler != null) { Handler(this, e); } }
protected virtual void OnShowMessage(ShowMessageEventArgs e) { var handler = this.Events["ShowMessage"] as EventHandler<ShowMessageEventArgs>; if (handler != null) { handler(this, e); } }
private void JSCallCS_ShowMessage(object sender, ShowMessageEventArgs e) { //MessageBox.Show(e.Message, e.Caption, e.Button, e.Icon); //_popupModel.Title = e.Caption; //_popupModel.Message = e.Message; //_popupModel.IsShowLoading = false; //_popupModel.IsShowOK = true; //LayerWeb.InvokeScript("showPopupModal", JsonConvert.SerializeObject(_popupModel)); CSCallJS.ShowMessage(LayerWeb, e.Caption, e.Message); }
private void OnExecute(CancelEventArgs e) { var showMessageEventArgs = new ShowMessageEventArgs(); ConfirmCloseWindow.Notify(showMessageEventArgs); if (showMessageEventArgs.MessageBoxResult == MessageBoxResult.Cancel) { e.Cancel = true; } }
protected virtual void RaiseFingerprintShowMessage(ShowMessageEventArgs e) { // Make a temporary copy of the event to avoid possibility of // a race condition if the last subscriber unsubscribes // immediately after the null check and before the event is raised. EventHandler <ShowMessageEventArgs> handler = OnShowMessage; // Event will be null if there are no subscribers if (handler != null) { // Use the () operator to raise the event. handler(this, e); } }
int Interface.IDocHostShowUI.ShowMessage(IntPtr hwnd, string lpstrText, string lpstrCaption, uint dwType, string lpstrHelpFile, uint dwHelpContext, ref int lpResult) { //Initially, lpResult is set 0 //S_OK API.Console.warn("ShowMessage: " + lpstrText); //Host did not display its UI. MSHTML displays its message box. var e = new ShowMessageEventArgs(lpstrText, lpstrCaption, dwType, lpstrHelpFile, dwHelpContext); this.host.OnShowMessage(e); lpResult = (e.Handled) ? (int)e.Result : 0; return(HResult.S_OK); }
int Interop.IDocHostShowUI.ShowMessage(IntPtr hwnd, string lpStrText, string lpstrCaption, uint dwType, string lpStrHelpFile, uint dwHelpContext, out uint lpresult) { // dwType 48 == Alert() // 33 == confirm() lpresult = (uint)Interop.MBID.OK; ShowMessageEventArgs e = new ShowMessageEventArgs(lpStrText, lpstrCaption, dwType); ((HtmlWindow)htmlEditor.Window).OnScriptMessage(e); if (e.Cancel) { return(Interop.S_OK); } else { return(Interop.S_FALSE); } }
private void OnShowMessage(object sender, ShowMessageEventArgs e) => _ui.ShowMessage(e.message, e.type);
int IDocHostShowUI.ShowMessage(IntPtr hwnd, string lpstrText, string lpstrCaption, uint dwType, string lpstrHelpFile, uint dwHelpContext, ref int lpResult) { //Initially //lpResult is set 0 //S_OK API.Console.warn("ShowMessage: " + lpstrCaption); //Host did not display its UI. MSHTML displays its message box. var e = new ShowMessageEventArgs(lpstrText, lpstrCaption, dwType, lpstrHelpFile, dwHelpContext); this.host.OnShowMessage(e); lpResult = (e.Handled) ? e.Result : 0; return Hresults.S_OK; }
public void OnShowMessage(ShowMessageEventArgs eventArgs) { ShowMessage?.Invoke(this, eventArgs); }
private void model_ShowMessage(object sender, ShowMessageEventArgs args) { args.MessageResponse = MessageBox.Show(this, args.Text, args.Caption, args.Options, args.MessageType); }
void ViewModel_ShowMessage(object sender, ShowMessageEventArgs e) { MessageBox.Show(e.Message, "Some caption", MessageBoxButton.OK); }
/// <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 OnShowMessage(Object sender, ShowMessageEventArgs e) { var bar = this.SupportActionBar; var ft = this.SupportFragmentManager.BeginTransaction (); bar.SetDisplayHomeAsUpEnabled (false); ft.SetTransition (FragmentTransaction.TransitNone); ft.Replace (Resource.Id.fragment, new ScreenDialog (engine, e.Text, e.Media, e.ButtonLabel1, e.ButtonLabel2, e.Callback)); ft.Commit (); }