private void button15_Click(object sender, EventArgs e) { string path = StDirectory.CurrentAppDirectory + "\\" + this.textBox22.Text; StDirectory.ExistsDirectory(path, true); if (StDirectory.ExistsDirectory(path)) { System.Diagnostics.Process.Start("explorer.exe", path); } }
private void txtDirPath_DoubleClick(object sender, EventArgs e) { string[] conf_s = File.ReadAllLines("files/config.ini"); string path = conf_s[0];//路径 if (!string.IsNullOrWhiteSpace(this.txtDirPath.Text)) { path = this.txtDirPath.Text; } path = path.Replace("{yy}", DateTime.Now.ToString("yy")); path = path.Replace("{yyyy}", DateTime.Now.ToString("yyyy")); path = path.Replace("{MM}", DateTime.Now.ToString("MM")); path = path.Replace("{dd}", DateTime.Now.ToString("dd")); StDirectory.ExistsDirectory(path, true); //OpenDic(path); //return; System.Diagnostics.Process.Start("explorer.exe", path); }
private void button9_Click(object sender, EventArgs e) { if (this.button9.Tag.ToString() == "0") { string iniPath = this.textBox15.Text; if (!StDirectory.ExistsDirectory(iniPath)) { MessageBox.Show("您监视的文件夹不存在"); return; } sw = new StFileWatcher(); string wPath = this.textBox17.Text; wPath = wPath.Replace("\r\n", ";"); sw.AddFolderWhite(wPath.Split(';')); sw.FullPath = iniPath; sw.Changed += new StFileWatcher.StFileHander(sw_Changed); sw.Created += new StFileWatcher.StFileHander(sw_Changed); sw.Deleted += new StFileWatcher.StFileHander(sw_Changed); sw.Renamed += new StFileWatcher.StFileHander(sw_Changed); sw.Erro += new StFileWatcher.StFileErroHander(sw_Erro); sw.Open(); this.button9.Tag = "1"; this.button9.Text = "暂 停"; } else { sw.Close(); this.button9.Tag = "0"; this.button9.Text = "开 始"; } this.textBox15.Enabled = this.button9.Tag + "" == "0"; this.textBox17.Enabled = this.button9.Tag + "" == "0"; this.checkBox1.Enabled = this.button9.Tag + "" == "0"; }