示例#1
0
        private async void SetConfiguration(bool isSetting, bool isImageResource)
        {
            Dp_Image.Stop();
            Pg_Loading.Visibility = Visibility.Visible;

            if (isImageResource)
            {
                Pg_Loading.SetMessage("이미지 정보를 가져옵니다.");
                List <ImageResource> sources = await resourceCore.GetImageSources();

                Dp_Image.SetImageResources(sources);
            }

            if (isSetting)
            {
                Pg_Loading.SetMessage("설정 정보를 가져옵니다.");
                SettingData settingData = await resourceCore.GetSettingData();

                if (settingData != null)
                {
                    environmentCore.SetEnvironmentOptions(settingData.GetCity(), settingData.GetProvince(), settingData.GetLatitude(), settingData.GetLongitude());
                    EnvironmentData environmentData = await environmentCore.GetEnvironment();

                    Dp_Image.SetOutputTime(int.Parse(settingData.GetDisplayTime()));
                    Eb_Air_State.ShowPublicData(environmentData);
                }
            }

            Pg_Loading.Visibility = Visibility.Collapsed;
            Dp_Image.Start(isImageResource);
        }
示例#2
0
        private async void WeatherResetTimer_Tick(object sender, EventArgs e)
        {
            EnvironmentData environmentData = await environmentCore.GetEnvironment();

            Dispatcher.Invoke(new Action(delegate {
                Eb_Air_State.ShowPublicData(environmentData);
            }), DispatcherPriority.Normal);
        }
示例#3
0
 private void Serial_ReceiveListener(string data)
 {
     Dispatcher.Invoke(new Action(delegate {
         Eb_Air_State.ShowSensorData(data);
     }), DispatcherPriority.Normal);
 }