Example #1
0
        public static void Init(MainWindow mainWindow)
        {
            LoadConfig();

            GoogleSheet googleSheet = new GoogleSheet(
                _config["GoogleSheetApplicationName"],
                _config["GoogleSheetSpreadsheetId"],
                _config["GoogleSheetClientSecretPath"],
                _config["GoogleSheetCredentialsPath"]);

            BeansDatabase = new BeansDatabaseGoogle(googleSheet);

            BeansMainWindow = mainWindow;

            // Default dates (this month)
            EndDate   = DateTime.Now;
            StartDate = new DateTime(EndDate.Year, EndDate.Month, 1);

            // Reports View
            ReportsView = new BeansReportsPage();
            BeansReportsPresenter reportsPresenter = new BeansReportsPresenter(ReportsView);

            // Settings View
            SettingsView = new BeansSettingsPage();
            BeansSettingsPresenter settingsPresenter = new BeansSettingsPresenter(SettingsView);

            BeansMainWindow.NavigationService.Navigate(ReportsView);
        }
Example #2
0
 public BeansDatabaseGoogle(GoogleSheet googleSheet)
 {
     _googleSheet = googleSheet;
 }