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

0.6-svn2 chronojump.cs (init of program) separated from

0.6-svn2
chronojump.cs (init of program) separated from gui/chronojump.cs.Fixes: 480399
server:
-server works now with Mono.Data.Sqlite (Sqlite3)
-MakeFile includes webservice and WSDL compilation, on english and lot cleaner
-chronojumpServer.cs renamed chronojumpServerCSharp.cs Fixes: 473721
-better code to test server on chronojump.cs
potencyLewis and Sayers now has a description in stat
not shown descriptions on graph window because normally they don't fit
fixed bug in session edit (date changed value)
chronopic.cs to src
fixed some warnings (unneded "parent" passed between windows) (working on 486128)
updated POTFILES.in


svn path=/trunk/; revision=308
parent 9aeaae6b
# **************************************************************************
# Fichero makefile.
# Makefile.
# --------------------------------------------------------------------------
# Licencia GPL. Juan Gonzalez Gomez, Xavier de Blas Foix
# --------------------------------------------------------------------------
......@@ -11,14 +11,28 @@
CC = gcc
CFLAGS = -Wall
#-- C# Compilador
#-- C# Compilator
MCS = gmcs
#-------- Nombres y dependencias de los programas a construir
BUILD_DIR = build/data
#-- WSDL Client Compilator
WSDL = chronojump_server/compile_wsdl.sh
#-------- Names of programs to build
CHRONOJUMP = chronojump
CHRONOJUMP_DEP_GUI = src/gui/confirm.cs src/gui/error.cs src/gui/eventExecute.cs src/gui/eventGraphConfigure.cs src/gui/event.cs src/gui/jump.cs src/gui/jumpType.cs src/gui/run.cs src/gui/runType.cs src/gui/reactionTime.cs src/gui/pulse.cs src/gui/person.cs src/gui/preferences.cs src/gui/session.cs src/gui/stats.cs src/gui/report.cs src/gui/about.cs src/gui/helpPorts.cs src/gui/dialogMessage.cs src/gui/dialogHelp.cs src/gui/dialogCalendar.cs src/gui/dialogImageTest.cs src/gui/language.cs src/gui/repetitiveConditions.cs src/gui/chronopicConnection.cs
CHRONOJUMP_MINI = chronojump_mini
CHRONOJUMP_SERVER = chronojump_server
#--------Dependences of CHRONOJUMP
CHRONOJUMP_DEP_GUI = src/gui/chronojump.cs src/gui/confirm.cs src/gui/error.cs src/gui/eventExecute.cs src/gui/eventGraphConfigure.cs src/gui/event.cs src/gui/jump.cs src/gui/jumpType.cs src/gui/run.cs src/gui/runType.cs src/gui/reactionTime.cs src/gui/pulse.cs src/gui/person.cs src/gui/preferences.cs src/gui/session.cs src/gui/stats.cs src/gui/report.cs src/gui/about.cs src/gui/helpPorts.cs src/gui/dialogMessage.cs src/gui/dialogHelp.cs src/gui/dialogCalendar.cs src/gui/dialogImageTest.cs src/gui/language.cs src/gui/repetitiveConditions.cs src/gui/chronopicConnection.cs
CHRONOJUMP_DEP_STATS = src/statType.cs src/stats/main.cs src/stats/global.cs src/stats/sjCmjAbk.cs src/stats/sjCmjAbkPlus.cs src/stats/djIndex.cs src/stats/djQ.cs src/stats/rjIndex.cs src/stats/rjPotencyBosco.cs src/stats/rjEvolution.cs src/stats/ieIub.cs src/stats/fv.cs src/stats/potency.cs
......@@ -69,40 +83,56 @@ 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-2.0 -pkg:glade-sharp-2.0 -r:System.Data -r:Mono.Data.Sqlite -r:System.Web.Services
#CHRONOJUMP_LIB = -pkg:gtk-sharp-2.0 -pkg:glade-sharp-2.0 -r:System.Data -r:Mono.Data.Sqlite -r:Mono.Data.SqliteClient -r:System.Web.Services
NPLOT_LIBS = build/data/linux_dlls
BUILD_DIR = build/data
#-- Construccion del chronojump_mini que funciona por consola
CHRONOJUMP_MINI = chronojump_mini
#--------Dependences of CHRONOJUMP_MINI
CHRONOJUMP_MINI_DEP = src/chronojump_mini.cs chronopic.cs src/util.cs src/constants.cs
CHRONOJUMP_MINI_DEP = src/chronojump_mini.cs src/chronopic.cs src/util.cs src/constants.cs
#--------Dependences of CHRONOJUMP_SERVER
CHRONOJUMP_SERVER_DEP = chronojump_server/chronojumpServerCSharp.cs src/sqlite/*.cs src/util.cs src/person.cs src/event.cs src/jump.cs src/run.cs src/pulse.cs src/reactionTime.cs src/session.cs src/eventType.cs src/jumpType.cs src/runType.cs src/pulseType.cs src/constants.cs
#--------Makefiles
#chronojump and chronojump_mini (default if used 'make')
all: $(CHRONOJUMP).prg $(CHRONOJUMP_MINI).prg
#chronojump, chronojump_mini and server (use 'make server')
server: $(CHRONOJUMP).prg $(CHRONOJUMP_MINI).prg $(CHRONOJUMP_SERVER)
#-------------------------------
# Regla para compilar CHRONOJUMP (C#)
# Compile CHRONOJUMP (C#)
#-------------------------------
$(CHRONOJUMP).prg: $(NPLOT_LIBS)/NPlot.dll $(NPLOT_LIBS)/NPlot.Gtk.dll $(CHRONOJUMP_DEP) chronopic.cs glade/chronojump.glade Makefile
$(CHRONOJUMP).prg: $(NPLOT_LIBS)/NPlot.dll $(NPLOT_LIBS)/NPlot.Gtk.dll $(CHRONOJUMP_DEP) src/chronopic.cs glade/chronojump.glade
./compile_po_files.sh #update translations
$(MCS) -debug $(CHRONOJUMP_DEP) $(RESOURCES_GLADE) $(RESOURCES_IMAGES) $(RESOURCES_REPORT) -unsafe chronopic.cs -r:$(NPLOT_LIBS)/NPlot.dll -r:$(NPLOT_LIBS)/NPlot.Gtk.dll -r:System.Drawing -r:Mono.Posix $(CHRONOJUMP_LIB) -nowarn:169 -out:$(BUILD_DIR)/$(CHRONOJUMP).prg
$(MCS) -debug $(CHRONOJUMP_DEP) $(RESOURCES_GLADE) $(RESOURCES_IMAGES) $(RESOURCES_REPORT) -unsafe src/chronopic.cs -r:$(NPLOT_LIBS)/NPlot.dll -r:$(NPLOT_LIBS)/NPlot.Gtk.dll -r:System.Drawing -r:Mono.Posix $(CHRONOJUMP_LIB) -nowarn:169 -out:$(BUILD_DIR)/$(CHRONOJUMP).prg
#------------------------------------
# Regla para compilar CHRONOJUMP_MINI (C#)
# Compile CHRONOJUMP_MINI (C#)
#------------------------------------
$(CHRONOJUMP_MINI).prg: $(CHRONOJUMP_MINI_DEP)
$(MCS) $(CHRONOJUMP_MINI_DEP) -r:Mono.Posix -out:$(BUILD_DIR)/$(CHRONOJUMP_MINI).prg
#------------------------------------
# Compile server webservice & WSDL
#------------------------------------
$(CHRONOJUMP_SERVER): $(CHRONOJUMP_SERVER_DEP) chronojump_server/chronojumpServer.asmx
$(MCS) -t:library -out:chronojump_server/bin/chronojumpServer.dll -r:System.Data -r:Mono.Data.Sqlite -r:System.Web.Services -r:Mono.Posix $(CHRONOJUMP_SERVER_DEP)
$(WSDL)
#--------------------------
# REGLAS GENERICAS
# GENERIC rules
#--------------------------
.c.o:
$(CC) $(CFLAGS) -c $<
......
CHRONOJUMP DETAILED CHANGELOG:
12 oct 2007
0.6-svn2
chronojump.cs (init of program) separated from gui/chronojump.cs.Fixes: 480399
server:
-server works now with Mono.Data.Sqlite (Sqlite3)
-MakeFile includes webservice and WSDL compilation, on english and lot cleaner
-chronojumpServer.cs renamed chronojumpServerCSharp.cs Fixes: 473721
-better code to test server on chronojump.cs
potencyLewis and Sayers now has a description in stat
not shown descriptions on graph window because normally they don't fit
fixed bug in session edit (date changed value)
chronopic.cs to src
fixed some warnings (unneded "parent" passed between windows) (working
on 486128)
updated POTFILES.in
9 oct (2)
fixed bug on 484758 on today svn up
......
#!/bin/sh
xsp2 --root /var/www/mono/ --nonstop &
echo waiting 3 seconds
sleep 3
echo compiling wsdl
wsdl http://localhost:8080/chronojumpServer.asmx
COMPILE WEBSERVICE
COMPILE WEBSERVICE (now automatically compiles from chronojump Makefile)
gmcs -t:library -out:bin/chronojumpServer.dll -r:System.Data -r:Mono.Data.SqliteClient -r:System.Web.Services -r:Mono.Posix chronojumpServer.cs ../src/sqlite/*.cs ../src/util.cs ../src/person.cs ../src/event.cs ../src/jump.cs ../src/run.cs ../src/session.cs ../src/jumpType.cs ../src/runType.cs
gmcs -t:library -out:bin/chronojumpServer.dll -r:System.Data -r:Mono.Data.Sqlite -r:System.Web.Services -r:Mono.Posix chronojumpServerCSharp.cs ../src/sqlite/*.cs ../src/util.cs ../src/person.cs ../src/event.cs ../src/jump.cs ../src/run.cs ../src/pulse.cs ../src/reactionTime.cs ../src/session.cs ../src/eventType.cs ../src/jumpType.cs ../src/runType.cs ../src/pulseType.cs ../src/constants.cs
COMPILE CLIENT WITH WSDL
COMPILE CLIENT WITH WSDL (now auto done by makefile calling compile_wsdl.sh on this dir)
(server has to be running for doing this compilation
xavier@corall:/var/www/mono$ xsp2 --root /var/www/mono/
)
wsdl http://localhost:8080/chronojumpServer.asmx
this compiles to file: ChronojumpServer.cs .this file now gets linked to chronojump client (see Makefile)
OLD (compile webservice):
*** OLD *** (compile webservice):
gmcs -t:library -r:System.Data -r:Mono.Data.SqliteClient -r:System.Web.Services -out:bin/chronojumpServer.dll chronojumpServer.cs ../src/sqlite/person.cs ../src/sqlite/main.cs ../src/util.cs ../src/person.cs ../src/sqlite/personSession.cs -r:Mono.Posix
......
......@@ -8,6 +8,7 @@ src/execute/pulse.cs
src/execute/reactionTime.cs
src/execute/run.cs
src/exportSession.cs
src/gui/chronojump.cs
src/gui/event.cs
src/gui/helpPorts.cs
src/gui/jump.cs
......@@ -28,12 +29,12 @@ src/report.cs
src/runType.cs
src/sqlite/stat.cs
src/statType.cs
src/stats/cmjPlusPotency.cs
src/stats/potency.cs
src/stats/djIndex.cs
src/stats/djQ.cs
src/stats/fv.cs
src/stats/global.cs
src/stats/graphs/cmjPlusPotency.cs
src/stats/graphs/potency.cs
src/stats/graphs/djIndex.cs
src/stats/graphs/djQ.cs
src/stats/graphs/fv.cs
......
This diff is collapsed.
......@@ -48,7 +48,7 @@ public class Chronopic {
//-- Configurar timeout por defecto
//de momento no en windows (hasta que no encontremos por qué falla)
OperatingSystem os = Environment.OSVersion;
//OperatingSystem os = Environment.OSVersion;
//not used, now there's no .NET this was .NET related
//on mono timeouts work on windows and linux
//if( ! os.Platform.ToString().ToUpper().StartsWith("WIN"))
......
......@@ -27,16 +27,21 @@ public class Constants
//the strings created by Catalog cannot be const
//formulas
public static string DjIndexFormula = "Dj Index ((tv-tc)/tc *100)";
public static string DjIndexFormula = "Dj Index (tv-tc)/tc *100)";
public static string QIndexFormula = "Q index (tv/tc)";
public const string FvIndexFormula = "F/V sj+(100%)/sj *100";
public const string IeIndexFormula = "IE (cmj-sj)/sj *100";
public const string IubIndexFormula = "IUB (abk-cmj)/cmj *100";
//public static string CmjPlusPotencyFormula = Catalog.GetString("Potency") +
// " (Pc + Pb) * 9.81 * sqrt(2 * 9,81 * h)";
public static string PotencyLewisCMJlFormula = Catalog.GetString("Potency")+ " CMJl (Lewis)";
public static string PotencySayersSJlFormula = Catalog.GetString("Potency") + " SJl (Sayers)";
public static string PotencySayersCMJlFormula = Catalog.GetString("Potency") + " CMJl (Sayers)";
public static string PotencyLewisCMJlFormula = Catalog.GetString("Potency")+ " CMJl (Lewis) " +
"(" + Catalog.GetString("body weight") + "+" + Catalog.GetString("extra weight") + ")*9.81*" +
"SQRT(2*9,81* " + Catalog.GetString("height") + "(m))";
public static string PotencySayersSJlFormula = Catalog.GetString("Potency") + " SJl (Sayers) " +
"(60.7*" + Catalog.GetString("height") + "(cm)) + (45.3*" + Catalog.GetString("weight") + ") -2055";
public static string PotencySayersCMJlFormula = Catalog.GetString("Potency") + " CMJl (Sayers) " +
"(51.9*" + Catalog.GetString("height") + "(cm)) + (48.9*" + Catalog.GetString("weight") + ") -2007";
//global stat types
public static string TypeSessionSummary = Catalog.GetString("Session summary");
......
......@@ -97,7 +97,6 @@ public class EventExecute
protected States loggedState; //log of last state
//protected Gtk.ProgressBar progressBar;
protected Gtk.Statusbar appbar;
protected Gtk.Window app;
protected int pDN;
protected int timesForSavingRepetitive; //number of times that this repetive event needs for being recorded in temporal table
......
......@@ -48,7 +48,7 @@ public class JumpExecute : EventExecute
//jump execution
public JumpExecute(EventExecuteWindow eventExecuteWin, int personID, string personName, int sessionID, string type, int fall, double weight,
Chronopic cp, Gtk.Statusbar appbar, Gtk.Window app, int pDN, bool volumeOn)
Chronopic cp, Gtk.Statusbar appbar, int pDN, bool volumeOn)
{
this.eventExecuteWin = eventExecuteWin;
this.personID = personID;
......@@ -60,7 +60,6 @@ public class JumpExecute : EventExecute
this.cp = cp;
this.appbar = appbar;
this.app = app;
this.pDN = pDN;
this.volumeOn = volumeOn;
......@@ -140,7 +139,7 @@ public class JumpExecute : EventExecute
}
else {
ConfirmWindow confirmWin;
confirmWin = ConfirmWindow.Show(app,
confirmWin = ConfirmWindow.Show(
Catalog.GetString("You are OUT, come inside and press the 'accept' button"), "");
Util.PlaySound(Constants.SoundTypes.BAD, volumeOn);
......@@ -188,7 +187,7 @@ public class JumpExecute : EventExecute
}
else {
ConfirmWindow confirmWin;
confirmWin = ConfirmWindow.Show(app,
confirmWin = ConfirmWindow.Show(
Catalog.GetString("You are IN, please leave the platform, and press the 'accept' button"), "");
Util.PlaySound(Constants.SoundTypes.BAD, volumeOn);
......@@ -444,7 +443,7 @@ public class JumpRjExecute : JumpExecute
public JumpRjExecute(EventExecuteWindow eventExecuteWin, int personID, string personName,
int sessionID, string type, int fall, double weight,
double limitAsDouble, bool jumpsLimited,
Chronopic cp, Gtk.Statusbar appbar, Gtk.Window app, int pDN, bool allowFinishAfterTime,
Chronopic cp, Gtk.Statusbar appbar, int pDN, bool allowFinishAfterTime,
bool volumeOn, RepetitiveConditionsWindow repetitiveConditionsWin)
{
this.eventExecuteWin = eventExecuteWin;
......@@ -465,7 +464,6 @@ public class JumpRjExecute : JumpExecute
this.cp = cp;
this.appbar = appbar;
this.app = app;
this.pDN = pDN;
this.allowFinishAfterTime = allowFinishAfterTime;
......@@ -522,7 +520,7 @@ public class JumpRjExecute : JumpExecute
myMessage = Catalog.GetString("You are OUT, please enter the platform, prepare for jump and press the 'accept' button");
}
ConfirmWindow confirmWin;
confirmWin = ConfirmWindow.Show(app, myMessage, "");
confirmWin = ConfirmWindow.Show(myMessage, "");
Util.PlaySound(Constants.SoundTypes.BAD, volumeOn);
//we call again this function
......
......@@ -55,7 +55,7 @@ public class PulseExecute : EventExecute
//execution
public PulseExecute(EventExecuteWindow eventExecuteWin, int personID, string personName, int sessionID, string type, double fixedPulse, int totalPulsesNum,
Chronopic cp, Gtk.Statusbar appbar, Gtk.Window app, int pDN, bool volumeOn)
Chronopic cp, Gtk.Statusbar appbar, int pDN, bool volumeOn)
{
this.eventExecuteWin = eventExecuteWin;
this.personID = personID;
......@@ -68,7 +68,6 @@ public class PulseExecute : EventExecute
this.cp = cp;
this.appbar = appbar;
this.app = app;
this.pDN = pDN;
this.volumeOn = volumeOn;
......@@ -121,7 +120,7 @@ public class PulseExecute : EventExecute
string myMessage = Catalog.GetString("You are IN, please leave the platform, prepare for start, and press the 'accept' button!!");
ConfirmWindow confirmWin;
confirmWin = ConfirmWindow.Show(app, myMessage, "");
confirmWin = ConfirmWindow.Show(myMessage, "");
Util.PlaySound(Constants.SoundTypes.BAD, volumeOn);
//we call again this function
......
......@@ -42,7 +42,7 @@ public class ReactionTimeExecute : EventExecute
//reactionTime execution
public ReactionTimeExecute(EventExecuteWindow eventExecuteWin, int personID, string personName, int sessionID,
Chronopic cp, Gtk.Statusbar appbar, Gtk.Window app, int pDN, bool volumeOn)
Chronopic cp, Gtk.Statusbar appbar, int pDN, bool volumeOn)
{
this.eventExecuteWin = eventExecuteWin;
this.personID = personID;
......@@ -51,7 +51,6 @@ public class ReactionTimeExecute : EventExecute
this.cp = cp;
this.appbar = appbar;
this.app = app;
this.pDN = pDN;
this.volumeOn = volumeOn;
......@@ -118,7 +117,7 @@ public class ReactionTimeExecute : EventExecute
}
else {
ConfirmWindow confirmWin;
confirmWin = ConfirmWindow.Show(app,
confirmWin = ConfirmWindow.Show(
Catalog.GetString("You are OUT, come inside and press the 'accept' button"), "");
System.Media.SystemSounds.Beep.Play();
......
......@@ -53,7 +53,7 @@ public class RunExecute : EventExecute
//run execution
public RunExecute(EventExecuteWindow eventExecuteWin, int personID, int sessionID, string type, double distance,
Chronopic cp, Gtk.Statusbar appbar, Gtk.Window app, int pDN, bool metersSecondsPreferred, bool volumeOn)
Chronopic cp, Gtk.Statusbar appbar, int pDN, bool metersSecondsPreferred, bool volumeOn)
{
this.eventExecuteWin = eventExecuteWin;
this.personID = personID;
......@@ -63,7 +63,6 @@ public class RunExecute : EventExecute
this.cp = cp;
this.appbar = appbar;
this.app = app;
this.pDN = pDN;
this.metersSecondsPreferred = metersSecondsPreferred;
......@@ -338,7 +337,7 @@ public class RunIntervalExecute : RunExecute
//run execution
public RunIntervalExecute(EventExecuteWindow eventExecuteWin, int personID, int sessionID, string type, double distanceInterval, double limitAsDouble, bool tracksLimited,
Chronopic cp, Gtk.Statusbar appbar, Gtk.Window app, int pDN, bool metersSecondsPreferred,
Chronopic cp, Gtk.Statusbar appbar, int pDN, bool metersSecondsPreferred,
bool volumeOn, RepetitiveConditionsWindow repetitiveConditionsWin)
{
this.eventExecuteWin = eventExecuteWin;
......@@ -359,7 +358,6 @@ public class RunIntervalExecute : RunExecute
this.cp = cp;
this.appbar = appbar;
this.app = app;
this.metersSecondsPreferred = metersSecondsPreferred;
this.pDN = pDN;
......
......@@ -99,7 +99,7 @@ public class ExportSession
Console.WriteLine("File {0} exists with attributes {1}, created at {2}",
fileName, File.GetAttributes(fileName), File.GetCreationTime(fileName));
Console.WriteLine("Overwrite...");
ConfirmWindow confirmWin = ConfirmWindow.Show(app1, Catalog.GetString("Are you sure you want to overwrite file: "), fileName);
ConfirmWindow confirmWin = ConfirmWindow.Show(Catalog.GetString("Are you sure you want to overwrite file: "), fileName);
confirmWin.Button_accept.Clicked += new EventHandler(on_overwrite_file_accepted);
} else {
writer = File.CreateText(fileName);
......
This diff is collapsed.
......@@ -38,22 +38,19 @@ public class ChronopicConnection
[Widget] Gtk.Button button_cancel;
[Widget] Gtk.Button button_close;
Gtk.Window parent;
static ChronopicConnection ChronopicConnectionBox;
public ChronopicConnection (Gtk.Window parent)
public ChronopicConnection ()
{
Glade.XML gladeXML;
gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "chronojump.glade", "chronopic_connection", null);
gladeXML.Autoconnect(this);
this.parent = parent;
}
static public ChronopicConnection Show (Gtk.Window parent)
static public ChronopicConnection Show ()
{
if (ChronopicConnectionBox == null) {
ChronopicConnectionBox = new ChronopicConnection(parent);
ChronopicConnectionBox = new ChronopicConnection();
}
ChronopicConnectionBox.chronopic_connection.Show ();
......
......@@ -35,19 +35,16 @@ public class ConfirmWindowJumpRun
[Widget] Gtk.Label label2;
[Widget] Gtk.Button button_accept;
Gtk.Window parent;
string table;
int uniqueID;
static ConfirmWindowJumpRun ConfirmWindowJumpRunBox;
public ConfirmWindowJumpRun (Gtk.Window parent, string text1, string text2, string table, int uniqueID)
public ConfirmWindowJumpRun (string text1, string text2, string table, int uniqueID)
{
//Setup (text, table, uniqueID);
Glade.XML gladeXML;
gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "chronojump.glade", "confirm_window", null);
gladeXML.Autoconnect(this);
this.parent = parent;
label1.Text = text1;
label2.Text = text2;
......@@ -55,10 +52,10 @@ public class ConfirmWindowJumpRun
this.uniqueID = uniqueID;
}
static public ConfirmWindowJumpRun Show (Gtk.Window parent, string text1, string text2, string table, int uniqueID)
static public ConfirmWindowJumpRun Show (string text1, string text2, string table, int uniqueID)
{
if (ConfirmWindowJumpRunBox == null) {
ConfirmWindowJumpRunBox = new ConfirmWindowJumpRun(parent, text1, text2, table, uniqueID);
ConfirmWindowJumpRunBox = new ConfirmWindowJumpRun(text1, text2, table, uniqueID);
}
ConfirmWindowJumpRunBox.confirm_window.Show ();
......@@ -102,25 +99,22 @@ public class ConfirmWindow
[Widget] Gtk.Button button_accept;
[Widget] Gtk.Button button_cancel;
Gtk.Window parent;
static ConfirmWindow ConfirmWindowBox;
public ConfirmWindow (Gtk.Window parent, string text1, string text2)
public ConfirmWindow (string text1, string text2)
{
Glade.XML gladeXML;
gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "chronojump.glade", "confirm_window", null);
gladeXML.Autoconnect(this);
this.parent = parent;
label1.Text = text1;
label2.Text = text2;
}
static public ConfirmWindow Show (Gtk.Window parent, string text1, string text2)
static public ConfirmWindow Show (string text1, string text2)
{
if (ConfirmWindowBox == null) {
ConfirmWindowBox = new ConfirmWindow(parent, text1, text2);
ConfirmWindowBox = new ConfirmWindow(text1, text2);
}
ConfirmWindowBox.confirm_window.Show ();
......
......@@ -34,25 +34,22 @@ public class ErrorWindow
[Widget] Gtk.Label label1;
[Widget] Gtk.Button button_accept;
Gtk.Window parent;
string table;
static ErrorWindow ErrorWindowBox;
public ErrorWindow (Gtk.Window parent, string text1)
public ErrorWindow (string text1)
{
Glade.XML gladeXML;
gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "chronojump.glade", "error_window", null);
gladeXML.Autoconnect(this);
this.parent = parent;
label1.Text = text1;
}
static public ErrorWindow Show (Gtk.Window parent, string text1)
static public ErrorWindow Show (string text1)
{
if (ErrorWindowBox == null) {
ErrorWindowBox = new ErrorWindow(parent, text1);
ErrorWindowBox = new ErrorWindow(text1);
}
ErrorWindowBox.error_window.Show ();
......
......@@ -66,7 +66,6 @@ public class EditEventWindow
[Widget] protected Gtk.TextView textview_description;
static EditEventWindow EditEventWindowBox;
protected Gtk.Window parent;
protected int pDN;
protected bool metersSecondsPreferred;
protected string type;
......@@ -94,20 +93,20 @@ public class EditEventWindow
//for inheritance
protected EditEventWindow () {
}
EditEventWindow (Gtk.Window parent) {
/*
EditEventWindow () {
//Glade.XML gladeXML;
//gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "chronojump.glade", "edit_event", null);
//gladeXML.Autoconnect(this);
this.parent = parent;
}
static public EditEventWindow Show (Gtk.Window parent, Event myEvent, int pDN)
*/
static public EditEventWindow Show (Event myEvent, int pDN)
//run win have also metersSecondsPreferred
{
if (EditEventWindowBox == null) {
EditEventWindowBox = new EditEventWindow (parent);
EditEventWindowBox = new EditEventWindow ();
}
EditEventWindowBox.pDN = pDN;
......@@ -406,22 +405,17 @@ public class EventMoreWindow
protected TreeStore store;
[Widget] protected Gtk.TreeView treeview_more;
[Widget] protected Gtk.Button button_accept;
protected Gtk.Window parent;
protected string selectedEventType;
protected string selectedEventName;
protected string selectedDescription;
public Gtk.Button button_selected;
public EventMoreWindow () {
}
public EventMoreWindow (Gtk.Window parent) {
public EventMoreWindow () {
/*
Glade.XML gladeXML;
gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "chronojump.glade", "jumps_runs_more", null);
gladeXML.Autoconnect(this);
this.parent = parent;
*/
//name, startIn, weight, description
......
......@@ -40,22 +40,23 @@ public class EditJumpWindow : EditEventWindow
protected double personWeight;
//for inheritance
/*
protected EditJumpWindow () {
}
*/
EditJumpWindow (Gtk.Window parent) {
public EditJumpWindow () {
Glade.XML gladeXML;
gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "chronojump.glade", "edit_event", null);
gladeXML.Autoconnect(this);
this.parent = parent;
eventBigTypeString = Catalog.GetString("jump");
}
static new public EditJumpWindow Show (Gtk.Window parent, Event myEvent, bool weightPercentPreferred, int pDN)
static new public EditJumpWindow Show (Event myEvent, bool weightPercentPreferred, int pDN)
{
if (EditJumpWindowBox == null) {
EditJumpWindowBox = new EditJumpWindow (parent);
EditJumpWindowBox = new EditJumpWindow ();
}
EditJumpWindowBox.weightPercentPreferred = weightPercentPreferred;
......@@ -195,19 +196,18 @@ public class EditJumpRjWindow : EditJumpWindow
{
static EditJumpRjWindow EditJumpRjWindowBox;
EditJumpRjWindow (Gtk.Window parent) {
EditJumpRjWindow () {
Glade.XML gladeXML;
gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "chronojump.glade", "edit_event", null);
gladeXML.Autoconnect(this);
this.parent = parent;
eventBigTypeString = Catalog.GetString("reactive jump");
}
static new public EditJumpRjWindow Show (Gtk.Window parent, Event myEvent, bool weightPercentPreferred, int pDN)
static new public EditJumpRjWindow Show (Event myEvent, bool weightPercentPreferred, int pDN)
{
if (EditJumpRjWindowBox == null) {
EditJumpRjWindowBox = new EditJumpRjWindow (parent);
EditJumpRjWindowBox = new EditJumpRjWindow ();
}
EditJumpRjWindowBox.weightPercentPreferred = weightPercentPreferred;
......@@ -320,18 +320,16 @@ public class RepairJumpRjWindow
[Widget] Gtk.TextView textview1;
static RepairJumpRjWindow RepairJumpRjWindowBox;
Gtk.Window parent;
//int pDN;
JumpType jumpType;
JumpRj jumpRj; //used on button_accept
RepairJumpRjWindow (Gtk.Window parent, JumpRj myJump, int pDN) {
RepairJumpRjWindow (JumpRj myJump, int pDN) {
Glade.XML gladeXML;
gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "chronojump.glade", "repair_sub_event", null);
gladeXML.Autoconnect(this);
this.parent = parent;
this.jumpRj = myJump;
//this.pDN = pDN;
......@@ -364,11 +362,11 @@ public class RepairJumpRjWindow
treeview_subevents.Selection.Changed += onSelectionEntry;
}
static public RepairJumpRjWindow Show (Gtk.Window parent, JumpRj myJump, int pDN)
static public RepairJumpRjWindow Show (JumpRj myJump, int pDN)
{
//Console.WriteLine(myJump);
if (RepairJumpRjWindowBox == null) {
RepairJumpRjWindowBox = new RepairJumpRjWindow (parent, myJump, pDN);
RepairJumpRjWindowBox = new RepairJumpRjWindow (myJump, pDN);
}
RepairJumpRjWindowBox.repair_sub_event.Show ();
......@@ -710,19 +708,17 @@ public class JumpExtraWindow
static int fall = 20;
static JumpExtraWindow JumpExtraWindowBox;
Gtk.Window parent;
JumpExtraWindow (Gtk.Window parent) {
JumpExtraWindow () {
Glade.XML gladeXML;
gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "chronojump.glade", "jump_extra", null);
gladeXML.Autoconnect(this);
this.parent = parent;
}
static public JumpExtraWindow Show (Gtk.Window parent, JumpType myJumpType)
static public JumpExtraWindow Show (JumpType myJumpType)
{
if (JumpExtraWindowBox == null) {
JumpExtraWindowBox = new JumpExtraWindow (parent);
JumpExtraWindowBox = new JumpExtraWindow ();
}
if(myJumpType.IsRepetitive) {
......@@ -871,11 +867,10 @@ public class JumpsMoreWindow : EventMoreWindow
private bool selectedStartIn;
private bool selectedExtraWeight;
public JumpsMoreWindow (Gtk.Window parent) {
public JumpsMoreWindow () {
Glade.XML gladeXML;
gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "chronojump.glade", "jumps_runs_more", null);
gladeXML.Autoconnect(this);
this.parent = parent;
selectedEventType = EventType.Types.JUMP.ToString();
......@@ -885,10 +880,10 @@ public class JumpsMoreWindow : EventMoreWindow
initializeThings();
}
static public JumpsMoreWindow Show (Gtk.Window parent)
static public JumpsMoreWindow Show ()
{
if (JumpsMoreWindowBox == null) {
JumpsMoreWindowBox = new JumpsMoreWindow (parent);
JumpsMoreWindowBox = new JumpsMoreWindow ();
}
JumpsMoreWindowBox.jumps_runs_more.Show ();
......@@ -1037,12 +1032,11 @@ public class JumpsRjMoreWindow : EventMoreWindow
private double selectedLimitedValue;
private bool selectedUnlimited;
public JumpsRjMoreWindow (Gtk.Window parent) {
public JumpsRjMoreWindow () {
//the glade window is the same as jumps_more
Glade.XML gladeXML;
gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "chronojump.glade", "jumps_runs_more", null);
gladeXML.Autoconnect(this);
this.parent = parent;
//if jumps_runs_more is opened to showing Rj jumpTypes make it wider
jumps_runs_more.Resize(600,300);
......@@ -1056,10 +1050,10 @@ public class JumpsRjMoreWindow : EventMoreWindow
initializeThings();
}
static public JumpsRjMoreWindow Show (Gtk.Window parent)
static public JumpsRjMoreWindow Show ()
{
if (JumpsRjMoreWindowBox == null) {
JumpsRjMoreWindowBox = new JumpsRjMoreWindow (parent);
JumpsRjMoreWindowBox = new JumpsRjMoreWindow ();