摘要:
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 阅读全文
摘要:
bool mutexIsNew; using (System.Threading.Mutex m=new Mutex(true,"",out mutexIsNew)) { if (mutexIsNew) { //第一个实例,run } else { //已经存在实例,退出 } } 阅读全文