if(downListControl == null || downListControl.IsVisible == false) { downListControl = new DownloadListControl(); downListControl.Show(); } else { MessageBox.Show("对不起,下载窗口也打开!不要重复打开"); downListControl.Activate(); downListControl.WindowState = WindowState.Normal; }
PS:downListControl 是窗口的实例对象名
时间: 2024-11-05 12:46:01