protected override void handleLoaded(TECBid loadedBid) { if (loadedBid != null) { bid = loadedBid; watcher = new ChangeWatcher(bid); doStack = new DoStacker(watcher); deltaStack = new DeltaStacker(watcher, bid); if (databaseManager == null && currentTemplatesPath != "") { DatabaseManager <TECTemplates> templatesDatabaseManager = new DatabaseManager <TECTemplates>(currentTemplatesPath); templatesDatabaseManager.LoadComplete += handleLoadedTemplates; ViewEnabled = false; templatesDatabaseManager.AsyncLoad(); } else { estimate = new TECEstimator(bid, watcher); EditorVM = new EstimateEditorVM(bid, watcher, estimate); CurrentVM = EditorVM; ViewEnabled = true; } } else { this.splashVM.LoadingText = ""; ViewEnabled = true; } }
protected override void handleLoaded(TECTemplates loaded) { if (loaded == null) { MessageBox.Show("There was an issue loading this file."); splashVM.LoadingText = ""; } else { templates = loaded; watcher = new ChangeWatcher(templates); doStack = new DoStacker(watcher); deltaStack = new DeltaStacker(watcher, templates); EditorVM = new TemplatesEditorVM(templates); CurrentVM = EditorVM; } ViewEnabled = true; }