Exemplo n.º 1
0
			public override void RowSelected (UITableView tableView, NSIndexPath indexPath)
			{
				if (!enabled)
					return;
				
				if (indexPath.Section == 0) {
					if (indexPath.Row == 0) {
						//Give type "focus"
						type.BecomeFirstResponder ();
					} else {
						//Give hours "focus"
						hours.BecomeFirstResponder ();
					}
				} else {
					//Give description "focus"
					description.BecomeFirstResponder ();
				}
			}
Exemplo n.º 2
0
            public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
            {
                if (!enabled)
                {
                    return;
                }

                if (indexPath.Section == 0)
                {
                    if (indexPath.Row == 0)
                    {
                        //Category changed
                        expenseSheet            = new ExpenseCategorySheet();
                        expenseSheet.Dismissed += (sender, e) => {
                            var expense = expenseViewModel.SelectedExpense;
                            if (expenseSheet.Category.HasValue && expense.Category != expenseSheet.Category)
                            {
                                expense.Category = expenseSheet.Category.Value;

                                Load(enabled);
                            }

                            expenseSheet.Dispose();
                            expenseSheet = null;
                        };
                        expenseSheet.ShowFrom(categoryCell.Frame, tableView, true);
                    }
                    else
                    {
                        //Give hours "focus"
                        cost.BecomeFirstResponder();
                    }
                }
                else if (indexPath.Section == 1)
                {
                    //Give description "focus"
                    description.BecomeFirstResponder();
                }
            }