public MatterDetailsDialog(MatterSearchResultDTO searchResult)
     : base(UITableViewStyle.Grouped, null, true)
 {
     this.searchResult = searchResult;
     //this.NavigationItem.LeftBarButtonItem = new UIBarButtonItem (S.GetText (S.SEARCH), UIBarButtonItemStyle.Bordered, delegate(object sender, EventArgs e) {
     //	NavigationController.PopViewControllerAnimated (true);
     //});
     this.NavigationItem.RightBarButtonItem = new UIBarButtonItem ("Reports", UIBarButtonItemStyle.Bordered, delegate(object sender, EventArgs e) {
         var con = new ReportsCoordinatorDialog ();
         NavigationController.PushViewController (con, true);
     });
     GetMatterDetails ();
     BuildInterface ();
 }
Exemplo n.º 2
0
        public Finder()
            : base(UITableViewStyle.Grouped, null)
        {
            btnReports = new UIBarButtonItem ("Reports", UIBarButtonItemStyle.Plain, delegate (object sender, EventArgs e) {
                var cont = new ReportsCoordinatorDialog ();
                NavigationController.PushViewController (cont, true);
            });
            btnAbout = new UIBarButtonItem ("About", UIBarButtonItemStyle.Plain, delegate (object sender, EventArgs e) {
                var s = "\n";
                s += "UserName: "******"userName") + "\n";
                s += "UserID: " + NSUserDefaults.StandardUserDefaults.StringForKey ("userID") + "\n";
                if (NSUserDefaults.StandardUserDefaults.StringForKey ("companyName") != null) {
                    s += "Practice: " + NSUserDefaults.StandardUserDefaults.StringForKey ("companyName") + "\n";
                }
                s += "App Version: " + NSBundle.MainBundle.InfoDictionary ["CFBundleVersion"] + "\n";
                new UIAlertView ("User Information", s, null, "OK").Show ();
            });

            UIBarButtonItem[] btns = { btnAbout, btnReports };
            this.NavigationItem.SetRightBarButtonItems (btns, true);

            BuildInterface ();
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();
            Console.WriteLine ("MatterFindController, ViewDidLoad is running !!!");
            this.tableView.RowHeight = 60;
            this.NavigationController.NavigationBarHidden = true;
            //coordinate = LocationService.GetCurrentLocation ();
            btnReports.TintColor = ColorHelper.GetGPPurple ();
            btnCount.TintColor = ColorHelper.GetGPPurple ();
            btnCount.Style = UIBarButtonItemStyle.Plain;
            btnReports.Clicked += delegate {
            //				if (pbController == null) {
            //					pbController = new PracticeBranchController ();
            //				}
            //				this.NavigationController.PushViewController (pbController, true);
                if (reportsCoordinator == null) {
                    reportsCoordinator = new ReportsCoordinatorDialog ();
                }
                this.NavigationController.PushViewController (reportsCoordinator, true);
            };
            searchBar.SearchButtonClicked += delegate {
                searchBar.ResignFirstResponder ();
                if (isBusy) {
                    new UIAlertView ("Search", "Searching is continuing, cannot start new search", null, "OK").Show ();
                    cnt++;
                    if (cnt > 1) {
                        isBusy = false;
                        cnt = 0;
                    }
                    return;
                }
                string s = searchBar.Text.Trim ();
                if (s == "" || s.Length == 0) {
                    new UIAlertView ("Search", "Please enter search text", null, "OK").Show ();
                    return;
                } else {
                    getAsyncData ();
                }
            };

            searchBar.BookmarkButtonClicked += delegate {
                Console.WriteLine ("book search bar cancel pressed");
                searchBar.ResignFirstResponder ();
            };
            searchBar.CancelButtonClicked += delegate {
                Console.WriteLine ("search bar cancel pressed");
                searchBar.ResignFirstResponder ();
            };
        }