Example #1
0
        private void AddGameButton_Click(object sender, RoutedEventArgs e)
        {
            customExe cus = new customExe(Curlibrary);

            this.Close();
            cus.ShowDialog();
        }
        private void ChangeDetails_Click(object sender, RoutedEventArgs e)
        {
            customExe cus = new customExe(setGame);

            cus.close.Visibility = Visibility.Hidden;
            this.Hide();
            cus.ShowDialog();
            this.Show();
        }
        private void ManualAddBtn_Click(object sender, RoutedEventArgs e)
        {
            customExe cus = new customExe(library);

            this.Hide();
            cus.ShowDialog();
            this.Show();
            if (library.gameList.Count > 0)
            {
                //no games were added to the library, let user know
                warningDisplay = false;
                EmptyLibraryWarning.Visibility = Visibility.Collapsed;
                if (ChildCheck.IsChecked == true)
                {
                    this.Height              = 530;
                    DoneBtn.Margin           = new Thickness(133, 495, 0, 0);
                    LockCodeLabel.Visibility = Visibility.Visible;
                    LockCode.Visibility      = Visibility.Visible;
                    ChildLabel.Visibility    = Visibility.Visible;
                    ChildName.Visibility     = Visibility.Visible;
                    ParentLabel.Visibility   = Visibility.Visible;
                    ParentName.Visibility    = Visibility.Visible;
                    Properties.Settings.Default.ChildEnabled = true;
                }
                else
                {
                    this.Height              = 360;
                    DoneBtn.Margin           = new Thickness(133, 330, 0, 0);
                    LockCodeLabel.Visibility = Visibility.Collapsed;
                    LockCode.Visibility      = Visibility.Collapsed;
                    ChildLabel.Visibility    = Visibility.Collapsed;
                    ChildName.Visibility     = Visibility.Collapsed;
                    ParentLabel.Visibility   = Visibility.Collapsed;
                    ParentName.Visibility    = Visibility.Collapsed;
                    Properties.Settings.Default.ChildEnabled = false;
                }
            }
        }