示例#1
0
        public BvForm()
        {
            StoredAutoScaleFactor = new SizeF(1, 1);

            InitializeComponent();
            KeyDown   += BaseForm_KeyDown;
            KeyPreview = true;
            RtlHelper.SetRTL(this);
        }
示例#2
0
 private void Init()
 {
     btnOk.Text             = BvMessages.Get("strOK_Id");
     btnOk.DialogResult     = System.Windows.Forms.DialogResult.OK;
     btnCancel.Text         = BvMessages.Get("strCancel_Id");
     btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
     LayoutCorrector.ApplySystemFont(this);
     if (BaseFormManager.MainForm != null)
     {
         this.Icon = BaseFormManager.MainForm.Icon;
     }
     RtlHelper.SetRTL(this);
 }
示例#3
0
        private static ErrorForm Create(Form owner, string msg, FormType fType, string detailError = null)
        {
            if (owner == null)
            {
                owner = ActiveForm;
            }
            var f = new ErrorForm
            {
                ErrorText = msg,
                Type      = fType
            };

            //f.cmdDetail.Visible = !string.IsNullOrEmpty(detailError);
            if (!string.IsNullOrEmpty(detailError))
            {
                f.FullErrorText = detailError;
            }
            //f.cmdDetail_Click(null, EventArgs.Empty);
            f.StartPosition = owner != null ? FormStartPosition.CenterParent : FormStartPosition.CenterScreen;
            RtlHelper.SetRTL(f);
            return(f);
        }