Exemple #1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            NewContactWindow newContactWindow = new NewContactWindow();

            newContactWindow.ShowDialog();
            ReadDatabase();
        }
Exemple #2
0
        private void AddNewButton_Click(object sender, RoutedEventArgs e)
        {
            NewContactWindow newContactWindow = new NewContactWindow();

            newContactWindow.ShowDialog();

            RefreshContactsViewIfShowDialogHasBeenAccepted();
        }
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            NewContactWindow newContactWindow = new NewContactWindow();

            newContactWindow.ShowDialog(); // Show dialog makes the user use the new window before continuing

            readDatabase();                //will not be executed until the dialog window closes
        }
Exemple #4
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            NewContactWindow newContactWindow = new NewContactWindow();

            newContactWindow.ShowDialog(); // new window must be closed before main window can be accessed

            ReadDatabase();
        }
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            NewContactWindow newContactWindow = new NewContactWindow();

            //newContactWindow.Show(); Multiple windows possible here.

            newContactWindow.ShowDialog(); // Only single windo is possible.
            ReadDatabase();                // After closing dialog, read the db again.
        }
Exemple #6
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            NewContactWindow newContactWindow = new NewContactWindow();

            //display the new window
            newContactWindow.ShowDialog();

            //called after the other window has
            //closed or the user added so always updated
            ReadDatabase();
        }
Exemple #7
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            NewContactWindow newContactWindow = new NewContactWindow();

            newContactWindow.ShowDialog(); // Nothing will be returned until the window is closed
                                           // by clicking on the save button or closing it manually

            ReadDatabase();                // This will be called AFTER the window is closed.
                                           // That way, after a new contact has been entered,
                                           // the  updated table is immediately read
        }
        private void newContactsWindowButton_Click(object sender, RoutedEventArgs e)
        {
            NewContactWindow newContactWindow = new NewContactWindow();

            //newContactWindow.Show();

            //ShowDialog disables the user to click out
            newContactWindow.ShowDialog();

            //After showdialog() - close the form or presssed save button - it will be called!
            ReadDatabase();
        }
Exemple #9
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            NewContactWindow newContactWindow = new NewContactWindow();

            // newContactWindow.Show();
            // ShowDialog does not allow the user to navigate back to the first window
            // until the new window is closed
            newContactWindow.ShowDialog();

            // reads database after possible addition of new contact
            ReadDatabase();
        }