public BvForm() { StoredAutoScaleFactor = new SizeF(1, 1); InitializeComponent(); KeyDown += BaseForm_KeyDown; KeyPreview = true; RtlHelper.SetRTL(this); }
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); }
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); }