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

6 jan 2006 (minor RELEASE 0.43)

	graphs: all multisession graphs and rjEvolution now have a palette in
	constants.cs if palette is small for graph, then use random but values
	far from white

	graph rjEvolution now has different marker for tv and tc

	report: less cols for persons if not needed
	report: rjEvolution jumps data in rows

	fixed size in treeview persons

	fixed three noticeable bugs: (1) some bad code inherited from old use of
	"all/none" row in stats treeview, (2) some bad code for the old using
	"id: name" for comboPerson. These bugs make crash the rjEvolution
	report, and makes problems in some parts of the code if the jumper
	name has no ' ' (3) checkboxes in treeview stats doesn't add rows to
	markedRows without checking if that exists (and delete doesn't check
	if there is more than one of every row)

	fixed all warnings
parent a92f9e9b
CHANGELOG:
6 jan 2006 (minor RELEASE 0.43)
graphs: all multisession graphs and rjEvolution now have a palette in
constants.cs if palette is small for graph, then use random but values
far from white
graph rjEvolution now has different marker for tv and tc
report: less cols for persons if not needed
report: rjEvolution jumps data in rows
fixed size in treeview persons
fixed three noticeable bugs: (1) some bad code inherited from old use of
"all/none" row in stats treeview, (2) some bad code for the old using
"id: name" for comboPerson. These bugs make crash the rjEvolution
report, and makes problems in some parts of the code if the jumper
name has no ' ' (3) checkboxes in treeview stats doesn't add rows to
markedRows without checking if that exists (and delete doesn't check
if there is more than one of every row)
fixed all warnings
2 jan 2006 (minor RELEASE 0.42)
persons gui changed, deleted the combo and now managed with a clearer,
easier, powerfuler treeview at left of main window (added
......
No preview for this file type
No preview for this file type
This diff is collapsed.
......@@ -1424,7 +1424,7 @@
<child>
<widget class="GtkScrolledWindow" id="scrolledwindow24">
<property name="width_request">140</property>
<property name="width_request">145</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
......@@ -1490,7 +1490,7 @@
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
......
This diff is collapsed.
......@@ -159,7 +159,7 @@ public class ChronoJump
private Random rand;
private static string [] authors = {"Xavier de Blas", "Juan Gonzalez"};
private static string progversion = "0.42";
private static string progversion = "0.43";
private static string progname = "Chronojump";
//persons
......
......@@ -21,6 +21,7 @@
using System;
using System.Data;
using System.Collections; //ArrayList
public class Constants
{
......@@ -36,6 +37,22 @@ public class Constants
//strings
public static string AllJumpsName = Catalog.GetString("All jumps");
public static string AllRunsName = Catalog.GetString("All runs");
/*
public static string [] ColorsRGB = {
"1,11,111", "2,22,222", "3,33,223", "4,44,224", "5,55,225"
};
*/
//30 colors defined
public static string [] Colors = {
"Blue", "Coral", "Cyan", "Gray", "Green", "Pink", "Salmon", "Yellow",
"DarkBlue", "DarkCyan", "DarkGoldenrod", "DarkGray",
"DarkGreen", "DarkMagenta", "DarkSalmon",
"LightBlue", "LightCoral", "LightCyan", "LightGoldenrodYellow",
"LightGray", "LightGreen", "LightPink", "LightSalmon", "LightYellow",
"MediumBlue", "MediumOrchid", "MediumPurple", "MediumTurquoise", "MediumVioletRed", "YellowGreen"
};
}
......@@ -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.PersonName);
if (jumper == myJump.PersonID + ": " + myJump.PersonName) {
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.PersonName);
if (jumper == myJump.PersonID + ": " + myJump.PersonName) {
Console.WriteLine("jumper: {0}, name: {1}", jumper, myJump.PersonID + ":" + myJump.PersonName);
if (jumper == myJump.PersonID + ":" + myJump.PersonName) {
combo_jumpers.Entry.Text = jumper;
}
}
......@@ -593,7 +593,6 @@ public class RepairJumpRjWindow
bool iterOk = store.GetIterFirst (out myIter);
if(iterOk) {
int count = 1;
string equal= ""; //first iteration should not appear '='
do {
tcString = tcString + equal + (string) treeview_subevents.Model.GetValue (myIter, 1);
......@@ -625,7 +624,8 @@ public class RepairJumpRjWindow
//save it deleting the old first for having the same uniqueID
SqliteJump.Delete("jumpRj", jumpRj.UniqueID.ToString());
int uniqueID = SqliteJump.InsertRj(jumpRj.UniqueID.ToString(), jumpRj.PersonID, jumpRj.SessionID,
//int uniqueID = SqliteJump.InsertRj(jumpRj.UniqueID.ToString(), jumpRj.PersonID, jumpRj.SessionID,
SqliteJump.InsertRj(jumpRj.UniqueID.ToString(), jumpRj.PersonID, jumpRj.SessionID,
jumpRj.Type, Util.GetMax(tvString), Util.GetMax(tcString),
jumpRj.Fall, jumpRj.Weight, jumpRj.Description,
Util.GetAverage(tvString), Util.GetAverage(tcString),
......@@ -887,9 +887,8 @@ public class JumpsMoreWindow
tv.AppendColumn ( Catalog.GetString ("Description"), new CellRendererText(), "text", count++);
}
private void fillTreeView (Gtk.TreeView tv, TreeStore store) {
TreeIter iter = new TreeIter();
private void fillTreeView (Gtk.TreeView tv, TreeStore store)
{
//select data without inserting an "all jumps", without filter, and not obtain only name of jump
string [] myJumpTypes = SqliteJumpType.SelectJumpTypes("", "", false);
foreach (string myType in myJumpTypes) {
......@@ -905,7 +904,7 @@ public class JumpsMoreWindow
myStringFull[3] = Catalog.GetString("No");
}
iter = store.AppendValues (
store.AppendValues (
//myStringFull[0], //don't display de uniqueID
myStringFull[1], //name
myStringFull[2], //startIn
......@@ -1075,9 +1074,8 @@ public class JumpsRjMoreWindow
tv.AppendColumn ( Catalog.GetString ("Description"), new CellRendererText(), "text", count++);
}
private void fillTreeView (Gtk.TreeView tv, TreeStore store) {
TreeIter iter = new TreeIter();
private void fillTreeView (Gtk.TreeView tv, TreeStore store)
{
//select data without inserting an "all jumps", and not obtain only name of jump
string [] myJumpTypes = SqliteJumpType.SelectJumpRjTypes("", false);
foreach (string myType in myJumpTypes) {
......@@ -1111,7 +1109,7 @@ public class JumpsRjMoreWindow
}
}
iter = store.AppendValues (
store.AppendValues (
//myStringFull[0], //don't display de uniqueID
myStringFull[1], //name
myLimiter, //jumps or seconds
......
......@@ -87,8 +87,8 @@ public class EditRunWindow
combo_runners = new Combo();
combo_runners.PopdownStrings = runners;
foreach (string runner in runners) {
Console.WriteLine("runner: {0}, name: {1}", runner, myRun.PersonID + ": " + myRun.RunnerName);
if (runner == myRun.PersonID + ": " + myRun.RunnerName) {
Console.WriteLine("runner: {0}, name: {1}", runner, myRun.PersonID + ":" + myRun.RunnerName);
if (runner == myRun.PersonID + ":" + myRun.RunnerName) {
combo_runners.Entry.Text = runner;
}
}
......@@ -196,7 +196,7 @@ public class EditRunIntervalWindow
combo_runners = new Combo();
combo_runners.PopdownStrings = runners;
foreach (string runner in runners) {
if (runner == myRun.PersonID + ": " + myRun.RunnerName) {
if (runner == myRun.PersonID + ":" + myRun.RunnerName) {
combo_runners.Entry.Text = runner;
}
}
......@@ -477,7 +477,6 @@ public class RepairRunIntervalWindow
bool iterOk = store.GetIterFirst (out myIter);
if(iterOk) {
int count = 1;
string equal= ""; //first iteration should not appear '='
do {
timeString = timeString + equal + (string) treeview_subevents.Model.GetValue (myIter, 1);
......@@ -508,7 +507,7 @@ public class RepairRunIntervalWindow
//save it deleting the old first for having the same uniqueID
SqliteRun.Delete("runInterval", runInterval.UniqueID.ToString());
int uniqueID = SqliteRun.InsertInterval(runInterval.UniqueID.ToString(),
SqliteRun.InsertInterval(runInterval.UniqueID.ToString(),
runInterval.PersonID, runInterval.SessionID,
runInterval.Type,
runs * runInterval.DistanceInterval, //distanceTotal
......@@ -713,9 +712,8 @@ public class RunsMoreWindow
tv.AppendColumn ( Catalog.GetString ("Description"), new CellRendererText(), "text", count++);
}
private void fillTreeView (Gtk.TreeView tv, TreeStore store) {
TreeIter iter = new TreeIter();
private void fillTreeView (Gtk.TreeView tv, TreeStore store)
{
//select data without inserting an "all jumps", and not obtain only name of jump
string [] myRunTypes = SqliteRunType.SelectRunTypes("", false);
foreach (string myType in myRunTypes) {
......@@ -724,7 +722,7 @@ public class RunsMoreWindow
myStringFull[2] = Catalog.GetString("Not defined");
}
iter = store.AppendValues (
store.AppendValues (
//myStringFull[0], //don't display the uniqueID
myStringFull[1], //name
myStringFull[2], //distance
......@@ -880,9 +878,8 @@ public class RunsIntervalMoreWindow
tv.AppendColumn ( Catalog.GetString ("Description"), new CellRendererText(), "text", count++);
}
private void fillTreeView (Gtk.TreeView tv, TreeStore store) {
TreeIter iter = new TreeIter();
private void fillTreeView (Gtk.TreeView tv, TreeStore store)
{
//select data without inserting an "all jumps", and not obtain only name of jump
string [] myTypes = SqliteRunType.SelectRunIntervalTypes("", false);
foreach (string myType in myTypes) {
......@@ -907,7 +904,7 @@ public class RunsIntervalMoreWindow
}
}
iter = store.AppendValues (
store.AppendValues (
//myStringFull[0], //don't display de uniqueID
myStringFull[1], //name
myStringFull[2], //distance
......
......@@ -308,14 +308,13 @@ public class SessionLoadWindow {
tv.AppendColumn ( Catalog.GetString ("Comments"), new CellRendererText(), "text", count++);
}
private void fillTreeView (Gtk.TreeView tv, TreeStore store) {
TreeIter iter = new TreeIter();
private void fillTreeView (Gtk.TreeView tv, TreeStore store)
{
string [] mySessions = SqliteSession.SelectAllSessions(); //returns a string of values separated by ':'
foreach (string session in mySessions) {
string [] myStringFull = session.Split(new char[] {':'});
iter = store.AppendValues (myStringFull[0], myStringFull[1],
store.AppendValues (myStringFull[0], myStringFull[1],
myStringFull[2], myStringFull[3],
myStringFull[5], //number of jumpers x session
myStringFull[6], //number of jumps x session
......@@ -456,9 +455,8 @@ public class SessionSelectStatsWindow {
tv.AppendColumn ( Catalog.GetString ("Comments"), new CellRendererText(), "text", count++);
}
private void fillTreeView (Gtk.TreeView tv, TreeStore store) {
TreeIter iter = new TreeIter();
private void fillTreeView (Gtk.TreeView tv, TreeStore store)
{
bool commentsDisable = false;
int sessionIdDisable = -1; //don't disable any session (-1 as uniqueID is impossible)
string [] mySessions =
......@@ -467,7 +465,7 @@ public class SessionSelectStatsWindow {
foreach (string session in mySessions) {
string [] myStringFull = session.Split(new char[] {':'});
iter = store.AppendValues (myStringFull[0], myStringFull[1],
store.AppendValues (myStringFull[0], myStringFull[1],
myStringFull[2], myStringFull[3],
myStringFull[4] //description of session
);
......@@ -479,7 +477,6 @@ public class SessionSelectStatsWindow {
//now, find iters corresponding to each of this sessions and put in the selected treeview, and delete from the unselected treeview
private void processOldSelectedSessions (Gtk.TreeView treeview1, TreeStore store1, TreeStore store2, ArrayList oldSelectedSessions) {
TreeIter iter1 = new TreeIter();
TreeIter iter2 = new TreeIter();
string [] strIter = {"", "", "", "", ""};
for (int i=0; i < oldSelectedSessions.Count ; i ++) {
......@@ -490,8 +487,8 @@ public class SessionSelectStatsWindow {
strIter [j] = (string) treeview1.Model.GetValue (iter1, j);
}
//create iter2
iter2 = store2.AppendValues (strIter[0], strIter[1], strIter[2], strIter[3], strIter[4]);
//print values
store2.AppendValues (strIter[0], strIter[1], strIter[2], strIter[3], strIter[4]);
//delete iter1
store1.Remove(ref iter1);
......@@ -504,7 +501,6 @@ public class SessionSelectStatsWindow {
TreeIter iter1; //iter of the first treeview
TreeIter iter2; //iter of second treeview. Used for search the row on we are going to insert
TreeIter iter3; //new iter in first treeview
TreePath path;
int i;
string [] str = {"", "", "", "", ""};
......@@ -531,7 +527,6 @@ public class SessionSelectStatsWindow {
TreeIter iter1; //iter of first treeview. Used for search the row on we are going to insert
TreeIter iter2; //iter of the second treeview
TreeIter iter3; //new iter in first treeview
TreePath path2;
int i;
string [] str = {"", "", "", "", ""};
......
......@@ -215,21 +215,22 @@ public class Report : ExportSession
protected override void printJumpers()
{
ArrayList myData = new ArrayList(1);
myData.Add ( "\n" +
Catalog.GetString ("ID") + ":" + Catalog.GetString ("Name") + ":" +
Catalog.GetString ("ID") + ":" + Catalog.GetString ("Name") + ":" +
Catalog.GetString ("ID") + ":" + Catalog.GetString ("Name") + ":" +
Catalog.GetString ("ID") + ":" + Catalog.GetString ("Name") + ":" +
Catalog.GetString ("ID") + ":" + Catalog.GetString ("Name") + ":" +
Catalog.GetString ("ID") + ":" + Catalog.GetString ("Name")
);
//put 6 jumpers x row, now write the headers, but if there are less than 6 persons,do less columns
string tempString = "\n";
for(int i=0; i < 6 && i < myPersons.Length ; i ++) {
if(i > 0) {
tempString += ":";
}
tempString += Catalog.GetString ("ID") + ":" + Catalog.GetString ("Name");
}
myData.Add (tempString);
string myLine = "";
int count = 0;
foreach (string jumperString in myPersons) {
string [] myStr = jumperString.Split(new char[] {':'});
Console.WriteLine(myStr[1] + ":");
if(count > 0) {
myLine += ":";
}
......@@ -336,7 +337,7 @@ public class Report : ExportSession
writer.WriteLine(myHeaderStat);
StatType myStatType;
bool allFine;
//bool allFine;
//report of stat
......@@ -359,7 +360,8 @@ public class Report : ExportSession
""
);
allFine = myStatType.ChooseStat();
//allFine = myStatType.ChooseStat();
myStatType.ChooseStat();
string myEnunciate ="<tr><td colspan=\"2\">" + myStatType.Enunciate + "</td></tr>";
......@@ -385,7 +387,8 @@ public class Report : ExportSession
fileName //fileName for exporting there
);
allFine = myStatType.ChooseStat();
//allFine = myStatType.ChooseStat();
myStatType.ChooseStat();
//enunciate is prented here and not before
//because myStatType of a graph doesn't know the numContinuous value
......
......@@ -91,8 +91,8 @@ class SqliteJump : Sqlite
int myLast = dbcon.LastInsertRowId;
dbcon.Close();
Jump myJump = new Jump(myLast, personID, sessionID,
type, tv, tc, fall, weight, description );
//Jump myJump = new Jump(myLast, personID, sessionID,
// type, tv, tc, fall, weight, description );
return myLast;
}
......@@ -115,8 +115,8 @@ class SqliteJump : Sqlite
dbcmd.ExecuteNonQuery();
int myLast = dbcon.LastInsertRowId;
JumpRj myJump = new JumpRj (myLast, personID, sessionID, type, tvString, tcString,
fall, weight, description, jumps, time, limited );
//JumpRj myJump = new JumpRj (myLast, personID, sessionID, type, tvString, tcString,
// fall, weight, description, jumps, time, limited );
dbcon.Close();
......
......@@ -686,8 +686,8 @@ class SqliteStat : Sqlite
myArray.Add (reader[0].ToString() + showSexString + showJumpTypeString +
returnSessionString + ":" + //session
Util.ChangeDecimalSeparator(reader[3].ToString()) + //index
allTCsTVsCombined + //tc:tv:tc:tv...
returnFallString //fall
returnFallString + //fall
allTCsTVsCombined //tc:tv:tc:tv...
);
}
reader.Close();
......
......@@ -33,6 +33,7 @@ public class GraphDjIndex : StatDjIndex
{
protected string operation;
private Random myRand = new Random();
private int countSeriesGraphColors = 0;
//for simplesession
GraphSerie serieIndex;
......@@ -153,14 +154,23 @@ public class GraphDjIndex : StatDjIndex
GraphSerie mySerie = new GraphSerie();
mySerie.IsLeftAxis = true;
int myR = myRand.Next(255);
int myG = myRand.Next(255);
int myB = myRand.Next(255);
//color code
Color myColor = new Color();
if(countSeriesGraphColors > Constants.Colors.Length) {
int myR = myRand.Next(255 - 40); //not 255 for not being so light colors
int myG = myRand.Next(255 - 40);
int myB = myRand.Next(255 - 40);
myColor = Color.FromArgb(myR, myG, myB);
} else {
myColor = Color.FromName(Constants.Colors[countSeriesGraphColors]);
countSeriesGraphColors ++;
}
mySerie.SerieMarker = new Marker (Marker.MarkerType.Cross1,
6, new Pen (Color.FromArgb(myR, myG, myB), 2.0F));
6, new Pen (myColor, 2.0F));
mySerie.SerieColor = Color.FromArgb(myR, myG, myB);
mySerie.SerieColor = myColor;
int i=0;
foreach (string myValue in statValues) {
......
......@@ -33,6 +33,7 @@ public class GraphDjQ : StatDjQ
{
protected string operation;
private Random myRand = new Random();
private int countSeriesGraphColors = 0;
//for simplesession
GraphSerie serieIndex;
......@@ -154,14 +155,23 @@ public class GraphDjQ : StatDjQ
GraphSerie mySerie = new GraphSerie();
mySerie.IsLeftAxis = true;
int myR = myRand.Next(255);
int myG = myRand.Next(255);
int myB = myRand.Next(255);
//color code
Color myColor = new Color();
if(countSeriesGraphColors > Constants.Colors.Length) {
int myR = myRand.Next(255 - 40); //not 255 for not being so light colors
int myG = myRand.Next(255 - 40);
int myB = myRand.Next(255 - 40);
myColor = Color.FromArgb(myR, myG, myB);
} else {
myColor = Color.FromName(Constants.Colors[countSeriesGraphColors]);
countSeriesGraphColors ++;
}
mySerie.SerieMarker = new Marker (Marker.MarkerType.Cross1,
6, new Pen (Color.FromArgb(myR, myG, myB), 2.0F));
6, new Pen (myColor, 2.0F));
mySerie.SerieColor = myColor;
mySerie.SerieColor = Color.FromArgb(myR, myG, myB);
int i=0;
foreach (string myValue in statValues) {
......
......@@ -34,6 +34,7 @@ public class GraphFv : StatFv
{
protected string operation;
private Random myRand = new Random();
private int countSeriesGraphColors = 0;
//for simplesession
GraphSerie serieIndex;
......@@ -142,14 +143,24 @@ public class GraphFv : StatFv
GraphSerie mySerie = new GraphSerie();
mySerie.IsLeftAxis = true;
int myR = myRand.Next(255);
int myG = myRand.Next(255);
int myB = myRand.Next(255);
//color code
Color myColor = new Color();
if(countSeriesGraphColors > Constants.Colors.Length) {
int myR = myRand.Next(255 - 40); //not 255 for not being so light colors
int myG = myRand.Next(255 - 40);
int myB = myRand.Next(255 - 40);
myColor = Color.FromArgb(myR, myG, myB);
} else {
myColor = Color.FromName(Constants.Colors[countSeriesGraphColors]);
countSeriesGraphColors ++;
}
mySerie.SerieMarker = new Marker (Marker.MarkerType.Cross1,
6, new Pen (Color.FromArgb(myR, myG, myB), 2.0F));
6, new Pen (myColor, 2.0F));
mySerie.SerieColor = myColor;
mySerie.SerieColor = Color.FromArgb(myR, myG, myB);
int i=0;
foreach (string myValue in statValues) {
......
......@@ -33,6 +33,7 @@ using System.Drawing.Imaging;
public class GraphGlobal : StatGlobal
{
private Random myRand = new Random();
private int countSeriesGraphColors = 0;
//for simplesession
GraphSerie serieIndex;
......@@ -172,12 +173,19 @@ public class GraphGlobal : StatGlobal
} else {
GraphSerie mySerie = new GraphSerie();
int myR = myRand.Next(255);
int myG = myRand.Next(255);
int myB = myRand.Next(255);
//color code
Color myColor = new Color();
if(countSeriesGraphColors > Constants.Colors.Length) {
int myR = myRand.Next(255 - 40); //not 255 for not being so light colors
int myG = myRand.Next(255 - 40);
int myB = myRand.Next(255 - 40);
myColor = Color.FromArgb(myR, myG, myB);
} else {
myColor = Color.FromName(Constants.Colors[countSeriesGraphColors]);
countSeriesGraphColors ++;
}
mySerie.SerieColor = Color.FromArgb(myR, myG, myB);
mySerie.SerieColor = myColor;
int i=0;
string myValueBefore = "";
......@@ -195,12 +203,12 @@ public class GraphGlobal : StatGlobal
valueNoSex == "IE" || valueNoSex == "IUB" || valueNoSex == "FV" ) {
mySerie.IsLeftAxis = false;
mySerie.SerieMarker = new Marker (Marker.MarkerType.FilledCircle,
6, new Pen (Color.FromArgb(myR, myG, myB), 2.0F));
6, new Pen (myColor, 2.0F));
} else {
mySerie.IsLeftAxis = true;
//mySerie.SerieMarker = new Marker (Marker.MarkerType.TriangleUp,
mySerie.SerieMarker = new Marker (Marker.MarkerType.Cross1,
6, new Pen (Color.FromArgb(myR, myG, myB), 2.0F));
6, new Pen (myColor, 2.0F));
}
myValueBefore = valueNoSex; //for changing later indexQ for indexQ*10
mySerie.Title = myValue;
......
......@@ -34,6 +34,7 @@ public class GraphIeIub : StatIeIub
{
protected string operation;
private Random myRand = new Random();
private int countSeriesGraphColors = 0;
//for simplesession
GraphSerie serieIndex;
......@@ -149,14 +150,22 @@ public class GraphIeIub : StatIeIub
GraphSerie mySerie = new GraphSerie();
mySerie.IsLeftAxis = true;
int myR = myRand.Next(255);
int myG = myRand.Next(255);
int myB = myRand.Next(255);
//color code
Color myColor = new Color();
if(countSeriesGraphColors > Constants.Colors.Length) {
int myR = myRand.Next(255 - 40); //not 255 for not being so light colors
int myG = myRand.Next(255 - 40);
int myB = myRand.Next(255 - 40);
myColor = Color.FromArgb(myR, myG, myB);
} else {
myColor = Color.FromName(Constants.Colors[countSeriesGraphColors]);
countSeriesGraphColors ++;
}
mySerie.SerieMarker = new Marker (Marker.MarkerType.Cross1,
6, new Pen (Color.FromArgb(myR, myG, myB), 2.0F));
6, new Pen (myColor, 2.0F));
mySerie.SerieColor = Color.FromArgb(myR, myG, myB);
mySerie.SerieColor = myColor;
int i=0;
foreach (string myValue in statValues) {
......
......@@ -34,6 +34,7 @@ public class GraphRjEvolution : StatRjEvolution
{
protected string operation;
private Random myRand = new Random();
private int countSeriesGraphColors = 0;
//numContinuous passed only for writing correct Enunciate
......@@ -99,20 +100,28 @@ public class GraphRjEvolution : StatRjEvolution
serieTc.IsLeftAxis = true;
serieTv.IsLeftAxis = true;
int myR = myRand.Next(255);
int myG = myRand.Next(255);
int myB = myRand.Next(255);
//color code
Color myColor = new Color();
if(countSeriesGraphColors > Constants.Colors.Length) {
int myR = myRand.Next(255 - 40); //not 255 for not being so light colors
int myG = myRand.Next(255 - 40);
int myB = myRand.Next(255 - 40);
myColor = Color.FromArgb(myR, myG, myB);
} else {
myColor = Color.FromName(Constants.Colors[countSeriesGraphColors]);
countSeriesGraphColors ++;
}
//serieTc.SerieMarker = new Marker (Marker.MarkerType.TriangleDown,
serieTc.SerieMarker = new Marker (Marker.MarkerType.Cross1,
6, new Pen (Color.FromArgb(myR, myG, myB), 2.0F));
6, new Pen (myColor, 2.0F));
//serieTv.SerieMarker = new Marker (Marker.MarkerType.TriangleUp,
serieTv.SerieMarker = new Marker (Marker.MarkerType.Cross1,
6, new Pen (Color.FromArgb(myR, myG, myB), 2.0F));
serieTv.SerieMarker = new Marker (Marker.MarkerType.Cross2,
6, new Pen (myColor, 2.0F));
//for the line between markers
serieTc.SerieColor = Color.FromArgb(myR, myG, myB);
serieTv.SerieColor = Color.FromArgb(myR, myG, myB);
serieTc.SerieColor = myColor;
serieTv.SerieColor = myColor;
int i = 0;
foreach (string myValue in statValues)
......@@ -136,7 +145,7 @@ public class GraphRjEvolution : StatRjEvolution
private bool isTC(int col) {
for (int i=0; i < maxJumps ; i++) {
if (i*2 +2 == col) { //TC cols: 2, 4, 6, 8, ...
if (i*2 +3 == col) { //TC cols: 3, 5, 7, 9, ...
return true;
}
}
......@@ -145,7 +154,7 @@ public class GraphRjEvolution : StatRjEvolution
private bool isTV(int col) {
for (int i=0; i < maxJumps ; i++) {
if (i*2 +3 == col) { //TV cols: 3, 5, 6, 9, ...
if (i*2 +4 == col) { //TV cols: 4, 6, 8, 10, ...
return true;
}
}
......
......@@ -34,6 +34,7 @@ public class GraphRjIndex : StatRjIndex
{
protected string operation;
private Random myRand = new Random();
private int countSeriesGraphColors = 0;
//for simplesession
GraphSerie serieIndex;
......@@ -147,14 +148,22 @@ public class GraphRjIndex : StatRjIndex
GraphSerie mySerie = new GraphSerie();
mySerie.IsLeftAxis = true;
int myR = myRand.Next(255);
int myG = myRand.Next(255);
int myB = myRand.Next(255);
//color code
Color myColor = new Color();
if(countSeriesGraphColors > Constants.Colors.Length) {
int myR = myRand.Next(255 - 40); //not 255 for not being so light colors
int myG = myRand.Next(255 - 40);
int myB = myRand.Next(255 - 40);
myColor = Color.FromArgb(myR, myG, myB);
} else {
myColor = Color.FromName(Constants.Colors[countSeriesGraphColors]);
countSeriesGraphColors ++;
}
mySerie.SerieMarker = new Marker (Marker.MarkerType.Cross1,
6, new Pen (Color.FromArgb(myR, myG, myB), 2.0F));
6, new Pen (myColor, 2.0F));
mySerie.SerieColor = Color.FromArgb(myR, myG, myB);
mySerie.SerieColor = myColor;
int i=0;
foreach (string myValue in statValues) {
......
......@@ -34,6 +34,7 @@ public class GraphRjPotencyBosco : StatRjPotencyBosco
{
protected string operation;
private Random myRand = new Random();