本文整理汇总了C#中StatType.ChooseStat方法的典型用法代码示例。如果您正苦于以下问题:C# StatType.ChooseStat方法的具体用法?C# StatType.ChooseStat怎么用?C# StatType.ChooseStat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StatType
的用法示例。
在下文中一共展示了StatType.ChooseStat方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: on_button_graph_clicked
private void on_button_graph_clicked(object o, EventArgs args)
{
if(selected)
{
TreeModel model;
TreeIter iter1;
if (treeview1.Selection.GetSelected (out model, out iter1)) {
string str=getRow(iter1);
string [] statRow = str.ToString().Split(new char[] {'\t'});
string subType;
int rj_evolution_mark_consecutives = report.GetRjEvolutionMarkConsecutives(statRow[1], out subType);
ArrayList sendSelectedSessions = report.GetSelectedSessions(statRow[3]);
Gtk.TreeView treeviewFake = new Gtk.TreeView(); //not needed for graph
bool showSex = Util.StringToBool(statRow[5]);
int limit = -1;
int statsJumpsType = report.GetStatsJumpTypeAndLimit(statRow[4], out limit);
ArrayList arrayListMarkedRows = Util.StringToArrayList(statRow[6], ':');
GraphROptions graphROptions = new GraphROptions(statRow[7]);
StatType myStatType = new StatType(
statRow[0], //statisticType
subType,
statRow[2], //statisticApplyTo,
treeviewFake,
sendSelectedSessions,
showSex,
statsJumpsType,
limit,
arrayListMarkedRows,
rj_evolution_mark_consecutives,
graphROptions,
true, //graph
false, //always false in this class
report.preferences
);
myStatType.ChooseStat();
}
}
}
示例2: fillTreeView_stats
private bool fillTreeView_stats(bool graph)
{
if(blockFillingTreeview)
return false;
Log.WriteLine("----------FILLING treeview stats---------------");
string statisticType = UtilGtk.ComboGetActive(combo_stats_stat_type);
string statisticSubType = UtilGtk.ComboGetActive(combo_stats_stat_subtype);
string statisticApplyTo = "";
if (UtilGtk.ComboGetActive(combo_stats_stat_subtype) ==
Catalog.GetString(Constants.SubtractionBetweenTests))
statisticApplyTo = UtilGtk.ComboGetActive(combo_subtraction_between_1) + "," +
UtilGtk.ComboGetActive(combo_subtraction_between_2);
else
statisticApplyTo = UtilGtk.ComboGetActive(combo_stats_stat_apply_to);
if(statsColumnsToRemove && !graph) {
statsRemoveColumns();
}
statsColumnsToRemove = true;
bool toReport = false; //all graphs are done for be shown on window (not to file like report.cs)
int statsJumpsType = 0;
int limit = -1;
if (radiobutton_stats_jumps_all.Active) {
statsJumpsType = 0;
limit = -1;
} else if (radiobutton_stats_jumps_limit.Active) {
statsJumpsType = 1;
limit = Convert.ToInt32 ( spin_stats_jumps_limit.Value );
} else if (radiobutton_stats_jumps_person_bests.Active) {
statsJumpsType = 2;
limit = Convert.ToInt32 ( spin_stats_jumps_person_bests.Value );
} else {
statsJumpsType = 3;
limit = -1;
}
//we use sendSelectedSessions for not losing selectedSessions ArrayList
//everytime user cicles the sessions select radiobuttons
sendSelectedSessions = new ArrayList(2);
if (radiobutton_current_session.Active) {
sendSelectedSessions.Add (currentSession.UniqueID + ":" + currentSession.Name + ":" + currentSession.Date);
} else if (radiobutton_selected_sessions.Active) {
sendSelectedSessions = selectedSessions;
}
//the mark best jumps or runs is only on rjEvolution and runInterval
//runInterval has only one stat subtype and is like rjEvolution
int evolution_mark_consecutives = -1;
if (
( UtilGtk.ComboGetActive(combo_stats_stat_subtype) == Catalog.GetString("Evolution") ||
UtilGtk.ComboGetActive(combo_stats_stat_type) == Constants.TypeRunsIntervallic ) &&
checkbutton_mark_consecutives.Active ) {
evolution_mark_consecutives = Convert.ToInt32 ( spinbutton_mark_consecutives.Value );
}
ArrayList markedRows = new ArrayList();
if(graph) {
markedRows = myStatType.MarkedRows;
}
//if we change combo_type, subtype, or others, always, show button_graph & add_to_report,
//if there's no data, they will be hided, later
button_graph.Sensitive = true;
button_add_to_report.Sensitive = true;
GraphROptions graphROptions = fillGraphROptions();
myStatType = new StatType(
statisticType,
statisticSubType,
statisticApplyTo,
treeview_stats,
sendSelectedSessions,
prefsDigitsNumber,
checkbutton_stats_sex.Active,
statsJumpsType,
limit,
heightPreferred,
weightPercentPreferred,
markedRows,
evolution_mark_consecutives,
graphROptions,
graph,
toReport //always false in this class
);
//if we just made a graph, store is not made,
//and we cannot change the Male/female visualizations in the combo
//with this we can assign a store to the graph (we assign the store of the last stat (not graph)
//define lastStore before Choosing Stat
if(! toReport)
if (graph)
myStatType.LastStore = lastStore;
bool allFine = myStatType.ChooseStat();
//.........这里部分代码省略.........
示例3: printStats
protected void printStats()
{
if(StatisticsData.Count > 0)
writer.WriteLine("<h2>Statistics</h2>");
//obtain every report stats one by one
for(int statCount=0; statCount < StatisticsData.Count ; statCount++) {
string [] strFull = StatisticsData[statCount].ToString().Split(new char[] {'\t'});
string myHeaderStat = "";
//separate in sessions
ArrayList sendSelectedSessions = GetSelectedSessions(strFull[3]);
//separate in markedRows
ArrayList arrayListMarkedRows = Util.StringToArrayList(strFull[6], ':');
string applyTo = strFull[2];
myHeaderStat += "<h3> " + strFull[0] + " : " + strFull[1] + " : " + applyTo + "</h3> ";
bool showSex = Util.StringToBool(strFull[5]);
int limit;
int statsJumpsType = GetStatsJumpTypeAndLimit(strFull[4], out limit);
//obtain marked jumps of rj evolution if needed
string subType;
int rj_evolution_mark_consecutives = GetRjEvolutionMarkConsecutives(strFull[1], out subType);
myHeaderStat += "\n<p><TABLE cellpadding=2 cellspacing=2><tr><td>\n";
writer.WriteLine(myHeaderStat);
StatType myStatType;
//bool allFine;
//report of stat
GraphROptions graphROptions = new GraphROptions(strFull[7]);
myStatType = new StatType(
strFull[0], //statisticType
subType, //statisticSubType
strFull[2], //statisticApplyTo
sendSelectedSessions,
prefsDigitsNumber,
showSex,
statsJumpsType,
limit,
heightPreferred,
weightStatsPercent,
arrayListMarkedRows,
rj_evolution_mark_consecutives,
graphROptions,
false, //graph
toReport,
writer,
"",
statCount
);
//allFine = myStatType.ChooseStat();
myStatType.ChooseStat();
string myEnunciate ="<tr><td>" + myStatType.Enunciate + "</td></tr>";
writer.WriteLine("<br>");
//report of graph
myStatType = new StatType(
strFull[0], //statisticType
subType, //statisticSubType
strFull[2], //statisticApplyTo
sendSelectedSessions,
prefsDigitsNumber,
showSex,
statsJumpsType,
limit,
heightPreferred,
weightStatsPercent,
arrayListMarkedRows,
rj_evolution_mark_consecutives,
graphROptions,
true, //graph
toReport,
writer,
fileName, //fileName for exporting there
statCount
);
myStatType.ChooseStat();
//enunciate is prented here and not before
//because myStatType of a graph doesn't know the numContinuous value
//needed for enunciate in rj evolution statistic
writer.WriteLine(myEnunciate);
writer.WriteLine("<tr><td>" + strFull[8] + "</td></tr>"); //comment
writer.WriteLine("</table>");
}
}