Exemplo n.º 1
0
 private void MenuItem_Click(object sender, RoutedEventArgs e)
 {
     if (sender == chooseFiles)
     {
         OpenFile();
     }
     else if (sender == silth)
     {
         SettingsWin settings = new SettingsWin();
         settings.ShowDialog();
     }
 }
Exemplo n.º 2
0
        private async void loginToServer()
        {
            client = new RestClient(serverAddress.Text);
            HttpResponseMessage response = await client.login(username.Text, password.Text);

            if (response.StatusCode.ToString().Equals("OK"))
            {
                this.Hide();
                SettingsWin settingsWin = new SettingsWin(client);
                settingsWin.ShowDialog();
            }
            else
            {
                timer1.Stop();
                MessageBox.Show("The details you’ve entered are incorrect.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                faildState(true, true, true, true, true);
                message.Visible = false;
            }
        }
        private void OnClick()
        {
            SettingsWin settings = new SettingsWin();

            settings.ShowDialog();
        }