using System.Windows.Controls; using System.Windows.Media; namespace AirPlanner { public partial class RoomCard : UserControl { public RoomCard() { InitializeComponent(); } // 실명 / 공기질 텍스트·색 / 센서 4종 상태 / 버튼(ON·Standby·OFF, active=검정) public void Set(string name, string aqText, Brush aqColor, string pm25, string pm10, string co2, string voc, string btnText, bool btnActive) { NameText.Text = name; AqText.Text = aqText; AqText.Foreground = aqColor; AqRing.Stroke = aqColor; S0.Text = $"초미세먼지: {pm25}"; S1.Text = $"미세먼지: {pm10}"; S2.Text = $"CO2: {co2}"; S3.Text = $"VOCs: {voc}"; OnBtn.Content = btnText; OnBtn.IsChecked = btnActive; // true → 검정(ON/Standby) } } }