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); }); }
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(); }
public abstract void Visit(PKContainer item);
public override void Visit(PKContainer item) { UpdateFromBase(item); contextMenuStrip.Show(control, x, y); }
public override void Visit(PKContainer item) { UpdateSize(item); }
public override void Visit(PKContainer item) { item.Add(this.currentItem); }
public override void Visit(PKContainer item) { VisitBase(item); item.Text = flatItem.Text; }