public ControlWrapper GetCandy() { ControlWrapper cw = new ControlWrapper(); DesignerClock clock = new DesignerClock(); clock.Size.Width = 200; clock.Size.Height = 50; BoardClock bf = new BoardClock(clock); cw.Protect(bf); return(cw); }
void InitVisual() { if (Board == null) { return; } this.Height = Board.Size.Height; this.Width = Board.Size.Width; foreach (DesignerControl cd in Board.VisualChildren) { switch (cd.ControlType) { case DesignerControlType.Image: BoardImage bi = new BoardImage(cd as DesignerImage); Add(bi, cd); break; case DesignerControlType.GIF: BoardGif bg = new BoardGif(cd as DesignerGif); Add(bg, cd); break; case DesignerControlType.Label: BoardLabel bl = new BoardLabel(cd as DesignerLabel); Add(bl, cd); break; case DesignerControlType.Table: BoardDataGrid bdg = new BoardDataGrid(cd as DesignerTable); Add(bdg, cd); break; case DesignerControlType.Chart: BoardChart bc = new BoardChart(cd as DesignerChart); Add(bc, cd); break; case DesignerControlType.Media: BoardMediaPlayer bmp = new BoardMediaPlayer(cd as DesignerMedia); Add(bmp, cd); break; case DesignerControlType.Clock: BoardClock clock = new BoardClock(cd as DesignerClock); Add(clock, cd); break; case DesignerControlType.DynamicLabel: BoardDynamicLabel dlb = new BoardDynamicLabel(cd as DesignerDynamicLabel); Add(dlb, cd); break; case DesignerControlType.Processbar: BoardProcessbar bpd = new BoardProcessbar(cd as DesignerProcessbar); Add(bpd, cd); break; default: break; } } }
public UserControl GetCandy(DesignerControl control) { BoardClock bf = new BoardClock(control as DesignerClock); return(bf); }