示例#1
0
        private void addPartitionsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                AggManager.AddPartitionsForm form1 = new AggManager.AddPartitionsForm();
                TreeNode node;

                node = treeView1.SelectedNode;

                form1.Init(node.Name, (MeasureGroup)node.Parent.Parent.Tag);
                form1.ShowDialog(this);

                //Refresh the tree
                treeView1.SelectedNode = treeView1.SelectedNode.Parent.Parent;
                treeView1.SelectedNode.Nodes.RemoveAt(0);
                CreateNode(treeView1.SelectedNode.Nodes, TagAggdesigns, TagAggdesigns, ImgListMetadataFolderIndex);

                treeView1.SelectedNode.Nodes[0].Expand();

                if (!treeView1.SelectedNode.Text.EndsWith(MODIFIED_SUFFIX))
                {
                    treeView1.SelectedNode.Text = treeView1.SelectedNode.Text + MODIFIED_SUFFIX;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
            }
        }
示例#2
0
        private void addPartitionsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                AggManager.AddPartitionsForm form1 = new AggManager.AddPartitionsForm();
                TreeNode node;

                node = treeView1.SelectedNode;

                form1.Init(node.Name, (MeasureGroup)node.Parent.Parent.Tag);
                form1.ShowDialog(this);

                //Refresh the tree 
                treeView1.SelectedNode = treeView1.SelectedNode.Parent.Parent;
                treeView1.SelectedNode.Nodes.RemoveAt(0);
                CreateNode(treeView1.SelectedNode.Nodes, TagAggdesigns, TagAggdesigns, ImgListMetadataFolderIndex);

                treeView1.SelectedNode.Nodes[0].Expand();

                if (!treeView1.SelectedNode.Text.EndsWith(MODIFIED_SUFFIX))
                    treeView1.SelectedNode.Text = treeView1.SelectedNode.Text + MODIFIED_SUFFIX;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
            }
        }