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;
        }
Exemple #2
0
 public Page(Window window, SqlConnectionFactory sqlConnectionFactory) : this(window, null, sqlConnectionFactory)
 {
 }
Exemple #3
0
 public OrderPage(Window window, Page previousPage, SqlConnectionFactory sqlConnectionFactory) : base(window, previousPage, sqlConnectionFactory)
 {
     InitializeComponent();
     Loaded += (sender, args) => SpeechControl.SetParent(this);
     ListMovies();
 }
Exemple #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);
 }