Example #1
0
 public VisualUnit(DSClassifierWrapper classifier)
 {
     classifier_ = classifier;
     points      = new PointF[3];
     drown       = false;
 }
Example #2
0
 public Classifier(DSHierarchyWrapper hierarchy, DSClassifierWrapper classifier)
 {
     InitializeComponent();
     hierarchy_  = hierarchy;
     classifier_ = classifier;
 }
Example #3
0
        public void ReadClassifierTable()
        {
            for (int i = com.DictionaryAttributes() + com.DictionaryClasses(); i < com.DictionaryElements(); i++)
            {
                classifier.Add(com.GetNumber(i));
            }

            List <DSClassifierWrapper> classifiers = hierarchy_.getClassifiers();

            foreach (string cl in classifier)
            {
                DataTable  dt22 = new DataTable();
                DataColumn column;
                DataRow    row;

                DSClassifierWrapper classifier_ = classifiers[classifier.IndexOf(cl)];

                dt22.TableName = "dat" + classifier.IndexOf(cl);

                column            = new DataColumn();
                column.ColumnName = "Класс";
                dt22.Columns.Add(column);


                column            = new DataColumn();
                column.ColumnName = "Степень принадлежности";
                dt22.Columns.Add(column);

                tabpage1 = new TabPage();
                tabpage1.SuspendLayout();
                tabpage1.Name = cl;
                tabControl1.TabPages.Add(tabpage1);
                tabControl1.SelectedTab = tabpage1;
                tabpage1.Text           = cl.ToString();

                DGV                    = new DataGridView();
                DGV.Name               = "DataGridV" + classifier.IndexOf(cl);
                DGV.BackgroundColor    = Color.White;
                DGV.Parent             = tabpage1;
                DGV.Location           = new Point(7, 7);
                DGV.Size               = new Size(299, 162);
                DGV.BorderStyle        = BorderStyle.FixedSingle;
                DGV.Visible            = true;
                DGV.AllowUserToAddRows = false;
                DGV.ReadOnly           = true;



                foreach (DSClassWrapper cls in classifier_.getClasses())
                {
                    foreach (DataRow dr in dtClasses.Rows)
                    {
                        if ((cls.getID() + " " + cls.getName()) == dr["Класс"].ToString())
                        {
                            row          = dt22.NewRow();
                            row["Класс"] = dr["Класс"];
                            dt22.Rows.Add(row);
                        }
                    }
                }

                DGV.DataSource = dt22;
                datatable.Add(dt22);
                tabControl1.TabPages[cl].Controls.Add(DGV);

                tabpage1.ResumeLayout();
                tabpage1.Refresh();
            }
        }