예제 #1
0
		RootElement CreateRoot ()
		{
			return new RootElement ("Settings") {
				new Section (){
					new StringElement ("mes photos"
					                 /*, el => 
	                 	{				
							int userId = AppDelegateIPhone.AIphone.MainUser.Id;
							return new MembersPhotoViewControler(AppDelegateIPhone.meNavigationController, userId);
						}
						*/, ()=>
	                   {
							Action act = ()=>
							{
								int userId = AppDelegateIPhone.AIphone.MainUser.Id;
								var m = new MembersPhotoViewControler(AppDelegateIPhone.meNavigationController, userId, false);
								//this.PresentModalViewController(m, true);
								AppDelegateIPhone.meNavigationController.PushViewController(m, false);
							
								var view = new UIView();
								var btn = UIButton.FromType(UIButtonType.Custom);
								btn.Frame = new RectangleF(0, -13, 26, 26);
								btn.SetBackgroundImage(Graphics.GetImgResource("back"), UIControlState.Normal);								
								view.Add(btn);
								
							};
							AppDelegateIPhone.ShowRealLoading(View, "Loading photos", null, act);
						}
					),
					
					new StringElement ("mon profile"),					
					new StringElement("mes autres reseaux"),
				}
			};
		}
예제 #2
0
		public MembersPhotoPanelView (MembersPhotoViewControler membersPhotoView, bool isDialogView, 
		                              RectangleF rect, int userId) : this(rect)
		{			
			Tapped += HandleTapped;
			TapAndHold +=  HandleTapAndHold;

			
			_IsDialogView = isDialogView;
			_MembersPhotoView = membersPhotoView;
			prevController = AppDelegateIPhone.AIphone.GetCurrentNavControler();
			UpdateFromUserId (userId);
		}
예제 #3
0
		public override void Selected (DialogViewController dvc, UITableView tableView, MonoTouch.Foundation.NSIndexPath path)
		{
			tableView.DeselectRow (path, true);
			
			var uinav = AppDelegateIPhone.AIphone.GetCurrentNavControler();
			if (uinav != null)
			{
				var membersPhotoView = new MembersPhotoViewControler(uinav, User.Id, false);
				uinav.PushViewController(membersPhotoView, true);
			
				//dvc.ActivateController (membersPhotoView);
			}
		}
예제 #4
0
파일: ActivityView.cs 프로젝트: 21Off/21Off
		void GoToMembersPhotoView (int userId)
		{
			Action act = ()=>
			{
				InvokeOnMainThread(()=>
				{
					var a = new MembersPhotoViewControler(MSPNavigationController, userId, false);
					MSPNavigationController.PushViewController(a, false);
					//MSPNavigationController.PresentModalViewController (a, true);
				});
			};			
			AppDelegateIPhone.ShowRealLoading(View, "Loading photos", null, act);				
		}
예제 #5
0
		public void GotoMemberPhotosArea()
		{
			Action act = ()=>
			{
				InvokeOnMainThread(()=>
                {
					
					var m = new MembersPhotoViewControler(_MSP, _ImageOwner.User.Id, _IsModal);
					if (_IsModal)				
						this.PresentModalViewController(m, true);
					else
						_MSP.PushViewController(m, true);
				});
				
			};
			AppDelegateIPhone.ShowRealLoading(View, "Loading photos", null, act);
		}		
예제 #6
0
		private RootElement CreateRoot ()
		{
			var searchElement = new CustomImageStringElement("search", ()=>
			{
				_MSP.DismissModalViewControllerAnimated(true);
			
				var search = new SearchViewController(_MSP);
				_MSP.PushViewController(search, true);
			}, Graphics.GetImgResource("search"));
			
			return new RootElement ("Settings") {
				new Section()
				{
					searchElement
				},
				new Section (){					
					new StringElement ("my posts", ()=>
	                   {
							Action act = ()=>
							{
								int userId = AppDelegateIPhone.AIphone.MainUser.Id;
								InvokeOnMainThread(()=>
			                    {
									var m = new MembersPhotoViewControler(AppDelegateIPhone.meNavigationController, userId, false);
									_MSP.PushViewController(m, true);
								});
							};
							AppDelegateIPhone.ShowRealLoading(View, "Loading posts", null, act);
						} 
					),
					new StringElement("facebook friends", ()=>
					{
						Action act = () => LoadFacebookFriends();
						AppDelegateIPhone.ShowRealLoading(null, "Loading facebook friends", null, act);
					}),
					new StringElement ("my profile", ()=>
					{
						Action act = ()=>
						{
							var userInfo = AppDelegateIPhone.AIphone.UsersServ.GetUserInfo(AppDelegateIPhone.AIphone.MainUser.Id);
							if (userInfo != null)
							{							
								InvokeOnMainThread(()=>
			                    {
									var pref = new PreferencesViewController(_MSP, userInfo);
									_MSP.PushViewController(pref, true);
								});
							}
						};
						AppDelegateIPhone.ShowRealLoading(View, "Loading my profile", null, act);
					}),					
					new StringElement ("other networks", ()=>
					{
						var vc = new SocialNetworksParentViewController(_MSP);
						_MSP.PushViewController(vc, true);
					}),
				},
				new Section(){
					new CustomHtmlElement("terms of service", "http://storage.21offserver.com:82/legal.html", _MSP),
					new CustomHtmlElement("help",  "http://storage.21offserver.com:82/help.html", _MSP),
					//"http://www.21off.net/help.html"
					//"http://www.21off.net/termsofservice.html"
					
				},
				
				new Section(){
					new StringElement("log out", () =>
	                {
						AppDelegateIPhone.AIphone.Logout();
						AppDelegateIPhone.AIphone.InitLoginPage();
					})
				}
					
			};
		}
예제 #7
0
파일: CommentCell.cs 프로젝트: 21Off/21Off
			void HandleActivityBtnTouchUpInside (object sender, EventArgs e)
			{
				var uinav = (UINavigationController) AppDelegateIPhone.tabBarController.SelectedViewController;
				Action act = () =>
				{
					InvokeOnMainThread(()=>
					{
						var membersPhotoView = new MembersPhotoViewControler (uinav, _comment.CommentOwner.Id, false);
											
						uinav.PushViewController(membersPhotoView, true);
						//ActivateController (membersPhotoView);
					});
				};
				AppDelegateIPhone.ShowRealLoading(null, "Loading user photos", null, act);				
			}
예제 #8
0
파일: SearchUser.cs 프로젝트: 21Off/21Off
		public override void Selected (NSIndexPath indexPath)
		{
			var uinav = (UINavigationController) AppDelegateIPhone.tabBarController.SelectedViewController;
			//GetItemText (indexPath);
			
			var element = Root [0][indexPath.Row] as UserElementII;
			if (element == null)
				return;
		
			Action act = () =>
			{
				InvokeOnMainThread(()=>
				{
					var membersPhotoView = new MembersPhotoViewControler (uinav, element.User.Id, false);
										
					uinav.PushViewController(membersPhotoView, true);
					//ActivateController (membersPhotoView);
				});
			};
			AppDelegateIPhone.ShowRealLoading(null, "Loading user photos", null, act);
		}
예제 #9
0
		private void GoToUserPhotos(int userId)
		{
			Action act = ()=>
			{					
				var nav = AppDelegateIPhone.tabBarController.SelectedViewController as UINavigationController;
				var a = new MembersPhotoViewControler(nav, userId, false);
				InvokeOnMainThread(()=> nav.PushViewController(a, false));
			};			
			AppDelegateIPhone.ShowRealLoading(View, "Loading photos", null, act);			
		}