private void RefreshStationPage() { SortedList <long, int> statesList = m_remoterServer.GetStationStates(); foreach (Station cs in StationsListView.Items) { if (statesList.ContainsKey(cs.Parent.myID)) { cs.ImageIndex = statesList[cs.Parent.myID]; } } if (StationsListView.SelectedItems.Count > 0) { Statistics.StationStatistics.StationStatisticsInternal curr = m_remoterServer.GetStation(((Station)StationsListView.SelectedItems[0]).Parent.myID); if (curr != null) { groupBoxCurrStation.Text = curr.ToString(); label_StationCurrState.Text = curr.StationStateString; } else { groupBoxCurrStation.Text = ns; label_StationCurrState.Text = ns; } } }
public Station(Statistics.StationStatistics.StationStatisticsInternal statistics) : base(statistics.myName) { myStatistics = statistics; // statistics.MarkNewState += new Statistics.StateChanged(myStatistics_MarkNewState); // ObjectToRefresh.Add(this); }