static void Main() { if (!StartChecks.StartCheck()) { return; } // initialize DPIManager BEFORE setting // the application to be DPI aware DPIManager.PreInitialize(); User32Util.SetProcessDpiAwareness(ProcessDPIAwareness.ProcessPerMonitorDPIAware); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); MainForm form = new MainForm(); DPIManager.AddForm(form); DPIManager.ForceUpdate(); Settings sform = new Settings(); DPIManager.AddForm(sform); DPIManager.ForceUpdate(); SearchDisksForm sdf = new SearchDisksForm(form); DPIManager.AddForm(sdf); DPIManager.ForceUpdate(); Application.Run(form); }
private void btnAutoSearch_Click(object sender, EventArgs e) { if (form != null) { return; } form = new SearchDisksForm(this); form.FormClosed += Form_FormClosed; form.Show(); SetUpForm(form); }
private void Form_FormClosed(object sender, FormClosedEventArgs e) { form = null; }
private void btnAutoSearch_Click(object sender, EventArgs e) { if (form != null) { return; } form = new SearchDisksForm(this); form.FormClosed += Form_FormClosed; form.Show(); SetUpForm(form); }
private void Form_FormClosed(object sender, FormClosedEventArgs e) { form = null; }