Beispiel #1
0
        public void LogOutEvent(LogOutMessage message)
        {
            MenuItems = new ObservableCollection <Models.Security.MenuItem>(_securityService.GetAllowedAccessItems());

            var mainPage = App.Current.MainPage as FlyoutPage;

            if (mainPage != null)
            {
                mainPage.Detail      = new NavigationPage((Page)Activator.CreateInstance(typeof(LoginView)));
                mainPage.IsPresented = false;
            }
        }
        private void Logout()
        {
            LogOutMessage msg = new LogOutMessage();

            SendMsg <LogOutMessage>(msg);
            SleepRand(1000);
            client.Disconnect();
            if (SQLiteConnect.conn != null)
            {
                SQLiteConnect.conn.Close();
            }
            System.Environment.Exit(1);
        }
Beispiel #3
0
        public async Task <bool> LogOutAsync(string key, string login)
        {
            var message = new LogOutMessage()
            {
                SessionKey = key, Login = login
            };
            var deSerializedData = await GetDataAsync(message);

            switch (deSerializedData)
            {
            case ErrorMessage errorMessage:
                MessageBox.Show(errorMessage.Error);
                return(false);

            case SuccessfulMessage successfulMessage:
                MessageBox.Show(successfulMessage.ToString());
                return(true);

            default:
                throw new Exception();
            }
        }
Beispiel #4
0
 private void UserLogOut(LogOutMessage obj)
 {
     Model = null;
 }
Beispiel #5
0
 private void ReloadLoginPage(LogOutMessage message)
 {
     ContentFrame.Source = new Uri("/login", UriKind.Relative);
 }
Beispiel #6
0
 public void Handle(LogOutMessage message)
 {
     ActivateItem(_loginConductorViewModel);
 }
Beispiel #7
0
 private void ReloadLoginPage(LogOutMessage message)
 {
     ContentFrame.Source = new Uri("/login", UriKind.Relative);
 }