Exemplo n.º 1
0
 private void InitializeDependency(EbMobileControl control, string parent)
 {
     foreach (int value in Enum.GetValues(typeof(ExpressionType)))
     {
         if (control.HasExpression((ExpressionType)value, out string script))
         {
             foreach (string dependent in GetDependentNames(script))
             {
                 string dparent = dependent.Split(CharConstants.DOT)[0];
                 if (dparent != CTRL_PARENT_FORM && parent == CTRL_PARENT_FORM)// grid to form dependency
                 {
                     if (!DGDependencyMapColl.ContainsKey(dparent))
                     {
                         DGDependencyMapColl[dparent] = new ExprDependency();
                     }
                     DGDependencyMapColl[dparent].Add((ExpressionType)value, $"{parent}.{control.Name}");
                 }
                 else if (parent == dparent)// avoid form to grid dependency
                 {
                     if (!DependencyMapCollection.ContainsKey(dependent))
                     {
                         DependencyMapCollection[dependent] = new ExprDependency();
                     }
                     DependencyMapCollection[dependent].Add((ExpressionType)value, $"{parent}.{control.Name}");
                 }
             }
         }
     }
 }
Exemplo n.º 2
0
 public bool HasDependency(string name)
 {
     return(DependencyMapCollection.ContainsKey(name));
 }