Пример #1
0
            /*
             * // Override to support rearranging the table view.
             * public override void MoveRow (UITableView tableView, NSIndexPath sourceIndexPath, NSIndexPath destinationIndexPath)
             * {
             * }
             */

            /*
             * // Override to support conditional rearranging of the table view.
             * public override bool CanMoveRow (UITableView tableView, NSIndexPath indexPath)
             * {
             *      // Return false if you do not want the item to be re-orderable.
             *      return true;
             * }
             */

            public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
            {
                var     item     = list [indexPath.Row];
                Section Airlines = new Section();



                var l = new iportogruaroLibraryShared.subCategorys().getSubCategorys(item.cat_id, true);

                foreach (iportogruarocategories i in l)
                {
                    var e = new StyledStringElement(i.name, i.name);
                    e.Caption = i.name;
                    e.Value   = i.name;
                    Airlines.Add(e);
                }



                RootElement root = new RootElement(item.name)
                {
                    Airlines
                };

                var myController = new DialogViewController(root, true);

                this.controller.NavigationController.PushViewController(myController, true);
            }
Пример #2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            setstyle();
            if (modeSearch == true)
            {
                TableView.Source = new sourceSecondCategory(this, lstSearch);
                TableView.ReloadData();
                setLoadingViewStyle(this.TableView);
            }
            else
            {
                starthud();
                var indicator = new UIActivityIndicatorView(UIActivityIndicatorViewStyle.White);
                this.NavigationItem.LeftBarButtonItem = new UIBarButtonItem(indicator);
                indicator.StartAnimating();
                reloading = true;
                ThreadPool.QueueUserWorkItem(state =>
                {
                    var lst = new iportogruaroLibraryShared.subCategorys().getSubCategorys(cat_id, true);

                    InvokeOnMainThread(delegate {
                        TableView.Source = new sourceSecondCategory(this, lst);
                        TableView.ReloadData();
                        setLoadingViewStyle(this.TableView);
                        reloading = false;
                        this.NavigationItem.LeftBarButtonItem = null;
                        stophud();
                    }
                                       );
                });
            }
        }