private void WFTabExplorerForm_Load(object sender, EventArgs e) { ConfigurationLoader.OnSetDefaultValue("split", 200); Width = ConfigurationLoader.OnGetIntValue("w"); Height = ConfigurationLoader.OnGetIntValue("h"); splitContainer.SplitterDistance = ConfigurationLoader.OnGetIntValue("split"); Location = new Point(ConfigurationLoader.OnGetIntValue("l"), ConfigurationLoader.OnGetIntValue("t")); if (Width < 200 || Height < 100) { Width = 200; Height = 100; Location = new Point(0, 0); DoSaveSizeAndLocation(); } this.Resize += new System.EventHandler(this.WFTabExplorerForm_Resize); this.Move += new System.EventHandler(this.WFTabExplorerForm_Move); this.splitContainer.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.splitContainer_SplitterMoved); this.splitContainer.MouseDoubleClick += WFTabExplorerForm_MouseDoubleClick; this.splitContainer.Panel2.MouseDoubleClick += WFTabExplorerForm_MouseDoubleClick; this.outputURL.GotFocus += OutputURL_GotFocus; this.outputURL.LostFocus += OutputURL_LostFocus; }
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; }