public StatsArterTableSource(StatsArter controller) { _controller = controller; }
public StatsFrontpageTableSource(StatsFrontpage controller) { _controller = controller; var section1 = new SectionMapping("", ""); sections.Add(section1); section1.Rows.Add(new RowItemMapping { Label = Utils.Translate("stats.kills"), GetValue = () => { return ""; }, RowSelected = () => { var statScreen = new StatsArter(); _controller.NavigationController.PushViewController(statScreen, true); } }); section1.Rows.Add(new RowItemMapping { Label = Utils.Translate("stats.observed"), GetValue = () => { return ""; }, RowSelected = () => { var statScreen = new StatsArter(); statScreen.Tittel =Utils.Translate("stats.observed"); statScreen.Mode = "Sett"; _controller.NavigationController.PushViewController(statScreen, true); } }); section1.Rows.Add(new RowItemMapping { Label = Utils.Translate("stats.besthunters"), GetValue = () => { return ""; }, RowSelected = () => { var statScreen = new StatsBesteJegere(); _controller.NavigationController.PushViewController(statScreen, true); } }); section1.Rows.Add(new RowItemMapping { Label = Utils.Translate("stats.hitcount"), GetValue = () => { return ""; }, RowSelected = () => { var statScreen = new StatsHitrate(); _controller.NavigationController.PushViewController(statScreen, true); } }); section1.Rows.Add(new RowItemMapping { Label = Utils.Translate("stats.map"), GetValue = () => { return ""; }, RowSelected = () => { var statScreen = new StatsLoggMap(JaktLoggApp.instance.LoggList); _controller.NavigationController.PushViewController(statScreen, true); } }); section1.Rows.Add(new RowItemMapping { Label = Utils.Translate("stats.timeofday"), GetValue = () => { return ""; }, RowSelected = () => { var statScreen = new StatsTimeOfDay(); _controller.NavigationController.PushViewController(statScreen, true); } }); /*section1.Rows.Add(new RowItemMapping { Label = "Treffprosent", GetValue = () => { return ""; }, RowSelected = () => { var list = JaktLoggApp.instance.LoggList; var shots = list.Sum(l=> l.Skudd); var hits = list.Sum(l=> l.Treff); var percent = shots > 0 ? Decimal.Round(hits*100/shots) : 0; var f = string.Format("{0} treff, {1} skudd : {2}% treff", hits, shots, percent); var img = string.Format("http://chart.apis.google.com/chart?chs="+graphWidth+"x"+graphHeight+"&cht=p3&chd=t:{0},{1}&chdl=Skudd|Treff", shots, hits); var webView = new StatsGenericWebView("Treffprosent", f, "<img src=\""+img+"\" />"); webView.Title = "Treffprosent"; _controller.NavigationController.PushViewController(webView, true); } });*/ }