Exemplo n.º 1
0
// new And search button clicked

		partial void btnNewContactClicked (Foundation.NSObject sender){
		if (UserInterfaceIsPhone) {
				this.NavigationController.PushViewController (new TSContactDetail (), true);	
		} else {
				var obj= new TSContactDetail();
				this.AddPartialView(obj.GetContactView ());
		}

		}
Exemplo n.º 2
0
		public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();

			Appdata.setViewBorder1 (txtSearchView);
			Appdata.setButtonBorder (btnFind);
			Appdata.setButtonBorder (btnNewContact);
			btnFind.BackgroundColor = Appdata.buttonBackgroundColor;
			btnNewContact.BackgroundColor = Appdata.buttonBackgroundColor;


			txtSearchtext.ShouldReturn += TextFieldShouldReturn;
// Remove this comment

			txtSearchtext.EditingChanged += (object sender, EventArgs e) => {

				if(txtSearchtext.Text.Length != 0){
					List<contactInfo> searchContactList;
					searchContactList = ContactData.searchContactByName (userContactList, txtSearchtext.Text);
					tableViewIPhone.Source =new TSContactTableSource (this, searchContactList);
				}else{
					tableViewIPhone.Source =new TSContactTableSource (this, userContactList);
				}
				tableViewIPhone.ReloadData();
			};


			this.NavigationItem.HidesBackButton = true;
			if (userContactList.Count > 0) {
				var TableViewSource =new TSContactTableSource (this, userContactList);
				tableViewIPhone.SeparatorInset = new UIEdgeInsets (0, 0, 0, 0);
				tableViewIPhone.BackgroundColor = UIColor.White;
				tableViewIPhone.SeparatorStyle = UITableViewCellSeparatorStyle.SingleLine;
				tableViewIPhone.Source = TableViewSource;
				tableViewIPhone.ReloadData ();
			}

			if (UserInterfaceIsPhone) {
			} else {
				var obj= new TSContactDetail(userContactList[0]);
				AddPartialView(obj.GetContactView ());
			}



			// Perform any additional setup after loading the view, typically from a nib.
		}
Exemplo n.º 3
0
		public override void RowSelected (UITableView tableView, NSIndexPath indexPath)
		{
			contactInfo userInfo;
			userInfo = ContactData.getContactForLetter (ContactList, letters.Substring (Convert.ToInt16 (indexPath.Section), 1)) [indexPath.Row];
			if (UserInterfaceIsPhone) {
				ContactView.NavigationController.PushViewController (new TSContactDetail (userInfo), true);	
			} else {
				var obj= new TSContactDetail(userInfo);
			ContactView.AddPartialView(obj.GetContactView ());
			}
		}