예제 #1
0
        /// <summary>
        /// Executes login command. Opens login dialog and loads customers.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void LoginCommand_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            WindowLogin window = new WindowLogin();

            window.Owner = this; // This will center dialog in owner window

            if (window.ShowDialog() == true)
            {
                LoadCustomers();

                CommandManager.InvalidateRequerySuggested();
            }
        }
예제 #2
0
        /// <summary>
        /// Executes login command. Opens login dialog and loads customers.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void LoginCommand_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            var window = new WindowLogin();

            window.Owner = this; // This will center dialog in owner window

            if (window.ShowDialog() == true)
            {
                TextBlockAnnouncement.Visibility = Visibility.Collapsed;

                Cursor = Cursors.Wait;
                ViewModel.LoadCustomers();
                Cursor = Cursors.Arrow;

                CommandManager.InvalidateRequerySuggested();
            }
        }