示例#1
0
        private async Task LoadData()
        {
            switchesRespose      = settingService.GetSettingSwitches();
            autoUpdateTimeRepose = settingService.GetSettingAutoUpdateTime();
            userRespose          = await userService.GetUserAsync();

            ViewModel.AutoUpdateSettingPage autoUpdateSettingPage = new ViewModel.AutoUpdateSettingPage()
            {
                Switches        = switchesRespose.Switches,
                AutoUpdateTimes = autoUpdateTimeRepose.AutoUpdateTimes
            };
            ViewModel.GeneralSettingPage generalSettingPage = new ViewModel.GeneralSettingPage()
            {
                Switches = switchesRespose.Switches
            };
            ViewModel.SettingPage settingPage = new ViewModel.SettingPage()
            {
                AutoUpdateSettingPage = autoUpdateSettingPage,
                GeneralSettingPage    = generalSettingPage,
                UserConfig            = userRespose.UserConfig
            };
            colorResponse = await colorService.GetColorAsync();

            this.LVMood.DataContext     = colorResponse.UserColors;
            this.LayoutRoot.DataContext = null;
            this.LayoutRoot.DataContext = settingPage;
        }
示例#2
0
        private async Task LoadData()
        {
            switchesRespose = settingService.GetSettingSwitches();
            autoUpdateTimeRepose = settingService.GetSettingAutoUpdateTime();
            userRespose = await userService.GetUserAsync();

            ViewModel.AutoUpdateSettingPage autoUpdateSettingPage = new ViewModel.AutoUpdateSettingPage()
            {
                Switches = switchesRespose.Switches,
                AutoUpdateTimes = autoUpdateTimeRepose.AutoUpdateTimes
            };
            ViewModel.GeneralSettingPage generalSettingPage = new ViewModel.GeneralSettingPage()
            {
                Switches = switchesRespose.Switches
            };
            ViewModel.SettingPage settingPage = new ViewModel.SettingPage()
            {
                AutoUpdateSettingPage = autoUpdateSettingPage,
                GeneralSettingPage = generalSettingPage,
                UserConfig = userRespose.UserConfig

            };
            colorResponse = await colorService.GetColorAsync();
            this.LVMood.DataContext = colorResponse.UserColors;
            this.LayoutRoot.DataContext = null;
            this.LayoutRoot.DataContext = settingPage;
        }
        private async void LoadData()
        {
            switchesRespose = settingService.GetSettingSwitches();
            autoUpdateTimeRepose = settingService.GetSettingAutoUpdateTime();
            userRespose = await userService.GetUserAsync();

            ViewModel.AutoUpdateSettingPage autoUpdateSettingPage = new ViewModel.AutoUpdateSettingPage()
            {
                Switches = switchesRespose.Switches,
                AutoUpdateTimes = autoUpdateTimeRepose.AutoUpdateTimes
            };
            ViewModel.GeneralSettingPage generalSettingPage = new ViewModel.GeneralSettingPage()
            {
                Switches = switchesRespose.Switches
            };
            ViewModel.SettingPage settingPage = new ViewModel.SettingPage()
            {
                AutoUpdateSettingPage = autoUpdateSettingPage,
                GeneralSettingPage = generalSettingPage,
                UserConfig = userRespose.UserConfig

            };
            LayoutRoot.DataContext = settingPage;
        }