예제 #1
0
        private void EditIdBtn_Click(object sender, EventArgs e)
        {
            IDDIsotopicsEdit ia = new IDDIsotopicsEdit(m_iso.id);

            if (ia.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                string oldId = m_iso.id;
                m_iso.id = String.Copy(ia.NewID);  // changes the id on the object on the list - m_iso is a reference to an element in the in-memory list
                if (NC.App.DB.Isotopics.Rename(oldId, ia.NewID))
                {
                    IsotopicsIdComboBox.Items.Remove(oldId);
                    IsotopicsIdComboBox.Items.Add(m_iso.id);
                    applog.TraceInformation("Renamed " + oldId + " to " + m_iso.id);
                    IsotopicsIdComboBox.SelectedItem = m_iso.id;
                    //PopulateWithSelectedItem();
                }
            }
        }
예제 #2
0
        private void EditBtn_Click(object sender, EventArgs e)
        {
            IDDIsotopicsEdit ia = new IDDIsotopicsEdit(m_comp_iso.id);

            if (ia.ShowDialog() == DialogResult.OK)
            {
                string oldId = m_comp_iso.id;
                m_comp_iso.id = string.Copy(ia.NewID);  // changes the id on the object on the list - m_comp_iso is a reference to an element in the in-memory list
                if (NC.App.DB.CompositeIsotopics.Rename(oldId, ia.NewID))
                {
                    IsotopicsIdComboBox.Items.Remove(oldId);
                    IsotopicsIdComboBox.Items.Add(m_comp_iso.id);
                    applog.TraceInformation("Renamed " + oldId + " to " + m_comp_iso.id);
                    IsotopicsIdComboBox.SelectedItem = m_comp_iso.id;
                    calcQ = true;
                }
            }
        }
예제 #3
0
 private void EditIdBtn_Click(object sender, EventArgs e)
 {
     IDDIsotopicsEdit ia = new IDDIsotopicsEdit(m_iso.id);
     if (ia.ShowDialog() == DialogResult.OK)
     {
         string oldId = m_iso.id;
         m_iso.id = string.Copy(ia.NewID);  // changes the id on the object on the list - m_iso is a reference to an element in the in-memory list
         if (NC.App.DB.Isotopics.Rename(oldId, ia.NewID))
         {
             IsotopicsIdComboBox.Items.Remove(oldId);
             IsotopicsIdComboBox.Items.Add(m_iso.id);
             applog.TraceInformation("Renamed " + oldId + " to " + m_iso.id);
             IsotopicsIdComboBox.SelectedItem = m_iso.id;
             //PopulateWithSelectedItem();
         }
     }
 }