Пример #1
0
 private DialogResult showSafeInteractionDialog(interactionButtons Buttons, string Title, string Message)
 {
     onInterfaceInteraction(new applyUpdateInterfaceInteractionEventArgs(ProgressBarState.Pause));
     using (var dlg = new interactionDialog(Buttons, Title, Message)) {
         dlg.Text = m_config.ServerConfiguration.applicationName;
         DialogResult result = dlg.ShowDialog(ownerForm);
         onInterfaceInteraction(new applyUpdateInterfaceInteractionEventArgs(ProgressBarState.Normal));
         return(result);
     }
 }
        public interactionDialog(interactionButtons buttons, string Title, string Message)
        {
            InitializeComponent();
            base.Font = SystemFonts.MessageBoxFont;

            lblTitle.Text   = Title;
            lblMessage.Text = Message;

            SetClientSizeCore(ClientRectangle.Width, (12 + lblTitle.Height + 10 + lblMessage.Height + 12 + flpBottom.Height));
            lblMessage.Location = new Point(lblMessage.Location.X, (12 + lblTitle.Height + 10));

            switch (buttons)
            {
            case interactionButtons.Close:
                btnCancel.Hide();
                btnOk.Text           = Language.GetString("general_button_close");
                imgInformation.Image = SystemIcons.Information.ToBitmap();
                ControlBox           = true;
                break;

            case interactionButtons.OkCancel:
                btnCancel.Text       = Language.GetString("general_button_cancel");
                btnOk.Text           = Language.GetString("general_button_ok");
                imgInformation.Image = SystemIcons.Question.ToBitmap();
                break;

            case interactionButtons.YesNo_1:                     //Abbruch bei Ja
                btnCancel.Text         = Language.GetString("general_button_no");
                btnOk.Text             = Language.GetString("general_button_yes");
                btnOk.DialogResult     = DialogResult.Cancel;
                btnCancel.DialogResult = DialogResult.OK;
                CancelButton           = btnOk;
                AcceptButton           = btnCancel;
                imgInformation.Image   = SystemIcons.Question.ToBitmap();
                break;

            case interactionButtons.YesNo_2:                     //Abbruch bei Nein
                btnCancel.Text       = Language.GetString("general_button_no");
                btnOk.Text           = Language.GetString("general_button_yes");
                imgInformation.Image = SystemIcons.Question.ToBitmap();
                break;
            }
        }
Пример #3
0
		public interactionDialog(interactionButtons buttons, string Title, string Message) {
			InitializeComponent();
			base.Font = SystemFonts.MessageBoxFont;

			lblTitle.Text = Title;
			lblMessage.Text = Message;

			SetClientSizeCore(ClientRectangle.Width, (12 + lblTitle.Height + 10 + lblMessage.Height + 12 + flpBottom.Height));
			lblMessage.Location = new Point(lblMessage.Location.X, (12 + lblTitle.Height + 10));

			switch (buttons) {
				case interactionButtons.Close:
					btnCancel.Hide();
					btnOk.Text = Language.GetString("general_button_close");
					imgInformation.Image = SystemIcons.Information.ToBitmap();
					ControlBox = true;
					break;
				case interactionButtons.OkCancel:
					btnCancel.Text = Language.GetString("general_button_cancel");
					btnOk.Text = Language.GetString("general_button_ok");
					imgInformation.Image = SystemIcons.Question.ToBitmap();
					break;
				case interactionButtons.YesNo_1: //Abbruch bei Ja
					btnCancel.Text = Language.GetString("general_button_no");
					btnOk.Text = Language.GetString("general_button_yes");
					btnOk.DialogResult = DialogResult.Cancel;
					btnCancel.DialogResult = DialogResult.OK;
					CancelButton = btnOk;
					AcceptButton = btnCancel;
					imgInformation.Image = SystemIcons.Question.ToBitmap();
					break;
				case interactionButtons.YesNo_2: //Abbruch bei Nein
					btnCancel.Text = Language.GetString("general_button_no");
					btnOk.Text = Language.GetString("general_button_yes");
					imgInformation.Image = SystemIcons.Question.ToBitmap();
					break;
			}
		}
Пример #4
0
 /// <summary>
 /// Zeigt einen Informationsdialog an.
 /// </summary>
 /// <param name="Buttons">Die Schaltflächen die auf dem Dialog angezeigt werden soll.</param>
 /// <param name="Title">Der Titel des Dialogs.</param>
 /// <param name="Message">Der Nachrichteninhalt.</param>
 /// <returns>Gibt das vom Benutzer ausgewählte Dialogresult zurück.</returns>
 protected DialogResult showInteractionDialog(interactionButtons Buttons, string Title, string Message)
 {
     return
         ((DialogResult)
          ownerForm.Invoke(new delShowInteractionDialog(showSafeInteractionDialog), new object[] { Buttons, Title, Message }));
 }
Пример #5
0
		/// <summary>
		/// Zeigt einen Informationsdialog an.
		/// </summary>
		/// <param name="Buttons">Die Schaltflächen die auf dem Dialog angezeigt werden soll.</param>
		/// <param name="Title">Der Titel des Dialogs.</param>
		/// <param name="Message">Der Nachrichteninhalt.</param>
		/// <returns>Gibt das vom Benutzer ausgewählte Dialogresult zurück.</returns>
		protected DialogResult showInteractionDialog(interactionButtons Buttons, string Title, string Message) {
			return
				(DialogResult)
				ownerForm.Invoke(new delShowInteractionDialog(showSafeInteractionDialog), new object[] {Buttons, Title, Message});
		}
Пример #6
0
		private DialogResult showSafeInteractionDialog(interactionButtons Buttons, string Title, string Message) {
			onInterfaceInteraction(new applyUpdateInterfaceInteractionEventArgs(ProgressBarState.Pause));
			using (var dlg = new interactionDialog(Buttons, Title, Message)) {
				dlg.Text = m_config.ServerConfiguration.applicationName;
				DialogResult result = dlg.ShowDialog(ownerForm);
				onInterfaceInteraction(new applyUpdateInterfaceInteractionEventArgs(ProgressBarState.Normal));
				return result;
			}
		}