Esempio n. 1
0
 public Form_Box(IWin32Window owner, ltext xltext)
 {
     // TODO: Complete member initialization
     InitializeComponent();
     this.owner = owner;
     this.caption = "";
     this.Text = "";
     xltext.Text(textBox1);
     textBox1.TextAlign = HorizontalAlignment.Center;
     button1.Visible = false;
     button2.Visible = true;
     button3.Visible = false;
     button2.Tag = DialogResult.OK;
     lngRPM.s_OK.Text(button2);
     button2.Focus();
 }
Esempio n. 2
0
        public Form_Box(IWin32Window owner, ltext xltext, string caption, MessageBoxButtons buttons, object oIcon, MessageBoxDefaultButton defaultButton)
        {
            // TODO: Complete member initialization
            InitializeComponent();
            this.owner = owner;
            this.m_buttons = buttons;
            if (oIcon is MessageBoxIcon)
            {
                Icon ico = SetIcon((MessageBoxIcon)oIcon);
                if (ico != null)
                {
                    this.Icon = ico;
                }
            }
            else if (oIcon is Icon)
            {
                this.Icon = (Icon)oIcon;
            }
            this.defaultButton = defaultButton;

            this.Text = caption;
            xltext.Text(textBox1);

            button1.Visible = false;
            button2.Visible = false;
            button3.Visible = false;

            switch (buttons)
            {
                case MessageBoxButtons.AbortRetryIgnore:
                    button1.Visible = true;
                    button1.Tag = DialogResult.Abort;
                    lngRPM.s_Abort.Text(button1);
                    button2.Visible = true;
                    button2.Tag = DialogResult.Retry;
                    lngRPM.s_Retry.Text(button2);
                    button3.Visible = true;
                    button3.Tag = DialogResult.Ignore;
                    lngRPM.s_Ignore.Text(button3);
                    break;
                case MessageBoxButtons.OK:
                    button2.Visible = true;
                    button2.Tag = DialogResult.OK;
                    lngRPM.s_OK.Text(button2);
                    break;
                case MessageBoxButtons.OKCancel:
                    button1.Visible = true;
                    button1.Tag = DialogResult.OK;
                    lngRPM.s_OK.Text(button1);
                    button2.Visible = true;
                    button2.Tag = DialogResult.Cancel;
                    lngRPM.s_Cancel.Text(button2);
                    break;
                case MessageBoxButtons.RetryCancel:
                    button1.Visible = true;
                    button1.Tag = DialogResult.Retry;
                    lngRPM.s_Retry.Text(button1);
                    button2.Visible = true;
                    button2.Tag = DialogResult.Cancel;
                    lngRPM.s_Cancel.Text(button2);
                    break;
                case MessageBoxButtons.YesNo:
                    button1.Visible = true;
                    button1.Tag = DialogResult.Yes;
                    lngRPM.s_Yes.Text(button1);
                    button2.Visible = true;
                    button2.Tag = DialogResult.No;
                    lngRPM.s_No.Text(button2);
                    break;
                case MessageBoxButtons.YesNoCancel:
                    button1.Visible = true;
                    button1.Tag = DialogResult.Yes;
                    lngRPM.s_Yes.Text(button1);
                    button2.Visible = true;
                    button2.Tag = DialogResult.No;
                    lngRPM.s_No.Text(button2);
                    button3.Visible = true;
                    button3.Tag = DialogResult.Cancel;
                    lngRPM.s_Cancel.Text(button3);
                    break;

            }
            switch (defaultButton)
            {
                case MessageBoxDefaultButton.Button1:
                    button1.Focus();
                    break;
                case MessageBoxDefaultButton.Button2:
                    button2.Focus();
                    break;
                case MessageBoxDefaultButton.Button3:
                    button3.Focus();
                    break;
            }
        }
 private void usrc_RowReferencedFromTable_List_Dialog_Load(object sender, EventArgs e)
 {
     this.Text = lngRPM.s_Warning.s;
     if (Instruction!=null)
     {
         Instruction.Text(this.lbl_Message);
     }
     else
     {
         List<object> ltext_obj_list = new List<object>();
         ltext_obj_list.Add(lngRPM.s_RowWithID);
         ltext_obj_list.Add(id.ToString());
         ltext_obj_list.Add(lngRPM.s_InTable);
         ltext_obj_list.Add(m_tbl.lngTableName.s);
         ltext_obj_list.Add(lngRPM.s_IsReferencedSeveralTimes);
         ltext_obj_list.Add("!\r\n");
         ltext_obj_list.Add(lngRPM.s_IfYouChangeThisRowThisWillAffectAllRowsThatAreReferencingIt);
         ltext_obj_list.Add("\r\n");
         ltext_obj_list.Add(lngRPM.s_BellowIsTheListOfTableReferences);
         ltext_obj_list.Add("\r\n");
         ltext_obj_list.Add(lngRPM.s_ChangeThisRowQuestion);
         ltext xInstruction = new ltext(ltext_obj_list);
         xInstruction.Text(lbl_Message);
     }
     this.btn_No.Focus();
 }