public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            _updatePostView.NavigationBar  = NavigationController?.NavigationBar;
            _updatePostView.NavigationItem = NavigationItem;
            _updatePostView.SetConfigToolbar();

            _interactor = new InteractorUpdatePost(PostId, new UpdatePostController(ConnectionController.GetInstance(), WebMsgParser.ParseResponseCreatePost, DataService.NotificationCenter,
                                                                                    DataService.RepositoryController.RepoQc, DataService.RepositoryController.RepositoryPost), DataService.RepositoryController.RepositoryUpdatePost,
                                                   DataService.RepositoryController.RepositoryPost, DataService.RepositoryController.RepositoryUserAuth);

            _presenter = new PresenterUpdatePost(_updatePostView, _interactor, new RouterUpdatePost(this), new UpdatePostStylesHolderIOS <GlobalControlsTheme>(iOS_DAL.ThemeParser), Localization.Lang);


            ImagePicker = new ImagePickerDispatcher
            {
                OnGetImageFromGallery = (imageString) =>
                {
                    _presenter.ImageSelected(imageString);
                }
            };

            HideShowKeyboard hideShowKeyboard = new HideShowKeyboard(_updatePostView);

            NSNotificationCenter.DefaultCenter.AddObserver(UIKeyboard.DidShowNotification, hideShowKeyboard.KeyBoardUpNotification);
            NSNotificationCenter.DefaultCenter.AddObserver(UIKeyboard.WillHideNotification, hideShowKeyboard.KeyBoardDownNotification);
        }
예제 #2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            RequestWindowFeature(WindowFeatures.NoTitle);
            SetContentView(Resource.Layout.UpdatePostActivity);

            _postId = Intent.GetStringExtra("id");

            IViewUpdatePost updatePostView = FindViewById <UpdatePostView>(Resource.Id.updatePost_view);

            IInteractorUpdatePost interactor = new InteractorUpdatePost(_postId, new UpdatePostController(ConnectionController.GetInstance(), WebMsgParser.ParseResponseCreatePost,
                                                                                                          DataService.NotificationCenter, DataService.RepositoryController.RepoQc, DataService.RepositoryController.RepositoryPost),
                                                                        DataService.RepositoryController.RepositoryUpdatePost, DataService.RepositoryController.RepositoryPost, DataService.RepositoryController.RepositoryUserAuth);

            _presenter = new PresenterUpdatePost(updatePostView, interactor, new RouterUpdatePost(this), new UpdatePostStylesHolderDroid <GlobalControlsTheme>(new ThemeParser <GlobalControlsTheme>()), Localization.Lang);
        }