private Settings settings; // настройки приложения #endregion Fields #region Constructors /// <summary> /// Конструктор /// </summary> public FrmMain() { InitializeComponent(); allNodes = new List<TreeNode>(); preventDblClick = false; frmReplace = null; }
private FrmReplace frmReplace; // форма замены /// <summary> /// Конструктор /// </summary> public FrmMain() { InitializeComponent(); allNodes = new List <TreeNode>(); preventDblClick = false; frmReplace = null; }
private void miEditReplace_Click(object sender, EventArgs e) { if (frmReplace == null || !frmReplace.Visible) { frmReplace = new FrmReplace(); frmReplace.FrmTable = winControl.ActiveForm as FrmTable; // display of the replacement form in the center relative to the main form // FormStartPosition = CenterParent only works for modal forms. frmReplace.Left = (Left + Right - frmReplace.Width) / 2; frmReplace.Top = (Top + Bottom - frmReplace.Height) / 2; frmReplace.Show(this); } else { frmReplace.Activate(); } }
private void miEditReplace_Click(object sender, EventArgs e) { if (frmReplace == null || !frmReplace.Visible) { frmReplace = new FrmReplace(); frmReplace.FrmTable = winControl.ActiveForm as FrmTable; // отображение формы замены по центру относительно главной формы // FormStartPosition = CenterParent работает только для модальных форм frmReplace.Left = (Left + Right - frmReplace.Width) / 2; frmReplace.Top = (Top + Bottom - frmReplace.Height) / 2; frmReplace.Show(this); } else { frmReplace.Activate(); } }