Esempio n. 1
0
 public UIPackage(Packge p)
     : base(512, 512)
 {
     mPkg = p;
     dragAble = true;
     paddingY = paddingX = 5;
     layout = ELayout.vertical;
     //expandAbleY = expandAbleX = true;
     //shrinkAble = true;
     var items = p.getItems();
     foreach (var elem in items)
     {
         var ui = elem.funcGetUiWidget();
         ui.paresent = this;
     }
 }
Esempio n. 2
0
        public UIPackageItem_package(Packge pkg)
        {
            mPkg = pkg;
            //shrinkAble = true;
            marginX = 5;
            marginY = 5;
            layout = ELayout.horizon;

            mTypeRect = appendFromXML(@"
            <rect padding='2' clip='true' shrink='true'>
                <lable size='12' text='dir' color='yellow'></lable>
            </rect>") as UIRect;

            mNameRect = appendFromXML(@"
            <rect padding='2' clip='true' shrink='true'></rect>
            ") as UIRect;
            mName = mNameRect.appendFromXML(@"
            <lable size='12' color='black'></lable>") as UILable;
            setName(pkg.cast<PackageItem>().name);
        }
Esempio n. 3
0
 public Packge addPackage(string pname)
 {
     var p = new Packge();
     var it = p.cast<PackageItem>();
     it.name = pname;
     if (addItem(it))
     {
         return p;
     }
     else
         return null;
 }