摘要: 1.//关闭登陆窗口 foreach (Window window in Application.Current.Windows) { if (window.Title == "LoginWindow") { window.Close(); } }2. 通过构造函数传值,调用引用获取返回值RenameDialog dialog = new RenameDialog(Path.GetFileNameWithoutExtension(filename)); if (dialog.ShowDialog() == true) // Result could be true, fal 阅读全文
posted @ 2013-01-19 23:36 gitran 阅读(148) 评论(0) 推荐(0) 编辑
摘要: bool mutexIsNew; using (System.Threading.Mutex m=new Mutex(true,"",out mutexIsNew)) { if (mutexIsNew) { //第一个实例,run } else { //已经存在实例,退出 } } 阅读全文
posted @ 2013-01-19 23:32 gitran 阅读(128) 评论(0) 推荐(0) 编辑