[chronojump] Compujump auto logout implemented again
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Compujump auto logout implemented again
- Date: Fri, 14 Jul 2017 17:55:59 +0000 (UTC)
commit bed8667b29f8ba53579072d209443e84283e0b08
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Jul 14 19:55:23 2017 +0200
Compujump auto logout implemented again
src/gui/chronojump.cs | 3 ++-
src/gui/encoder.cs | 1 -
src/gui/networks.cs | 4 +++-
src/restTime.cs | 3 ++-
4 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index e23203d..49efeda 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -4041,7 +4041,8 @@ public partial class ChronoJumpWindow
myTreeViewPersons.UpdateRestTimes(restTime);
if( configChronojump.Compujump && currentPerson != null &&
- restTime.CompujumpPersonNeedLogout(currentPerson.UniqueID) )
+ DateTime.Now.Subtract(currentPersonCompujumpLoginTime).TotalMinutes >= 3 &&
//login time minimum 3'
+ restTime.CompujumpPersonNeedLogout(currentPerson.UniqueID) )
//3' since last executed test
{
compujumpPersonLogoutDo();
}
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index a5aa40a..035d957 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -32,7 +32,6 @@ using LongoMatch.Gui;
public partial class ChronoJumpWindow
{
-
[Widget] Gtk.HBox hbox_encoder_capture_top;
[Widget] Gtk.Label label_encoder_exercise_mass;
[Widget] Gtk.VBox vbox_encoder_exercise_mass;
diff --git a/src/gui/networks.cs b/src/gui/networks.cs
index 5330a09..2afeb58 100644
--- a/src/gui/networks.cs
+++ b/src/gui/networks.cs
@@ -93,6 +93,7 @@ public partial class ChronoJumpWindow
private static bool updatingRFIDGuiStuff;
private bool rfidProcessCancel;
private bool rfidIsDifferent;
+ private DateTime currentPersonCompujumpLoginTime;
DialogPersonPopup dialogPersonPopup;
@@ -490,6 +491,7 @@ public partial class ChronoJumpWindow
SqlitePerson.Update(pLocal);
}
+ currentPersonCompujumpLoginTime = DateTime.Now;
currentPerson = pLocal;
insertAndAssignPersonSessionIfNeeded(json);
@@ -517,6 +519,7 @@ public partial class ChronoJumpWindow
LogB.Information("RFID person exists locally!!");
if(rfidIsDifferent || dialogPersonPopup == null || ! dialogPersonPopup.Visible)
{
+ currentPersonCompujumpLoginTime = DateTime.Now;
currentPerson = pLocal;
insertAndAssignPersonSessionIfNeeded(json);
@@ -536,7 +539,6 @@ public partial class ChronoJumpWindow
if(rowToSelect != -1)
selectRowTreeView_persons(treeview_persons, rowToSelect);
*/
-
getTasksExercisesAndPopup();
}
diff --git a/src/restTime.cs b/src/restTime.cs
index 43815ed..a53a1a1 100644
--- a/src/restTime.cs
+++ b/src/restTime.cs
@@ -119,7 +119,8 @@ public class RestTime
return false;
}
- return false;
+ //person has not done any test.
DateTime.Now.Subtract(currentPersonCompujumpLoginTime).TotalMinutes will decide
+ return true;
}
public void AddOrModify(int personID, bool print)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]