Beispiel #1
0
 private void InsertButton_Click(object sender, EventArgs e)
 {
     var editor = new GeneEditor();
     if (editor.ShowDialog(this) == DialogResult.OK)
     {
         DNA.Add(editor.Value);
         UpdateGenomeEditor(GenomeEditor.Items.Count);
         UpdateDNAView();
     }
 }
Beispiel #2
0
 private void EditGeneButton_Click(object sender, EventArgs e)
 {
     var selected = Convert.ToByte(GenomeEditor.SelectedItem as string, 16);
     var editor = new GeneEditor(selected);
     if (editor.ShowDialog(this) == DialogResult.OK)
     {
         DNA[GenomeEditor.SelectedIndex] = editor.Value;
         UpdateGenomeEditor(GenomeEditor.SelectedIndex);
         UpdateDNAView();
     }
 }
Beispiel #3
0
        private void InsertButton_Click(object sender, EventArgs e)
        {
            var editor = new GeneEditor();

            if (editor.ShowDialog(this) == DialogResult.OK)
            {
                DNA.Add(editor.Value);
                UpdateGenomeEditor(GenomeEditor.Items.Count);
                UpdateDNAView();
            }
        }
Beispiel #4
0
        private void EditGeneButton_Click(object sender, EventArgs e)
        {
            var selected = Convert.ToByte(GenomeEditor.SelectedItem as string, 16);
            var editor   = new GeneEditor(selected);

            if (editor.ShowDialog(this) == DialogResult.OK)
            {
                DNA[GenomeEditor.SelectedIndex] = editor.Value;
                UpdateGenomeEditor(GenomeEditor.SelectedIndex);
                UpdateDNAView();
            }
        }
Beispiel #5
0
        private void InsertGene(int index)
        {
            var editor = new GeneEditor();

            if (editor.ShowDialog(this) == DialogResult.OK)
            {
                DNA.Insert(index, editor.Value);

                if (index < GenomeEditor.Items.Count)
                {
                    GenomeEditor.Items.Insert(index, DNA[index]);
                }
                else
                {
                    UpdateGenomeEditor(index);
                }

                UpdateDNAView();
            }
        }
Beispiel #6
0
        private void InsertGene(int index)
        {
            var editor = new GeneEditor();
            if (editor.ShowDialog(this) == DialogResult.OK)
            {
                DNA.Insert(index, editor.Value);

                if (index < GenomeEditor.Items.Count)
                    GenomeEditor.Items.Insert(index, DNA[index]);
                else
                    UpdateGenomeEditor(index);

                UpdateDNAView();
            }
        }