[chronojump] forceSensor, raceAnalyzer, sprint only can open result if was successful
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] forceSensor, raceAnalyzer, sprint only can open result if was successful
- Date: Thu, 10 Jun 2021 12:51:36 +0000 (UTC)
commit 8eb27ae75978a86cf75227c61bc792664132072f
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Jun 10 14:51:04 2021 +0200
forceSensor, raceAnalyzer, sprint only can open result if was successful
src/exportFiles/exportFiles.cs | 9 +++++++++
src/gui/app1/forceSensorAnalyze.cs | 4 +++-
src/gui/app1/runEncoderAnalyze.cs | 4 +++-
src/gui/sprint.cs | 4 +++-
4 files changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/src/exportFiles/exportFiles.cs b/src/exportFiles/exportFiles.cs
index 91b6a6415..7ba7f48c5 100644
--- a/src/exportFiles/exportFiles.cs
+++ b/src/exportFiles/exportFiles.cs
@@ -48,6 +48,7 @@ public abstract class ExportFiles
protected static bool failedRprocess; //error on .R process
protected static bool noData;
protected static bool cannotCopy;
+ protected static bool allOk;
protected static string messageToProgressbar;
protected void assignParams (
@@ -82,6 +83,7 @@ public abstract class ExportFiles
failedRprocess = false;
noData = false;
cannotCopy = false;
+ allOk = false;
progressbar.Fraction = 0;
messageToProgressbar = "";
notebook.CurrentPage = 1;
@@ -159,10 +161,14 @@ public abstract class ExportFiles
else if (cannotCopy)
labelResult.Text = string.Format(Catalog.GetString("Cannot copy to {0} "),
exportURL);
else
+ {
labelResult.Text = string.Format(Catalog.GetString("Exported to {0}"),
exportURL);// +
//Constants.GetSpreadsheetString(CSVExportDecimalSeparator)
//);
+ allOk = true;
+ }
+
Button_done.Click();
return false;
@@ -221,6 +227,9 @@ public abstract class ExportFiles
//folder or .csv depending on includeImages
//this provides a way to open file or folder from the main gui
+ public bool AllOk {
+ get { return allOk; }
+ }
public string ExportURL {
get { return exportURL; }
}
diff --git a/src/gui/app1/forceSensorAnalyze.cs b/src/gui/app1/forceSensorAnalyze.cs
index af506a7de..26d477c6c 100644
--- a/src/gui/app1/forceSensorAnalyze.cs
+++ b/src/gui/app1/forceSensorAnalyze.cs
@@ -845,7 +845,9 @@ public partial class ChronoJumpWindow
hbox_force_sensor_analyze_top_modes.Sensitive = true;
button_force_sensor_analyze_options.Sensitive = true;
hbox_force_sensor_export_images.Sensitive = true;
- button_force_sensor_export_result_open.Visible = true;
+
+ if(forceSensorExport != null && forceSensorExport.AllOk)
+ button_force_sensor_export_result_open.Visible = true;
}
private void on_button_force_sensor_export_result_open_clicked (object o, EventArgs args)
diff --git a/src/gui/app1/runEncoderAnalyze.cs b/src/gui/app1/runEncoderAnalyze.cs
index 6bab433c8..778b6ca0f 100644
--- a/src/gui/app1/runEncoderAnalyze.cs
+++ b/src/gui/app1/runEncoderAnalyze.cs
@@ -417,7 +417,9 @@ public partial class ChronoJumpWindow
runEncoderButtonsSensitive(true);
hbox_run_encoder_top.Sensitive = true;
- button_run_encoder_export_result_open.Visible = true;
+
+ if(runEncoderExport != null && runEncoderExport.AllOk)
+ button_run_encoder_export_result_open.Visible = true;
}
private void on_button_run_encoder_export_result_open_clicked (object o, EventArgs args)
diff --git a/src/gui/sprint.cs b/src/gui/sprint.cs
index 3c4cb1f3b..2ae754dd1 100644
--- a/src/gui/sprint.cs
+++ b/src/gui/sprint.cs
@@ -420,7 +420,9 @@ public partial class ChronoJumpWindow
// sprintButtonsSensitive(true);
hbox_sprint_analyze_top_modes.Sensitive = true;
- button_sprint_export_result_open.Visible = true;
+
+ if(sprintExport != null && sprintExport.AllOk)
+ button_sprint_export_result_open.Visible = true;
}
private void on_button_sprint_export_result_open_clicked (object o, EventArgs args)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]