Esempio n. 1
0
 /// <summary>
 /// Bind properties of input channels and control channels to view elements
 /// </summary>
 public void BindCnlProps(BaseView view)
 {
     try {
         dataCache.RefreshBaseTables();
         var baseAge = dataCache.BaseTables.BaseAge;
         if (view != null && view.BaseAge != baseAge && baseAge > DateTime.MinValue)
         {
             lock (view.SyncRoot) {
                 view.BaseAge = baseAge;
                 view.BindCnlProps(dataCache.CnlProps);
                 view.BindCtrlCnlProps(dataCache.CtrlCnlProps);
             }
         }
     } catch (Exception ex) {
         log.WriteException(ex, "Error binding channel properties to the view elements");
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Привязать свойства входных каналов и каналов управления к элементам представления.
 /// </summary>
 public void BindCnlProps(BaseView view)
 {
     try
     {
         dataCache.RefreshBaseTables();
         DateTime baseAge = dataCache.BaseTables.BaseAge;
         if (view != null && view.BaseAge != baseAge && baseAge > DateTime.MinValue)
         {
             lock (view.SyncRoot)
             {
                 view.BaseAge = baseAge;
                 view.BindCnlProps(dataCache.CnlProps);
                 view.BindCtrlCnlProps(dataCache.CtrlCnlProps);
             }
         }
     }
     catch (Exception ex)
     {
         log.WriteException(ex, Localization.UseRussian ?
                            "Ошибка при привязке свойств каналов к элементам представления" :
                            "Error binding channel properties to the view elements");
     }
 }