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

gtk2 integration: -all onSelectionEntry() on treeviews work now:

gtk2 integration: 
 -all onSelectionEntry() on treeviews work now: sessionLoad, personRecuperateWindow, 
 PersonsRecuperateFromOtherSessionWindow, reportWindow, RepairEvents windows, treeviewPersons
 -1st combobox working: combo_jumps (pending: try on windows)
new features:
 -buttons for agility on runs
 -select graph works on more on runs & runsInterval. 
 -added mini/agility_hexagon.png
 -put "others" on menu, and include pulses and reaction time there
 -zoom button on image_test changed to gtk-info
 -chronojump_logo and report_css as resources (pending: try on windows)
 -chronojump_logo on startup
bugs fixed:
 -on not ending good reactionTime (EventType was not assigned)
 -if something is selected on jumps_runs_more, the dialogImageTest should have correct info
 -fixed CMJ_l name on DB
Cleaned code on all "more" gui and on loading glade

svn path=/trunk/; revision=249
parent 04e1181e
......@@ -33,9 +33,11 @@ CHRONOJUMP_DEP_SERVER = chronojump_server/ChronojumpServer.cs
CHRONOJUMP_DEP = src/chronojump.cs src/person.cs src/event.cs src/eventType.cs src/jump.cs src/jumpType.cs src/run.cs src/runType.cs src/pulse.cs src/pulseType.cs src/reactionTime.cs src/reactionTimeType.cs src/session.cs src/exportSession.cs src/treeViewEvent.cs src/treeViewPerson.cs src/treeViewJump.cs src/treeViewRun.cs src/treeViewPulse.cs src/treeViewReactionTime.cs src/util.cs src/constants.cs src/report.cs src/updateProgressBar.cs src/prepareEventGraphObjects.cs src/repetitiveConditions.cs $(CHRONOJUMP_DEP_GUI) $(CHRONOJUMP_DEP_STATS) $(CHRONOJUMP_DEP_GRAPHS) $(CHRONOJUMP_DEP_SQLITE) $(CHRONOJUMP_DEP_REPORT) $(CHRONOJUMP_DEP_EXECUTE) $(CHRONOJUMP_DEP_SERVER)
RESOURCES_GLADE = -resource:glade/chronojump.glade,chronojump.glade
RESOURCES_IMAGES = -resource:images/mini/no_image.png,mini/no_image.png \
-resource:images/agility_505.png,agility_505.png -resource:images/mini/agility_505.png,mini/agility_505.png \
-resource:images/agility_20yard.png,agility_20yard.png -resource:images/mini/agility_20yard.png,mini/agility_20yard.png \
-resource:images/agility_hexagon.png,agility_hexagon.png -resource:images/mini/agility_hexagon.png,mini/agility_hexagon.png \
-resource:images/agility_illinois.png,agility_illinois.png -resource:images/mini/agility_illinois.png,mini/agility_illinois.png \
-resource:images/agility_shuttle.png,agility_shuttle.png -resource:images/mini/agility_shuttle.png,mini/agility_shuttle.png \
-resource:images/agility_zigzag.png,agility_zigzag.png -resource:images/mini/agility_zigzag.png,mini/agility_zigzag.png \
......@@ -43,7 +45,9 @@ RESOURCES_IMAGES = -resource:images/mini/no_image.png,mini/no_image.png \
-resource:images/jump_sj.png,jump_sj.png -resource:images/mini/jump_sj.png,mini/jump_sj.png \
-resource:images/jump_sj_l.png,jump_sj_l.png -resource:images/mini/jump_sj_l.png,mini/jump_sj_l.png \
-resource:images/jump_cmj.png,jump_cmj.png -resource:images/mini/jump_cmj.png,mini/jump_cmj.png \
-resource:images/jump_cmj_l.png,jump_cmj_l.png -resource:images/mini/jump_cmj_l.png,mini/jump_cmj_l.png \
-resource:images/jump_abk.png,jump_abk.png -resource:images/mini/jump_abk.png,mini/jump_abk.png \
-resource:images/jump_abk_l.png,jump_abk_l.png -resource:images/mini/jump_abk_l.png,mini/jump_abk_l.png \
-resource:images/jump_dj.png,jump_dj.png -resource:images/mini/jump_dj.png,mini/jump_dj.png \
-resource:images/jump_rocket.png,jump_rocket.png -resource:images/mini/jump_rocket.png,mini/jump_rocket.png \
-resource:images/jump_rj.png,jump_rj.png -resource:images/mini/jump_rj.png,mini/jump_rj.png \
......@@ -51,6 +55,10 @@ RESOURCES_IMAGES = -resource:images/mini/no_image.png,mini/no_image.png \
-resource:images/run_simple.png,run_simple.png -resource:images/mini/run_simple.png,mini/run_simple.png \
-resource:images/run_interval.png,run_interval.png -resource:images/mini/run_interval.png,mini/run_interval.png \
RESOURCES_REPORT = -resource:images/chronojump_logo.png,chronojump_logo.png \
-resource:images/report_web_style.css,report_web_style.css \
CHRONOJUMP_LIB = -pkg:gtk-sharp-2.0 -pkg:glade-sharp-2.0 -r:System.Data -r:Mono.Data.SqliteClient -r:System.Web.Services
#CHRONOJUMP_LIB = -pkg:gtk-sharp -pkg:glade-sharp -r:System.Data -r:Mono.Data.SqliteClient -r:System.Web.Services
......@@ -68,9 +76,7 @@ all: $(CHRONOJUMP).exe $(CHRONOJUMP_MINI).exe
#-------------------------------
$(CHRONOJUMP).exe: NPlot.dll NPlot.Gtk.dll $(CHRONOJUMP_DEP) chronopic.cs glade/chronojump.glade
$(MCS) -debug $(CHRONOJUMP_DEP) $(RESOURCES_GLADE) $(RESOURCES_IMAGES) -unsafe chronopic.cs -r:NPlot.dll -r:NPlot.Gtk.dll -r:System.Drawing -r:Mono.Posix $(CHRONOJUMP_LIB) -nowarn:169 -out:$(CHRONOJUMP).exe
#$(CHRONOJUMP).exe: $(CHRONOJUMP_DEP) chronopic.cs glade/chronojump.glade
# $(MCS) -debug $(CHRONOJUMP_DEP) $(RESOURCES_GLADE) $(RESOURCES_IMAGES) -unsafe chronopic.cs -r:System.Drawing -r:Mono.Posix $(CHRONOJUMP_LIB) -nowarn:169 -out:$(CHRONOJUMP).exe
$(MCS) -debug $(CHRONOJUMP_DEP) $(RESOURCES_GLADE) $(RESOURCES_IMAGES) $(RESOURCES_REPORT) -unsafe chronopic.cs -r:NPlot.dll -r:NPlot.Gtk.dll -r:System.Drawing -r:Mono.Posix $(CHRONOJUMP_LIB) -nowarn:169 -out:$(CHRONOJUMP).exe
#------------------------------------
......
TODO:
-1st combobox working: combo_jumps (pending: try on windows)
-chronojump_logo and report_css as resources (pending: try on windows)
-event edit (run) shows km/h not looking at prefs DONE
-put a image_file, and a image_desc for every test type. DONE
-create some images DONE
......
CHRONOJUMP DETAILED CHANGELOG:
5 may 2007
gtk2 integration:
-all onSelectionEntry() on treeviews work now: sessionLoad, personRecuperateWindow,
PersonsRecuperateFromOtherSessionWindow, reportWindow, RepairEvents windows, treeviewPersons
-1st combobox working: combo_jumps (pending: try on windows)
new features:
-buttons for agility on runs
-select graph works on more on runs & runsInterval.
-added mini/agility_hexagon.png
-put "others" on menu, and include pulses and reaction time there
-zoom button on image_test changed to gtk-info
-chronojump_logo and report_css as resources (pending: try on windows)
-chronojump_logo on startup
bugs fixed:
-on not ending good reactionTime (EventType was not assigned)
-if something is selected on jumps_runs_more, the dialogImageTest should have correct info
-fixed CMJ_l name on DB
Cleaned code on all "more" gui and on loading glade
3 may 2007
new code now runs on windows: updated csproj, changed way to load image resources
......
......@@ -173,8 +173,12 @@
<EmbeddedResource Include="images\mini\jump_sj_l.png" />
<EmbeddedResource Include="images\jump_cmj.png" />
<EmbeddedResource Include="images\mini\jump_cmj.png" />
<EmbeddedResource Include="images\jump_cmj_l.png" />
<EmbeddedResource Include="images\mini\jump_cmj_l.png" />
<EmbeddedResource Include="images\jump_abk.png" />
<EmbeddedResource Include="images\mini\jump_abk.png" />
<EmbeddedResource Include="images\jump_abk_l.png" />
<EmbeddedResource Include="images\mini\jump_abk_l.png" />
<EmbeddedResource Include="images\jump_dj.png" />
<EmbeddedResource Include="images\mini\jump_dj.png" />
<EmbeddedResource Include="images\jump_rj.png" />
......@@ -194,11 +198,8 @@
<EmbeddedResource Include="images\mini\agility_20yard.png" />
<EmbeddedResource Include="images\agility_505.png" />
<EmbeddedResource Include="images\mini\agility_505.png" />
<!--
don't compile, hexagon mini isn't done
<EmbeddedResource Include="images\agility_hexagon.png" />
<EmbeddedResource Include="images\mini\agility_hexagon.png" />
-->
<EmbeddedResource Include="images\agility_illinois.png" />
<EmbeddedResource Include="images\mini\agility_illinois.png" />
<EmbeddedResource Include="images\agility_shuttle.png" />
......
No preview for this file type
No preview for this file type
This diff is collapsed.
This diff is collapsed.
......@@ -149,7 +149,7 @@ msgstr "<b>estadística</b>"
#: ../glade/chronojump.glade.h:34
msgid "<b>statistics data</b>"
msgstr "<b>dades estadístiques/b>"
msgstr "<b>dades estadístiques</b>"
#: ../glade/chronojump.glade.h:35
msgid "<b>test bells</b>"
......
......@@ -50,7 +50,8 @@ public class ChronoJump
[Widget] Gtk.Box hbox_runs;
[Widget] Gtk.Box hbox_runs_interval;
[Widget] Gtk.Box hbox_pulses;
[Widget] Gtk.Combo combo_jumps;
[Widget] Gtk.ComboBox combo_jumps;
// [Widget] Gtk.Combo combo_jumps;
[Widget] Gtk.Combo combo_jumps_rj;
[Widget] Gtk.Combo combo_runs;
[Widget] Gtk.Combo combo_runs_interval;
......@@ -93,7 +94,7 @@ public class ChronoJump
[Widget] Gtk.Button button_free;
[Widget] Gtk.Button button_sj;
[Widget] Gtk.Button button_sj_plus;
[Widget] Gtk.Button button_sj_l;
[Widget] Gtk.Button button_cmj;
[Widget] Gtk.Button button_abk;
[Widget] Gtk.Button button_dj;
......@@ -107,6 +108,11 @@ public class ChronoJump
[Widget] Gtk.Button button_run_100m;
[Widget] Gtk.Button button_run_200m;
[Widget] Gtk.Button button_run_400m;
[Widget] Gtk.Button button_run_20yard;
[Widget] Gtk.Button button_run_505;
[Widget] Gtk.Button button_run_illinois;
[Widget] Gtk.Button button_run_shuttle;
[Widget] Gtk.Button button_run_zigzag;
[Widget] Gtk.Button button_run_interval_by_laps;
[Widget] Gtk.Button button_run_interval_by_time;
[Widget] Gtk.Button button_run_interval_unlimited;
......@@ -132,12 +138,12 @@ public class ChronoJump
[Widget] Gtk.MenuItem menu_persons;
[Widget] Gtk.MenuItem menu_jumps;
[Widget] Gtk.MenuItem menu_runs;
[Widget] Gtk.MenuItem menu_pulses;
[Widget] Gtk.MenuItem menu_other;
[Widget] Gtk.MenuItem menu_view;
[Widget] Gtk.MenuItem menuitem_jump_free;
[Widget] Gtk.MenuItem sj;
[Widget] Gtk.MenuItem sj_plus;
[Widget] Gtk.MenuItem sj_l;
[Widget] Gtk.MenuItem cmj;
[Widget] Gtk.MenuItem abk;
[Widget] Gtk.MenuItem dj;
......@@ -153,6 +159,11 @@ public class ChronoJump
[Widget] Gtk.MenuItem menuitem_100m;
[Widget] Gtk.MenuItem menuitem_200m;
[Widget] Gtk.MenuItem menuitem_400m;
[Widget] Gtk.MenuItem menuitem_run_20yard;
[Widget] Gtk.MenuItem menuitem_run_505;
[Widget] Gtk.MenuItem menuitem_run_illinois;
[Widget] Gtk.MenuItem menuitem_run_shuttle;
[Widget] Gtk.MenuItem menuitem_run_zigzag;
[Widget] Gtk.MenuItem menuitem_run_interval_by_laps;
[Widget] Gtk.MenuItem menuitem_run_interval_by_time;
[Widget] Gtk.MenuItem menuitem_run_interval_unlimited;
......@@ -178,7 +189,7 @@ public class ChronoJump
bool volumeOn;
private static string [] authors = {"Xavier de Blas", "Juan Gonzalez"};
private static string progversion = "0.52";
private static string progversion = "0.52-cvs";
private static string progname = "Chronojump";
//persons
......@@ -349,6 +360,9 @@ public class ChronoJump
}
//check if logo and css exists
/*
* currently not used, we copy the assemblies now
*
if(! File.Exists(Util.GetHomeDir() + "/" + Constants.FileNameLogo)) {
Util.CopyArchivesOninstallation(Constants.FileNameLogo);
Console.WriteLine("Copied " + Constants.FileNameLogo);
......@@ -357,7 +371,7 @@ public class ChronoJump
Util.CopyArchivesOninstallation(Constants.FileNameCSS);
Console.WriteLine("Copied " + Constants.FileNameCSS);
}
*/
string recuperatedString = recuperateBrokenEvents();
......@@ -409,7 +423,6 @@ public class ChronoJump
private void on_button_image_test_clicked(object o, EventArgs args) {
//new DialogImageTest(currentRunType);
new DialogImageTest(currentEventType);
}
......@@ -443,37 +456,15 @@ public class ChronoJump
private void createMainWindow(string recuperatedString)
{
Glade.XML gxml;
Console.Write("1");
try {
Console.Write("2");
//linux
gxml = Glade.XML.FromAssembly ("chronojump.glade", "app1", null);
/*
gxml = new Glade.XML (this.GetType().Assembly,
"chronojump.glade",
"app1",
null);
*/
//gxml = Glade.XML.FromAssembly ("/media/mmc1/chronojump.glade", "app1", null);
Console.Write("3");
} catch {
Console.Write("4");
//windows
gxml = Glade.XML.FromAssembly ("chronojump.glade.chronojump.glade", "app1", null);
Console.Write("5");
}
Console.Write("6");
gxml = Glade.XML.FromAssembly (Util.GetGladePath() + "chronojump.glade", "app1", null);
gxml.Autoconnect(this);
Console.Write("7");
Pixbuf pixbuf = new Pixbuf (null, Util.GetImagePath(true) + "no_image.png");
//Pixbuf pixbuf = new Pixbuf (null, Util.GetImagePath(true) + "no_image.png");
Pixbuf pixbuf = new Pixbuf (null, Util.GetImagePath(false) + Constants.FileNameLogo);
image_test.Pixbuf = pixbuf;
button_image_test.Sensitive=false;
cpRunning = false;
report = new Report(-1); //when a session is loaded or created, it will change the report.SessionID value
......@@ -734,6 +725,7 @@ Console.Write("7");
private void createTreeView_persons (Gtk.TreeView tv) {
myTreeViewPersons = new TreeViewPersons( tv );
tv.Selection.Changed += onTreeviewPersonsSelectionEntry;
}
private void fillTreeView_persons () {
......@@ -774,13 +766,15 @@ Console.Write("7");
myTreeViewPersons = new TreeViewPersons(treeview_persons);
}
private void on_treeview_persons_cursor_changed (object o, EventArgs args) {
TreeView tv = (TreeView) o;
//private void on_treeview_persons_cursor_changed (object o, EventArgs args) {
private void onTreeviewPersonsSelectionEntry (object o, EventArgs args) {
//TreeView tv = (TreeView) o;
TreeModel model;
TreeIter iter;
// you get the iter and the model if something is selected
if (tv.Selection.GetSelected (out model, out iter)) {
//if (tv.Selection.GetSelected (out model, out iter)) {
if (((TreeSelection)o).GetSelected(out model, out iter)) {
string selectedID = (string) model.GetValue (iter, 1); //name, ID
Console.WriteLine (selectedID);
......@@ -1035,12 +1029,24 @@ Console.Write("7");
* --------------------------------------------------------
*/
private void createComboJumps() {
combo_jumps = new Combo ();
combo_jumps.PopdownStrings =
SqliteJumpType.SelectJumpTypes(Constants.AllJumpsName, "", true); //without filter, only select name
//combo_jumps = new Combo ();
combo_jumps = ComboBox.NewText ();
//combo_jumps.PopdownStrings =
// SqliteJumpType.SelectJumpTypes(Constants.AllJumpsName, "", true); //without filter, only select name
foreach (string str in SqliteJumpType.SelectJumpTypes(Constants.AllJumpsName, "", true)) //without filter, only select name
//string [] myStr = SqliteJumpType.SelectJumpTypes(Constants.AllJumpsName, "", true); //without filter, only select name
//foreach (string str in myStr)
{
//comboListStore.AppendValues (str);
//Console.Write(str);
combo_jumps.AppendText (str);
}
combo_jumps.DisableActivate ();
combo_jumps.Entry.Changed += new EventHandler (on_combo_jumps_changed);
//combo_jumps.DisableActivate ();
//combo_jumps.Entry.Changed += new EventHandler (on_combo_jumps_changed);
combo_jumps.Changed += new EventHandler (on_combo_jumps_changed);
hbox_combo_jumps.PackStart(combo_jumps, true, true, 0);
hbox_combo_jumps.ShowAll();
......@@ -1106,8 +1112,10 @@ Console.Write("7");
}
private void updateComboJumps() {
combo_jumps.PopdownStrings =
SqliteJumpType.SelectJumpTypes(Constants.AllJumpsName, "", true); //without filter, only select name
foreach (string str in SqliteJumpType.SelectJumpTypes(Constants.AllJumpsName, "", true)) //without filter, only select name
{
combo_jumps.AppendText (str);
}
}
private void updateComboJumpsRj() {
......@@ -1133,7 +1141,23 @@ Console.Write("7");
}
private void on_combo_jumps_changed(object o, EventArgs args) {
string myText = combo_jumps.Entry.Text;
//from monodoc
ComboBox combo = o as ComboBox;
if (o == null)
return;
TreeIter iter;
string selected = "";
if (combo.GetActiveIter (out iter))
//Console.WriteLine ((string) combo.Model.GetValue (iter, 0));
selected = (string) combo.Model.GetValue (iter, 0);
//end from monodoc
//Console.WriteLine(selected);
//string myText = combo_jumps.Entry.Text;
//string myText = combo_jumps.Active.ToString();
//show the edit-delete selected jumps buttons:
......@@ -1143,10 +1167,12 @@ Console.Write("7");
button_delete_selected_jump.Sensitive = true;
treeview_jumps_storeReset();
fillTreeView_jumps(myText);
//fillTreeView_jumps(myText);
fillTreeView_jumps(selected);
//expand all rows if a jump filter is selected:
if (myText != Constants.AllJumpsName)
//if (myText != Constants.AllJumpsName)
if (selected != Constants.AllJumpsName)
treeview_jumps.ExpandAll();
}
......@@ -1540,7 +1566,8 @@ Console.Write("7");
}
treeview_jumps_storeReset();
string myText = combo_jumps.Entry.Text;
//string myText = combo_jumps.Entry.Text;
string myText = combo_jumps.Active.ToString();
fillTreeView_jumps(myText);
//load the treeview_rj
......@@ -1770,13 +1797,14 @@ Console.Write("7");
//this will crash if currentSession is not created/loaded, then go to catch
try {
//... and recreate the treeview_jumps
string myText = combo_jumps.Entry.Text;
//string myText = combo_jumps.Entry.Text;
string myText = combo_jumps.Active.ToString();
createTreeView_jumps (treeview_jumps);
treeview_jumps_storeReset();
fillTreeView_jumps(myText);
//... and recreate the treeview_jumps_rj
myText = combo_jumps.Entry.Text;
myText = combo_jumps_rj.Entry.Text;
createTreeView_jumps_rj (treeview_jumps_rj);
treeview_jumps_rj_storeReset();
fillTreeView_jumps_rj(myText);
......@@ -1876,12 +1904,18 @@ Console.Write("7");
currentEventType = new JumpType("Free");
} else if(o == (object) button_sj) {
currentEventType = new JumpType("SJ");
} else if(o == (object) button_sj_plus) {
} else if(o == (object) button_sj_l) {
currentEventType = new JumpType("SJl");
} else if(o == (object) button_cmj) {
currentEventType = new JumpType("CMJ");
//no cmj_l button currently
// } else if(o == (object) button_cmj_l) {
// currentEventType = new JumpType("CMJl");
} else if(o == (object) button_abk) {
currentEventType = new JumpType("ABK");
//no abk_l button currently
// } else if(o == (object) button_abk_l) {
// currentEventType = new JumpType("ABKl");
} else if(o == (object) button_dj) {
currentEventType = new JumpType("DJ");
} else if(o == (object) button_rocket) {
......@@ -1904,6 +1938,16 @@ Console.Write("7");
currentEventType = new RunType("200m");
} else if(o == (object) button_run_200m) {
currentEventType = new RunType("400m");
} else if(o == (object) button_run_20yard) {
currentEventType = new RunType("Agility-20Yard");
} else if(o == (object) button_run_505) {
currentEventType = new RunType("Agility-505");
} else if(o == (object) button_run_illinois) {
currentEventType = new RunType("Agility-Illinois");
} else if(o == (object) button_run_shuttle) {
currentEventType = new RunType("Agility-Shuttle-Run");
} else if(o == (object) button_run_zigzag) {
currentEventType = new RunType("Agility-ZigZag");
//run interval
} else if(o == (object) button_run_interval_by_laps) {
currentEventType = new RunType("byLaps");
......@@ -1947,8 +1991,8 @@ Console.Write("7");
}
private void on_more_jumps_draw_image_test (object o, EventArgs args) {
currentJumpType = new JumpType(jumpsMoreWin.SelectedEventName);
changeTestImage("jump", currentJumpType.Name, currentJumpType.ImageFileName);
currentEventType = new JumpType(jumpsMoreWin.SelectedEventName);
changeTestImage(currentEventType.Type.ToString(), currentEventType.Name, currentEventType.ImageFileName);
}
private void on_button_last_clicked (object o, EventArgs args)
......@@ -1995,10 +2039,15 @@ Console.Write("7");
private void on_jump_extra_activate (object o, EventArgs args)
{
Console.WriteLine("jump extra");
if(o == (object) button_sj_plus || o == (object) sj_plus) {
if(o == (object) button_sj_l || o == (object) sj_l) {
currentJumpType = new JumpType("SJl");
} else if(o == (object) button_dj || o == (object) dj) {
currentJumpType = new JumpType("DJ");
// currently no cmj_l, abk_l buttons or menu
// } else if(o == (object) button_cmj_l || o == (object) cmj_l) {
// currentJumpType = new JumpType("CMJl");
// } else if(o == (object) button_abk_l || o == (object) abk_l) {
// currentJumpType = new JumpType("ABKl");
} else {
}
......@@ -2126,10 +2175,10 @@ Console.Write("7");
jumpsRjMoreWin.Button_accept.Clicked += new EventHandler(on_more_jumps_rj_accepted);
jumpsRjMoreWin.Button_selected.Clicked += new EventHandler(on_more_jumps_rj_draw_image_test);
}
private void on_more_jumps_rj_draw_image_test (object o, EventArgs args) {
currentJumpType = new JumpType(jumpsRjMoreWin.SelectedEventName);
changeTestImage("jumpRj", currentJumpType.Name, currentJumpType.ImageFileName);
currentEventType = new JumpType(jumpsRjMoreWin.SelectedEventName);
changeTestImage(currentEventType.Type.ToString(), currentEventType.Name, currentEventType.ImageFileName);
}
private void on_button_last_rj_clicked (object o, EventArgs args)
......@@ -2320,8 +2369,15 @@ Console.Write("7");
{
runsMoreWin = RunsMoreWindow.Show(app1);
runsMoreWin.Button_accept.Clicked += new EventHandler(on_more_runs_accepted);
runsMoreWin.Button_selected.Clicked += new EventHandler(on_more_runs_draw_image_test);
}
private void on_more_runs_draw_image_test (object o, EventArgs args) {
currentEventType = new RunType(runsMoreWin.SelectedEventName);
changeTestImage(currentEventType.Type.ToString(), currentEventType.Name, currentEventType.ImageFileName);
}
private void on_button_run_last_clicked (object o, EventArgs args)
{
Console.WriteLine("button run last");
......@@ -2339,14 +2395,14 @@ Console.Write("7");
runsMoreWin.Button_accept.Clicked -= new EventHandler(on_more_runs_accepted);
currentRunType = new RunType(
runsMoreWin.SelectedRunType, //name
runsMoreWin.SelectedEventName, //name
false, //hasIntervals
runsMoreWin.SelectedDistance, //distance
false, //tracksLimited (false, because has not intervals)
0, //fixedValue (0, because has not intervals)
false, //unlimited (false, because has not intervals)
runsMoreWin.SelectedDescription,
SqliteEvent.SelectFileName("run", runsMoreWin.SelectedRunType)
SqliteEvent.SelectFileName("run", runsMoreWin.SelectedEventName)
);
......@@ -2389,6 +2445,16 @@ Console.Write("7");
currentRunType = new RunType("200m");
} else if (o == (object) button_run_400m || o == (object) menuitem_400m) {
currentRunType = new RunType("400m");
} else if (o == (object) button_run_20yard || o == (object) menuitem_run_20yard) {
currentRunType = new RunType("Agility-20Yard");
} else if (o == (object) button_run_505 || o == (object) menuitem_run_505) {
currentRunType = new RunType("Agility-505");
} else if (o == (object) button_run_illinois || o == (object) menuitem_run_illinois) {
currentRunType = new RunType("Agility-Illinois");
} else if (o == (object) button_run_shuttle || o == (object) menuitem_run_shuttle) {
currentRunType = new RunType("Agility-Shuttle-Run");
} else if (o == (object) button_run_zigzag || o == (object) menuitem_run_zigzag) {
currentRunType = new RunType("Agility-ZigZag");
}
// add others...
......@@ -2490,6 +2556,12 @@ Console.Write("7");
{
runsIntervalMoreWin = RunsIntervalMoreWindow.Show(app1);
runsIntervalMoreWin.Button_accept.Clicked += new EventHandler(on_more_runs_interval_accepted);
runsIntervalMoreWin.Button_selected.Clicked += new EventHandler(on_more_runs_interval_draw_image_test);
}
private void on_more_runs_interval_draw_image_test (object o, EventArgs args) {
currentEventType = new RunType(runsIntervalMoreWin.SelectedEventName);
changeTestImage(currentEventType.Type.ToString(), currentEventType.Name, currentEventType.ImageFileName);
}
private void on_more_runs_interval_accepted (object o, EventArgs args)
......@@ -2497,14 +2569,14 @@ Console.Write("7");
runsIntervalMoreWin.Button_accept.Clicked -= new EventHandler(on_more_runs_interval_accepted);
currentRunType = new RunType(
runsIntervalMoreWin.SelectedRunType, //name
runsIntervalMoreWin.SelectedEventName, //name
true, //hasIntervals
runsIntervalMoreWin.SelectedDistance,
runsIntervalMoreWin.SelectedTracksLimited,
runsIntervalMoreWin.SelectedLimitedValue,
runsIntervalMoreWin.SelectedUnlimited,
runsIntervalMoreWin.SelectedDescription,
SqliteEvent.SelectFileName("runInterval", runsMoreWin.SelectedRunType)
SqliteEvent.SelectFileName("runInterval", runsMoreWin.SelectedEventName)
);
bool unlimited = false;
......@@ -2701,7 +2773,7 @@ Console.Write("7");
}
*/
//used by cancel and finish
//currentEventType = new ReactionTimeType();
currentEventType = new ReactionTimeType();
//currentEventType = currentReactionTimeType;
//hide jumping buttons
......@@ -3009,7 +3081,8 @@ Console.Write("7");
Console.WriteLine("edit selected jump accepted");
treeview_jumps_storeReset();
fillTreeView_jumps(combo_jumps.Entry.Text);
//fillTreeView_jumps(combo_jumps.Entry.Text);
fillTreeView_jumps(combo_jumps.Active.ToString());
if(createdStatsWin) {
statsWin.FillTreeView_stats(false, false);
......@@ -3701,7 +3774,7 @@ Console.Write("7");
menu_persons.Sensitive = false;
menu_jumps.Sensitive = false;
menu_runs.Sensitive = false;
menu_pulses.Sensitive = false;
menu_other.Sensitive = false;
menu_view.Sensitive = false;
frame_image_test.Sensitive = false;
......@@ -3757,7 +3830,7 @@ Console.Write("7");
menu_jumps.Sensitive = false;
menu_runs.Sensitive = false;
menu_pulses.Sensitive = false;
menu_other.Sensitive = false;
menu_view.Sensitive = false;
//menuitem_jump_type_add.Sensitive = false;
......@@ -3775,7 +3848,7 @@ Console.Write("7");
menu_jumps.Sensitive = true;
menu_runs.Sensitive = true;
menu_pulses.Sensitive = true;
menu_other.Sensitive = true;
menu_view.Sensitive = true;
combo_jumps.Sensitive = true;
......@@ -3800,7 +3873,7 @@ Console.Write("7");
//menu
menu_jumps.Sensitive = false;
menu_runs.Sensitive = false;
menu_pulses.Sensitive = false;
menu_other.Sensitive = false;
//cancel, delete last, finish
button_last_delete.Sensitive = false;
......@@ -3851,7 +3924,7 @@ Console.Write("7");
//menu
menu_jumps.Sensitive = true;
menu_runs.Sensitive = true;
menu_pulses.Sensitive = true;
menu_other.Sensitive = true;
}
}
......@@ -99,8 +99,10 @@ public class Constants
}
//public soundTypes SoundType;
public static string GladeWindows = "chronojump.glade.";
public static string ImagesWindows = "chronojump.images.";
public static string ImagesMiniWindows = "chronojump.images.mini.";
public static string GladeLinux = "";
public static string ImagesLinux = "";
public static string ImagesMiniLinux = "mini/";
......
......@@ -33,12 +33,7 @@ public class About
public About (string version, string [] authors, string translators)
{
Glade.XML gladeXML;
try {
gladeXML = Glade.XML.FromAssembly ("chronojump.glade", "dialog_about", null);
} catch {
gladeXML = Glade.XML.FromAssembly ("chronojump.glade.chronojump.glade", "dialog_about", null);
}
gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "chronojump.glade", "dialog_about", null);
gladeXML.Autoconnect(this);
dialog_about_label_version.Text = version;
......
......@@ -45,12 +45,7 @@ public class ConfirmWindowJumpRun
{
//Setup (text, table, uniqueID);
Glade.XML gladeXML;
try {
gladeXML = Glade.XML.FromAssembly ("chronojump.glade", "confirm_window", null);
} catch {
gladeXML = Glade.XML.FromAssembly ("chronojump.glade.chronojump.glade", "confirm_window", null);
}
gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "chronojump.glade", "confirm_window", null);
gladeXML.Autoconnect(this);
this.parent = parent;
......@@ -114,13 +109,7 @@ public class ConfirmWindow
public ConfirmWindow (Gtk.Window parent, string text1, string text2)
{
Glade.XML gladeXML;
try {
gladeXML = Glade.XML.FromAssembly ("chronojump.glade", "confirm_window", null);
} catch {
gladeXML = Glade.XML.FromAssembly ("chronojump.glade.chronojump.glade", "confirm_window", null);
}
gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "chronojump.glade", "confirm_window", null);
gladeXML.Autoconnect(this);
this.parent = parent;
......
......@@ -36,12 +36,7 @@ public class DialogCalendar
public DialogCalendar (string calendarTitle)
{
Glade.XML gladeXML;
try {
gladeXML = Glade.XML.FromAssembly ("chronojump.glade", "dialog_calendar", null);
} catch {
gladeXML = Glade.XML.FromAssembly ("chronojump.glade.chronojump.glade", "dialog_calendar", null);
}
gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "chronojump.glade", "dialog_calendar", null);
gladeXML.Autoconnect(this);
dialog_calendar.Title = calendarTitle;
......
......@@ -31,12 +31,7 @@ public class DialogHelp
public DialogHelp (string message)
{
Glade.XML gladeXML;
try {
gladeXML = Glade.XML.FromAssembly ("chronojump.glade", "dialog_help", null);
} catch {
gladeXML = Glade.XML.FromAssembly ("chronojump.glade.chronojump.glade", "dialog_help", null);
}
gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "chronojump.glade", "dialog_help", null);
gladeXML.Autoconnect(this);
label_message.Text = message;
......
......@@ -34,12 +34,7 @@ public class DialogImageTest
public DialogImageTest (EventType myEventType)
{
Glade.XML gladeXML;
try {
gladeXML = Glade.XML.FromAssembly ("chronojump.glade", "dialog_image_test", null);
} catch {
gladeXML = Glade.XML.FromAssembly ("chronojump.glade.chronojump.glade", "dialog_image_test", null);
}
gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "chronojump.glade", "dialog_image_test", null);
gladeXML.Autoconnect(this);
label_frame_test.Text = "<b>" + myEventType.Name + "</b>";
......
......@@ -31,12 +31,7 @@ public class DialogMessage
public DialogMessage (string message)
{
Glade.XML gladeXML;
try {
gladeXML = Glade.XML.FromAssembly ("chronojump.glade", "dialog_message", null);
} catch {
gladeXML = Glade.XML.FromAssembly ("chronojump.glade.chronojump.glade", "dialog_message", null);
}