Example #1
0
        private void menu_newagfile_Click(object sender, EventArgs e)
        {
            FormChipEditorSettings frm_chipeditorsettings = new FormChipEditorSettings();

            frm_chipeditorsettings.NewChipSettingsUpdated += new FormChipEditorSettings.NewChipSettingsUpdateHandler(frm_chipeditorsettings_Updated);
            frm_chipeditorsettings.ShowDialog();
        }
Example #2
0
        private void menu_openagfile_Click(object sender, EventArgs e)
        {
            FormChipEditorSettings frm_chipeditorsettings = new FormChipEditorSettings();

            frm_chipeditorsettings.NewChipSettingsUpdated += new FormChipEditorSettings.NewChipSettingsUpdateHandler(frm_chipeditorsettings_Updated);

            if (frm_chipeditorsettings.ShowDialog() == DialogResult.OK)
            {
                DataSet dataSet = new DataSet();
                dataSet.DataSetName = "Antigene List File";

                OpenFileDialog ofd = new OpenFileDialog();
                ofd.Filter = "XML files (*.xml)|*.xml|All files (*.*)|*.*";
                DialogResult result = ofd.ShowDialog();

                if (result == DialogResult.Cancel)
                {
                    return;
                }
                else
                {
                    // Save to disk (ez vajon mi)
                    if (ofd.FileName.Length > 0)
                    {
                        dataSet.ReadXml(ofd.FileName);
                    }
                }

                dt_list = dataSet.Tables[0].Copy();
                dgw_spotlist.DataSource = dt_list;
                foreach (DataRow dr in dt_list.Rows)
                {
                    UpdateChipTable(Convert.ToInt32(dr["Spot Position"]), dr["Spot Name"].ToString());
                }
                this.IsModified = false;
            }
        }