Beispiel #1
0
 public Adaline(Adaline adaline) :
     base(adaline)
 {
 }
Beispiel #2
0
        private void menu(TabPage page, string tabName)
        {
            TabPage npage = null;

            page = tabControl(page, tabName);
            switch (tabName)
            {
            case "Adaline":
                rbnTop.Tabs[0].Visible = false;
                foreach (RibbonPanel pnl in rbnTop.Tabs[1].Panels)
                {
                    pnl.Visible = true;
                }
                rbnTop.Tabs[1].Visible = true;
                rbnTop.Tabs[2].Visible = false;
                if (page != null)
                {
                    tabMain.SelectedTab = page;
                }
                else
                {
                    Adaline frm = new Adaline();
                    frm.FormClosed     += new FormClosedEventHandler(AdalineClosed);
                    frm.TopLevel        = false;
                    frm.AutoScroll      = true;
                    frm.Dock            = DockStyle.Fill;
                    frm.FormBorderStyle = FormBorderStyle.None;
                    npage = new TabPage("Adaline");
                    npage.Controls.Add(frm);
                    npage.Tag = frm;
                    frm.Show();
                    tabMain.TabPages.Add(npage);
                    tabMain.SelectedTab = npage;
                }
                break;

            case "BackPropagation":
                rbnTop.Tabs[0].Visible = true;
                rbnTop.Tabs[1].Visible = false;
                rbnTop.Tabs[2].Visible = false;
                foreach (RibbonPanel pnl in rbnTop.Tabs[0].Panels)
                {
                    pnl.Visible = true;
                }
                edtProblemType.TextBoxText         = inii.IniReadValue("Network", "Problem Type");
                edtNormalizationMethod.TextBoxText = inii.IniReadValue("Network", "Normalization Method");
                edtErrorWindow.Checked             = Convert.ToBoolean(inii.IniReadValue("Network", "Show Error Window"));
                edtTrainPercent.TextBoxText        = inii.IniReadValue("Network", "Train Percent");
                edtTestPercent.TextBoxText         = inii.IniReadValue("Network", "Test Percent");
                if (inii.IniReadValue("Network", "Prepare Method") == "InOrder")
                {
                    edtInOrder.Checked = true;
                }
                else
                {
                    edtRandom.Checked = true;
                }
                string testsetname = inii.IniReadValue("Network", "TestsetName");
                if (testsetname == "Testset")
                {
                    edtTestWithTest.Checked = true;
                }
                else if (testsetname == "Trainset")
                {
                    edtTestWithTrainset.Checked = true;
                }
                else
                {
                    edtTestWithData.Checked = true;
                }
                if (page != null)
                {
                    tabMain.SelectedTab = page;
                }
                else
                {
                    BackPropagation frm = new BackPropagation();
                    frm.FormClosed     += new FormClosedEventHandler(BackPropagationClosed);
                    frm.TopLevel        = false;
                    frm.AutoScroll      = true;
                    frm.Dock            = DockStyle.Fill;
                    frm.FormBorderStyle = FormBorderStyle.None;
                    npage = new TabPage("BackPropagation");
                    npage.Controls.Add(frm);
                    npage.Tag = frm;
                    frm.Show();
                    tabMain.TabPages.Add(npage);
                    tabMain.SelectedTab = npage;
                }
                break;

            case "One Variable":
                rbnTop.Tabs[0].Visible = false;
                rbnTop.Tabs[1].Visible = false;
                rbnTop.Tabs[2].Visible = true;
                foreach (RibbonPanel pnl in rbnTop.Tabs[2].Panels)
                {
                    pnl.Visible = true;
                }
                if (page != null)
                {
                    tabMain.SelectedTab = page;
                }
                else
                {
                    OneVariable frm = new OneVariable();
                    frm.FormClosed     += new FormClosedEventHandler(OneVariableClosed);
                    frm.TopLevel        = false;
                    frm.AutoScroll      = true;
                    frm.Dock            = DockStyle.Fill;
                    frm.FormBorderStyle = FormBorderStyle.None;
                    npage = new TabPage("One Variable");
                    npage.Controls.Add(frm);
                    npage.Tag = frm;
                    frm.Show();
                    tabMain.TabPages.Add(npage);
                    tabMain.SelectedTab = npage;
                }
                break;

            case "Two Variable":
                rbnTop.Tabs[0].Visible = false;
                rbnTop.Tabs[1].Visible = false;
                rbnTop.Tabs[2].Visible = true;
                foreach (RibbonPanel pnl in rbnTop.Tabs[2].Panels)
                {
                    pnl.Visible = true;
                }
                if (page != null)
                {
                    tabMain.SelectedTab = page;
                }
                else
                {
                    TwoVariable frm = new TwoVariable();
                    frm.FormClosed     += new FormClosedEventHandler(TwoVariableClosed);
                    frm.TopLevel        = false;
                    frm.AutoScroll      = true;
                    frm.Dock            = DockStyle.Fill;
                    frm.FormBorderStyle = FormBorderStyle.None;
                    npage = new TabPage("Two Variable");
                    npage.Controls.Add(frm);
                    npage.Tag = frm;
                    frm.Show();
                    tabMain.TabPages.Add(npage);
                    tabMain.SelectedTab = npage;
                }
                break;
            }
        }