Пример #1
0
        private void OKBtn_Click(object sender, EventArgs e)
        {
            LingVariable temp;

            if (TypeCombo.SelectedItem.Equals("Input"))
            {
                temp = new LingVariable(NameTxT.Text, VarType.Input);
                List <double> rang = FuzzyApp.tokString(RangeTxT.Text);
                temp.setRange(rang[0], rang[1]);
                double value = (rang[1] - rang[0]) * 0.5;
                temp.addMF(new Trimf("mf", rang[0], (rang[0] + value), rang[1]));
                FuzzyApp.InputVariables.Add(temp);
                ParentTab.SelectedTab = ParentTab.TabPages[0];
            }
            else
            {
                temp = new LingVariable(NameTxT.Text, VarType.Output);
                List <double> rang = FuzzyApp.tokString(RangeTxT.Text);
                temp.setRange(rang[0], rang[1]);
                double value = (rang[1] - rang[0]) * 0.5;
                temp.addMF(new Trimf("mf", rang[0], (rang[0] + value), rang[1]));
                FuzzyApp.OutputVariables.Add(temp);
                ParentTab.SelectedTab = ParentTab.TabPages[1];
            }
            this.Close();
        }
Пример #2
0
 static void Main()
 {
     FuzzyApp.Initalize();
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     Application.Run(new Form1());
 }
Пример #3
0
 private void closeToolStripMenuItem_Click(object sender, EventArgs e)
 {
     FuzzyApp.Initalize();
     variable1.ClearVariable();
     InputView.Clear();
     OutputView.Clear();
     reultsUI1.loadVariables();
 }
Пример #4
0
 private void test2ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     FuzzyApp.Initalize();
     variable1.ClearVariable();
     InputView.Clear();
     OutputView.Clear();
     FuzzyApp.defaultSettings2();
     if (FuzzyApp.InputVariables.Count > 0)
     {
         variable1.Current = FuzzyApp.InputVariables[0];
         variable1.Populate();
         populateVariables();
     }
 }