Example #1
0
 public static MessageBoxOptions GetMessageBoxOptions(Control owner)
 {
     if (owner != null && owner.RightToLeft == RightToLeft.Yes)
     {
         return(MessageBoxOptions.RightAlign | MessageBoxOptions.RtlReading);
     }
     return(GlobalizationHelper.GetMessageBoxOptions());
 }
 private void textBoxPrecision_TextChanged(object sender, EventArgs e)
 {
     if (this.textBoxPrecision.Text.Length >= 1 && !char.IsDigit(this.textBoxPrecision.Text[0]))
     {
         MessageBox.Show(this, SR.LabelFormatPrecisionMsg, SR.LabelFormatPrecisionMsgCaption, MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1, GlobalizationHelper.GetMessageBoxOptions(this));
         this.textBoxPrecision.Text = string.Empty;
     }
     else if (this.textBoxPrecision.Text.Length >= 2 && (!char.IsDigit(this.textBoxPrecision.Text[0]) || !char.IsDigit(this.textBoxPrecision.Text[1])))
     {
         MessageBox.Show(this, SR.LabelFormatPrecisionMsg, SR.LabelFormatPrecisionMsgCaption, MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1, GlobalizationHelper.GetMessageBoxOptions(this));
         this.textBoxPrecision.Text = string.Empty;
     }
     this.UpdateNumericSample();
 }