Esempio n. 1
0
        public void AlertCheck(nsIDOMWindow aParent, string aDialogTitle, string aText, string aCheckMsg, ref bool aCheckState)
        {
            ConfirmDialog dialog = new ConfirmDialog(aText, aDialogTitle, "OK", null, null, aCheckMsg);

            dialog.ShowDialog();

            aCheckState = dialog.CheckBoxChecked;
        }
Esempio n. 2
0
		public void AlertCheck(nsIDOMWindow aParent, string aDialogTitle, string aText, string aCheckMsg, ref bool aCheckState)
		{
			ConfirmDialog dialog = new ConfirmDialog(aText, aDialogTitle, "OK", null, null, aCheckMsg);
			
			dialog.ShowDialog();
			
			aCheckState = dialog.CheckBoxChecked;
		}
Esempio n. 3
0
 public bool ConfirmCheck(nsIDOMWindow aParent, string aDialogTitle, string aText, string aCheckMsg, ref bool aCheckState)
 {
     using (ConfirmDialog dialog = new ConfirmDialog(aText, aDialogTitle, "OK", "Cancel", null, aCheckMsg))
     {
         DialogResult result = dialog.ShowDialog();
         aCheckState = dialog.CheckBoxChecked;
         return(result == (DialogResult)1);
     }
 }
Esempio n. 4
0
 public bool ConfirmCheck(nsIDOMWindow aParent, string aDialogTitle, string aText, string aCheckMsg, ref bool aCheckState)
 {
     using (ConfirmDialog dialog = new ConfirmDialog(aText, aDialogTitle, "OK", "Cancel", null, aCheckMsg))
     {
         DialogResult result = dialog.ShowDialog();
         aCheckState = dialog.CheckBoxChecked;
         return (result == (DialogResult)1);
     }
 }
Esempio n. 5
0
        public int ConfirmEx(nsIDOMWindow aParent, string aDialogTitle, string aText, uint aButtonFlags, string aButton0Title, string aButton1Title, string aButton2Title, string aCheckMsg, out bool aCheckState)
        {
            string [] buttons = new String[3];
            string [] titles  = { aButton0Title, aButton1Title, aButton2Title };

            for (int i = 0; i < 3; i++)
            {
                uint flags = (aButtonFlags >> (i * 8)) & 0xFF;
                switch (flags)
                {
                case nsIPromptServiceConstants.BUTTON_TITLE_CANCEL: buttons[i] = "Cancel"; break;

                case nsIPromptServiceConstants.BUTTON_TITLE_DONT_SAVE: buttons[i] = "&Don't Save"; break;

                case nsIPromptServiceConstants.BUTTON_TITLE_NO: buttons[i] = "No"; break;

                case nsIPromptServiceConstants.BUTTON_TITLE_OK: buttons[i] = "OK"; break;

                case nsIPromptServiceConstants.BUTTON_TITLE_REVERT: buttons[i] = "&Revert"; break;

                case nsIPromptServiceConstants.BUTTON_TITLE_SAVE: buttons[i] = "&Save"; break;

                case nsIPromptServiceConstants.BUTTON_TITLE_YES: buttons[i] = "Yes"; break;

                case nsIPromptServiceConstants.BUTTON_TITLE_IS_STRING:
                    buttons[i] = titles[i];
                    break;
                }
            }

            using (ConfirmDialog dialog = new ConfirmDialog(aText, aDialogTitle, buttons[0], buttons[1], buttons[2], aCheckMsg))
            {
                DialogResult result = dialog.ShowDialog();
                aCheckState = dialog.CheckBoxChecked;
                if (result == (DialogResult)1)
                {
                    return(0);
                }
                else
                if (result == (DialogResult)2)
                {
                    return(1);
                }
                else
                if (result == (DialogResult)3)
                {
                    return(2);
                }
            }

            return(0);
        }
Esempio n. 6
0
		public int ConfirmEx(nsIDOMWindow aParent, string aDialogTitle, string aText, uint aButtonFlags, string aButton0Title, string aButton1Title, string aButton2Title, string aCheckMsg, out bool aCheckState)
		{
			string [] buttons = new String[3];
			string [] titles = { aButton0Title, aButton1Title, aButton2Title };
			
			for (int i = 0; i < 3; i++)
			{
				uint flags = (aButtonFlags >> (i * 8)) & 0xFF;
				switch (flags)
				{
					case nsIPromptServiceConstants.BUTTON_TITLE_CANCEL: buttons[i] = "Cancel"; break;
					case nsIPromptServiceConstants.BUTTON_TITLE_DONT_SAVE: buttons[i] = "&Don't Save"; break;
					case nsIPromptServiceConstants.BUTTON_TITLE_NO: buttons[i] = "No"; break;
					case nsIPromptServiceConstants.BUTTON_TITLE_OK: buttons[i] = "OK"; break;
					case nsIPromptServiceConstants.BUTTON_TITLE_REVERT: buttons[i] = "&Revert"; break;
					case nsIPromptServiceConstants.BUTTON_TITLE_SAVE: buttons[i] = "&Save"; break;
					case nsIPromptServiceConstants.BUTTON_TITLE_YES: buttons[i] = "Yes"; break;
					case nsIPromptServiceConstants.BUTTON_TITLE_IS_STRING:
						buttons[i] = titles[i];
						break;
				}
			}
			
			ConfirmDialog dialog = new ConfirmDialog(aText, aDialogTitle, buttons[0], buttons[1], buttons[2], aCheckMsg);
			
			DialogResult result = dialog.ShowDialog();
			
			aCheckState = dialog.CheckBoxChecked;
			
			if (result == (DialogResult)1)
				return 0;
			else if (result == (DialogResult)2)
				return 1;
			else if (result == (DialogResult)3)
				return 2;
			
			return 0;
		}
Esempio n. 7
0
		public void ShowNonBlockingAlert(nsIDOMWindow aParent, string aDialogTitle, string aText)
		{
		      ConfirmDialog dialog = new ConfirmDialog(aText, aDialogTitle, "OK", null, null, null);
		      dialog.Show();
		}
Esempio n. 8
0
        public void ShowNonBlockingAlert(nsIDOMWindow aParent, string aDialogTitle, string aText)
        {
            ConfirmDialog dialog = new ConfirmDialog(aText, aDialogTitle, "OK", null, null, null);

            dialog.Show();
        }