コード例 #1
0
 private void buttonOk_Click(object sender, EventArgs e)
 {
     //Check if textbox is not empty for it is the name of the list
     if(textBox.Text.Length > 0)
     {
         //Confirm the entered name is valid and the user confirmed
         valid = true;
         text = textBox.Text;
         this.Close();
     }
     else
     {
         FailedDialogView dlg = new FailedDialogView();
         dlg.getLabelFailed().Text = "Vul een naam in";
         dlg.ShowDialog();
     }
 }
コード例 #2
0
ファイル: StartView.cs プロジェクト: 1337Steven1337/KBS2G3
        public void ShowCodeResult(Model.Pincode instance, HttpStatusCode status)
        {
            if (status == HttpStatusCode.OK)
            {
                this.Code = instance;
            }
            else
            {
                this.CodeTextBox.Invoke((Action)(() =>
                {
                    LoginButton.Enabled = true;
                    CodeTextBox.Enabled = true;
                    PasswordTextBox.Enabled = true;

                    FailedDialogView failed = new FailedDialogView();
                    failed.getLabelFailed().Text = "De code is incorrect.";
                    BackgroundDialogView background = new BackgroundDialogView(this, failed);
                }));
            }
        }
コード例 #3
0
 public void ShowSaveFailed(Dictionary<string, int> data)
 {
     FailedDialogView failed = new FailedDialogView();
     failed.getLabelFailed().Text = "Kon een of meerdere e-mails niet versturen.";
     failed.ShowDialog();
 }
コード例 #4
0
 public void ShowNoAccountsFound()
 {
     FailedDialogView failed = new FailedDialogView();
     failed.getLabelFailed().Text = "Het Excel bestand is ongeldig, er zijn geen accounts gevonden.";
     failed.ShowDialog();
 }
コード例 #5
0
 public void ShowLoadFailed()
 {
     FailedDialogView failed = new FailedDialogView();
     failed.getLabelFailed().Text = "Het Excel bestand is ongeldig, er is geen sheet gevonden.";
     failed.ShowDialog();
 }
コード例 #6
0
ファイル: MainView.cs プロジェクト: 1337Steven1337/KBS2G3
 private void DeletedStatus()
 {
     count++;
     //Check if accounts, openquestions and useranswers have been removed
     if (count == 3)
     {
         if (removed)
         {
             //If everything is succesfully removed show succes
             SuccesDialogView view = new SuccesDialogView();
             view.Text = "Succes";
             view.getLabelSucces().Text = "Verwijderen gegevens voltooid! U kunt nu het programma afsluiten.";
             view.ShowDialog();
         }
         else
         {
             //If everything is succesfully removed show fail
             FailedDialogView view = new FailedDialogView();
             view.Text = "Foutmelding";
             view.getLabelFailed().Text = "Oeps! Er is iets misgegaan! Probeer het opnieuw!";
             view.ShowDialog();
         }
         count = 0;
         removed = true;
     }
 }
コード例 #7
0
ファイル: StartView.cs プロジェクト: 1337Steven1337/KBS2G3
        public void ShowPasswordResult(bool result)
        {
            if (!result)
            {
                this.CodeTextBox.Invoke((Action)(() =>
                {
                    LoginButton.Enabled = true;
                    CodeTextBox.Enabled = true;
                    PasswordTextBox.Enabled = true;

                    FailedDialogView failed = new FailedDialogView();
                    failed.getLabelFailed().Text = "Het wachtwoord is incorrect.";
                    BackgroundDialogView background = new BackgroundDialogView(this, failed);
                }));
            }
        }
コード例 #8
0
 public void ShowSaveFailed()
 {
     FailedDialogView failed = new FailedDialogView();
     failed.getLabelFailed().Text = "Het opslaan is mislukt! Probeer het opnieuw.";
     failed.ShowDialog();
 }