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

            newContactWindow.ShowDialog();
            ReadDatabase();
        }
예제 #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
        }
예제 #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();
        }
예제 #5
0
        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.
        }
예제 #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();
        }
예제 #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();
        }
예제 #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();
        }