예제 #1
0
        public void Button_TEST(object sender, RoutedEventArgs e)
        {
            ReadmeDialog updaterTest = new ReadmeDialog();

            updaterTest.ShowDialog();

            //Restart Print.exe after updating the Scripts
            System.Windows.Forms.Application.Restart();
            Application.Current.Shutdown();
        }
예제 #2
0
        private void OnClickDefault(object sender, RoutedEventArgs e)
        {
            var proceed       = Button_Okay();
            var optionsBox    = PrintOptions;
            var selectedValue = optionsBox.SelectionBoxItem.ToString();


            if (proceed)
            {
                switch (selectedValue)
                {
                case ("Batchsheets"):
                {
                    ComboBoxItem_Batchsheets();
                    break;
                }

                case ("Monthly Reports"):
                {
                    ComboBoxItem_MonthlyReports();
                    break;
                }

                case ("Invoices"):
                {
                    ComboBoxItem_Invoices();
                    break;
                }

                case ("Collection Agency Reports"):
                {
                    ComboBoxItem_CollectionAgencyReports();
                    break;
                }

                case ("Statements"):
                {
                    ComboBoxItem_Statements();
                    break;
                }

                case ("Perkins Reassignments"):
                {
                    ComboBoxItem_PerkinsReassignments();
                    break;
                }

                case ("Interest Paid"):
                {
                    try
                    {
                        ComboBoxItem_InterestPaid();
                    }
                    catch
                    {
                        Console.WriteLine(@"Your Scripts Folder is out of date. Please locate the README file located at 'C:\Users\Owner\Google Drive\EDSI\Updated Scripts' for more information.");
                        ReadmeDialog Updater = new ReadmeDialog();
                        Updater.ShowDialog();
                        ComboBoxItem_MonthlyReports();
                    }

                    break;
                }

                case ("All"):
                {
                    ComboBoxItem_All();
                    break;
                }

                default:
                {
                    Console.WriteLine(@"Selection was invalid, terminating.");
                    break;
                }
                }
            }
            else
            {
                MessageBox.Show("Something went wrong!");
            }

            Button_Cancel(sender, e);
        }