Пример #1
0
        public override void LoadView()
        {
            base.LoadView();
            this.IsSearching = false;

            PillboxClient.Initialize();
            _Service = new DBManagerService(@"http://mor.nlm.nih.gov/axis/services/RxNormDBService");

            _SearchBar       = new UISearchBar();
            _SearchBar.Text  = "sildenafil";
            _SearchBar.Frame = new RectangleF(0, -44, View.Frame.Width, 44);
            _SearchBar.SearchButtonClicked += delegate {
                Search(_SearchBar.Text);
            };
            _SearchBar.CancelButtonClicked += delegate {
                SearchCancelled();
            };

            _SearchingView        = new DrugSearchingView(SearchCancelled);
            _SearchingView.Hidden = true;

            this.TableView.ContentInset = new UIEdgeInsets(44, 0, 0, 0);

            this.View.AddSubview(_SearchingView);
            this.View.AddSubview(_SearchBar);
        }
		public override void LoadView()
		{
			base.LoadView();
			this.IsSearching = false;
			
			PillboxClient.Initialize();
			_Service = new DBManagerService(@"http://mor.nlm.nih.gov/axis/services/RxNormDBService");
			
			_SearchBar = new UISearchBar();
			_SearchBar.Text = "sildenafil";
			_SearchBar.Frame = new RectangleF(0, -44, View.Frame.Width, 44);
			_SearchBar.SearchButtonClicked += delegate {
				Search(_SearchBar.Text);
			};
			_SearchBar.CancelButtonClicked += delegate {
				SearchCancelled();
			};
			
			_SearchingView = new DrugSearchingView(SearchCancelled);
			_SearchingView.Hidden = true;
			
			this.TableView.ContentInset = new UIEdgeInsets(44, 0, 0, 0);
			
			this.View.AddSubview(_SearchingView);
			this.View.AddSubview(_SearchBar);
		}