/* --------------------------------------------------------- * ---------------- RUNS EXECUTION (interval) ---------- * -------------------------------------------------------- */ private void on_run_interval_activate(object o, EventArgs args) { Log.WriteLine("run interval accepted"); //if distance can be always different in this run, //show values selected in runExtraWin double distanceInterval = 0; if(currentRunIntervalType.Distance == 0) { distanceInterval = extra_window_runs_interval_distance; } else { distanceInterval = currentRunIntervalType.Distance; } double progressbarLimit = 0; //if it's a unlimited interval run, put -1 as limit value if(currentRunIntervalType.Unlimited) { progressbarLimit = -1; } else { if(currentRunIntervalType.FixedValue > 0) { progressbarLimit = currentRunIntervalType.FixedValue; } else { progressbarLimit = extra_window_runs_interval_limit; } } //used by cancel and finish //currentEventType = new RunType(); currentEventType = currentRunIntervalType; //hide running buttons sensitiveGuiEventDoing(); //don't let update until test finishes if(createdStatsWin) showUpdateStatsAndHideData(false); //show the event doing window ExecutingGraphData egd = event_execute_initializeVariables( currentPerson.UniqueID, currentPerson.Name, Catalog.GetString("Tracks"), //name of the different moments Constants.RunIntervalTable, //tableName currentRunIntervalType.Name ); event_execute_ButtonCancel.Clicked += new EventHandler(on_cancel_clicked); event_execute_ButtonFinish.Clicked += new EventHandler(on_finish_clicked); //when user clicks on update the eventExecute window //(for showing with his new confgured values: max, min and guides event_execute_ButtonUpdate.Clicked -= new EventHandler(on_update_clicked); //if we don't do this, on_update_clicked it's called 'n' times when 'n' events are done event_execute_ButtonUpdate.Clicked += new EventHandler(on_update_clicked); currentEventExecute = new RunIntervalExecute(currentPerson.UniqueID, currentSession.UniqueID, currentRunIntervalType.Name, distanceInterval, progressbarLimit, currentRunIntervalType.TracksLimited, chronopicWin.CP, event_execute_textview_message, app1, prefsDigitsNumber, metersSecondsPreferred, volumeOn, repetitiveConditionsWin, progressbarLimit, egd); //suitable for limited by tracks and time if(!chronopicWin.Connected) currentEventExecute.SimulateInitValues(rand); currentEventExecute.Manage(); thisRunIsSimple = false; //used by: on_event_execute_update_graph_in_progress_clicked currentEventExecute.FakeButtonUpdateGraph.Clicked += new EventHandler(on_event_execute_update_graph_in_progress_clicked); currentEventExecute.FakeButtonEventEnded.Clicked += new EventHandler(on_event_execute_EventEnded); currentEventExecute.FakeButtonFinished.Clicked += new EventHandler(on_run_interval_finished); }
/* --------------------------------------------------------- * ---------------- REACTION TIMES EXECUTION -------------- * -------------------------------------------------------- */ //suitable for reaction times private void on_reaction_time_activate(object o, EventArgs args) { //used by cancel and finish currentEventType = new ReactionTimeType(); //hide jumping buttons sensitiveGuiEventDoing(); //show the event doing window double progressbarLimit = 2; //don't let update until test finishes if(createdStatsWin) showUpdateStatsAndHideData(false); ExecutingGraphData egd = event_execute_initializeVariables( currentPerson.UniqueID, currentPerson.Name, Catalog.GetString("Phases"), //name of the different moments Constants.ReactionTimeTable, //tableName "" ); event_execute_ButtonCancel.Clicked += new EventHandler(on_cancel_clicked); event_execute_ButtonFinish.Clicked += new EventHandler(on_finish_clicked); //when user clicks on update the eventExecute window //(for showing with his new confgured values: max, min and guides event_execute_ButtonUpdate.Clicked -= new EventHandler(on_update_clicked); //if we don't do this, on_update_clicked it's called 'n' times when 'n' events are done event_execute_ButtonUpdate.Clicked += new EventHandler(on_update_clicked); currentEventExecute = new ReactionTimeExecute(currentPerson.UniqueID, currentPerson.Name, currentSession.UniqueID, chronopicWin.CP, event_execute_textview_message, app1, prefsDigitsNumber, volumeOn, progressbarLimit, egd); if (!chronopicWin.Connected) currentEventExecute.SimulateInitValues(rand); currentEventExecute.Manage(); currentEventExecute.FakeButtonUpdateGraph.Clicked += new EventHandler(on_event_execute_update_graph_in_progress_clicked); currentEventExecute.FakeButtonEventEnded.Clicked += new EventHandler(on_event_execute_EventEnded); currentEventExecute.FakeButtonFinished.Clicked += new EventHandler(on_reaction_time_finished); }
/* --------------------------------------------------------- * ---------------- JUMPS RJ EXECUTION ------------------ * -------------------------------------------------------- */ private void on_rj_activate(object o, EventArgs args) { double progressbarLimit = 0; //if it's a unlimited interval run, put -1 as limit value if(currentJumpRjType.Unlimited) { progressbarLimit = -1; } else { if(currentJumpRjType.FixedValue > 0) { progressbarLimit = currentJumpRjType.FixedValue; } else { progressbarLimit = extra_window_jumps_rj_limited; } } double jumpWeight = 0; if(currentJumpRjType.HasWeight) { if(extra_window_jumps_rj_option == "%") { jumpWeight = extra_window_jumps_rj_weight; } else { jumpWeight = Util.WeightFromKgToPercent(extra_window_jumps_rj_weight, currentPersonSession.Weight); } } double myFall = 0; if( ! currentJumpRjType.StartIn || currentJumpRjType.Name == Constants.RunAnalysisName) myFall = extra_window_jumps_rj_fall; //used by cancel and finish //currentEventType = new JumpRjType(); currentEventType = currentJumpRjType; //hide jumping buttons sensitiveGuiEventDoing(); //don't let update until test finishes if(createdStatsWin) showUpdateStatsAndHideData(false); //show the event doing window ExecutingGraphData egd = event_execute_initializeVariables( currentPerson.UniqueID, currentPerson.Name, Catalog.GetString("Jumps"), //name of the different moments Constants.JumpRjTable, //tableName currentJumpRjType.Name ); event_execute_ButtonCancel.Clicked += new EventHandler(on_cancel_clicked); event_execute_ButtonFinish.Clicked += new EventHandler(on_finish_clicked); //when user clicks on update the eventExecute window //(for showing with his new configured values: max, min and guides event_execute_ButtonUpdate.Clicked -= new EventHandler(on_update_clicked); //if we don't do this, on_update_clicked it's called 'n' times when 'n' events are done event_execute_ButtonUpdate.Clicked += new EventHandler(on_update_clicked); currentEventExecute = new JumpRjExecute(currentPerson.UniqueID, currentPerson.Name, currentSession.UniqueID, currentJumpRjType.Name, myFall, jumpWeight, progressbarLimit, currentJumpRjType.JumpsLimited, chronopicWin.CP, event_execute_textview_message, app1, prefsDigitsNumber, allowFinishRjAfterTime, volumeOn, repetitiveConditionsWin, progressbarLimit, egd); //suitable for limited by jump and time //simulated always simulate limited by jumps if(!chronopicWin.Connected) currentEventExecute.SimulateInitValues(rand); currentEventExecute.Manage(); thisJumpIsSimple = false; //used by: on_event_execute_update_graph_in_progress_clicked currentEventExecute.FakeButtonUpdateGraph.Clicked += new EventHandler(on_event_execute_update_graph_in_progress_clicked); currentEventExecute.FakeButtonEventEnded.Clicked += new EventHandler(on_event_execute_EventEnded); currentEventExecute.FakeButtonFinished.Clicked += new EventHandler(on_jump_rj_finished); }
/* --------------------------------------------------------- * ---------------- RUNS EXECUTION (no interval) ---------- * -------------------------------------------------------- */ //suitable for all runs not repetitive private void on_normal_run_activate(object o, EventArgs args) { //if distance can be always different in this run, //show values selected in runExtraWin double myDistance = 0; if(currentRunType.Distance == 0) { myDistance = extra_window_runs_distance; } else { myDistance = currentRunType.Distance; } //used by cancel and finish //currentEventType = new RunType(); currentEventType = currentRunType; //hide jumping (running) buttons sensitiveGuiEventDoing(); //show the event doing window double progressbarLimit = 3; //same for startingIn than out (before) //don't let update until test finishes if(createdStatsWin) showUpdateStatsAndHideData(false); ExecutingGraphData egd = event_execute_initializeVariables( currentPerson.UniqueID, currentPerson.Name, Catalog.GetString("Phases"), //name of the different moments Constants.RunTable, //tableName currentRunType.Name ); event_execute_ButtonCancel.Clicked += new EventHandler(on_cancel_clicked); event_execute_ButtonFinish.Clicked += new EventHandler(on_finish_clicked); //when user clicks on update the eventExecute window //(for showing with his new confgured values: max, min and guides event_execute_ButtonUpdate.Clicked -= new EventHandler(on_update_clicked); //if we don't do this, on_update_clicked it's called 'n' times when 'n' events are done event_execute_ButtonUpdate.Clicked += new EventHandler(on_update_clicked); currentEventExecute = new RunExecute(currentPerson.UniqueID, currentSession.UniqueID, currentRunType.Name, myDistance, chronopicWin.CP, event_execute_textview_message, app1, prefsDigitsNumber, metersSecondsPreferred, volumeOn, progressbarLimit, egd); if (!chronopicWin.Connected) currentEventExecute.SimulateInitValues(rand); currentEventExecute.Manage(); thisRunIsSimple = true; //used by: on_event_execute_update_graph_in_progress_clicked currentEventExecute.FakeButtonUpdateGraph.Clicked += new EventHandler(on_event_execute_update_graph_in_progress_clicked); currentEventExecute.FakeButtonEventEnded.Clicked += new EventHandler(on_event_execute_EventEnded); currentEventExecute.FakeButtonFinished.Clicked += new EventHandler(on_run_finished); }
/* --------------------------------------------------------- * ---------------- PULSES EXECUTION ---------------------- * -------------------------------------------------------- */ private void on_pulse_activate(object o, EventArgs args) { Log.WriteLine("pulse accepted"); double pulseStep = 0; int totalPulses = 0; if(currentPulseType.Name == "Free") { pulseStep = currentPulseType.FixedPulse; // -1 totalPulses = currentPulseType.TotalPulsesNum; //-1 } else { //custom (info comes from Extra Window pulseStep = extra_window_pulses_spinbutton_pulse_step.Value; if(extra_window_pulses_checkbutton_unlimited.Active) totalPulses = currentPulseType.TotalPulsesNum; //-1 else totalPulses = Convert.ToInt32( extra_window_pulses_spinbutton_total_pulses.Value); //-1: unlimited; or 'n': limited by 'n' pulses } //used by cancel and finish //currentEventType = new PulseType(); currentEventType = currentPulseType; //hide pulse buttons sensitiveGuiEventDoing(); //don't let update until test finishes if(createdStatsWin) showUpdateStatsAndHideData(false); //show the event doing window ExecutingGraphData egd = event_execute_initializeVariables( currentPerson.UniqueID, currentPerson.Name, Catalog.GetString("Pulses"), //name of the different moments Constants.PulseTable, //tableName currentPulseType.Name ); event_execute_ButtonCancel.Clicked += new EventHandler(on_cancel_clicked); event_execute_ButtonFinish.Clicked += new EventHandler(on_finish_clicked); //when user clicks on update the eventExecute window //(for showing with his new confgured values: max, min and guides event_execute_ButtonUpdate.Clicked -= new EventHandler(on_update_clicked); //if we don't do this, on_update_clicked it's called 'n' times when 'n' events are done event_execute_ButtonUpdate.Clicked += new EventHandler(on_update_clicked); currentEventExecute = new PulseExecute(currentPerson.UniqueID, currentPerson.Name, currentSession.UniqueID, currentPulseType.Name, pulseStep, totalPulses, chronopicWin.CP, event_execute_textview_message, app1, prefsDigitsNumber, volumeOn, egd); if(!chronopicWin.Connected) currentEventExecute.SimulateInitValues(rand); currentEventExecute.Manage(); currentEventExecute.FakeButtonUpdateGraph.Clicked += new EventHandler(on_event_execute_update_graph_in_progress_clicked); currentEventExecute.FakeButtonEventEnded.Clicked += new EventHandler(on_event_execute_EventEnded); currentEventExecute.FakeButtonFinished.Clicked += new EventHandler(on_pulse_finished); }
/* --------------------------------------------------------- * ---------------- JUMPS EXECUTION (no RJ) ---------------- * -------------------------------------------------------- */ //suitable for all jumps not repetitive private void on_normal_jump_activate(object o, EventArgs args) { double jumpWeight = 0; if(currentJumpType.HasWeight) { if(extra_window_jumps_option == "%") jumpWeight = extra_window_jumps_weight; else jumpWeight = Util.WeightFromKgToPercent(extra_window_jumps_weight, currentPersonSession.Weight); } double myFall = 0; if(currentJumpType.Name == Constants.TakeOffName || currentJumpType.Name == Constants.TakeOffWeightName) myFall = 0; else if( ! currentJumpType.StartIn) { myFall = extra_window_jumps_fall; } //used by cancel and finish //currentEventType = new JumpType(); currentEventType = currentJumpType; //hide jumping buttons sensitiveGuiEventDoing(); //show the event doing window double progressbarLimit = 3; //3 phases for show the Dj if( currentJumpType.StartIn || currentJumpType.Name == Constants.TakeOffName || currentJumpType.Name == Constants.TakeOffWeightName) progressbarLimit = 2; //2 for normal jump (or take off) //don't let update until test finishes if(createdStatsWin) showUpdateStatsAndHideData(false); ExecutingGraphData egd = event_execute_initializeVariables( currentPerson.UniqueID, currentPerson.Name, Catalog.GetString("Phases"), //name of the different moments Constants.JumpTable, //tableName currentJumpType.Name ); event_execute_ButtonCancel.Clicked += new EventHandler(on_cancel_clicked); event_execute_ButtonFinish.Clicked += new EventHandler(on_finish_clicked); //when user clicks on update the eventExecute window //(for showing with his new confgured values: max, min and guides event_execute_ButtonUpdate.Clicked -= new EventHandler(on_update_clicked); //if we don't do this, on_update_clicked it's called 'n' times when 'n' events are done event_execute_ButtonUpdate.Clicked += new EventHandler(on_update_clicked); currentEventExecute = new JumpExecute(currentPerson.UniqueID, currentPerson.Name, currentSession.UniqueID, currentJumpType.Name, myFall, jumpWeight, chronopicWin.CP, event_execute_textview_message, app1, prefsDigitsNumber, volumeOn, progressbarLimit, egd); if (!chronopicWin.Connected) currentEventExecute.SimulateInitValues(rand); if( currentJumpType.StartIn ) currentEventExecute.Manage(); else currentEventExecute.ManageFall(); thisJumpIsSimple = true; //used by: on_event_execute_update_graph_in_progress_clicked currentEventExecute.FakeButtonUpdateGraph.Clicked += new EventHandler(on_event_execute_update_graph_in_progress_clicked); currentEventExecute.FakeButtonEventEnded.Clicked += new EventHandler(on_event_execute_EventEnded); currentEventExecute.FakeButtonFinished.Clicked += new EventHandler(on_jump_finished); }
/* --------------------------------------------------------- * ---------------- JUMPS RJ EXECUTION ------------------ * -------------------------------------------------------- */ private void on_rj_activate(bool canCaptureC) { double progressbarLimit = 0; //if it's a unlimited interval run, put -1 as limit value if(currentJumpRjType.Unlimited) { progressbarLimit = -1; } else { if(currentJumpRjType.FixedValue > 0) { progressbarLimit = currentJumpRjType.FixedValue; } else { progressbarLimit = (double) extra_window_jumps_rj_spinbutton_limit.Value; } } double jumpWeight = 0; if(currentJumpRjType.HasWeight) { if(extra_window_jumps_rj_option == "%") { jumpWeight = (double) extra_window_jumps_rj_spinbutton_weight.Value; } else { jumpWeight = Util.WeightFromKgToPercent( (double) extra_window_jumps_rj_spinbutton_weight.Value, currentPersonSession.Weight); } } double myFall = 0; if( currentJumpRjType.HasFall || currentJumpRjType.Name == Constants.RunAnalysisName) myFall = (double) extra_window_jumps_rj_spinbutton_fall.Value; //used by cancel and finish //currentEventType = new JumpRjType(); currentEventType = currentJumpRjType; //hide jumping buttons sensitiveGuiEventDoing(); //don't let update until test finishes if(createdStatsWin) showUpdateStatsAndHideData(false); //show the event doing window event_execute_initializeVariables( ! canCaptureC, //is simulated currentPerson.UniqueID, currentPerson.Name, Catalog.GetString("Jumps"), //name of the different moments Constants.JumpRjTable, //tableName currentJumpRjType.Name ); event_execute_button_cancel.Sensitive = true; ExecutingGraphData egd = event_execute_prepareForTest (); event_execute_ButtonCancel.Clicked += new EventHandler(on_cancel_clicked); event_execute_ButtonFinish.Clicked += new EventHandler(on_finish_clicked); //when user clicks on update the eventExecute window //(for showing with his new configured values: max, min and guides event_execute_ButtonUpdate.Clicked -= new EventHandler(on_update_clicked); //if we don't do this, on_update_clicked it's called 'n' times when 'n' events are done event_execute_ButtonUpdate.Clicked += new EventHandler(on_update_clicked); currentEventExecute = new JumpRjExecute(currentPerson.UniqueID, currentPerson.Name, currentSession.UniqueID, currentJumpRjType.Name, myFall, jumpWeight, progressbarLimit, currentJumpRjType.JumpsLimited, cp2016.CP, event_execute_label_message, app1, preferences.digitsNumber, checkbutton_allow_finish_rj_after_time.Active, preferences.volumeOn, repetitiveConditionsWin, progressbarLimit, egd ); //suitable for limited by jump and time //simulated always simulate limited by jumps if(! canCaptureC) currentEventExecute.SimulateInitValues(rand); currentEventExecute.Manage(); thisJumpIsSimple = false; //used by: on_event_execute_update_graph_in_progress_clicked currentEventExecute.FakeButtonUpdateGraph.Clicked += new EventHandler(on_event_execute_update_graph_in_progress_clicked); currentEventExecute.FakeButtonEventEnded.Clicked += new EventHandler(on_event_execute_EventEnded); currentEventExecute.FakeButtonFinished.Clicked += new EventHandler(on_jump_rj_finished); currentEventExecute.FakeButtonThreadDyed.Clicked += new EventHandler(on_test_finished_can_touch_gtk); }
/* --------------------------------------------------------- * ---------------- REACTION TIMES EXECUTION -------------- * -------------------------------------------------------- */ //suitable for reaction times private void on_reaction_time_activate(bool canCaptureC) { //used by cancel and finish currentEventType = new ReactionTimeType(); //hide jumping buttons sensitiveGuiEventDoing(); //show the event doing window double progressbarLimit = 2; //don't let update until test finishes if(createdStatsWin) showUpdateStatsAndHideData(false); event_execute_initializeVariables( ! canCaptureC, //is simulated currentPerson.UniqueID, currentPerson.Name, Catalog.GetString("Phases"), //name of the different moments Constants.ReactionTimeTable, //tableName "" ); event_execute_button_cancel.Sensitive = true; ExecutingGraphData egd = event_execute_prepareForTest (); event_execute_ButtonCancel.Clicked += new EventHandler(on_cancel_clicked); event_execute_ButtonFinish.Clicked += new EventHandler(on_finish_clicked); //when user clicks on update the eventExecute window //(for showing with his new confgured values: max, min and guides event_execute_ButtonUpdate.Clicked -= new EventHandler(on_update_clicked); //if we don't do this, on_update_clicked it's called 'n' times when 'n' events are done event_execute_ButtonUpdate.Clicked += new EventHandler(on_update_clicked); string sep = ""; string description = ""; if(extra_window_radio_reaction_time_discriminative.Active) { if(check_reaction_time_disc_red.Active == true) { description += sep + Catalog.GetString("red"); sep = " + "; } if(check_reaction_time_disc_yellow.Active == true) { description += sep + Catalog.GetString("yellow"); sep = " + "; } if(check_reaction_time_disc_green.Active == true) { description += sep + Catalog.GetString("green"); sep = " + "; } if(check_reaction_time_disc_buzzer.Active == true) { description += sep + Catalog.GetString("buzzer"); sep = " + "; } } else if(extra_window_radio_reaction_time_animation_lights.Active) description = spinbutton_flicker_lights_speed.Value.ToString() + " - " + label_animation_lights_interval.Text; currentEventExecute = new ReactionTimeExecute(currentPerson.UniqueID, currentPerson.Name, currentSession.UniqueID, currentReactionTimeType.Name, cp2016.CP, event_execute_label_message, app1, preferences.digitsNumber, preferences.volumeOn, progressbarLimit, egd, description ); if (! canCaptureC) currentEventExecute.SimulateInitValues(rand); //not on simulated because results would be always 0 if( canCaptureC && (extra_window_radio_reaction_time_discriminative.Active || extra_window_radio_reaction_time_animation_lights.Active) ) //TODO: do also for flickr currentEventExecute.StartIn = false; currentEventExecute.FakeButtonReactionTimeStart.Clicked += new EventHandler(on_event_execute_reaction_time_start); currentEventExecute.Manage(); //check that platform is ok currentEventExecute.FakeButtonUpdateGraph.Clicked += new EventHandler(on_event_execute_update_graph_in_progress_clicked); currentEventExecute.FakeButtonEventEnded.Clicked += new EventHandler(on_event_execute_EventEnded); currentEventExecute.FakeButtonFinished.Clicked += new EventHandler(on_reaction_time_finished); currentEventExecute.FakeButtonThreadDyed.Clicked += new EventHandler(on_test_finished_can_touch_gtk); }
/* --------------------------------------------------------- * ---------------- JUMPS EXECUTION (no RJ) ---------------- * -------------------------------------------------------- */ //suitable for all jumps not repetitive private void on_normal_jump_activate(bool canCaptureC) { if(execute_auto_doing) sensitiveGuiAutoExecuteOrWait (true); double jumpWeight = 0; if(currentJumpType.HasWeight) { if(extra_window_jumps_option == "%") jumpWeight = (double) extra_window_jumps_spinbutton_weight.Value; else jumpWeight = Util.WeightFromKgToPercent( (double) extra_window_jumps_spinbutton_weight.Value, currentPersonSession.Weight); } double myFall = 0; if(currentJumpType.HasFall) { if(extra_window_jumps_check_dj_fall_calculate.Active) myFall = -1; else myFall = (double) extra_window_jumps_spinbutton_fall.Value; } string description = ""; if(currentJumpType.Name == "slCMJleft" || currentJumpType.Name == "slCMJright") { description = slCMJString(); extra_window_jumps_spin_single_leg_distance.Value = 0; extra_window_jumps_spin_single_leg_angle.Value = 90; } //used by cancel and finish //currentEventType = new JumpType(); currentEventType = currentJumpType; //hide jumping buttons if(! execute_auto_doing) sensitiveGuiEventDoing(); //show the event doing window double progressbarLimit = 3; //3 phases for show the Dj if(myFall == -1) progressbarLimit = 4; //4 if there's a pre-jump else if( currentJumpType.StartIn || currentJumpType.Name == Constants.TakeOffName || currentJumpType.Name == Constants.TakeOffWeightName) progressbarLimit = 2; //2 for normal jump (or take off) //don't let update until test finishes if(createdStatsWin) showUpdateStatsAndHideData(false); event_execute_initializeVariables( ! canCaptureC, //is simulated currentPerson.UniqueID, currentPerson.Name, Catalog.GetString("Phases"), //name of the different moments Constants.JumpTable, //tableName currentJumpType.Name ); event_execute_button_cancel.Sensitive = true; ExecutingGraphData egd = event_execute_prepareForTest (); event_execute_ButtonCancel.Clicked += new EventHandler(on_cancel_clicked); event_execute_ButtonFinish.Clicked += new EventHandler(on_finish_clicked); //when user clicks on update the eventExecute window //(for showing with his new confgured values: max, min and guides event_execute_ButtonUpdate.Clicked -= new EventHandler(on_update_clicked); //if we don't do this, on_update_clicked it's called 'n' times when 'n' events are done event_execute_ButtonUpdate.Clicked += new EventHandler(on_update_clicked); currentEventExecute = new JumpExecute(currentPerson.UniqueID, currentPerson.Name, currentSession.UniqueID, currentJumpType.Name, myFall, jumpWeight, //chronopicWin.CP, event_execute_label_message, app1, preferences.digitsNumber, preferences.volumeOn, cp2016.CP, event_execute_label_message, app1, preferences.digitsNumber, preferences.volumeOn, progressbarLimit, egd, description); //UtilGtk.ChronopicColors(viewport_chronopics, label_chronopics, label_connected_chronopics, chronopicWin.Connected); if (! canCaptureC) currentEventExecute.SimulateInitValues(rand); if( currentJumpType.StartIn ) currentEventExecute.Manage(); else currentEventExecute.ManageFall(); thisJumpIsSimple = true; //used by: on_event_execute_update_graph_in_progress_clicked currentEventExecute.FakeButtonUpdateGraph.Clicked += new EventHandler(on_event_execute_update_graph_in_progress_clicked); currentEventExecute.FakeButtonEventEnded.Clicked += new EventHandler(on_event_execute_EventEnded); currentEventExecute.FakeButtonFinished.Clicked += new EventHandler(on_jump_finished); currentEventExecute.FakeButtonThreadDyed.Clicked += new EventHandler(on_test_finished_can_touch_gtk); }
private void on_multi_chronopic_start_clicked(bool canCaptureC) { //new DialogMessage(Constants.MessageTypes.WARNING, "Disabled on version 1.6.3."); //return; LogB.Information("multi chronopic accepted"); bool syncAvailable = false; if(currentMultiChronopicType.SyncAvailable && extra_window_check_multichronopic_sync.Active) syncAvailable = true; //used by cancel and finish currentEventType = new MultiChronopicType(); //hide pulse buttons sensitiveGuiEventDoing(); //don't let update until test finishes if(createdStatsWin) showUpdateStatsAndHideData(false); //show the event doing window event_execute_initializeVariables( ! canCaptureC, //is simulated currentPerson.UniqueID, currentPerson.Name, Catalog.GetString("Changes"), //name of the different moments Constants.MultiChronopicTable, //tableName currentMultiChronopicType.Name ); event_execute_button_cancel.Sensitive = true; ExecutingGraphData egd = event_execute_prepareForTest (); event_execute_ButtonCancel.Clicked += new EventHandler(on_cancel_multi_clicked); event_execute_ButtonFinish.Clicked += new EventHandler(on_finish_multi_clicked); //when user clicks on update the eventExecute window //(for showing with his new confgured values: max, min and guides event_execute_ButtonUpdate.Clicked -= new EventHandler(on_update_clicked); //if we don't do this, on_update_clicked it's called 'n' times when 'n' events are done event_execute_ButtonUpdate.Clicked += new EventHandler(on_update_clicked); //bool syncAvailable = false; //if(currentMultiChronopicType.SyncAvailable && extra_window_check_multichronopic_sync.Active) // syncAvailable = true; currentEventExecute = new MultiChronopicExecute( currentPerson.UniqueID, currentPerson.Name, currentSession.UniqueID, currentMultiChronopicType.Name, cp2016.CP, cp2016.CP2, syncAvailable, extra_window_check_multichronopic_delete_first.Active, extra_window_spin_run_analysis_distance.Value.ToString(), app1, egd ); //mark to only get inside on_multi_chronopic_finished one time multiFinishing = false; currentEventExecute.Manage(); currentEventExecute.FakeButtonUpdateGraph.Clicked += new EventHandler(on_event_execute_update_graph_in_progress_clicked); currentEventExecute.FakeButtonEventEnded.Clicked += new EventHandler(on_event_execute_EventEnded); // currentEventExecute.FakeButtonRunATouchPlatform.Clicked += new EventHandler(on_event_execute_RunATouchPlatform); currentEventExecute.FakeButtonFinished.Clicked += new EventHandler(on_multi_chronopic_finished); currentEventExecute.FakeButtonThreadDyed.Clicked += new EventHandler(on_test_finished_can_touch_gtk); }