private void Main_Load(object sender, EventArgs e) { //选择器初始化 ConfigItemDefine.SaveDefines(); ctlConfFile.PickerType = CtlFilePicker.DialogType.SaveFile; ctlConfFile.FileFilter = Utility.ConfFilter; if (File.Exists(ConfigItemDefine.ValueFilename)) { ConfigItemDefine.LoadValues(); } RefreshSelectItemList(); var cRoot = ConfigItemDefine.LoadDefines(); var rootTreeNode = new TreeNode("Config"); FillTreeView(cRoot, rootTreeNode); trvConfig.Nodes.Add(rootTreeNode); trvConfig.ExpandAll(); var MonoMode = Type.GetType("Mono.Runtime") != null; if (MonoMode) { this.Text = "Configuration File"; this.Font = GuiConfig.GetMonoFont(this.Font); } }
private void Main_Load(object sender, System.EventArgs e) { //选择器初始化 ConfigItemDefine.SaveDefines(); ctlConfFile.PickerType = ResourceLib.UI.CtlFilePicker.DialogType.SaveFile; ctlConfFile.FileFilter = Utility.ConfFilter; ConfigItemDefine.LoadValues(); RefreshSelectItemList(); var CRoot = ConfigItemDefine.LoadDefines(); TreeNode RootTreeNode = new TreeNode("Config"); FillTreeView(CRoot, RootTreeNode); trvConfig.Nodes.Add(RootTreeNode); trvConfig.ExpandAll(); }