if (WindowState == WindowState.Minimized) { WindowState = WindowState.Normal; }
打开另一个 windows
方法一
在打开窗口里面获取全局的 winmain 然后执行相应操作
// 检查登录信息 if (FLAG_LOGIN_OPEN != (flag & FLAG_LOGIN_OPEN)) { flag |= FLAG_LOGIN_OPEN; Type type = this.GetType(); Assembly assembly = type.Assembly; Window window = (Window)assembly.CreateInstance(type.Namespace + ".win." + "WinLogin"); // 窗口保持最前端显示 window.Owner = this; // 隐藏任务栏图标 window.ShowInTaskbar = false; window.Show(); }
方法二
// 回调函数 public void CBWinConfigValue(List<string> strValue) {
}
// 窗口类 public partial class telesisConfig : Window { //声明委托 public delegate void TransValueFunc(List<string> strValue); //委托对象 public TransValueFunc transValueFunc;
public telesisConfig() { InitializeComponent(); } }