private void Menu_Click(object sender, RoutedEventArgs e) { var mi = sender as MenuItem; string type = mi.Header.ToString(); Menu menu = mi.Parent as Menu; string str2 = type; if (!(str2 == "显示悬浮框")) { if (str2 == "隐藏悬浮框") { ShowEvent.ShowOrHideWindow(new Flash().Title); this.Menu1.Header = "显示悬浮框"; } else if (str2 == "关 于" || str2 == "版本信息") { OpenWindows.About(); } else { this.RapidAndType(type); } } else { if (!ShowEvent.ShowOrHideWindow(new Flash().Title)) { new Flash().Show(); } this.Menu1.Header = "隐藏悬浮框"; } if (str2 == "切换账号") { OpenWindows.Logon(); } if (str2 == "设置") { OpenWindows.SettingProfile(); } this.Menu.IsOpen = false; this.h1pop.IsOpen = false; this.h2pop.IsOpen = false; }
private void _lnkSwitchUser_Click(object sender, RoutedEventArgs e) { OpenWindows.Logon(); }