public MainWindow() { this.InitializeComponent(); //MAKE SURE TO INCLUDE THIS LINE OR THE APPLICATION WILL NOT CLOSE //BECAUSE THE WINDOWS ARE STILL IN MEMORY Application.Current.ShutdownMode = ShutdownMode.OnMainWindowClose; //ResourceDictionary skin = new ResourceDictionary(); //skin.Source = new Uri(@"/CS3280GroupProject/ExpressionDark.xaml", UriKind.Absolute); //App.Current.Resources.MergedDictionaries.Add(skin); try { SQLStatements = new clsSQLStatements(); infoLabel.Content = ""; lblInvoiceNumber.Visibility = Visibility.Hidden; txtInvoice.Visibility = Visibility.Hidden; selectItem.IsEnabled = false; cmdAdd.IsEnabled = false; cmdDeleteItem.IsEnabled = false; cmdSave.IsEnabled = false; cmdEdit.IsEnabled = false; cmdDelete.IsEnabled = false; } catch (Exception ex) { throw new Exception(MethodInfo.GetCurrentMethod().DeclaringType.Name + "." + MethodInfo.GetCurrentMethod().Name + " -> " + ex.Message); } }
public MainWindow() { this.InitializeComponent(); //MAKE SURE TO INCLUDE THIS LINE OR THE APPLICATION WILL NOT CLOSE //BECAUSE THE WINDOWS ARE STILL IN MEMORY Application.Current.ShutdownMode = ShutdownMode.OnMainWindowClose; SQLStatements = new clsSQLStatements(); selectItem.ItemsSource = SQLStatements.itemsCollection(); }