partial void yearChanged(UIKit.UISegmentedControl sender) { if (sender.SelectedSegment == 0) { flexPie.BeginUpdate(); this.flexPie.Header = TITLE + " 2015"; data.ReplaceAsync(0, new MyData { Label = "Safari", Value = safari[0] }); data.ReplaceAsync(1, new MyData { Label = "Chrome", Value = chrome[0] }); data.ReplaceAsync(2, new MyData { Label = "Android", Value = android_browser[0] }); data.ReplaceAsync(3, new MyData { Label = "Opera", Value = opera_mini[0] }); data.ReplaceAsync(4, new MyData { Label = "IE", Value = internet_explorer[0] }); data.ReplaceAsync(5, new MyData { Label = "Other", Value = other[0] }); flexPie.EndUpdate(); } if (sender.SelectedSegment == 1) { flexPie.BeginUpdate(); this.flexPie.Header = TITLE + " 2014"; data.ReplaceAsync(0, new MyData { Label = "Safari", Value = safari[1] }); data.ReplaceAsync(1, new MyData { Label = "Chrome", Value = chrome[1] }); data.ReplaceAsync(2, new MyData { Label = "Android", Value = android_browser[1] }); data.ReplaceAsync(3, new MyData { Label = "Opera", Value = opera_mini[1] }); data.ReplaceAsync(4, new MyData { Label = "IE", Value = internet_explorer[1] }); data.ReplaceAsync(5, new MyData { Label = "Other", Value = other[1] }); flexPie.EndUpdate(); } if (sender.SelectedSegment == 2) { flexPie.BeginUpdate(); this.flexPie.Header = TITLE + " 2013"; data.ReplaceAsync(0, new MyData { Label = "Safari", Value = safari[2] }); data.ReplaceAsync(1, new MyData { Label = "Chrome", Value = chrome[2] }); data.ReplaceAsync(2, new MyData { Label = "Android", Value = android_browser[2] }); data.ReplaceAsync(3, new MyData { Label = "Opera", Value = opera_mini[2] }); data.ReplaceAsync(4, new MyData { Label = "IE", Value = internet_explorer[2] }); data.ReplaceAsync(5, new MyData { Label = "Other", Value = other[2] }); flexPie.EndUpdate(); } if (sender.SelectedSegment == 3) { flexPie.BeginUpdate(); this.flexPie.Header = TITLE + " 2012"; data.ReplaceAsync(0, new MyData { Label = "Safari", Value = safari[3] }); data.ReplaceAsync(1, new MyData { Label = "Chrome", Value = chrome[3] }); data.ReplaceAsync(2, new MyData { Label = "Android", Value = android_browser[3] }); data.ReplaceAsync(3, new MyData { Label = "Opera", Value = opera_mini[3] }); data.ReplaceAsync(4, new MyData { Label = "IE", Value = internet_explorer[3] }); data.ReplaceAsync(5, new MyData { Label = "Other", Value = other[3] }); flexPie.EndUpdate(); } }
async void btnUpdate2015_Clicked(object sender, EventArgs e) { flexPie.BeginUpdate(); this.flexPie.Header = TITLE + " 2015"; await data.ReplaceAsync(0, new MyData { Label = "Safari", Value = safari[0] }); await data.ReplaceAsync(1, new MyData { Label = "Chrome", Value = chrome[0] }); await data.ReplaceAsync(2, new MyData { Label = "Android", Value = android_browser[0] }); await data.ReplaceAsync(3, new MyData { Label = "Opera", Value = opera_mini[0] }); await data.ReplaceAsync(4, new MyData { Label = "IE", Value = internet_explorer[0] }); await data.ReplaceAsync(5, new MyData { Label = "Other", Value = other[0] }); btnUpdate2015.BackgroundColor = Color.FromHex("#2196F3"); btnUpdate2014.BackgroundColor = Color.FromHex("#64B5F6"); btnUpdate2013.BackgroundColor = Color.FromHex("#64B5F6"); btnUpdate2012.BackgroundColor = Color.FromHex("#64B5F6"); flexPie.EndUpdate(); }
private async void Button2015_Click(object sender, EventArgs e) { mFlexPie.BeginUpdate(); mFlexPie.Header = TITLE + " 2015"; await data.ReplaceAsync(0, new BindObject("Safari", safari[0])); await data.ReplaceAsync(1, new BindObject("Chrome", chrome[0])); await data.ReplaceAsync(2, new BindObject("Android", android_browser[0])); await data.ReplaceAsync(3, new BindObject("Opera", opera_mini[0])); await data.ReplaceAsync(4, new BindObject("IE", internet_explorer[0])); await data.ReplaceAsync(5, new BindObject("Other", other[0])); mFlexPie.EndUpdate(); }