Пример #1
0
        public JokePanelControl(JokeAPI jokeAPI, User userInfo = null)
        {
            this.InitializeComponent();

            JokeVM = new JokeViewModel(jokeAPI, userInfo);
            this.DataContext = JokeVM;
        }
Пример #2
0
        public JokeViewModel(JokeAPI jokeAPI, User userInfo)
        {
            JokeAPI = jokeAPI;
            UserInfo = userInfo;

            _PageIndex = 1;
            Title = HashMap.JokeTitleMap[jokeAPI];
            LoadJokeInfoCollection(jokeAPI);
        }