private void AcceptCalibration(object sender, RoutedEventArgs e) { // Hide UI calibrationMenu.Visibility = Visibility.Collapsed; this.visualPoint.Visibility = Visibility.Collapsed; // Grab screenshot string savePath = GTPath.GetLocalApplicationDataPath() + Path.DirectorySeparatorChar + "Calibration" + Path.DirectorySeparatorChar + Tracker.Instance.Calibration.ID + Path.DirectorySeparatorChar + "calibrationScreen.png"; SaveImage(savePath, CanvasRoot.GetScreenShot(1)); // Dump Instance settings into the calibration folder FileInfo fileSettings = new FileInfo(Settings.Instance.FileSettings.SettingsDirectory + Settings.Instance.GetLatestConfigurationFile()); try { File.Copy(fileSettings.FullName, Tracker.Instance.Calibration.DataFolder + "\\" + fileSettings.Name); } catch (Exception ex) { Console.Out.WriteLine("Error dumping calibration data in CalibrationWindow.AcceptCalibration(), message: " + ex.Message); } // Trigger global calibration accept (will hide this) GTCommands.Instance.Calibration.Accept(); }
private void ShareData(object sender, RoutedEventArgs e) { calibrationMenu.Visibility = Visibility.Collapsed; sharingUC.SendData(Tracker.Instance, CanvasRoot.GetScreenShot(1)); sharingUC.Visibility = Visibility.Visible; }