Ejemplo n.º 1
0
        public ProfileForm(string fileName, string alignFile, filterOPT filter)
        {
            InitializeComponent();
            if (fileName == null || fileName.Length == 0)
            {
                this.Text = "Profile not defined";
            }
            else
            {
                this.Text     = fileName;
                this.fileName = fileName;
            }

            this.filter = filter;
            //profilesView.DrawMode = TreeViewDrawMode.OwnerDrawText;

            treeProfiles = new ProfileTree();
            if (fileName != null && fileName.Length > 0)
            {
                if (File.Exists(fileName))
                {
                    treeProfiles.LoadProfiles(fileName);
                }
            }

            ShowTree();
            //profilesView.
        }
Ejemplo n.º 2
0
        public InternalProfileForm(profileNode node, filterOPT filter, bool flag = true)
        {
            InitializeComponent();
            Settings set = new Settings();

            set.Load();
            if (set.mode == INPUTMODE.USER_DEFINED)
            {
                button5.Visible = false;
            }
            if (filter == filterOPT.SIMILARITY)
            {
                button4.Visible = false;
                button3.Visible = true;
            }
            else
            {
                button4.Visible = true;
                button3.Visible = false;
            }
            if (node == null)
            {
                return;
            }

            if (node.internalName == UserDefinedProfile.ProfileName)
            {
                dataGridView1.Columns["Column1"].ReadOnly = false;
            }
            else
            {
                dataGridView1.Columns["Column1"].ReadOnly = flag;
            }
            localNode.profProgram  = node.profProgram;
            localNode.internalName = node.internalName;
            textBox1.Text          = node.profName;
            if (node.GetNumberofStates() > 0)
            {
                dataGridView1.Rows.Add(node.GetNumberofStates());
                int i = 0;
                foreach (var item in node.states)
                {
                    dataGridView1.Rows[i].Cells[0].Value   = item.Key;
                    dataGridView1.Rows[i++].Cells[1].Value = item.Value;
                }


                foreach (var item in node.profWeights.Keys)
                {
                    foreach (var item2 in node.profWeights[item].Keys)
                    {
                        dataGridView2.Rows.Add(1);
                        int index = dataGridView2.Rows.Count - 2;
                        dataGridView2.Rows[index].Cells[0].Value = item;
                        dataGridView2.Rows[index].Cells[1].Value = item2;
                        dataGridView2.Rows[index].Cells[2].Value = node.profWeights[item][item2].ToString();
                    }
                }
            }
        }
Ejemplo n.º 3
0
        public InternalProfileForm(profileNode node,filterOPT filter,bool flag=true)
        {
            InitializeComponent();
            if(filter==filterOPT.SIMILARITY)
            {
                button4.Visible = false;
                button3.Visible = true;
            }
            else
            {
                button4.Visible = true;
                button3.Visible = false;

            }
            if (node == null)
                return;
           
            if(node.internalName==UserDefinedProfile.ProfileName)
                dataGridView1.Columns["Column1"].ReadOnly = false;
            else
                dataGridView1.Columns["Column1"].ReadOnly = flag;
            localNode.profProgram = node.profProgram;
            localNode.internalName = node.internalName;
            textBox1.Text = node.profName;
            if (node.GetNumberofStates()> 0)
            {
                dataGridView1.Rows.Add(node.GetNumberofStates());
                int i = 0;
                foreach (var item in node.states)
                {
                    dataGridView1.Rows[i].Cells[0].Value = item.Key;
                    dataGridView1.Rows[i++].Cells[1].Value = item.Value;
                }


                foreach (var item in node.profWeights.Keys)
                {
                    foreach (var item2 in node.profWeights[item].Keys)
                    {
                        dataGridView2.Rows.Add(1);
                        int index = dataGridView2.Rows.Count - 2;
                        dataGridView2.Rows[index].Cells[0].Value = item;
                        dataGridView2.Rows[index].Cells[1].Value = item2;
                        dataGridView2.Rows[index].Cells[2].Value = node.profWeights[item][item2].ToString();
                    }
                }
            }
        }
Ejemplo n.º 4
0
        public ProfileForm(string fileName,string alignFile,filterOPT filter)
        {
            InitializeComponent();
            if (fileName == null || fileName.Length == 0)
                this.Text = "Profile not defined";
            else
            {
                this.Text = fileName;
                this.fileName = fileName;
            }

            this.filter = filter;
            //profilesView.DrawMode = TreeViewDrawMode.OwnerDrawText;
            
            treeProfiles = new ProfileTree();
            if(fileName!=null && fileName.Length>0)
                if(File.Exists(fileName))
                    treeProfiles.LoadProfiles(fileName);
           
            ShowTree();
            //profilesView.
        }
Ejemplo n.º 5
0
        public ProfileForm(string fileName, string alignFile, filterOPT filter)
        {
            InitializeComponent();
            if (fileName == null || fileName.Length == 0)
            {
                this.Text = "Profile not defined";
            }
            else
            {
                this.Text     = fileName;
                this.fileName = fileName;
            }

            this.filter = filter;
            //profilesView.DrawMode = TreeViewDrawMode.OwnerDrawText;

            treeProfiles = new ProfileTree();
            if (fileName != null && fileName.Length > 0)
            {
                if (File.Exists(fileName))
                {
                    treeProfiles.LoadProfiles(fileName);
                    if (treeProfiles.combine == profileCombination.JOIN_STATES)
                    {
                        toolStripButton1.Enabled = false;
                        toolStripButton4.Enabled = true;
                    }
                    else
                    {
                        toolStripButton1.Enabled = true;
                        toolStripButton4.Enabled = false;
                    }
                }
            }

            ShowTree();
            //profilesView.
        }