Esempio n. 1
0
        public override void Visit(PKContainer item)
        {
            var node = AddNode(item, 1);

            item.Items.ToList().ForEach(x =>
            {
                x.Accept(new PKTreeNodeVisitor(node.Nodes));
            });
        }
 public override void Visit(PKContainer item)
 {
     canAddVisitor = new PKItemCanAddVisitor(newItem);
     item.Accept(canAddVisitor);
     if (canAddVisitor.CanAdd)
     {
         item.Add(newItem);
         this.Added = true;
     }
 }
        public override void Visit(PKContainer item)
        {
            string strItems        = string.Empty;
            string strDimension    = string.Empty;
            string strLayoutConfig = string.Empty;

            item.Items.ToList().ForEach(x =>
            {
                var visitor = new PKExt3ItemDefVisitor();
                x.Accept(visitor);
                this.Code += visitor.Code;
                strItems  += string.Format("this.{0},", x.Name);
            });

            if (strItems.Length > 0)
            {
                strItems = strItems.Remove(strItems.Length - 1, 1);
            }

            if (item.Flex > 0)
            {
                strDimension = string.Format("flex: {0},", item.Flex);
            }
            else
            {
                if (item.Parent.Layout.Name() == "vbox")
                {
                    strDimension = string.Format("height: {0},", item.Height);
                }
                if (item.Parent.Layout.Name() == "hbox")
                {
                    strDimension = string.Format("width: {0},", item.Width);
                }
            }

            if (item.Layout.Name() == "vbox" || item.Layout.Name() == "hbox")
            {
                strLayoutConfig = "layoutConfig: {align: 'stretch'},";
            }

            Code += string.Format(@"this.{0} = new Ext.Container({{
                xtype: 'container',
                style: 'padding: {5}px;',
                layout : '{1}',
                {2}
                {3}
                items: [{4}]                
                }});",
                                  item.Name,
                                  item.Layout.Name(),
                                  strLayoutConfig,
                                  strDimension,
                                  strItems,
                                  item.Padding);
        }
        public override void Visit(PKContainer item)
        {
            PKFlatItem flatItem = new PKFlatItem();

            this.FlatItems.Add(flatItem);
            UpdateFromBase(item, flatItem);
            flatItem.Text = item.Text;
            item.Items.ToList().ForEach(x => {
                x.Accept(this);
            });
        }
Esempio n. 5
0
 public override void Visit(PKContainer item)
 {
     if (AreSameType <PKContainer>(childItem) ||
         AreSameType <PKPanel>(childItem) ||
         AreSameType <PKTabPanel>(childItem) ||
         AreSameType <PKGrid>(childItem) ||
         AreSameType <PKField>(childItem) ||
         AreSameType <PKButton>(childItem) ||
         AreSameType <PKText>(childItem))
     {
         this.CanAdd = true;
     }
     IsUserControl();
 }
Esempio n. 6
0
 public abstract void Visit(PKContainer item);
Esempio n. 7
0
 public override void Visit(PKContainer item)
 {
     UpdateFromBase(item);
     contextMenuStrip.Show(control, x, y);
 }
Esempio n. 8
0
 public override void Visit(PKContainer item)
 {
     UpdateSize(item);
 }
 public override void Visit(PKContainer item)
 {
     item.Add(this.currentItem);
 }
Esempio n. 10
0
 public override void Visit(PKContainer item)
 {
     VisitBase(item);
     item.Text = flatItem.Text;
 }