Exemplo n.º 1
0
        //public static string GetString(string title)
        //{
        //    var box = new DialogMessageBox { Text = title };

        //    if (box.ShowDialog() == DialogResult.OK)
        //    {
        //        return box.ResultText;
        //    }

        //    return string.Empty;
        //}

        //private void okButton_Click(object sender, EventArgs e)
        //{
        //    this.ResultText = txtUserInput.Text;
        //    this.DialogResult = DialogResult.OK;
        //}

        public static string ShowBox(string txtMessage)
        {
            newMessageBox = new DialogPasswordBox();
            newMessageBox.labelControl1.Text = txtMessage;
            newMessageBox.ShowDialog();
            return(Button_id);
        }
Exemplo n.º 2
0
 public static DialogResult ShowBox(string txtMessage, string caption, string btnOk, string btnCancel)
 {
     newMessageBox = new DialogPasswordBox();
     newMessageBox.labelControl1.Text = caption;
     //   newMessageBox.labelControl2.Text = txtMessage;
     //   newMessageBox.simpleButton1.Text = btnOk;
     //   newMessageBox.simpleButton2.Text = btnCancel;
     return(newMessageBox.ShowDialog());
     //return Button_id;
 }
Exemplo n.º 3
0
        public static DialogResult ShowBox(string txtMessage, string caption, string btnOk)
        {
            newMessageBox = new DialogPasswordBox();
            newMessageBox.labelControl1.Text = caption;
            //  newMessageBox.labelControl2.Text = txtMessage;
            //  newMessageBox.simpleButton1.Text = btnOk;

            // newMessageBox.simpleButton1.Left = newMessageBox.simpleButton2.Left;//(newMessageBox.Width - newMessageBox.simpleButton1.Width) / 2;
            //newMessageBox.simpleButton1.Top = (newMessageBox.Height - newMessageBox.simpleButton1.Height) / 2;
            // newMessageBox.simpleButton2.Visible = false;
            return(newMessageBox.ShowDialog());
            //return Button_id;
        }