Пример #1
0
 private void OnChange(MeterStateChangedEventArgs e)
 {
     if (StateChanged != null && IsReportAboutChanges)
     {
         StateChanged.Invoke(this, e);
     }
 }
Пример #2
0
        // Обработчик события изменений в элементах списка
        private void OnElementsChange(object sender, MeterStateChangedEventArgs e)
        {
            if (!IsInitialized)
            {
                return;
            }

            if ((e != null) && (e.ChangedProperty == ChangesType.POWER_CHANGED))
            {
                AddUpdateTotals();
                ResetBindings();
            }
            else if ((e != null) && (e.ChangedProperty == ChangesType.GENERAL_COFFICIENT_CHANGED))
            {
                AddUpdateTotals();
                ResetBindings();
            }
            else if ((e != null) && (e.ChangedProperty == ChangesType.WINTER_MONTHES_IS_NULL))
            {
                CalculateGeneralCoeffs(true);
                AddUpdateTotals();
                ResetBindings();
            }
            else
            {
                AddUpdateTotals();
            }
        }