Beispiel #1
0
 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;
 }
Beispiel #2
0
 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();
     }
 }
Beispiel #3
0
 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();
     }
 }
Beispiel #4
0
 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;
 }