Ejemplo n.º 1
0
        /// <summary>
        /// Кнопка "Редактировать переменные"
        /// </summary>
        private void цельToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmVariables f = new frmVariables(tempES);

            if (f.ShowDialog() == DialogResult.OK)
            {
                saved = false;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Кнопка "Добавить переменную"
        /// </summary>
        private void btnAddVar_Click(object sender, EventArgs e)
        {
            frmVariables fvar = new frmVariables(f.es);

            if (fvar.AddVar(false) == DialogResult.OK)
            {
                fvar.SaveCollections();
                comboBox2.Items.Add(fvar.newVar);
                comboBox2.SelectedIndex = comboBox2.Items.Count - 1;
            }
        }
Ejemplo n.º 3
0
 public frmAddVar(frmVariables f, bool AllowQuaried)
 {
     InitializeComponent();
     this.f = f;
     comboBox1.SelectedIndex = 1;
     foreach (string s in f.es.Domains.Keys)
     {
         comboBox2.Items.Add(s);
     }
     if (!AllowQuaried) // нет запрашиваемых
     {
         comboBox1.Items.RemoveAt(1);
         comboBox1.SelectedIndex = 0;
         textBox3.Enabled        = false;
     }
 }
Ejemplo n.º 4
0
        public frmAddVar(frmVariables f, bool AllowQuaried, Variable v)
            : this(f, AllowQuaried)
        {
            textBox1.Text = v.Name;
            switch (v.MyType)
            {
            case VarType.Deducted:
                comboBox1.SelectedIndex = 0;
                break;

            case VarType.Queried:
                comboBox1.SelectedIndex = 1;
                break;

            case VarType.DeductionQueried:
                comboBox1.SelectedIndex = 2;
                break;
            }
            textBox2.Text          = v.Reasoning;
            comboBox2.SelectedItem = v.Domain.Name;
        }