public TreeViewJumpsRj(Gtk.TreeView treeview, Preferences preferences, ExpandStates expandState) { this.treeview = treeview; this.preferences = preferences; this.expandState = expandState; this.pDN = preferences.digitsNumber; //pDN short and very used name treeviewHasTwoLevels = true; dataLineNamePosition = 0; //position of name in the data to be printed dataLineTypePosition = 4; //position of type in the data to be printed allEventsName = Constants.AllJumpsName; if (preferences.weightStatsPercent) { weightName += "\n(%)"; } else { weightName += "\n(Kg)"; } string [] columnsStringPre = { jumperName, Catalog.GetString("TC") + "\n(s)", Catalog.GetString("TF") + "\n(s)", weightName, fallName, heightName }; columnsString = obtainColumnsString(columnsStringPre); eventIDColumn = columnsString.Length; //column where the uniqueID of event will be (and will be hidden). store = getStore(columnsString.Length + 1); //+1 because, eventID is not show in last col treeview.Model = store; prepareHeaders(columnsString); }
public ExpandStates ZoomChange(ExpandStates myExpand) { if (treeviewHasTwoLevels) { if (myExpand == ExpandStates.MINIMIZED) { return(ExpandStates.OPTIMAL); } else if (myExpand == ExpandStates.OPTIMAL) { return(ExpandStates.MAXIMIZED); } else { return(ExpandStates.MINIMIZED); } } else { if (myExpand == ExpandStates.MINIMIZED) { return(ExpandStates.MAXIMIZED); } else { return(ExpandStates.MINIMIZED); } } }
public TreeViewRuns(Gtk.TreeView treeview, int newPrefsDigitsNumber, bool metersSecondsPreferred, ExpandStates expandState) { this.treeview = treeview; this.pDN = newPrefsDigitsNumber; this.metersSecondsPreferred = metersSecondsPreferred; this.expandState = expandState; treeviewHasTwoLevels = false; dataLineNamePosition = 0; //position of name in the data to be printed dataLineTypePosition = 4; //position of type in the data to be printed allEventsName = Constants.AllRunsName; eventIDColumn = 5; //column where the uniqueID of event will be (and will be hidded) string runnerName = Catalog.GetString("Runner"); string speedName = Catalog.GetString("Speed"); if(metersSecondsPreferred) speedName += "\n(m/s)"; else speedName += "\n(Km/h)"; string distanceName = Catalog.GetString("Distance") + "\n(m)"; string timeName = Catalog.GetString("Time") + "\n(s)"; columnsString = new string[]{ runnerName, speedName, distanceName, timeName, descriptionName }; store = getStore(columnsString.Length +1); //+1 because, eventID is not show in last col treeview.Model = store; prepareHeaders(columnsString); }
public TreeViewJumps(Gtk.TreeView treeview, Preferences preferences, ExpandStates expandState) { this.treeview = treeview; this.preferences = preferences; this.expandState = expandState; this.pDN = preferences.digitsNumber; //pDN short and very used name treeviewHasTwoLevels = false; dataLineNamePosition = 0; //position of name in the data to be printed dataLineTypePosition = 4; //position of type in the data to be printed allEventsName = Constants.AllJumpsName; if(preferences.weightStatsPercent) weightName += "\n(%)"; else weightName += "\n(Kg)"; string [] columnsStringPre = { jumperName, Catalog.GetString("TC") + "\n(s)", Catalog.GetString("TF") + "\n(s)", weightName, fallName, heightName }; columnsString = obtainColumnsString(columnsStringPre); eventIDColumn = columnsString.Length ; //column where the uniqueID of event will be (and will be hidden). store = getStore(columnsString.Length +1); //+1 because, eventID is not show in last col treeview.Model = store; prepareHeaders(columnsString); //on creation, treeview is minimized expandState = ExpandStates.MINIMIZED; }
//session is created or loaded, we know maxCPs will be written public TreeViewMultiChronopic(Gtk.TreeView treeview, int newPrefsDigitsNumber, ExpandStates expandState, int maxCPs) { this.treeview = treeview; pDN = newPrefsDigitsNumber; this.expandState = expandState; this.maxCPs = maxCPs; treeviewHasTwoLevels = true; dataLineNamePosition = 0; //position of name in the data to be printed //These are Not used, TreeViewEvent/Fill will be called always without "filter" here dataLineTypePosition = -1; //position of type in the data to be printed allEventsName = ""; if (maxCPs == 2) { columnsString = new string[] { personName, Catalog.GetString("Time"), Catalog.GetString("State") + "\nCP1", "\nCP2", Catalog.GetString("Change") + "\nCP1", "\nCP2", Catalog.GetString("IN") + "-" + Catalog.GetString("IN") + "\nCP1", "\nCP2", Catalog.GetString("OUT") + "-" + Catalog.GetString("OUT") + "\nCP1", "\nCP2", descriptionName } } ; else if (maxCPs == 3) { columnsString = new string[] { personName, Catalog.GetString("Time"), Catalog.GetString("State") + "\nCP1", "\nCP2", "\nCP3", Catalog.GetString("Change") + "\nCP1", "\nCP2", "\nCP3", Catalog.GetString("IN") + "-" + Catalog.GetString("IN") + "\nCP1", "\nCP2", "\nCP3", Catalog.GetString("OUT") + "-" + Catalog.GetString("OUT") + "\nCP1", "\nCP2", "\nCP3", descriptionName } } ; else // ==4 { columnsString = new string[] { personName, Catalog.GetString("Time"), Catalog.GetString("State") + "\nCP1", "\nCP2", "\nCP3", "\nCP4", Catalog.GetString("Change") + "\nCP1", "\nCP2", "\nCP3", "\nCP4", Catalog.GetString("IN") + "-" + Catalog.GetString("IN") + "\nCP1", "\nCP2", "\nCP3", "\nCP4", Catalog.GetString("OUT") + "-" + Catalog.GetString("OUT") + "\nCP1", "\nCP2", "\nCP3", "\nCP4", descriptionName } }; eventIDColumn = columnsString.Length; //column where the uniqueID of event will be (and will be hidden). store = getStore(columnsString.Length + 1); //+1 because, eventID is not show in last col treeview.Model = store; prepareHeaders(columnsString); }
//session is created or loaded, we know maxCPs will be written public TreeViewMultiChronopic(Gtk.TreeView treeview, int newPrefsDigitsNumber, ExpandStates expandState, int maxCPs) { this.treeview = treeview; pDN = newPrefsDigitsNumber; this.expandState = expandState; this.maxCPs = maxCPs; treeviewHasTwoLevels = true; dataLineNamePosition = 0; //position of name in the data to be printed //These are Not used, TreeViewEvent/Fill will be called always without "filter" here dataLineTypePosition = -1; //position of type in the data to be printed allEventsName = ""; if(maxCPs == 2) columnsString = new string[]{ personName, Catalog.GetString("Time"), Catalog.GetString("State") + "\nCP1", "\nCP2", Catalog.GetString("Change") + "\nCP1", "\nCP2", Catalog.GetString("IN") + "-" + Catalog.GetString("IN") + "\nCP1", "\nCP2", Catalog.GetString("OUT") + "-" + Catalog.GetString("OUT") + "\nCP1", "\nCP2", descriptionName}; else if (maxCPs == 3) columnsString = new string[]{ personName, Catalog.GetString("Time"), Catalog.GetString("State") + "\nCP1", "\nCP2", "\nCP3", Catalog.GetString("Change") + "\nCP1", "\nCP2", "\nCP3", Catalog.GetString("IN") + "-" + Catalog.GetString("IN") + "\nCP1", "\nCP2", "\nCP3", Catalog.GetString("OUT") + "-" + Catalog.GetString("OUT") + "\nCP1", "\nCP2", "\nCP3", descriptionName}; else // ==4 columnsString = new string[]{ personName, Catalog.GetString("Time"), Catalog.GetString("State") + "\nCP1", "\nCP2", "\nCP3", "\nCP4", Catalog.GetString("Change") + "\nCP1", "\nCP2", "\nCP3", "\nCP4", Catalog.GetString("IN") + "-" + Catalog.GetString("IN") + "\nCP1", "\nCP2", "\nCP3", "\nCP4", Catalog.GetString("OUT") + "-" + Catalog.GetString("OUT") + "\nCP1", "\nCP2", "\nCP3", "\nCP4", descriptionName}; eventIDColumn = columnsString.Length ; //column where the uniqueID of event will be (and will be hidded). store = getStore(columnsString.Length +1); //+1 because, eventID is not show in last col treeview.Model = store; prepareHeaders(columnsString); }
public TreeViewEvent(Gtk.TreeView treeview, int newPrefsDigitsNumber, ExpandStates expandState) { this.treeview = treeview; this.pDN = newPrefsDigitsNumber; this.expandState = expandState; //orientative values, used for Run class treeviewHasTwoLevels = false; dataLineNamePosition = 0; dataLineTypePosition = 4; allEventsName = ""; eventIDColumn = 4; columnsString = new string[0]; store = getStore(columnsString.Length +1); //+1 because, eventID is not show in last col treeview.Model = store; prepareHeaders(columnsString); }
public TreeViewEvent(Gtk.TreeView treeview, int newPrefsDigitsNumber, ExpandStates expandState) { this.treeview = treeview; this.pDN = newPrefsDigitsNumber; this.expandState = expandState; //orientative values, used for Run class treeviewHasTwoLevels = false; dataLineNamePosition = 0; dataLineTypePosition = 4; allEventsName = ""; eventIDColumn = 4; columnsString = new string[0]; store = getStore(columnsString.Length + 1); //+1 because, eventID is not show in last col treeview.Model = store; prepareHeaders(columnsString); }
public TreeViewReactionTimes(Gtk.TreeView treeview, int newPrefsDigitsNumber, ExpandStates expandState) { this.treeview = treeview; pDN = newPrefsDigitsNumber; this.expandState = expandState; treeviewHasTwoLevels = false; dataLineNamePosition = 0; //position of name in the data to be printed dataLineTypePosition = 4; //position of type in the data to be printed allEventsName = ""; columnsString = new string[]{personName, Catalog.GetString("Time") + " (s)", descriptionName}; eventIDColumn = columnsString.Length ; //column where the uniqueID of event will be (and will be hidden). store = getStore(columnsString.Length +1); //+1 because, eventID is not show in last col treeview.Model = store; prepareHeaders(columnsString); }
public TreeViewReactionTimes(Gtk.TreeView treeview, int newPrefsDigitsNumber, ExpandStates expandState) { this.treeview = treeview; pDN = newPrefsDigitsNumber; this.expandState = expandState; treeviewHasTwoLevels = false; dataLineNamePosition = 0; //position of name in the data to be printed dataLineTypePosition = 4; //position of type in the data to be printed allEventsName = ""; columnsString = new string[] { personName, Catalog.GetString("Time") + " (s)", descriptionName }; eventIDColumn = columnsString.Length; //column where the uniqueID of event will be (and will be hidden). store = getStore(columnsString.Length + 1); //+1 because, eventID is not show in last col treeview.Model = store; prepareHeaders(columnsString); }
public TreeViewJumps(Gtk.TreeView treeview, bool showHeight, bool showPower, bool showInitialSpeed, bool showAngle, bool showQIndex, bool showDjIndex, int newPrefsDigitsNumber, bool weightPercentPreferred, bool metersSecondsPreferred, ExpandStates expandState) { this.treeview = treeview; this.showHeight = showHeight; this.showPower = showPower; this.showInitialSpeed = showInitialSpeed; this.showAngle = showAngle; this.showQIndex = showQIndex; this.showDjIndex = showDjIndex; pDN = newPrefsDigitsNumber; this.weightPercentPreferred = weightPercentPreferred; this.metersSecondsPreferred = metersSecondsPreferred; this.expandState = expandState; treeviewHasTwoLevels = false; dataLineNamePosition = 0; //position of name in the data to be printed dataLineTypePosition = 4; //position of type in the data to be printed allEventsName = Constants.AllJumpsName; if(weightPercentPreferred) weightName += "\n(%)"; else weightName += "\n(Kg)"; string [] columnsStringPre = { jumperName, "TC\n(s)", "TF\n(s)", weightName, fallName }; //Note: if this changes, check the '5's in obtainColumnsString columnsString = obtainColumnsString(columnsStringPre); eventIDColumn = columnsString.Length ; //column where the uniqueID of event will be (and will be hidded). store = getStore(columnsString.Length +1); //+1 because, eventID is not show in last col treeview.Model = store; prepareHeaders(columnsString); //on creation, treeview is minimized expandState = ExpandStates.MINIMIZED; }
public TreeViewPulses(Gtk.TreeView treeview, int newPrefsDigitsNumber, ExpandStates expandState) { this.treeview = treeview; pDN = newPrefsDigitsNumber; this.expandState = expandState; treeviewHasTwoLevels = true; dataLineNamePosition = 0; //position of name in the data to be printed dataLineTypePosition = 4; //position of type in the data to be printed allEventsName = Constants.AllPulsesName; eventIDColumn = 5; //column where the uniqueID of event will be (and will be hidden) string jumperName = Catalog.GetString("Person"); string timeName = Catalog.GetString("Time") + "\n(s)"; string diffName = Catalog.GetString("Difference"); string diffPercentName = Catalog.GetString("Difference") + "\n(%)"; columnsString = new string[] { jumperName, timeName, diffName, diffPercentName, descriptionName }; store = getStore(columnsString.Length + 1); //+1 because, eventID is not show in last col treeview.Model = store; prepareHeaders(columnsString); }
public TreeViewPulses(Gtk.TreeView treeview, int newPrefsDigitsNumber, ExpandStates expandState) { this.treeview = treeview; pDN = newPrefsDigitsNumber; this.expandState = expandState; treeviewHasTwoLevels = true; dataLineNamePosition = 0; //position of name in the data to be printed dataLineTypePosition = 4; //position of type in the data to be printed allEventsName = Constants.AllPulsesName; eventIDColumn = 5; //column where the uniqueID of event will be (and will be hidded) string jumperName = Catalog.GetString("Person"); string timeName = Catalog.GetString("Time") + "\n(s)"; string diffName = Catalog.GetString("Difference"); string diffPercentName = Catalog.GetString("Difference") + "\n(%)"; columnsString = new string[]{jumperName, timeName, diffName, diffPercentName, descriptionName}; store = getStore(columnsString.Length +1); //+1 because, eventID is not show in last col treeview.Model = store; prepareHeaders(columnsString); }
public ExpandStates ZoomChange(ExpandStates myExpand) { if(treeviewHasTwoLevels) { if(myExpand == ExpandStates.MINIMIZED) return ExpandStates.OPTIMAL; else if(myExpand == ExpandStates.OPTIMAL) return ExpandStates.MAXIMIZED; else return ExpandStates.MINIMIZED; } else { if(myExpand == ExpandStates.MINIMIZED) return ExpandStates.MAXIMIZED; else return ExpandStates.MINIMIZED; } }
public TreeViewRuns(Gtk.TreeView treeview, int newPrefsDigitsNumber, bool metersSecondsPreferred, ExpandStates expandState) { this.treeview = treeview; this.pDN = newPrefsDigitsNumber; this.metersSecondsPreferred = metersSecondsPreferred; this.expandState = expandState; treeviewHasTwoLevels = false; dataLineNamePosition = 0; //position of name in the data to be printed dataLineTypePosition = 4; //position of type in the data to be printed allEventsName = Constants.AllRunsName; eventIDColumn = 5; //column where the uniqueID of event will be (and will be hidden) string runnerName = Catalog.GetString("Runner"); string speedName = Catalog.GetString("Speed"); if (metersSecondsPreferred) { speedName += "\n(m/s)"; } else { speedName += "\n(Km/h)"; } string distanceName = Catalog.GetString("Distance") + "\n(m)"; string timeName = Catalog.GetString("Time") + "\n(s)"; columnsString = new string[] { runnerName, speedName, distanceName, timeName, descriptionName }; store = getStore(columnsString.Length + 1); //+1 because, eventID is not show in last col treeview.Model = store; prepareHeaders(columnsString); }