Esempio n. 1
0
        private void buttonEdit_Click(object sender, EventArgs e)
        {
            if (dataGridViewFuzzyVar.SelectedCells.Count > 0)
            {
                var i        = dataGridViewFuzzyVar.SelectedCells[0].RowIndex;
                var id_in_db = Convert.ToInt64(dataGridViewFuzzyVar.Rows[i].Cells[0].Value);

                var prototypeFuzzy = FuzzyList.Find(x => x.ID == id_in_db);

                /*var colorBut = dataGridViewFuzzyVar.Rows[i].Cells[6] as DataGridViewButtonCell;
                 *
                 * var prototypeFuzzy = new FuzzyVariable(id_in_db,
                 *  prototypeSymtom.ID,
                 *  Convert.ToString(dataGridViewFuzzyVar.Rows[i].Cells[1].Value),
                 *  colorBut.Style.BackColor);
                 *
                 * prototypeFuzzy.Type = (TypeMFuncEnum)Convert.ToInt32(dataGridViewFuzzyVar.Rows[i].Cells[2].Value);
                 * prototypeFuzzy.Bound = (BoundaryTypeEnum)Convert.ToInt32(dataGridViewFuzzyVar.Rows[i].Cells[4].Value);
                 *
                 * prototypeFuzzy.IdTriangulare = Convert.ToInt64(dataGridViewFuzzyVar.Rows[i].Cells[7].Value);
                 * prototypeFuzzy.IdTrapezoidal = Convert.ToInt64(dataGridViewFuzzyVar.Rows[i].Cells[8].Value);
                 * prototypeFuzzy.IdGaussian = Convert.ToInt64(dataGridViewFuzzyVar.Rows[i].Cells[9].Value);*/

                var FuzzyForm = new FuzzyVarForm(prototypeSymtom, prototypeFuzzy);
                FuzzyForm.Owner = this;
                FuzzyForm.ShowDialog();
            }
            else
            {
                MessageBox.Show("Ничего не выделено для редактирования!", "Объект не выделен", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }

            DrawGraphs();
        }
Esempio n. 2
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            var FuzzyForm = new FuzzyVarForm(prototypeSymtom);

            FuzzyForm.Owner = this;
            FuzzyForm.ShowDialog();

            DrawGraphs();
        }