Commit d31f1e67 authored by Xavier de Blas's avatar Xavier de Blas

window for jump reactive executing with realtime info done.

now rj jumps finish when fall down (always on finishing a tv)
time limited jumps doesn't record last jump after the time

preferences can change chronopicPort, if doesn't exists, it's created at chronojump start
changed "serial port" name to "chronopic" in menu

optimization on gui/stats.cs, now creation of treeview stats is 4 times faster (using blockFillingTreeview variable)

added -nowarn:169 at compile for hide fake warnings between glade and code
parent a9761682
......@@ -68,7 +68,7 @@ clean::
#-------------------------------
$(CHRONOJUMP).exe: $(DLL_CHRONOPIC).dll NPlot.dll NPlot.Gtk.dll $(CHRONOJUMP_DEP)
$(MCS) $(CHRONOJUMP_DEP) $(RESOURCES) -unsafe -r:$(DLL_CHRONOPIC).dll -r:NPlot.dll -r:NPlot.Gtk.dll -r:System.Drawing $(CHRONOJUMP_LIB) -out:$(CHRONOJUMP).exe
$(MCS) $(CHRONOJUMP_DEP) $(RESOURCES) -unsafe -r:$(DLL_CHRONOPIC).dll -r:NPlot.dll -r:NPlot.Gtk.dll -r:System.Drawing $(CHRONOJUMP_LIB) -nowarn:169 -out:$(CHRONOJUMP).exe
clean::
rm -f $(CHRONOJUMP).exe
......
CHANGELOG:
30 des 2005
window for jump reactive executing with realtime info done.
now rj jumps finish when fall down (always on finishing a tv)
time limited jumps doesn't record last jump after the time
preferences can change chronopicPort, if doesn't exists, it's created at chronojump start
changed "serial port" name to "chronopic" in menu
optimization on gui/stats.cs, now creation of treeview stats is 4 times faster (using blockFillingTreeview variable)
added -nowarn:169 at compile for hide fake warnings between glade and code
14 des 2005 (minor RELEASE 0.41)
jumps and jumpsRj show values in realtime in progressBar
......
No preview for this file type
No preview for this file type
This diff is collapsed.
CHRONOJUMP ROADMAP
TODO:
add a printed from in the print pages (without the "print" directory)
add a little image in the print
chronojump 0.5
--------------
- plot rjevolution consecutives in colors
- print rjevolution consecutives in colors in the stats treeview
- Chronojump will be a tool for training, not only for showing the results of train:
- add realtime info of every reactive jump and intervalic run [DONE]
- show realtime graph of some different color lights depending on the value respect previous jumps
- add conditions for finishing a jump or run ("when Q index is under x three times" ...)
- add realtime info of every reactive jump and intervalic run [DONE for jumpsRj, runs pending]
- play a sound of different tone depending the evolution of rjs
- edit reactive jump and intervalic run [DONE]
- stats checkboxes selectable by an outside combo with (all, none, invert, man, woman, ...) [DONE]
- chronojump should be able of reading from usb with a serial-usb cable (ttyUSB0)
- chronojump should be able of reading from usb with a serial-usb cable (usually /dev/ttyUSB0), and with a pcmcia (usually /dev/ttyS1) or others. Store in sqlite preferences [DONE]
- web: add a printed from in the print pages (without the "print" directory), add a little image in the print
chronojump 0.6
--------------
- user defined numeric variables (ask for including in stats, graphs) (height, weight, sex are some of them)
- XY graphs between any two variables
- user defined numeric variables (ask for including in stats, graphs) (height, weight, sex are some of them) this can be always the same for a subject, or change every session
- user defined non-numeric variables like sport (football, basquetball, ...)
- XY graphs between any two variables (also non-numeric)
- allow height and weight change for a different person in time and use it in intersession stats
- add conditions for finishing a rj jump or interval run ("when Q index is under x three times" ...)
- convert all combos to non-writable (gtk-2.0 ?, glade-2.0?)
chronojump 0.7
--------------
- add runs stats and graphs (with last numeric values and height, weight, ... evolution)
- start rhythm code
......@@ -38,6 +38,7 @@ class Test {
//-- Crear objeto chronopic, para acceder al chronopic
Chronopic cp = new Chronopic("/dev/ttyS0");
//Chronopic cp = new Chronopic("/dev/ttyS1");
//Chronopic cp = new Chronopic("/dev/ttyUSB0");
......
......@@ -152,9 +152,10 @@ public class ChronoJump
[Widget] Gtk.Button button_finish;
[Widget] Gtk.RadioMenuItem menuitem_simulated;
[Widget] Gtk.RadioMenuItem menuitem_serial_port;
[Widget] Gtk.RadioMenuItem menuitem_chronopic;
[Widget] Gtk.Notebook notebook;
[Widget] Gtk.ProgressBar progressBar;
private Random rand;
......@@ -176,6 +177,7 @@ public class ChronoJump
private TreeViewRunsInterval myTreeViewRunsInterval;
//preferences variables
private static string chronopicPort;
private static int prefsDigitsNumber;
private static bool showHeight;
private static bool showInitialSpeed;
......@@ -229,10 +231,7 @@ public class ChronoJump
StatsWindow statsWin;
ReportWindow reportWin;
//Progress bar
[Widget] Gtk.Box hbox_progress_bar;
Gtk.ProgressBar progressBar;
JumpRjExecuteWindow jumpRjExecuteWin;
//platform state variables
enum States {
......@@ -275,7 +274,10 @@ public class ChronoJump
Console.WriteLine ( Catalog.GetString ("no tables, creating ...") );
Sqlite.CreateFile();
Sqlite.CreateTables();
} else { Console.WriteLine ( Catalog.GetString ("tables already created") ); }
} else {
Sqlite.AddChronopicPortNameIfNotExists();
Console.WriteLine ( Catalog.GetString ("tables already created") );
}
cpRunning = false;
......@@ -301,34 +303,24 @@ public class ChronoJump
//We have no session, mark some widgets as ".Sensitive = false"
sensitiveGuiNoSession();
progressBar = new ProgressBar();
hbox_progress_bar.PackStart(progressBar, true, true, 0);
hbox_progress_bar.ShowAll();
appbar2.Push ( Catalog.GetString ("Ready.") );
rand = new Random(40);
//init connecting with chronopic
if (cpRunning) {
chronopicInit();
}
program.Run();
}
private void chronopicInit ()
private void chronopicInit (string myPort)
{
Console.WriteLine ( Catalog.GetString ("starting connection with serial port") );
Console.WriteLine ( Catalog.GetString ("starting connection with chronopic") );
Console.WriteLine ( Catalog.GetString ("if program crashes, write to xavi@xdeblas.com") );
Console.WriteLine ( Catalog.GetString ("if you used modem by serial port before (in a linux session) chronojump chrases") );
Console.WriteLine ( Catalog.GetString ("change variable using 'sqlite ~/.chronojump/chronojump.db' and") );
Console.WriteLine ( Catalog.GetString ("'update preferences set value=\"True\" where name=\"simulated\";'") );
try {
Console.WriteLine("J1");
cp = new Chronopic("/dev/ttyS0");
Console.WriteLine("J2");
Console.WriteLine("chronopic port: /dev/{0}", myPort);
cp = new Chronopic("/dev/" + myPort);
//-- Read initial state of platform
respuesta=cp.Read_platform(out platformState);
......@@ -343,10 +335,11 @@ public class ChronoJump
Console.WriteLine(Catalog.GetString("Chronopic OK"));
break;
}
Console.Write(Catalog.GetString("Plataform state: "));
Console.WriteLine("{0}", platformState);
Console.WriteLine(string.Format(
Catalog.GetString("Plataform state: {0}, chronopic in port /dev/{1}"),
platformState, chronopicPort));
} catch {
Console.WriteLine("Problems connecting to serial port, changed platform to 'Simulated'");
Console.WriteLine("Problems comunicating to chronopic, changed platform to 'Simulated'");
//TODO: raise a error window
//this will raise on_radiobutton_simulated_ativate and
......@@ -360,8 +353,9 @@ public class ChronoJump
Console.WriteLine (Catalog.GetString("Chronojump database version file: {0}"),
SqlitePreferences.Select("databaseVersion") );
prefsDigitsNumber = Convert.ToInt32 ( SqlitePreferences.Select("digitsNumber") );
chronopicPort = SqlitePreferences.Select("chronopicPort");
prefsDigitsNumber = Convert.ToInt32 ( SqlitePreferences.Select("digitsNumber") );
if ( SqlitePreferences.Select("showHeight") == "True" ) {
showHeight = true;
......@@ -382,7 +376,7 @@ public class ChronoJump
cpRunning = false;
} else {
simulated = false;
menuitem_serial_port.Active = true;
menuitem_chronopic.Active = true;
cpRunning = true;
}
......@@ -1216,19 +1210,21 @@ public class ChronoJump
cpRunning = false;
}
void on_radiobutton_serial_port_activate (object o, EventArgs args)
void on_radiobutton_chronopic_activate (object o, EventArgs args)
{
simulated = false;
SqlitePreferences.Update("simulated", simulated.ToString());
//init connecting with chronopic
chronopicInit();
cpRunning = true;
if(cpRunning == false) {
chronopicInit(chronopicPort);
cpRunning = true;
}
}
private void on_preferences_activate (object o, EventArgs args) {
PreferencesWindow myWin = PreferencesWindow.Show(
app1, prefsDigitsNumber, showHeight, showInitialSpeed,
app1, chronopicPort, prefsDigitsNumber, showHeight, showInitialSpeed,
//askDeletion, weightStatsPercent, heightPreferred, metersSecondsPreferred);
askDeletion, heightPreferred, metersSecondsPreferred);
myWin.Button_accept.Clicked += new EventHandler(on_preferences_accepted);
......@@ -1236,6 +1232,8 @@ public class ChronoJump
private void on_preferences_accepted (object o, EventArgs args) {
prefsDigitsNumber = Convert.ToInt32 ( SqlitePreferences.Select("digitsNumber") );
chronopicPort = SqlitePreferences.Select("chronopicPort");
if ( SqlitePreferences.Select("askDeletion") == "True" ) {
askDeletion = true;
......@@ -1449,7 +1447,8 @@ public class ChronoJump
//hide jumping buttons
sensitiveGuiJumpingOrRunning();
currentJump = new Jump(currentPerson.UniqueID, currentSession.UniqueID, currentJumpType.Name, myFall, jumpWeight,
currentJump = new Jump(currentPerson.UniqueID, currentPerson.Name,
currentSession.UniqueID, currentJumpType.Name, myFall, jumpWeight,
cp, progressBar, appbar2, app1, prefsDigitsNumber);
if (simulated) {
......@@ -1589,9 +1588,15 @@ public class ChronoJump
//hide jumping buttons
sensitiveGuiJumpingOrRunning();
//show the jump doing window
jumpRjExecuteWin = JumpRjExecuteWindow.Show(app1, currentPerson.Name,
currentJumpType.Name, prefsDigitsNumber, myLimit, currentJumpType.JumpsLimited);
jumpRjExecuteWin.ButtonCancel.Clicked += new EventHandler(on_cancel_clicked);
jumpRjExecuteWin.ButtonFinish.Clicked += new EventHandler(on_finish_clicked);
currentJumpRj = new JumpRj(currentPerson.UniqueID, currentSession.UniqueID,
currentJumpType.Name, myFall, jumpWeight,
currentJumpRj = new JumpRj(jumpRjExecuteWin, currentPerson.UniqueID, currentPerson.Name,
currentSession.UniqueID, currentJumpType.Name, myFall, jumpWeight,
myLimit, currentJumpType.JumpsLimited,
cp, progressBar, appbar2, app1, prefsDigitsNumber);
......
......@@ -100,8 +100,8 @@ public class EditJumpWindow
combo_jumpers = new Combo();
combo_jumpers.PopdownStrings = jumpers;
foreach (string jumper in jumpers) {
Console.WriteLine("jumper: {0}, name: {1}", jumper, myJump.PersonID + ": " + myJump.JumperName);
if (jumper == myJump.PersonID + ": " + myJump.JumperName) {
Console.WriteLine("jumper: {0}, name: {1}", jumper, myJump.PersonID + ": " + myJump.PersonName);
if (jumper == myJump.PersonID + ": " + myJump.PersonName) {
combo_jumpers.Entry.Text = jumper;
}
}
......@@ -228,8 +228,8 @@ public class EditJumpRjWindow
combo_jumpers = new Combo();
combo_jumpers.PopdownStrings = jumpers;
foreach (string jumper in jumpers) {
Console.WriteLine("jumper: {0}, name: {1}", jumper, myJump.PersonID + ": " + myJump.JumperName);
if (jumper == myJump.PersonID + ": " + myJump.JumperName) {
Console.WriteLine("jumper: {0}, name: {1}", jumper, myJump.PersonID + ": " + myJump.PersonName);
if (jumper == myJump.PersonID + ": " + myJump.PersonName) {
combo_jumpers.Entry.Text = jumper;
}
}
......@@ -1262,3 +1262,250 @@ public class JumpsRjMoreWindow
}
}
//--------------------------------------------------------
//---------------- JUMP RJ DOING WIDGET ------------------
//--------------------------------------------------------
public class JumpRjExecuteWindow
{
[Widget] Gtk.Window jump_rj_execute;
[Widget] Gtk.Label label_jumper;
[Widget] Gtk.Label label_jumptype;
[Widget] Gtk.Label label_extra;
[Widget] Gtk.ProgressBar progressbar_tv_current;
[Widget] Gtk.ProgressBar progressbar_tc_current;
[Widget] Gtk.ProgressBar progressbar_tv_tc_current_1up;
[Widget] Gtk.ProgressBar progressbar_tv_tc_current_0;
[Widget] Gtk.ProgressBar progressbar_tv_avg;
[Widget] Gtk.ProgressBar progressbar_tc_avg;
[Widget] Gtk.ProgressBar progressbar_tv_tc_avg_1up;
[Widget] Gtk.ProgressBar progressbar_tv_tc_avg_0;
[Widget] Gtk.ProgressBar progressbar_jumps;
[Widget] Gtk.Button button_cancel;
[Widget] Gtk.Button button_finish;
int pDN;
double limit;
bool jumpsLimited;
static JumpRjExecuteWindow JumpRjExecuteWindowBox;
Gtk.Window parent;
JumpRjExecuteWindow (Gtk.Window parent) {
Glade.XML gladeXML = Glade.XML.FromAssembly ("chronojump.glade", "jump_rj_execute", null);
gladeXML.Autoconnect(this);
this.parent = parent;
}
static public JumpRjExecuteWindow Show (Gtk.Window parent, string jumperName, string jumpType,
int pDN, double limit, bool jumpsLimited)
{
if (JumpRjExecuteWindowBox == null) {
JumpRjExecuteWindowBox = new JumpRjExecuteWindow (parent);
}
JumpRjExecuteWindowBox.initializeVariables (jumperName, jumpType, pDN, limit, jumpsLimited);
JumpRjExecuteWindowBox.jump_rj_execute.Show ();
return JumpRjExecuteWindowBox;
}
void initializeVariables (string jumperName, string jumpType, int pDN, double limit, bool jumpsLimited)
{
this.pDN = pDN;
this.limit = limit;
this.jumpsLimited = jumpsLimited;
this.label_jumper.Text = jumperName;
this.label_jumptype.Text = jumpType;
this.label_extra.Text = "";
progressbar_tv_current.Fraction = 0;
progressbar_tc_current.Fraction = 0;
progressbar_tv_tc_current_1up.Fraction = 0;
progressbar_tv_tc_current_0.Fraction = 0;
progressbar_tv_avg.Fraction = 0;
progressbar_tc_avg.Fraction = 0;
progressbar_tv_tc_avg_1up.Fraction = 0;
progressbar_tv_tc_avg_0.Fraction = 0;
progressbar_jumps.Fraction = 0;
progressbar_tv_current.Text = "";
progressbar_tc_current.Text = "";
progressbar_tv_tc_current_1up.Text = "";
progressbar_tv_tc_current_0.Text = "";
progressbar_tv_avg.Text = "";
progressbar_tc_avg.Text = "";
progressbar_tv_tc_avg_1up.Text = "";
progressbar_tv_tc_avg_0.Text = "";
progressbar_jumps.Text = "";
button_finish.Sensitive = true;
button_cancel.Sensitive = true;
}
public void JumpEndedHideButtons() {
button_finish.Sensitive = false;
button_cancel.Sensitive = false;
//if it was an unlimited jump, put the jumpsBar at end
if(limit == -1) {
progressbar_jumps.Fraction = 1.0;
}
}
void on_finish_clicked (object o, EventArgs args)
{
//event will be raised, and managed in chronojump.cs
}
void on_button_cancel_clicked (object o, EventArgs args)
{
//event will be raised, and managed in chronojump.cs
JumpEndedHideButtons();
}
void on_button_close_clicked (object o, EventArgs args)
{
JumpRjExecuteWindowBox.jump_rj_execute.Hide();
JumpRjExecuteWindowBox = null;
}
void on_jump_rj_execute_delete_event (object o, EventArgs args)
{
JumpRjExecuteWindowBox.jump_rj_execute.Hide();
JumpRjExecuteWindowBox = null;
}
public void ProgressbarJumps (double jumps, double time)
{
if(limit == -1) { //unlimited jump (until 'finish' is clicked)
progressbar_jumps.Pulse();
label_extra.Text = string.Format("{0}j {1}s", jumps.ToString(),
Util.TrimDecimals(time.ToString(), pDN));
} else {
double myFraction;
if(jumpsLimited)
myFraction = jumps / limit;
else
myFraction = time / limit;
if(myFraction > 1)
myFraction = 1;
else if(myFraction < 0)
myFraction = 0;
progressbar_jumps.Fraction = myFraction;
if(jumpsLimited) {
progressbar_jumps.Text = jumps.ToString() +
" / " + limit.ToString() + Catalog.GetString("jumps");
label_extra.Text = Util.TrimDecimals(time.ToString(), pDN) + "s";
}
else {
progressbar_jumps.Text = Util.TrimDecimals(time.ToString(), pDN) +
" / " + limit.ToString() + Catalog.GetString("seconds");
label_extra.Text = jumps + "j";
}
}
}
public double ProgressbarTvCurrent
{
set {
progressbar_tv_current.Text = Util.TrimDecimals(value.ToString(), pDN);
if(value > 1.0) value = 1.0;
else if(value < 0) value = 0;
progressbar_tv_current.Fraction = value;
}
}
public double ProgressbarTcCurrent
{
set {
progressbar_tc_current.Text = Util.TrimDecimals(value.ToString(), pDN);
if(value > 1.0) value = 1.0;
else if(value < 0) value = 0;
progressbar_tc_current.Fraction = value;
}
}
public double ProgressbarTvTcCurrent
{
set {
if(value > 1) {
progressbar_tv_tc_current_1up.Text = Util.TrimDecimals(value.ToString(), pDN);
if(value > 4.0) value = 4.0;
else if(value < 0) value = 0;
progressbar_tv_tc_current_1up.Fraction = value/4;
progressbar_tv_tc_current_0.Fraction = 1;
progressbar_tv_tc_current_0.Text = "";
} else {
progressbar_tv_tc_current_1up.Fraction = 0;
progressbar_tv_tc_current_1up.Text = "";
progressbar_tv_tc_current_0.Text = Util.TrimDecimals(value.ToString(), pDN);
if(value > 1.0) value = 1.0;
else if(value < 0) value = 0;
progressbar_tv_tc_current_0.Fraction = value;
}
}
}
public double ProgressbarTvAvg
{
set {
progressbar_tv_avg.Text = Util.TrimDecimals(value.ToString(), pDN);
if(value > 1.0) value = 1.0;
else if(value < 0) value = 0;
progressbar_tv_avg.Fraction = value;
}
}
public double ProgressbarTcAvg
{
set {
progressbar_tc_avg.Text = Util.TrimDecimals(value.ToString(), pDN);
if(value > 1.0) value = 1.0;
else if(value < 0) value = 0;
progressbar_tc_avg.Fraction = value;
}
}
public double ProgressbarTvTcAvg
{
set {
if(value > 0) {
progressbar_tv_tc_avg_1up.Text = Util.TrimDecimals(value.ToString(), pDN);
if(value > 4.0) value = 4.0;
else if(value < 0) value = 0;
progressbar_tv_tc_avg_1up.Fraction = value/4;
progressbar_tv_tc_avg_0.Fraction = 1;
progressbar_tv_tc_avg_0.Text = "";
} else {
progressbar_tv_tc_avg_1up.Fraction = 0;
progressbar_tv_tc_avg_1up.Text = "";
progressbar_tv_tc_avg_0.Text = Util.TrimDecimals(value.ToString(), pDN);
if(value > 1.0) value = 1.0;
else if(value < 0) value = 0;
progressbar_tv_tc_avg_0.Fraction = value;
}
}
}
public Button ButtonCancel
{
get { return button_cancel; }
}
public Button ButtonFinish
{
get { return button_finish; }
}
}
......@@ -536,6 +536,10 @@ public class PersonAddWindow {
PersonAddWindowBox.person_win.Hide();
PersonAddWindowBox = null;
}
void on_combobox_prova_changed (object o, EventArgs args) {
Console.WriteLine("changed!!");
}
void on_button_accept_clicked (object o, EventArgs args)
{
......
......@@ -31,6 +31,7 @@ using System.Collections; //ArrayList
public class PreferencesWindow {
[Widget] Gtk.Window preferences;
[Widget] Gtk.Entry entry_chronopic;
[Widget] Gtk.SpinButton spinbutton_decimals;
[Widget] Gtk.CheckButton checkbutton_height;
[Widget] Gtk.CheckButton checkbutton_initial_speed;
......@@ -45,19 +46,23 @@ public class PreferencesWindow {
Gtk.Window parent;
PreferencesWindow (Gtk.Window parent) {
PreferencesWindow (Gtk.Window parent, string entryChronopic) {
Glade.XML gladeXML = Glade.XML.FromAssembly ("chronojump.glade", "preferences", null);
gladeXML.Autoconnect(this);
this.parent = parent;
if(entryChronopic.Length > 0) {
entry_chronopic.Text = entryChronopic;
}
}
//static public PreferencesWindow Show (Gtk.Window parent, int digitsNumber, bool showHeight, bool showInitialSpeed, bool askDeletion, bool weightStatsPercent, bool heightPreferred, bool metersSecondsPreferred)
static public PreferencesWindow Show (Gtk.Window parent, int digitsNumber, bool showHeight, bool showInitialSpeed, bool askDeletion, bool heightPreferred, bool metersSecondsPreferred)
static public PreferencesWindow Show (Gtk.Window parent, string entryChronopic, int digitsNumber, bool showHeight, bool showInitialSpeed, bool askDeletion, bool heightPreferred, bool metersSecondsPreferred)
{
if (PreferencesWindowBox == null) {
PreferencesWindowBox = new PreferencesWindow (parent);
PreferencesWindowBox = new PreferencesWindow (parent, entryChronopic);
}
PreferencesWindowBox.spinbutton_decimals.Value = digitsNumber;
......@@ -124,6 +129,7 @@ public class PreferencesWindow {
void on_button_accept_clicked (object o, EventArgs args)
{
SqlitePreferences.Update("chronopicPort", entry_chronopic.Text.ToString());
SqlitePreferences.Update("digitsNumber", spinbutton_decimals.Value.ToString());
SqlitePreferences.Update("showHeight", PreferencesWindowBox.checkbutton_height.Active.ToString());
SqlitePreferences.Update("showInitialSpeed", PreferencesWindowBox.checkbutton_initial_speed.Active.ToString());
......
......@@ -82,6 +82,9 @@ public class StatsWindow {
//private Stat myStat;
private StatType myStatType;
//optimization
private bool blockFillingTreeview;
private static string [] comboStatsTypeOptions = {
Catalog.GetString("Global"),
......@@ -143,13 +146,20 @@ public class StatsWindow {
//myStat = new Stat(); //create and instance of myStat
myStatType = new StatType();
//this doesn't allow treeview to be recreated many times (4)
//in all the combos that are going to be created
blockFillingTreeview = true;
createComboSelectCheckboxes();
createComboStatsType();
createComboStatsSubType();
createComboStatsApplyTo();
// here doesn't do Ok the job, done later in Initialize
//blockFillingTreeview = false;
updateComboStats();
......@@ -188,6 +198,9 @@ public class StatsWindow {
selectedSessions = new ArrayList(2);
selectedSessions.Add(currentSession.UniqueID + ":" + currentSession.Name + ":" + currentSession.Date);
//now will be the first time the treeview is updated
blockFillingTreeview = false;
fillTreeView_stats(false);
}
......@@ -367,6 +380,12 @@ public class StatsWindow {
//private void fillTreeView_stats (bool graph)
private bool fillTreeView_stats (bool graph)
{
if(blockFillingTreeview) {
return false;
}
Console.WriteLine("----------FILLING treeview stats---------------");
string statisticType = combo_stats_stat_type.Entry.Text;
string statisticSubType = combo_stats_stat_subtype.Entry.Text;
string statisticApplyTo = combo_stats_stat_apply_to.Entry.Text;
......@@ -704,6 +723,7 @@ public class StatsWindow {
}
update_stats_widgets_sensitiveness();
fillTreeView_stats(false);
}
......@@ -733,6 +753,7 @@ public class StatsWindow {
}
update_stats_widgets_sensitiveness();
fillTreeView_stats(false);
}
......
......@@ -30,6 +30,7 @@ using System.Threading;
public class Jump
{
protected int personID;
protected string personName;
protected int sessionID;
protected int uniqueID;
protected string type;
......@@ -68,11 +69,12 @@ public class Jump
}
//jump execution
public Jump(int personID, int sessionID, string type, int fall, double weight,
public Jump(int personID, string personName, int sessionID, string type, int fall, double weight,
Chronopic cp, Gtk.ProgressBar progressBar, Gnome.AppBar appbar, Gtk.Window app,
int pDN)
{
this.personID = personID;
this.personName = personName;
this.sessionID = sessionID;
this.type = type;
this.fall = fall;
......@@ -288,7 +290,7 @@ public class Jump
string myStringPush =
//Catalog.GetString("Last jump: ") +
JumperName + " " +
personName + " " +
type + tcString + " TV:" + Util.TrimDecimals( tv.ToString(), pDN ) ;
if(weight > 0) {
myStringPush = myStringPush + "(" + weight.ToString() + "%)";
......@@ -392,10 +394,17 @@ public class Jump
get { return personID; }
}
public string PersonName
{
get { return personName; }
}
/*
public string JumperName
{
get { return SqlitePerson.SelectJumperName(personID); }
}
*/
~Jump() {}
......@@ -418,14 +427,21 @@ public class JumpRj : Jump
//for finishing earlier from chronojump.cs
private bool finish;
//windows needed
JumpRjExecuteWindow jumpRjExecuteWin;
//jump execution
public JumpRj(int personID, int sessionID, string type, int fall, double weight,
public JumpRj(JumpRjExecuteWindow jumpRjExecuteWin, int personID, string personName,
int sessionID, string type, int fall, double weight,
double limitAsDouble, bool jumpsLimited,
Chronopic cp, Gtk.ProgressBar progressBar, Gnome.AppBar appbar, Gtk.Window app,
int pDN)
{
this.jumpRjExecuteWin = jumpRjExecuteWin;
this.personID = personID;
this.personName = personName;
this.sessionID = sessionID;
this.type = type;
this.fall = fall;
......@@ -446,17 +462,19 @@ public class JumpRj : Jump
this.pDN = pDN;
if(TypeHasFall) {
hasFall = true;
} else {
hasFall = false;
}
//progressBar is used here only for put it to 1 when we want to stop the pulse() (the thread)
progressBar.Fraction = 0;
if(TypeHasFall) { hasFall = true; }
else { hasFall = false; }