示例#1
0
 public void RegisterName(string name, object scopedElement)
 {
     if (WinFramework != null)
     {
         name = namePrix + name;
         WinFramework.RegisterName(name, scopedElement);
         if (!Names.Contains(name))
         {
             Names.Add(name);
         }
     }
     else if (Win != null)
     {
         name = namePrix + name;
         Win.RegisterName(name, scopedElement);
         if (!Names.Contains(name))
         {
             Names.Add(name);
         }
     }
 }
示例#2
0
 public void RegisterName(object scopedElement)
 {
     if (WinFramework != null)
     {
         string name = scopedElement.GetHashCode().ToString();
         name = namePrix + name;
         WinFramework.RegisterName(name, scopedElement);
         if (!Names.Contains(name))
         {
             Names.Add(name);
         }
     }
     else if (Win != null)
     {
         string name = scopedElement.GetHashCode().ToString();
         name = namePrix + name;
         Win.RegisterName(name, scopedElement);
         if (!Names.Contains(name))
         {
             Names.Add(name);
         }
     }
 }