コード例 #1
0
        public void UpdateDisplay(WeatherViewModel model)
        {
            graphics.Clear();

            graphics.DrawRectangle(0, 0, graphics.Width, graphics.Height, Color.White, true);

            DisplayJPG(model.WeatherCode, 5, 5);

            graphics.DrawText(134, 143, "Outdoor", Color.Black);

            string outdoorTemp = model.OutdoorTemperature.ToString("00°C");

            graphics.DrawText(128, 178, outdoorTemp, Color.Black, ScaleFactor.X2);

            graphics.DrawText(23, 143, "Indoor", Color.Black);

            string indoorTemp = model.IndoorTemperature.ToString("00°C");

            graphics.DrawText(11, 178, indoorTemp, Color.Black, ScaleFactor.X2);

            graphics.Show();
        }