private void LogonSettingHandler(object sender, RoutedEventArgs e) { try { LogonSettingWindow logonSettingWindow = WindowModel.Instance.LogonSettingWindow; this.logonWindow = (this.dataService.LoginWindow as LogonWindow); if (logonSettingWindow != null && this.logonWindow != null && this.logonWindow.IsActive) { logonSettingWindow.Owner = this.logonWindow; logonSettingWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner; logonSettingWindow.tbxServer.Focus(); DoubleAnimation animate = new DoubleAnimation(); animate.FillBehavior = FillBehavior.HoldEnd; animate.From = new double?(0.0); animate.To = new double?(0.5); animate.Duration = new Duration(System.TimeSpan.FromSeconds(0.8)); this.logonWindow.RootBorder.Visibility = Visibility.Visible; this.logonWindow.RootBorder.Background.BeginAnimation(System.Windows.Media.Brush.OpacityProperty, animate); logonSettingWindow.ShowDialog(); logonSettingWindow.Activate(); this.logonWindow.RootBorder.Visibility = Visibility.Collapsed; } } catch (System.Exception ex) { this.logger.Error(ex.ToString()); } }
public void ClearAll() { try { if (this.resultWindow != null) { this.resultWindow.Close(); } if (this.searchWindow != null) { this.searchWindow.Close(); } if (this.systemSettingWindow != null) { this.systemSettingWindow.Close(); } if (this.aboutWindow != null) { this.aboutWindow.Close(); } if (this.closingTipWindow != null) { this.closingTipWindow.Close(); } if (this.updateWindow != null) { this.updateWindow.Close(); this.updateWindow = null; } if (this.groupManagerWindow != null) { this.groupManagerWindow.Close(); } if (this.messageCenterWindow != null) { this.messageCenterWindow.Close(); } if (this.systemSettingWindow != null) { this.systemSettingWindow.Close(); } if (this.logonSettingWindow != null) { this.logonSettingWindow.Close(); this.logonSettingWindow = null; } this.ClearEntGroupManagerWindows(); } catch (System.Exception ex) { this.logger.Error(ex.ToString()); } }