Esempio n. 1
0
        public NewPostViewModel(IFindierService findierService, IInsightsService insightsService)
        {
            _findierService  = findierService;
            _insightsService = insightsService;

            PublishCommand = new DelegateCommand(PublishExecute);
        }
 internal PostsCollection(Surrogate surrogate, IFindierService findierService)
 {
     foreach (var item in surrogate.Items)
     {
         Add(item);
     }
     _request         = surrogate.Request;
     _findierService  = findierService;
     _currentResponse = surrogate.CurrentResponse;
 }
        public CategoryViewModel(IFindierService findierService)
        {
            _findierService  = findierService;
            PostClickCommand = new DelegateCommand <ItemClickEventArgs>(PostClickExecute);
            NewPostCommand   = new DelegateCommand(NewPostExecute);

            if (IsInDesignMode)
            {
                OnNavigatedTo(null, NavigationMode.New, new Dictionary <string, object>());
            }
        }
Esempio n. 4
0
        public MainViewModel(IFindierService findierService)
        {
            FindierService       = findierService;
            CategoryClickCommand = new DelegateCommand <ItemClickEventArgs>(CategoryClickExecute);
            PostClickCommand     = new DelegateCommand <ItemClickEventArgs>(PostClickExecute);
            LoginCommand         = new DelegateCommand(LoginExecute);
            LogoutCommand        = new DelegateCommand(LogoutExecute);
            ContactCommand       = new DelegateCommand(ContactExecute);
            ReviewCommand        = new DelegateCommand(ReviewExecute);

            if (IsInDesignMode)
            {
                OnNavigatedTo(null, NavigationMode.New, new Dictionary <string, object>());
            }
        }
Esempio n. 5
0
        public PostViewModel(IFindierService findierService, IInsightsService insightsService)
        {
            _findierService  = findierService;
            _insightsService = insightsService;

            CallCommand       = new DelegateCommand(CallExecute);
            TextCommand       = new DelegateCommand(TextExecute);
            EmailCommand      = new DelegateCommand(EmailExecute);
            NewCommentCommand = new DelegateCommand(NewCommentExecute);
            EditCommand       = new DelegateCommand(EditExecute);
            DeleteCommand     = new DelegateCommand(DeleteExecute);

            if (IsInDesignMode)
            {
                CanEdit = true;
                OnNavigatedTo(null, NavigationMode.New, new Dictionary <string, object>());
            }
        }
        public EditPostViewModel(IFindierService findierService, IInsightsService insightsService)
        {
            _findierService  = findierService;
            _insightsService = insightsService;

            EditCommand = new DelegateCommand(EditExecute);

            if (IsInDesignMode)
            {
                OnNavigatedTo(new Post
                {
                    Title = "5 dollar app icons",
                    Text  =
                        "Studying gfx design and trying to do some freelance work on the side.\n\nCan do flat and minimilistic look. Text or icon based.",
                    Email  = "*****@*****.**",
                    IsNsfw = true
                },
                              NavigationMode.New,
                              new Dictionary <string, object>());
            }
        }
 public PostsCollection ToCollection(IFindierService apiService)
 {
     return(new PostsCollection(this, apiService));
 }
 public PostsCollection(GetPostsRequest request, IFindierService findierService)
 {
     _request        = request;
     _findierService = findierService;
 }
Esempio n. 9
0
 public LoginViewModel(IFindierService findierService)
 {
     _findierService = findierService;
     LoginCommand    = new DelegateCommand(LoginExecute);
 }
Esempio n. 10
0
 public MainViewModel(IFindierService findierService)
 {
     _findierService = findierService;
 }
Esempio n. 11
0
 public RegisterViewModel(IFindierService findierService)
 {
     _findierService = findierService;
     RegisterCommand = new DelegateCommand(RegisterExecute);
 }
Esempio n. 12
0
 public CommentCollection ToCollection(IFindierService apiService)
 {
     return(new CommentCollection(this, apiService));
 }
Esempio n. 13
0
 public CategoriesCollection ToCollection(IFindierService apiService)
 {
     return(new CategoriesCollection(this, apiService));
 }
Esempio n. 14
0
 public CategoriesCollection(GetCategoriesRequest request, IFindierService findierService)
 {
     _request        = request;
     _findierService = findierService;
 }