Exemplo n.º 1
0
        void MenuNewChartFromHere_Click(object sender, EventArgs e)
        {
            if (mindMapView1.SelectedTopic != null && !ReadOnly && Owner != null)
            {
                var root = mindMapView1.SelectedTopic.Clone();
                root.CutFromMap();
                var map = new MindMap(root, ST.RemoveUnvisibleCharts(root.Text));

                if (ChartThemeManage.Default.DefaultTheme != null)
                {
                    map.ApplyTheme(ChartThemeManage.Default.DefaultTheme);
                }

                root.Expand();
                Owner.Document.Charts.Add(map);
                Owner.ActiveChartPage(map);
            }
        }
Exemplo n.º 2
0
        Document CreateNewMap()
        {
            MindMap map = new MindMap();

            map.Name      = string.Format("{0} 1", Lang._("New Chart"));
            map.Root.Text = Lang._("Center Topic");
            map.Author    = System.Environment.UserName;

            if (ChartThemeManage.Default.DefaultTheme != null)
            {
                map.ApplyTheme(ChartThemeManage.Default.DefaultTheme);
            }

            Document doc = new Document();

            doc.Name   = Lang._("New Document");
            doc.Author = System.Environment.UserName;
            doc.Charts.Add(map);
            //doc.Modified = true;
            return(doc);
        }