////////////////////////////////////////////////////////////////////////// private void OnLoad(object sender, EventArgs e) { AppMgr.Settings.LoadFromXmlFile(); LoadLayout(AppMgr.Settings); SettingsNode Node = AppMgr.Settings.GetNode("Layout\\" + this.Name); if (Node != null) { this.TopMost = Node.GetBool("FormTopMost", false); } BtnAlwaysOnTop.Checked = this.TopMost; // load watches from project's registry try { string RegPath = _Client.Server.GetPropString("RegistryPath"); RegPath += @"\Debug"; using (RegistryKey Key = Registry.CurrentUser.OpenSubKey(RegPath)) { int NumWatches = int.Parse(Key.GetValue("NumWatches", 0).ToString()); for (int i = 0; i < NumWatches; i++) { string WatchName = Key.GetValue("Watch" + (i + 1).ToString(), "").ToString(); if (WatchName != string.Empty) { Watch.AddWatch(WatchName); } } } } catch { } }
////////////////////////////////////////////////////////////////////////// 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()); } } }