private void SetupPayoutsPicker()
{
List<string> payouts = new List<string> ();
for (int i = 1; i < 201; i++) {
payouts.Add (i.ToString ());
}
PickerModel model = new PickerModel (payouts);
if (payouts != null && payouts.Count != 0) {
getPayout = payouts [0];
}
model.PickerChanged += (sender, e) => {
getPayout=e;
};
UIPickerView picker = new UIPickerView ();
picker.ShowSelectionIndicator = true;
picker.Model = model;
UIToolbar toolbar = new UIToolbar ();
toolbar.BarStyle = UIBarStyle.Black;
toolbar.Translucent = true;
toolbar.SizeToFit ();
UIBarButtonItem doneButton = new UIBarButtonItem ("Done", UIBarButtonItemStyle.Done,
(s, e) => {
txtPayouts.Text=getPayout;
txtPayouts.ResignFirstResponder();
});
toolbar.SetItems(new UIBarButtonItem[]{doneButton}, true);
txtPayouts.InputView = picker;
txtPayouts.InputAccessoryView = toolbar;
}
{
List<string> payouts = new List<string> ();
for (int i = 1; i < 201; i++) {
payouts.Add (i.ToString ());
}
PickerModel model = new PickerModel (payouts);
if (payouts != null && payouts.Count != 0) {
getPayout = payouts [0];
}
model.PickerChanged += (sender, e) => {
getPayout=e;
};
UIPickerView picker = new UIPickerView ();
picker.ShowSelectionIndicator = true;
picker.Model = model;
UIToolbar toolbar = new UIToolbar ();
toolbar.BarStyle = UIBarStyle.Black;
toolbar.Translucent = true;
toolbar.SizeToFit ();
UIBarButtonItem doneButton = new UIBarButtonItem ("Done", UIBarButtonItemStyle.Done,
(s, e) => {
txtPayouts.Text=getPayout;
txtPayouts.ResignFirstResponder();
});
toolbar.SetItems(new UIBarButtonItem[]{doneButton}, true);
txtPayouts.InputView = picker;
txtPayouts.InputAccessoryView = toolbar;
}