//////////////////////////////////////////////////////////////////////////
        public void SaveSettings(SettingsNode RootNode)
        {
            SettingsNode Section = RootNode.GetNode("General", true, true);

            if (Section == null)
            {
                return;
            }

            Section.Clear();

            Section.SetValue("SelectionColor", SelectionColor);
            Section.SetValue("BoxColor", BoxColor);
            Section.SetValue("BackgroundColor", WindowCanvas.BackColor);
            Section.SetValue("GridWidth", GridSize.Width);
            Section.SetValue("GridHeight", GridSize.Height);

            SettingsNode RecentList = new SettingsNode("RecentFiles");

            foreach (string RecentFile in _RecentFiles)
            {
                RecentList.Children.Add(new SettingsNode("RecentFile", RecentFile));
            }
            Section.Children.Add(RecentList);
        }
        //////////////////////////////////////////////////////////////////////////
        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);
                    }
                }
            }
        }
        public void GetNode_PathDiffCasing_ReturnsNode()
        {
            SettingsNode node = new SettingsNode("Test");

            node.AddChild("Test Child").AddChild("Child of Child");

            SettingsNode foundNode = node.GetNode("TEST CHILD | ChILd oF chIld");

            Assert.IsNotNull(foundNode);
        }
        public void GetNode_PathExists_ReturnsNode()
        {
            SettingsNode node = new SettingsNode("Test");

            node.AddChild("Test Child").AddChild("Child of Child");

            SettingsNode foundNode = node.GetNode("Test Child | Child of Child");

            Assert.IsNotNull(foundNode);
        }
Exemple #5
0
        //////////////////////////////////////////////////////////////////////////
        public virtual void SaveControlLayout(SettingsNode RootNode)
        {
            SettingsNode Node = RootNode.GetNode(this.Name, false, true);

            if (Node != null)
            {
                for (int i = 0; i < Columns.Count; i++)
                {
                    Node.SetValue("Col" + i.ToString() + "Width", Columns[i].Width);
                }
            }
        }
Exemple #6
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);
                }
            }
        }
Exemple #7
0
        //////////////////////////////////////////////////////////////////////////
        private void SaveSettings(SettingsNode RootNode)
        {
            SettingsNode Section = RootNode.GetNode(this.Name, true, true);

            if (Section == null)
            {
                return;
            }

            Section.Clear();

            Section.SetValue("ProjectFile", TxtProjectFile.Text);
            Section.SetValue("ScriptExtensions", TxtExtensions.Text);

            foreach (IntegratorModule Mod in modules)
            {
                Mod.SaveSettings(Section);
            }
        }
Exemple #8
0
        //////////////////////////////////////////////////////////////////////////
        private void LoadSettings(SettingsNode RootNode)
        {
            SettingsNode Section = RootNode.GetNode(this.Name, true);

            if (Section != null)
            {
                TxtProjectFile.Text = Section.GetString("ProjectFile");
                TxtExtensions.Text  = Section.GetString("ScriptExtensions");

                foreach (IntegratorModule Mod in modules)
                {
                    Mod.LoadSettings(Section);
                }
            }
            if (TxtExtensions.Text == "")
            {
                TxtExtensions.Text = "script inc";
            }
        }
        //////////////////////////////////////////////////////////////////////////
        public void SaveSettings(SettingsNode RootNode)
        {
            SettingsNode Section = RootNode.GetNode("StringTableMgr", true, true);

            if (Section == null)
            {
                return;
            }

            Section.Clear();

            Section.SetValue("ProjectFile", ProjectFile);
            Section.SetValue("StringTableFile", StringTableFile);
            Section.SetValue("BackupOldFiles", BackupOldFiles);

            SettingsNode IgnoreItems = new SettingsNode("IgnoreList");

            foreach (string Item in IgnoreList)
            {
                IgnoreItems.Children.Add(new SettingsNode("Item", Item));
            }
            Section.Children.Add(IgnoreItems);
        }
        //////////////////////////////////////////////////////////////////////////
        public void LoadSettings(SettingsNode RootNode)
        {
            SettingsNode Section = RootNode.GetNode("StringTableMgr", true);

            if (Section == null)
            {
                return;
            }

            ProjectFile     = Section.GetString("ProjectFile");
            StringTableFile = Section.GetString("StringTableFile");
            BackupOldFiles  = Section.GetBool("BackupOldFiles");

            IgnoreList.Clear();
            SettingsNode IgnoreItems = Section.GetNode("IgnoreList");

            if (IgnoreItems != null)
            {
                foreach (SettingsNode Node in IgnoreItems.Children)
                {
                    IgnoreList.Add(Node.GetString());
                }
            }
        }