Ejemplo n.º 1
0
 public void CloseScope()
 {
     Debug.Assert(_scopeDepth == _currentScopeDepth);
     _currentScopeDepth--;
     _currentCreationScope = _prevScope;
     ElementTabSet         = null;
 }
Ejemplo n.º 2
0
 public ElementTab(ScriptScope scope, string directory, string source, ElementTabSet tabset, bool isWindow)
 {
     _isWindow     = isWindow;
     _tabset       = tabset;
     Scope         = scope;
     _directory    = directory;
     _controlScope = Control.CreateScope(_directory, scope.Engine);
     Scope.SetVariable("bindings", new BindingFactory());
     Scope.SetVariable("model", new ExpandoDependencyObject());
     DataContext = this;
     InitializeComponent();
     _variableList.ItemsSource = Scope.GetVariable("model");
     Source = source;
 }
Ejemplo n.º 3
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;
 }