public MainWindow()
        {
            InitializeComponent();

            // Create database if not exists
            if (!File.Exists(DatabasePath))
            {
                CreateSqlDatabase();

                ExecuteCreateQueries();
            }

            SqlConnectionFactory sqlConnectionFactory = CreateSqlConnectionFactory();

            TicketsWindow = new TicketsLogWindow(sqlConnectionFactory);
            Content       = MainPage = new MainPage(this, sqlConnectionFactory);

            WindowStartupLocation = WindowStartupLocation.CenterScreen;
        }
Beispiel #2
0
 public Page(Window window, SqlConnectionFactory sqlConnectionFactory) : this(window, null, sqlConnectionFactory)
 {
 }
Beispiel #3
0
 public OrderPage(Window window, Page previousPage, SqlConnectionFactory sqlConnectionFactory) : base(window, previousPage, sqlConnectionFactory)
 {
     InitializeComponent();
     Loaded += (sender, args) => SpeechControl.SetParent(this);
     ListMovies();
 }
Beispiel #4
0
 public SpeechPage(Window window, Page previousPage, SqlConnectionFactory sqlConnectionFactory) : base(window, previousPage, sqlConnectionFactory)
 {
     ExecuteBackgroundAction(InitializeSpeech);
 }
 public MainPage(Window window, SqlConnectionFactory sqlConnectionFactory) : base(window, sqlConnectionFactory)
 {
     InitializeComponent();
     Loaded += (sender, args) => SpeechControl.SetParent(this);
 }