示例#1
0
        public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
        {
            ExpenseController expController = new ExpenseController();

            switch (indexPath.Row)
            {
            case 0:
                expController = new ExpenseController(this.currencySymbol[0]);
                this.NavigationController.PushViewController(expController, true);

                break;

            case 1:
                expController = new ExpenseController(this.currencySymbol[1]);
                this.NavigationController.PushViewController(expController, true);

                break;

            case 2:
                expController = new ExpenseController(this.currencySymbol[2]);
                this.NavigationController.PushViewController(expController, true);

                break;

            case 3:
                expController = new ExpenseController(this.currencySymbol[3]);
                this.NavigationController.PushViewController(expController, true);

                break;

            case 4:
                expController = new ExpenseController(this.currencySymbol[4]);
                this.NavigationController.PushViewController(expController, true);

                break;

            case 5:
                expController = new ExpenseController(this.currencySymbol[5]);
                this.NavigationController.PushViewController(expController, true);

                break;

            case 6:
                expController = new ExpenseController(this.currencySymbol[6]);
                this.NavigationController.PushViewController(expController, true);

                break;

            case 7:
                expController = new ExpenseController(this.currencySymbol[7]);
                this.NavigationController.PushViewController(expController, true);

                break;

            case 8:
                expController = new ExpenseController(this.currencySymbol[8]);
                this.NavigationController.PushViewController(expController, true);

                break;

            case 9:
                expController = new ExpenseController(this.currencySymbol[9]);
                this.NavigationController.PushViewController(expController, true);

                break;

            case 10:
                expController = new ExpenseController(this.currencySymbol[10]);
                this.NavigationController.PushViewController(expController, true);

                break;

            case 11:
                expController = new ExpenseController(this.currencySymbol[11]);
                this.NavigationController.PushViewController(expController, true);

                break;

            case 12:
                expController = new ExpenseController(this.currencySymbol[12]);
                this.NavigationController.PushViewController(expController, true);

                break;

            case 13:
                expController = new ExpenseController(this.currencySymbol[13]);
                this.NavigationController.PushViewController(expController, true);

                break;

            case 14:
                expController = new ExpenseController(this.currencySymbol[14]);
                this.NavigationController.PushViewController(expController, true);

                break;

            case 15:
                expController = new ExpenseController(this.currencySymbol[15]);
                this.NavigationController.PushViewController(expController, true);

                break;

            case 16:
                expController = new ExpenseController(this.currencySymbol[16]);
                this.NavigationController.PushViewController(expController, true);

                break;

            case 17:
                expController = new ExpenseController(this.currencySymbol[17]);
                this.NavigationController.PushViewController(expController, true);

                break;

            case 18:
                expController = new ExpenseController(this.currencySymbol[18]);
                this.NavigationController.PushViewController(expController, true);

                break;

            case 19:
                expController = new ExpenseController(this.currencySymbol[19]);
                this.NavigationController.PushViewController(expController, true);

                break;

            default:
                expController = new ExpenseController(this.currencySymbol[20]);
                this.NavigationController.PushViewController(expController, true);

                break;
            }
            tableView.DeselectRow(indexPath, true);
        }
        public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
        {
            ExpenseController expController = new ExpenseController();

            switch (indexPath.Row)
            {
            case 0:
                this.DismissViewController(true, () => {
                    expController.symbolCurrency = this.currencySymbol[0];
                    Console.WriteLine("Symbol used: " + expController.symbolCurrency);
                });

                break;

            case 1:
                this.DismissViewController(true, () =>
                {
                    expController.symbolCurrency = this.currencySymbol[1];
                    Console.WriteLine("Symbol used: " + expController.symbolCurrency);
                });

                break;

            case 2:
                this.DismissViewController(true, () =>
                {
                    expController.symbolCurrency = this.currencySymbol[2];
                    Console.WriteLine("Symbol used: " + expController.symbolCurrency);
                });

                break;

            case 3:
                this.DismissViewController(true, () =>
                {
                    expController.symbolCurrency = this.currencySymbol[3];
                    Console.WriteLine("Symbol used: " + expController.symbolCurrency);
                });

                break;

            case 4:
                this.DismissViewController(true, () =>
                {
                    expController.symbolCurrency = this.currencySymbol[4];
                    Console.WriteLine("Symbol used: " + expController.symbolCurrency);
                });

                break;

            case 5:
                this.DismissViewController(true, () =>
                {
                    expController.symbolCurrency = this.currencySymbol[5];
                    Console.WriteLine("Symbol used: " + expController.symbolCurrency);
                });

                break;

            case 6:
                this.DismissViewController(true, () =>
                {
                    expController.symbolCurrency = this.currencySymbol[6];
                    Console.WriteLine("Symbol used: " + expController.symbolCurrency);
                });

                break;

            case 7:
                this.DismissViewController(true, () =>
                {
                    expController.symbolCurrency = this.currencySymbol[7];
                    Console.WriteLine("Symbol used: " + expController.symbolCurrency);
                });

                break;

            case 8:
                this.DismissViewController(true, () =>
                {
                    expController.symbolCurrency = this.currencySymbol[8];
                    Console.WriteLine("Symbol used: " + expController.symbolCurrency);
                });

                break;

            case 9:
                this.DismissViewController(true, () =>
                {
                    expController.symbolCurrency = this.currencySymbol[9];
                    Console.WriteLine("Symbol used: " + expController.symbolCurrency);
                });

                break;

            case 10:
                this.DismissViewController(true, () =>
                {
                    expController.symbolCurrency = this.currencySymbol[10];
                    Console.WriteLine("Symbol used: " + expController.symbolCurrency);
                });

                break;

            case 11:
                this.DismissViewController(true, () =>
                {
                    expController.symbolCurrency = this.currencySymbol[11];
                    Console.WriteLine("Symbol used: " + expController.symbolCurrency);
                });

                break;

            case 12:
                this.DismissViewController(true, () => {
                    expController.symbolCurrency = this.currencySymbol[12];
                    Console.WriteLine("Symbol used: " + expController.symbolCurrency);
                });


                break;

            case 13:
                this.DismissViewController(true, () =>
                {
                    expController.symbolCurrency = this.currencySymbol[13];
                    Console.WriteLine("Symbol used: " + expController.symbolCurrency);
                });

                break;

            case 14:
                this.DismissViewController(true, () =>
                {
                    expController.symbolCurrency = this.currencySymbol[14];
                    Console.WriteLine("Symbol used: " + expController.symbolCurrency);
                });

                break;

            case 15:
                this.DismissViewController(true, () =>
                {
                    expController.symbolCurrency = this.currencySymbol[15];
                    Console.WriteLine("Symbol used: " + expController.symbolCurrency);
                });

                break;

            case 16:
                this.DismissViewController(true, () =>
                {
                    expController.symbolCurrency = this.currencySymbol[16];
                    Console.WriteLine("Symbol used: " + expController.symbolCurrency);
                });

                break;

            case 17:
                this.DismissViewController(true, () =>
                {
                    expController.symbolCurrency = this.currencySymbol[17];
                    Console.WriteLine("Symbol used: " + expController.symbolCurrency);
                });

                break;

            case 18:
                this.DismissViewController(true, () =>
                {
                    expController.symbolCurrency = this.currencySymbol[18];
                    Console.WriteLine("Symbol used: " + expController.symbolCurrency);
                });
                break;

            case 19:
                this.DismissViewController(true, () =>
                {
                    expController.symbolCurrency = this.currencySymbol[19];
                    Console.WriteLine("Symbol used: " + expController.symbolCurrency);
                });

                break;

            default:
                this.DismissViewController(true, () =>
                {
                    expController.symbolCurrency = this.currencySymbol[20];
                    Console.WriteLine("Symbol used: " + expController.symbolCurrency);
                });

                break;
            }
            tableView.DeselectRow(indexPath, true);
        }