Example #1
0
 public Node(SlideMarkupFinder.UIContextTree.Node parent, string key, SlideDeckBlueprint value)
     : this()
 {
     string[] strArray = key.Split(new char[] { '/' });
     this.Name    = strArray[0];
     this._parent = parent;
     if (1 == strArray.Length)
     {
         this.Blueprint = value;
     }
     else
     {
         SlideMarkupFinder.UIContextTree.Node node = this;
         for (int i = 1; i < strArray.Length; i++)
         {
             SlideMarkupFinder.UIContextTree.Node node2 = new SlideMarkupFinder.UIContextTree.Node
             {
                 Name = strArray[i]
             };
             node.Nodes.Add(node2.Name, node2);
             node2._parent = node;
             node          = node2;
             if (i == (strArray.Length - 1))
             {
                 node2.Blueprint = value;
             }
         }
     }
 }
Example #2
0
        private void OnFinderStateChanged(object sender, ContextObjectStateEventArgs e)
        {
            switch (e.State)
            {
            case ContextObjectState.NotInitialized:
            case ContextObjectState.Loading:
                break;

            case ContextObjectState.Ready:
                lock (this._finder)
                {
                    SlideDeckBlueprint blueprint = this.Finder.SlideDeckBlueprint.Clone();
                    if (blueprint != this._blueprint)
                    {
                        this._blueprint = blueprint;
                        if (this.DefaultSlide != null)
                        {
                            this._blueprint.DefaultSlide = this.DefaultSlide;
                        }
                        this.SafeUpdateOptions(this._blueprint.DefaultSlide);
                    }
                }
                break;

            default:
                return;
            }
        }
Example #3
0
        public SlideDeckBlueprint Lookup(string context)
        {
            this.Denial = null;
            SlideDeckBlueprint blueprint = null;

            if (null == this.Denial)
            {
                this.State = ContextObjectState.Loading;
                if (ContextObjectState.Ready != this._contextTree.State)
                {
                    this._contextTree.LoadXml(null);
                }
                if (!this._contextTree.TryGetValue(context, out blueprint))
                {
                    this.Denial = new Denial("res://ehres!denial/MarkupFinder/TODO_InvalidContext.mcml", 1);
                }
            }
            if (blueprint != null)
            {
                this.SlideDeckBlueprint = blueprint;
                this.State = ContextObjectState.Ready;
            }
            return(blueprint);
        }