Ejemplo n.º 1
0
        private void InitializeControl()
        {
            pnlMain.Controls.Clear();
            //because tere is a dependency from ucDecisionTree on ucDecisionModel
            //first create ucDecisionModel
            model      = new ucDecisionModel(this as IApplication);
            model.Dock = DockStyle.Fill;

            ctrl      = new ucDecisionTree(this as IApplication);
            ctrl.Dock = DockStyle.Left;

            split           = new Splitter();
            split.Dock      = DockStyle.Left;
            split.Width     = 5;
            split.BackColor = Color.DarkBlue;

            props      = new ucProperties(this as IApplication);
            props.Dock = DockStyle.Right;

            split2           = new Splitter();
            split2.Dock      = DockStyle.Right;
            split2.Width     = 5;
            split2.BackColor = Color.DarkBlue;

            pnlMain.Controls.AddRange(new Control[] { model, split, ctrl, split2, props });

            if (conf.GetConfigurationValue(UI_Constants.SakwaModelOnStart, false))
            {
                IConfigurationItem recentProjects = conf.GetConfigurationItem(UI_Constants.RecentProjects);
                if (recentProjects != null)
                {
                    foreach (IConfigurationItem it in recentProjects.ConfigurationItems)
                    {
                        LoadFile(it.Value);
                    }
                }


                ctrl.SelectedPath = conf.GetConfigurationValue(UI_Constants.RecentNode, "");
            }
        }
Ejemplo n.º 2
0
        private void InitializeControl()
        {
            pnlMain.Controls.Clear();

            ctrl      = new ucDecisionTree(this as IApplication, ucDecisionTree.eDecisionTreeMode.DomainTemplate);
            ctrl.Dock = DockStyle.Left;

            split           = new Splitter();
            split.Dock      = DockStyle.Left;
            split.Width     = 5;
            split.BackColor = Color.DarkBlue;

            props      = new ucProperties(this as IApplication);
            props.Dock = DockStyle.Right;

            split2           = new Splitter();
            split2.Dock      = DockStyle.Right;
            split2.Width     = 5;
            split2.BackColor = Color.DarkBlue;

            editor           = new Panel();
            editor.Dock      = DockStyle.Fill;
            editor.BackColor = Color.AliceBlue;

            pnlMain.Controls.AddRange(new Control[] { editor, split2, props, split, ctrl });

            if (conf.GetConfigurationValue(UI_Constants.SakwaModelOnStart, false))
            {
                IConfigurationItem recentProjects = conf.GetConfigurationItem(UI_Constants.TemplateRecentProjects);
                if (recentProjects != null)
                {
                    foreach (IConfigurationItem it in recentProjects.ConfigurationItems)
                    {
                        LoadFile(it.Value);
                    }
                }
            }
            ctrl.SelectedPath = conf.GetConfigurationValue(UI_Constants.TemplateRecentNode, "");
        }