Example #1
0
        public void Init(HouseController houseController, WeatherController weatherController)
        {
            _houseController = houseController;
            _house           = _houseController.House;

            _weatherController = weatherController;

            FloorsListBox.SelectionChanged -= FloorsListBox_SelectionChanged;
            FloorsListBox.ItemsSource       = _house.Floors.Select(x => x.Name);
            FloorsListBox.SelectedIndex     = _selectedFloor;
            FloorsListBox.SelectionChanged += FloorsListBox_SelectionChanged;

            RoomsListBox.ItemsSource   = _house.Floors[_selectedFloor].Rooms.Select(x => x.Name);
            RoomsListBox.SelectedIndex = _selectedRoom;

            SetTable();
            HouseDataGrid.ItemsSource    = _house.HouseParams;
            HouseTemperatureTextBox.Text = _house.Temperature.ToString();

            InitHel();
            HeatView1.Init(_houseController, _weatherController, HeatType.Common);
            HeatView2.Init(_houseController, _weatherController, HeatType.Individual);
        }
Example #2
0
 public void SaveCharts(List <string> commonImgPaths, List <string> individualImgPaths)
 {
     HeatView1.SaveCharts(commonImgPaths);
     HeatView2.SaveCharts(individualImgPaths);
 }