Beispiel #1
0
        void login_LoginSuccessful(object sender, RoutedEventArgs e)
        {
            contentGrid.Children.Clear();
            _hostControl      = new BiolinkHost();
            _hostControl.User = (e as LoginSuccessfulEventArgs).User;
            this.User         = _hostControl.User;
            contentGrid.Children.Add(_hostControl);

            Config.RestoreWindowPosition(User, this);

            Title = String.Format("BioLink - {0}\\{1} ({2})", User.ConnectionProfile.Server, User.ConnectionProfile.Database, User.Username);
            _hostControl.StartUp();
        }
Beispiel #2
0
 public bool LogOut()
 {
     if (_hostControl.RequestShutdown())
     {
         _hostControl.Visibility = System.Windows.Visibility.Hidden;
         _hostControl.Dispose();
         _hostControl = null;
         ShowLogin();
         return(true);
     }
     else
     {
         return(false);
     }
 }