Beispiel #1
0
        private void Load()
        {
            try
            {
                _sqlConn = new SQLiteConnection(appconfig.sqlite);
                _sqlConn.Open();
            }
            catch (Exception ex)
            {
                MessageBox.Show($"Nepodařilo se připojit k DB", "Chyba", MessageBoxButton.OK,
                                MessageBoxImage.Stop);
                System.Environment.Exit(-1);
            }

            _pageStatistics   = new PageStatistics(_sqlConn);
            FrmModule.Content = _pageStatistics;
        }
Beispiel #2
0
 private void BtnStatistics_Click(object sender, RoutedEventArgs e)
 {
     if (FrmModule.Content.Equals(_pageStatistics))
     {
         return;
     }
     RectSide.Margin = new Thickness(RectSide.Margin.Left, btnStatistics.Margin.Top, RectSide.Margin.Right, RectSide.Margin.Bottom);
     if (_pageStatistics != null)
     {
         FrmModule.Content = _pageStatistics;
         _pageStatistics.Refresh();
     }
     else
     {
         _pageStatistics   = new PageStatistics(_sqlConn);
         FrmModule.Content = _pageStatistics;
     }
 }