protected override void OnStartup(StartupEventArgs e) { if (string.IsNullOrEmpty(YellowstonePathology.Business.User.UserPreferenceInstance.Instance.UserPreference.HostName) == true) { string path = System.Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\ypilis.json"; if (File.Exists(path) == false) { YellowstonePathology.Business.User.UserPreferenceInstance.SetDefaultUserPreference(); } else { YellowstonePathology.Business.User.UserPreferenceInstance.SetUserPreferenceHostNameByLocation(); } } Store.AppDataStore.Instance.LoadData(); Business.Test.AccessionLockCollection accessionLockCollection = new Business.Test.AccessionLockCollection(); accessionLockCollection.ClearLocks(); string startUpWindow = string.Empty; if (System.Environment.MachineName.ToUpper() == "CUTTINGA" || System.Environment.MachineName.ToUpper() == "CUTTINGB" || System.Environment.MachineName.ToUpper() == "CUTTINGC")// || System.Environment.MachineName.ToUpper() == "COMPILE") { YellowstonePathology.UI.Cutting.CuttingStationPath cuttingStationPath = new Cutting.CuttingStationPath(); cuttingStationPath.Start(); } else if (System.Environment.MachineName.ToUpper() == "CYTOLOG2") // || System.Environment.MachineName.ToUpper() == "COMPILE") { YellowstonePathology.UI.Cytology.ThinPrepPapSlidePrintingPath thinPrepPapSlidePrintingPath = new Cytology.ThinPrepPapSlidePrintingPath(); thinPrepPapSlidePrintingPath.Start(); } else { startUpWindow = @"UI\MainWindow.xaml"; this.StartupUri = new System.Uri(startUpWindow, System.UriKind.Relative); } EventManager.RegisterClassHandler(typeof(TextBox), TextBox.GotFocusEvent, new RoutedEventHandler(TextBox_GotFocus)); base.OnStartup(e); this.StartTimer(); this.SetupApplicationFolders(); this.EmptyDraftsFolder(); }
private void App_Exit(object sender, ExitEventArgs e) { Business.Test.AccessionLockCollection accessionLockCollection = new Business.Test.AccessionLockCollection(); accessionLockCollection.ClearLocks(); }
protected override void OnStartup(StartupEventArgs e) { Business.Test.AccessionLockCollection accessionLockCollection = new Business.Test.AccessionLockCollection(); accessionLockCollection.ClearLocks(); string startUpWindow = string.Empty; if (System.Environment.MachineName.ToUpper() == "CUTTINGA" || System.Environment.MachineName.ToUpper() == "CUTTINGB" ) //|| System.Environment.MachineName.ToUpper() == "COMPILE") { YellowstonePathology.UI.Cutting.CuttingStationPath cuttingStationPath = new Cutting.CuttingStationPath(); cuttingStationPath.Start(); } else if (System.Environment.MachineName.ToUpper() == "CYTOLOG2") // || System.Environment.MachineName.ToUpper() == "COMPILE") { YellowstonePathology.UI.Cytology.ThinPrepPapSlidePrintingPath thinPrepPapSlidePrintingPath = new Cytology.ThinPrepPapSlidePrintingPath(); thinPrepPapSlidePrintingPath.Start(); } else { startUpWindow = @"UI\MainWindow.xaml"; this.StartupUri = new System.Uri(startUpWindow, System.UriKind.Relative); } EventManager.RegisterClassHandler(typeof(TextBox), TextBox.GotFocusEvent, new RoutedEventHandler(TextBox_GotFocus)); base.OnStartup(e); this.StartTimer(); //HandleLocalRepository(); }