Ejemplo n.º 1
0
        /// <summary>
        /// Open New Contact Window
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <remarks>
        /// <"(Window).Show()"/>
        /// The new window and the original window
        /// are both actived.
        /// However one can call  <(Window).ShowDialog/> method
        /// to only active the new window.
        /// The orinal Mainwindow is locked until the
        /// new window gives a call back method.
        /// </remarks>
        private void NewContact_OnClick(object sender, RoutedEventArgs e)
        {
            var newContactWindow = new NewContactWindow();

            newContactWindow.ShowDialog();

            ReadDatabase();
        }
Ejemplo n.º 2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            NewContactWindow newContactWindow = new NewContactWindow();

            newContactWindow.ShowDialog();

            readDatabase();
        }
        private void NewContactButton_Click(object sender, RoutedEventArgs e)
        {
            //create a new window
            NewContactWindow newContactWindow = new NewContactWindow();

            //make the user unable to get back to the main window before finishing with the new one
            newContactWindow.ShowDialog();

            ReadDatabase();
        }
Ejemplo n.º 4
0
        private void OnButtonKeyDown(object sender, KeyEventArgs e)
        {
            //Shortcut to add new contact
            if (e.Key == Key.N)
            {
                NewContactWindow newContactWindow = new NewContactWindow();

                newContactWindow.ShowDialog();

                readDatabase();
            }
        }