示例#1
0
 private void NewKitFrm_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (bwDelete.IsBusy)
     {
         bwDelete.CancelAsync();
     }
     if (bwSave.IsBusy)
     {
         bwSave.CancelAsync();
     }
     if (bwNewKitAutosomalJob.IsBusy)
     {
         bwNewKitAutosomalJob.CancelAsync();
     }
     if (bwNewKitYDNAJob.IsBusy)
     {
         bwNewKitYDNAJob.CancelAsync();
     }
     if (bwPopuate.IsBusy)
     {
         bwPopuate.CancelAsync();
     }
     GGKUtilLib.disableSave();
     GGKUtilLib.disable_DisableKitToolbarBtn();
     GGKUtilLib.disable_EnableKitToolbarBtn();
     GGKUtilLib.disableDeleteKitToolbarBtn();
     GGKUtilLib.setStatus("Done.");
 }
示例#2
0
 private void QuickEditKit_FormClosing(object sender, FormClosingEventArgs e)
 {
     GGKUtilLib.disableSave();
     GGKUtilLib.disableDeleteKitToolbarBtn();
     GGKUtilLib.disable_DisableKitToolbarBtn();
     GGKUtilLib.disable_EnableKitToolbarBtn();
 }
 private void populateForm(string kit)
 {
     string[] data = settings[kit];
     tbKey.Text           = kit;
     tbValue.Text         = data[0];
     tbDesc.Text          = data[1];
     lblLastModified.Text = "Last Modified on " + data[3];
     if (data[2] == "1")
     {
         tbValue.ReadOnly        = true;
         btnResetDefault.Enabled = false;
         GGKUtilLib.disableSave();
     }
     else
     {
         tbValue.ReadOnly        = false;
         btnResetDefault.Enabled = true;
         GGKUtilLib.enableSave();
     }
 }
示例#4
0
        private void doControlActivities(bool disabled)
        {
            if (disabled)
            {
                GGKUtilLib.enable_EnableKitToolbarBtn();
                GGKUtilLib.disable_DisableKitToolbarBtn();
                GGKUtilLib.enableDeleteKitToolbarBtn();
                GGKUtilLib.disableSave();

                txtName.ReadOnly = true;
                dataGridViewAutosomal.ReadOnly = true;
                textBoxYDNA.ReadOnly           = true;
                dgvy12.ReadOnly       = true;
                dgvy25.ReadOnly       = true;
                dgvy37.ReadOnly       = true;
                dgvy67.ReadOnly       = true;
                dgvy111.ReadOnly      = true;
                dgvymisc.ReadOnly     = true;
                textBoxMtDNA.ReadOnly = true;
            }
            else
            {
                GGKUtilLib.disable_EnableKitToolbarBtn();
                GGKUtilLib.enable_DisableKitToolbarBtn();
                GGKUtilLib.enableDeleteKitToolbarBtn();
                GGKUtilLib.enableSave();

                txtName.ReadOnly = false;
                dataGridViewAutosomal.ReadOnly = false;
                textBoxYDNA.ReadOnly           = false;
                dgvy12.ReadOnly       = false;
                dgvy25.ReadOnly       = false;
                dgvy37.ReadOnly       = false;
                dgvy67.ReadOnly       = false;
                dgvy111.ReadOnly      = false;
                dgvymisc.ReadOnly     = false;
                textBoxMtDNA.ReadOnly = false;
            }
        }
示例#5
0
        public void Save()
        {
            bool err = false;

            if (txtKit.Text.Trim() == "")
            {
                errorProvider1.SetError(txtKit, "Must provide a Kit Number. If you don't have one, just enter anything unique to this kit. e.g, KIT01");
                err = true;
            }
            else
            {
                errorProvider1.SetError(txtKit, "");
            }

            if (txtName.Text.Trim() == "")
            {
                errorProvider1.SetError(txtName, "Must provide a name.");
                err = true;
            }
            else
            {
                errorProvider1.SetError(txtName, "");
            }


            if (err)
            {
                return;
            }

            Object[] args = new Object[] { txtKit.Text, txtName.Text, dataGridViewAutosomal.Rows, textBoxYDNA.Text, textBoxMtDNA.Text, new DataGridViewRowCollection[] { dgvy12.Rows, dgvy25.Rows, dgvy37.Rows, dgvy67.Rows, dgvy111.Rows, dgvymisc.Rows }, cbSex.Text, tbFASTA.Text };
            GGKUtilLib.disableSave();
            GGKUtilLib.setStatus("Saving ...");
            this.Enabled = false;
            GGKUtilLib.disableMenu();
            GGKUtilLib.disableToolbar();
            bwSave.RunWorkerAsync(args);
        }
 private void OneToOneCmpFrm_FormClosing(object sender, FormClosingEventArgs e)
 {
     GGKUtilLib.disableSave();
 }
 private void SettingsFrm_FormClosing(object sender, FormClosingEventArgs e)
 {
     GGKUtilLib.disableSave();
 }