Exemple #1
0
 private void MenuWindow_Logout()
 {
     SendRequest("logout");
     this.loggingWindow = new LoggingWindow();
     settingUpLoggingWindow();
     this.menuWindow.Close();
 }
        private void OnOpenLogging()
        {
            var window = new LoggingWindow();

            window.ViewModel.Subscribe(LogListener);
            window.Owner = MainWindow;
            window.Show();
        }
Exemple #3
0
        public static void ShowLoggingWindow()
        {
            if (LoggingWindowInstance == null)
            {
                LoggingWindowInstance = new LoggingWindow();
                LoggingWindowInstance.Show();
            }
            else
            {
                if (!LoggingWindowInstance.IsLoaded)
                {
                    LoggingWindowInstance = new LoggingWindow();
                }

                LoggingWindowInstance.Show();
            }
        }
Exemple #4
0
        private void NewAccountResponse(string message)
        {
            NewAccountResponsecs newAccount = JsonConvert.DeserializeObject <NewAccountResponsecs>(message);

            if (newAccount.newAccountResponse == "new account created")        //to zwraca serwer jak uda sie dodac konto
            {
                this.loggingWindow = new LoggingWindow();
                settingUpLoggingWindow();
                this.signUpWindow.Close();
                MessageBox.Show("Rejestracja przeszła pomyślnie! Możesz się zalogować.");
            }
            else if (newAccount.newAccountResponse == "creating new account failed")  //to zwraca serwer jak nie uda sie dodac konta
            {
                // usernameTextBox.Text = "";
                // PasswordBox1.Password = "";
                // PasswordBox2.Password = "";
                MessageBox.Show("Istnieje już taki użytkownik!");
            }
        }
Exemple #5
0
 private void SignUpWindow_LoggingWindow()
 {
     this.loggingWindow = new LoggingWindow();
     settingUpLoggingWindow();
     this.signUpWindow.Close();
 }