コード例 #1
0
        /// <summary>
        /// open the next window (adding child window)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Click_addChild(object sender, RoutedEventArgs e)
        {
            IEnumerable <Mother> mothers = myBl.MothersByPredicate();  // checks is there is untreated child. Because if there is no untreated child there is no point in opening this window

            if (mothers.Count() == 0)
            {
                MessageBox.Show("There is no any mother!", "Error 404", MessageBoxButton.OK, MessageBoxImage.Warning);
                return;
            }

            Window nextWindow = new AddChildWindow();

            this.Close();
            nextWindow.ShowDialog();
        }
コード例 #2
0
ファイル: MainWindow.xaml.cs プロジェクト: ReutAttar/Project
        private void AddChildButton_Click(object sender, RoutedEventArgs e)
        {
            Window addchildwindow = new AddChildWindow();

            addchildwindow.ShowDialog();
        }