Commit 5138d382 authored by Xavier de Blas's avatar Xavier de Blas

Exhibition testType selects Chronojump mode at start

parent 7a008fe5
......@@ -47,6 +47,7 @@ public class Config
public bool PlaySoundsFromFile;
public bool Exhibition; //like YOMO. does not have rfid capture, user autologout management, and automatic configuration of gui
public ExhibitionTest.testTypes ExhibitionStationType;
/*
* unused because the default serverURL chronojump.org is ok:
* public string ExhibitionServerURL = "";
......@@ -111,6 +112,9 @@ public class Config
PlaySoundsFromFile = true;
else if(parts[0] == "Exhibition" && Util.StringToBool(parts[1]))
Exhibition = true;
else if(parts[0] == "ExhibitionStationType" && Enum.IsDefined(typeof(ExhibitionTest.testTypes), parts[1]))
ExhibitionStationType = (ExhibitionTest.testTypes)
Enum.Parse(typeof(ExhibitionTest.testTypes), parts[1]);
/*
else if(parts[0] == "ExhibitionServerURL" && parts[1] != "")
ExhibitionServerURL = parts[1];
......
......@@ -696,8 +696,6 @@ public partial class ChronoJumpWindow
LogB.Information("Calling configInitRead from gui / ChronojumpWindow");
configInitRead();
if(configChronojump.Exhibition)
exhibitionGuiAtStart();
//presentationInit();
......@@ -4509,7 +4507,6 @@ public partial class ChronoJumpWindow
if(configChronojump.Exhibition)
uploadExhibitionTest(ExhibitionTest.testTypes.JUMP, Convert.ToDouble(Util.GetHeightInCentimeters(currentJump.Tv.ToString())));
}
else if( currentEventExecute.ChronopicDisconnected )
chronopicDisconnectedWhileExecuting();
......@@ -4951,6 +4948,9 @@ public partial class ChronoJumpWindow
//put correct time value in eventWindow (put the time from chronopic and not onTimer soft chronometer)
event_execute_LabelTimeValue = currentRun.Time;
if(configChronojump.Exhibition)
uploadExhibitionTest(ExhibitionTest.testTypes.RUN, currentRun.Time);
}
else if( currentEventExecute.ChronopicDisconnected )
chronopicDisconnectedWhileExecuting();
......
......@@ -30,8 +30,19 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Label label_exhibition_4;
[Widget] Gtk.Label label_persons; //persons text show the top of manage persons. Hidden on exhibition to be more clear (1,2,3,4)
private void exhibitionGuiAtStart()
private void exhibitionGuiAtStart(ExhibitionTest.testTypes exhibitionStationType)
{
if(exhibitionStationType == ExhibitionTest.testTypes.JUMP)
on_button_selector_start_jumps_simple_clicked (new object (), new EventArgs());
else if(exhibitionStationType == ExhibitionTest.testTypes.RUN)
on_button_selector_start_runs_simple_clicked (new object (), new EventArgs());
else if(exhibitionStationType == ExhibitionTest.testTypes.INERTIAL)
on_button_selector_start_encoder_inertial_clicked (new object (), new EventArgs());
else if(exhibitionStationType == ExhibitionTest.testTypes.FORCE_ROPE ||
exhibitionStationType == ExhibitionTest.testTypes.FORCE_SHOT)
on_button_selector_start_force_sensor_clicked (new object (), new EventArgs());
frame_exhibition.Visible = true;
notebook_session_person.CurrentPage = 1;
frame_persons.Sensitive = true;
spin_exhibition_school.Value = 0; //need to assign an inital value (if not it shows blank value)
......
......@@ -199,7 +199,7 @@ public partial class ChronoJumpWindow
}
if(configChronojump.Exhibition)
frame_exhibition.Visible = true;
exhibitionGuiAtStart(configChronojump.ExhibitionStationType);
configDo();
}
......
......@@ -1398,7 +1398,7 @@ public class ExhibitionTest
{
public int sessionID; //includes school and class-group
public int personID;
public enum testTypes { JUMP, RUN, FORCE_ROPE, FORCE_SHOT, INERTIAL }; //run will be a an intervallic run
public enum testTypes { JUMP, RUN, INERTIAL, FORCE_ROPE, FORCE_SHOT };
public testTypes testType;
public double result;
/* result is:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment