Esempio n. 1
0
 public El Add(El el)
 {
     Els.Add(el.Id, el);
     el.Parent = this;
     FrameResponse.Current.Added(el);
     Added(el);
     return(el);
 }
Esempio n. 2
0
 public El Remove(El el)
 {
     FrameResponse.Current.Removed(el);  //this has to be first to maintain the path
     Els.Remove(el.Id);
     el.Parent = null;
     Removed(el);
     return(el);
 }
Esempio n. 3
0
        public void Removed(El el)
        {
            if (el.Parent != null && HasChanged(el.Parent.Id))
            {
                return;
            }

            RemovedEls.Add(el.Id, new ElTag(el));
        }
Esempio n. 4
0
        public void Updated(El el)
        {
            if (el.Parent != null && HasChanged(el.Parent.Id))
            {
                return;
            }

            UpdatedEls.Add(el.Id, el);
        }
Esempio n. 5
0
        public void Added(El el)
        {
            if (el is Body || el is Act)
            {
                return;
            }

            if (el.Parent != null && HasChanged(el.Parent.Id))
            {
                return;
            }

            AddedEls.Add(el.Id, el);
        }
Esempio n. 6
0
        public El Find(String path)
        {
            El ret = null;

            if (!string.IsNullOrEmpty(path))
            {
                String[] ids    = path.Split('.');
                Screen   screen = Screens[ids[0]];

                if (ids.Length == 1)
                {
                    return(screen);
                }

                ret = screen.Find(ids[1]);

                for (int i = 2; i < ids.Length; i++)
                {
                    ret = ret.Find(ids[i]);
                }
            }

            return(ret);
        }
Esempio n. 7
0
 public virtual void Removed(El el)
 {
     OnRemoved?.Invoke(el);
 }
Esempio n. 8
0
 public virtual void Added(El el)
 {
     OnAdded?.Invoke(el);
 }
Esempio n. 9
0
 public ElTag(El el)
 {
     Id       = el.Id;
     ParentId = el.Parent == null ? "" : el.Parent.Id;
     Path     = el.Path;
 }
Esempio n. 10
0
 public String RenderView(El el)
 {
     return(Controller.RenderPartialViewToString(el.View, el));
 }