private void btnAddIndexSpec_Click(object sender, EventArgs e)
 {
     IndexSpecsForm dlg = new IndexSpecsForm();
     dlg.StartPosition = FormStartPosition.CenterParent;
     DialogResult dr = dlg.ShowDialog(this);
     if (dr == DialogResult.OK)
     {
         this.lbIndexes.Items.Add(dlg.Index);
     }
 }
示例#2
0
        private void btnAddIndexSpec_Click(object sender, EventArgs e)
        {
            IndexSpecsForm dlg = new IndexSpecsForm();

            dlg.StartPosition = FormStartPosition.CenterParent;
            DialogResult dr = dlg.ShowDialog(this);

            if (dr == DialogResult.OK)
            {
                this.lbIndexes.Items.Add(dlg.Index);
            }
        }
        private void btnEditIndexSpec_Click(object sender, EventArgs e)
        {
            Index index = this.lbIndexes.SelectedItem as Index;

            IndexSpecsForm dlg = new IndexSpecsForm();
            dlg.StartPosition = FormStartPosition.CenterParent;

            dlg.SetIndex(index);

            DialogResult dr = dlg.ShowDialog(this);
            if (dr == DialogResult.OK)
            {
                this.lbIndexes.Items[this.lbIndexes.SelectedIndex] = dlg.Index;
            }
        }
示例#4
0
        private void btnEditIndexSpec_Click(object sender, EventArgs e)
        {
            Index index = this.lbIndexes.SelectedItem as Index;

            IndexSpecsForm dlg = new IndexSpecsForm();

            dlg.StartPosition = FormStartPosition.CenterParent;

            dlg.SetIndex(index);

            DialogResult dr = dlg.ShowDialog(this);

            if (dr == DialogResult.OK)
            {
                this.lbIndexes.Items[this.lbIndexes.SelectedIndex] = dlg.Index;
            }
        }