public WFTabExplorerForm() { InitializeComponent(); if (!Directory.Exists("Config")) { Directory.CreateDirectory("Config"); if (File.Exists("Config.ini")) { File.Move("Config.ini", "Config/Config.ini"); } if (File.Exists("Save.ini")) { File.Move("Save.ini", "Config/Save.ini"); } if (File.Exists("Favorite.ini")) { File.Move("Favorite.ini", "Config/Favorite.ini"); } } ConfigurationLoader = new AIniLoader(); ConfigurationLoader.LoadIniFile("Config/Config.ini"); ConfigurationLoader.OnSetDefaultValue("w", 1024); ConfigurationLoader.OnSetDefaultValue("h", 768); if (ConfigurationLoader.OnGetIntValue("w") <= 0) { LoadDir(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory)); } else { int count = pathLoader.OnGetIntValue("Count"); if (count > 0) { for (int i = 0; i < count; i++) { string surl = pathLoader.OnGetValue("U" + i); LoadDir(surl, i); if (!dCurPath.ContainsKey(i)) { dCurPath.Add(i, surl); } } int cur = pathLoader.OnGetIntValue("Cur"); if (cur >= 0 && cur < tabExplorers.TabCount) { tabExplorers.SelectedIndex = cur; } } else { LoadDir(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory)); } } LoadDevices(); bInited = true; }
public CsvReader() { InitializeComponent(); this.AllowDrop = true; iniLoader = new AIniLoader(); iniLoader.LoadIniFile("config.ini"); var saveScript = iniLoader.OnGetValue("saveScript"); if (!string.IsNullOrEmpty(saveScript)) { inputSaveScript.Text = saveScript; } }