private void OpenTaskForm() { if (task_form == null || task_form.IsDisposed) { task_form = new TaskForm(); } task_form.Reset(); if (!task_form.Visible) { task_form.Show(this); } task_form.OnCancel = DoTaskCancel; task_form.CanClose = false; task_form.Focus(); task_form.Select(); this.Enabled = false; }
private void CloseTaskForm() { this.Enabled = true; this.Refresh(); //var ds = bsPrograms.DataSource; //bsPrograms.DataSource = null; //bsPrograms.DataSource = ds; dgvPrograms.Refresh(); if (task_form == null) { return; } if (task_form.IsDisposed) { task_form = null; } task_form.CanClose = true; if (task_form.Visible) { //task_form.Close(); } }
private void CloseTaskForm() { this.Enabled = true; this.Refresh(); //var ds = bsPrograms.DataSource; //bsPrograms.DataSource = null; //bsPrograms.DataSource = ds; dgvPrograms.Refresh(); if (task_form == null) return; if (task_form.IsDisposed) task_form = null; task_form.CanClose = true; if(task_form.Visible) { //task_form.Close(); } }
private void OpenTaskForm() { if (task_form == null || task_form.IsDisposed) task_form = new TaskForm(); task_form.Reset(); if (!task_form.Visible) task_form.Show(this); task_form.OnCancel = DoTaskCancel; task_form.CanClose = false; task_form.Focus(); task_form.Select(); this.Enabled = false; }