Esempio n. 1
0
 /// <summary>
 /// MButtons: Display CYButtons on the message box.
 /// </summary>
 static public DialogResult Show(string Message, string Title, CYButtons MButtons)
 {
     BuildMessageBox(Title);     // BuildMessageBox method, responsible for creating the MessageBox
     frmTitle.Text   = Title;    // Set the title of the MessageBox
     frmMessage.Text = Message;  //Set the text of the MessageBox
     ButtonStatements(MButtons); // ButtonStatements method is responsible for showing the appropreiate buttons
     newMessageBox.ShowDialog(); // Show the MessageBox as a Dialog.
     return(CYReturnButton);     // Return the button click as an Enumerator
 }
Esempio n. 2
0
    /// <summary>
    /// MIcon: Display CYIcon on the message box.
    /// </summary>
    static public DialogResult Show(string Message, string Title, CYButtons MButtons, CYIcon MIcon)
    {
        BuildMessageBox(Title);
        frmTitle.Text   = Title;
        frmMessage.Text = Message;
        ButtonStatements(MButtons);
        IconStatements(MIcon);
        Image imageIcon = new Bitmap(frmIcon.ToBitmap(), 38, 38);

        pIcon.Image = imageIcon;
        newMessageBox.ShowDialog();
        return(CYReturnButton);
    }
Esempio n. 3
0
    static private void ButtonStatements(CYButtons MButtons)
    {
        if (MButtons == CYButtons.AbortRetryIgnore)
        {
            ShowIgnoreButton();
            ShowRetryButton();
            ShowAbortButton();
        }

        if (MButtons == CYButtons.OK)
        {
            ShowOKButton();
        }

        if (MButtons == CYButtons.OKCancel)
        {
            ShowCancelButton();
            ShowOKButton();
        }

        if (MButtons == CYButtons.RetryCancel)
        {
            ShowCancelButton();
            ShowRetryButton();
        }

        if (MButtons == CYButtons.YesNo)
        {
            ShowNoButton();
            ShowYesButton();
        }

        if (MButtons == CYButtons.YesNoCancel)
        {
            ShowCancelButton();
            ShowNoButton();
            ShowYesButton();
        }

        if (MButtons == CYButtons.CancelLocateDownload)
        {
            ShowDownloadButton();
            ShowLocateButton();
            ShowCancelButton();
        }
    }
Esempio n. 4
0
        private static void ButtonStatements(CYButtons MButtons)
        {
            if (MButtons == CYButtons.AbortRetryIgnore)
            {
                ShowIgnoreButton();
                ShowRetryButton();
                ShowAbortButton();
            }

            if (MButtons == CYButtons.OK)
            {
                ShowOKButton();
            }

            if (MButtons == CYButtons.OKCancel)
            {
                ShowCancelButton();
                ShowOKButton();
            }

            if (MButtons == CYButtons.RetryCancel)
            {
                ShowCancelButton();
                ShowRetryButton();
            }

            if (MButtons == CYButtons.YesNo)
            {
                ShowNoButton();
                ShowYesButton();
            }

            if (MButtons == CYButtons.YesNoCancel)
            {
                ShowCancelButton();
                ShowNoButton();
                ShowYesButton();
            }
        }
Esempio n. 5
0
 /// <summary>
 /// MIcon: Display CYIcon on the message box.
 /// </summary>
 public static DialogResult Show(string Message, string Title, CYButtons MButtons, CYIcon MIcon)
 {
     BuildMessageBox(Title);
     //frmTitle.Text = Title;
     frmMessage.Text = Message;
     ButtonStatements(MButtons);
     IconStatements(MIcon);
     pIcon.Image = imgIcon;
     newMessageBox.ShowDialog();
     return CYReturnButton;
 }
Esempio n. 6
0
 /// <summary>
 /// MButtons: Display CYButtons on the message box.
 /// </summary>
 public static DialogResult Show(string Message, string Title, CYButtons MButtons)
 {
     BuildMessageBox(Title); // BuildMessageBox method, responsible for creating the MessageBox
     //frmTitle.Text = Title; // Set the title of the MessageBox
     frmMessage.Text = Message; //Set the text of the MessageBox
     ButtonStatements(MButtons); // ButtonStatements method is responsible for showing the appropreiate buttons
     newMessageBox.ShowDialog(); // Show the MessageBox as a Dialog.
     return CYReturnButton; // Return the button click as an Enumerator
 }
Esempio n. 7
0
 /// <summary>
 /// MIcon: Display CYIcon on the message box.
 /// </summary>
 public static DialogResult Show(IWin32Window pCtrl, string Message, string Title, CYButtons MButtons, CYIcon MIcon)
 {
     BuildMessageBox(Title);
     //frmTitle.Text = Title;
     frmMessage.Text = Message;
     ButtonStatements(MButtons);
     IconStatements(MIcon);
     pIcon.Image = imgIcon;
     newMessageBox.ShowDialog(pCtrl);
     if (btnYes == null)
         return DialogResult.OK;
     if (btnYes.Visible) btnYes.Focus();
     else if (btnRetry.Visible) btnRetry.Focus();
     return CYReturnButton;
 }