Beispiel #1
0
        //////////////////////////////////////////////////////////////////////////
        public void LoadSettings(SettingsNode RootNode)
        {
            SettingsNode Section = RootNode.GetNode("General", true);

            if (Section == null)
            {
                return;
            }

            SelectionColor         = Section.GetColor("SelectionColor", SelectionColor);
            BoxColor               = Section.GetColor("BoxColor", BoxColor);
            WindowCanvas.BackColor = Section.GetColor("BackgroundColor", WindowCanvas.BackColor);
            GridSize               = new Size(Section.GetInt("GridWidth", GridSize.Width), Section.GetInt("GridHeight", GridSize.Height));

            _RecentFiles.Clear();
            SettingsNode RecentList = Section.GetNode("RecentFiles");

            if (RecentList != null)
            {
                foreach (SettingsNode Node in RecentList.Children)
                {
                    string RecentFile = Node.GetString();
                    if (File.Exists(RecentFile))
                    {
                        _RecentFiles.Add(RecentFile);
                    }
                }
            }
        }
Beispiel #2
0
        //////////////////////////////////////////////////////////////////////////
        public virtual void LoadControlLayout(SettingsNode RootNode)
        {
            SettingsNode Node = RootNode.GetNode(this.Name, false, true);

            if (Node != null)
            {
                for (int i = 0; i < Columns.Count; i++)
                {
                    TreeColumn Col = Columns[i];
                    Col.Width = Node.GetInt("Col" + i.ToString() + "Width", Col.Width);
                }
            }
        }