예제 #1
0
 public Control()
 {
     _parentScope = _currentCreationScope;
     _elementTab  = new ElementTab(_parentScope.Engine.CreateScope(), _parentScope.Directory, null, _parentScope.ElementTabSet, false);
     _parentScope.ElementTabSet.AddTab(_elementTab);
     _parentScope.Add(this);
 }
예제 #2
0
 public void OpenScope(ElementTabSet tabset)
 {
     foreach (var scope in Scopes().ToList())
     {
         tabset.RemoveTab(scope);
     }
     Clear();
     _prevScope = _currentCreationScope;
     _currentScopeDepth++;
     if (_currentScopeDepth > 20)
     {
         throw new StackOverflowException("Cannot controls within controls 20 levels deep. Do you have control recursion?");
     }
     _scopeDepth           = _currentScopeDepth;
     ElementTabSet         = tabset;
     _currentCreationScope = this;
 }