private void btnPurchaseWindow_Click(object sender, RoutedEventArgs e) { PurchaseWindow win = new PurchaseWindow(); win.Owner = App.Current.MainWindow; win.ShowDialog(); this.lbTonerBar.FlashShopCatIcon(false); }
private void OnBtnClick(object sender, RoutedEventArgs e) { Button btn = sender as Button; if (btn.Name == "btnLogon") { LoginWindow loginWnd = new LoginWindow(); loginWnd.Owner = App.Current.MainWindow; loginWnd.ShowActivated = true; Nullable <bool> dialogResult = loginWnd.ShowDialog(); if (dialogResult == true) { VOP.MainWindow.m_bLogon = true; VOP.MainWindow.m_strPhoneNumber = loginWnd.m_strPhoneNumber; UserInformation userInformation = new UserInformation(); string strResult = ""; UserInformation.GetUserInfo(VOP.MainWindow.m_strPhoneNumber, ref userInformation, ref strResult); if (userInformation.m_strRealName.Length > 0) { tbUserName.Text = userInformation.m_strRealName + String.Format("({0})", VOP.MainWindow.m_strPhoneNumber); } else { tbUserName.Text = VOP.MainWindow.m_strPhoneNumber; } tbUserName.Visibility = Visibility.Visible; btnLogon.Visibility = Visibility.Hidden; ((MainWindow)App.Current.MainWindow).UpdateLogonBtnStatus(true); btnModifyUserInfo.IsEnabled = true; } } else if (btn.Name == "btnModifyUserInfo") { ((MainWindow)App.Current.MainWindow).ShowModifyUserInfoView(); } else if (btn.Name == "btnConsumable") { PurchaseWindow win = new PurchaseWindow(); win.Owner = App.Current.MainWindow; win.ShowDialog(); } else if (btn.Name == "btnRewardPoints") { } else if (btn.Name == "btnMaintainStation") { MaintainWindow mw = new MaintainWindow(); mw.Owner = App.Current.MainWindow; mw.ShowDialog(); } else if (btn.Name == "btnFWDownload") { try { System.Diagnostics.Process.Start(@"http://function.iprintworks.cn/downapp/down.html"); } catch { } } else if (btn.Name == "btnAbout") { AboutWindow wnd = new AboutWindow(); wnd.Owner = App.Current.MainWindow; wnd.ShowDialog(); } else if (btn.Name == "btnBack") { ((MainWindow)App.Current.MainWindow).ShowUserCenterView(false); } else if (btn.Name == "btnImprovePlan") { ((MainWindow)App.Current.MainWindow).ShowCRMAgreementWindow(); } }