Exemplo n.º 1
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            Settings.SettingsDatabase.Load();

            MainAppWindow.Topmost = Settings.SettingsDatabase.AlwaysOnTop;
            MainAppWindow.Show();
        }
Exemplo n.º 2
0
        private void LoginAction()
        {
            bool result = RestClient.Instance.MakePostRequest("LogIn", new User()
            {
                Login    = loginTextBox.Text,
                Password = pswdTextBox.Password
            });

            if (result)
            {
                RestClient.Instance.LoggedUserLogin = loginTextBox.Text;
                Window mainWindow = new MainAppWindow();
                App.Current.MainWindow = mainWindow;
                mainWindow.Show();
                this.Close();
            }
            else
            {
                loginTextBox.Clear();
                pswdTextBox.Clear();
                FailLogIn.Visibility = Visibility.Visible;
            }
        }