Ejemplo n.º 1
0
        public void SetConfig(IRepositoryPost repository, IRepositoryQc repositoryQc, INotificationCenter notification, PostOtherThemeStrings otherThemeStrings,
                              PostsViewController viewController, string id, int bodyWidth, int row, Action <int, nfloat> postHeightCounted, nfloat height)
        {
            var post = DataService.RepositoryController.RepositoryPost.GetOnePostById(id);

            _market = (EMarketTypes)Enum.Parse(typeof(EMarketTypes), post.ModelPost.Market);
            PostView.SetPostMarket(_market);

            Console.WriteLine(_market + "   " + post.ModelPost.Content);

            PostInteractor = new InteractorPost(id, new OnePostController(DataService.RepositoryController.RepositoryPost), notification, repository, repositoryQc);
            var presenter = new PresenterPost(
                view:               PostView,
                interactor:         PostInteractor,
                router:             new RouterPost(viewController),
                otherThemeStrings:  otherThemeStrings,
                headerStylesHolder: new PostHeaderStylesHolderIOS <GlobalControlsTheme>(iOS_DAL.ThemeParser),
                socialStylesHolder: new PostSocialStylesHolderIOS <GlobalControlsTheme>(iOS_DAL.ThemeParser),
                bodyStylesHolder:   new PostBodyStylesHolderIOS <GlobalControlsTheme>(iOS_DAL.ThemeParser),
                postLocale:         DataService.RepositoryController.RepositoryPost.LangPost,
                isPostDetailed:     false
                );

            SetCellWidth(bodyWidth);
            TransfareActionToView(postHeightCounted, row);

            PostInteractor.SendRequestForPosts();

            var fr = PostView.Frame;

            fr.Height      = height;
            PostView.Frame = fr;
        }
Ejemplo n.º 2
0
        public QuotationsController(IContactCreator contactCreator, IRepositoryQc repository, Func <string, WidgetResponse> parseResponseWidget, Func <JArray, List <DataModelQc> > parseResponseQc, Type modelType)
        {
            _parseResponseWidget = parseResponseWidget;
            _parseResponseQc     = parseResponseQc;
            _repository          = repository;

            ContactCreator = contactCreator;

            _contact          = ContactCreator.CreateContact(new Model(modelType));
            _contact.Reciever = this;
        }
Ejemplo n.º 3
0
        public PostsViewHolder(View itemView, INotificationCenter notification, IRepositoryPost repository, IRepositoryQc repositoryQc,
                               PostOtherThemeStrings otherThemeStrings) : base(itemView)
        {
            _repository   = repository;
            _repositoryQc = repositoryQc;
            _notification = notification;

            _otherThemeStrings = otherThemeStrings;

            _itemView = itemView;
        }
Ejemplo n.º 4
0
        public PostHeaderController(IContactCreator connectionController, Func <string, DataModelDeletePost> parseResponseDeletePost,
                                    INotificationCenterQc notificationCenterQc, IRepositoryQc repositoryQc, string quote)
        {
            ContactCreator = connectionController;

            _postQuote               = quote;
            _repositoryQc            = repositoryQc;
            _notificationCenterQc    = notificationCenterQc;
            _parseResponseDeletePost = parseResponseDeletePost;

            _notificationCenterQc.QcDataIncome += OnQcIncome;
        }
Ejemplo n.º 5
0
        public InteractorPost(string postId, IOnePostController onePostsController, INotificationCenter notificationCenter, IRepositoryPost repository, IRepositoryQc repositoryQc)
        {
            _postId = postId;

            _repository = repository;

            _onePostController = onePostsController;
            _onePostController.OnRecieveModel += ControllerOnMessage;

            InteractorPostBody   = new InteractorPostBody(_postId, notificationCenter, repository);
            InteractorPostChart  = new InteractorPostChart(notificationCenter, repository);
            InteractorPostHeader = new InteractorPostHeader(_postId, new PostHeaderController(ConnectionController.GetInstance(), WebMsgParser.ParseResponseDeletePost, notificationCenter, repositoryQc,
                                                                                              repository.GetPostById(_postId).Quote), repository);
            InteractorPostSocial = new InteractorPostSocial(_postId, new PostSocialController(ConnectionController.GetInstance(), WebMsgParser.ParseResponsePostLike), notificationCenter, repository);
            //InteractorPostStatistics = new InteractorPostStatistics(notificationCenter, repository);
            InteractorTrade = new InteractorTrade(notificationCenter, repository);
        }