예제 #1
0
        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;
        }
예제 #2
0
        private void OnShowConfirm()
        {
            var showMessageEventArgs = new ShowMessageEventArgs();

            NotificationConfirm.Notify(showMessageEventArgs);
            Debug.WriteLine(showMessageEventArgs.MessageBoxResult);
        }
예제 #3
0
        protected virtual void OnShowMessage(ShowMessageEventArgs e)
        {
            var handler = this.Events["ShowMessage"] as EventHandler <ShowMessageEventArgs>;

            if (handler != null)
            {
                handler(this, e);
            }
        }
예제 #4
0
파일: Profile.cs 프로젝트: Hunv/beRemote
        protected virtual void OnShowMessage(ShowMessageEventArgs e)
        {
            var Handler = ShowMessage;

            if (Handler != null)
            {
                Handler(this, e);
            }
        }
예제 #5
0
        protected virtual void OnShowMessage(ShowMessageEventArgs e)
        {
            var handler = this.Events["ShowMessage"] as EventHandler<ShowMessageEventArgs>;

            if (handler != null)
            {
                handler(this, e);
            }
        }
예제 #6
0
 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);
 }
예제 #7
0
        private void OnExecute(CancelEventArgs e)
        {
            var showMessageEventArgs = new ShowMessageEventArgs();

            ConfirmCloseWindow.Notify(showMessageEventArgs);
            if (showMessageEventArgs.MessageBoxResult == MessageBoxResult.Cancel)
            {
                e.Cancel = true;
            }
        }
예제 #8
0
        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);
            }
        }
예제 #9
0
            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);
            }
예제 #10
0
        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);
            }
        }
예제 #11
0
 private void OnShowMessage(object sender, ShowMessageEventArgs e) => _ui.ShowMessage(e.message, e.type);
예제 #12
0
            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;
            }
예제 #13
0
 public void OnShowMessage(ShowMessageEventArgs eventArgs)
 {
     ShowMessage?.Invoke(this, eventArgs);
 }
예제 #14
0
 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);
 }
예제 #16
0
		/// <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 ();
		}