Ejemplo n.º 1
0
        public async void LoadFile(IFile f, PackageView owner = null)
        {
            if (Loader == null)
            {
                return;
            }
            var pkgView = await Loader(f);

            if (owner != null && pkgView != null)
            {
                owner.AddChildPackage(pkgView);
            }
        }
Ejemplo n.º 2
0
 private void SetParentPackage(PackageView p)
 {
     parent = p;
 }
Ejemplo n.º 3
0
 private void RemoveChildPackage(PackageView p)
 {
     this.children.Remove(p);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Add a package as a child of this package.
 /// This means the given package will be closed if this package is closed.
 /// </summary>
 public void AddChildPackage(PackageView p)
 {
     this.children.Add(p);
     p.SetParentPackage(this);
 }