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"), } }; }
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); }
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); } }
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); }
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); }
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(); }) } }; }
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); }
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); }
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); }