public ControlWrapper GetCandy() { ControlWrapper cw = new ControlWrapper(); DesignerChart dc = new DesignerChart(); BoardChart chart = new BoardChart(dc); cw.Protect(chart); 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) { BoardChart chart = new BoardChart(control as DesignerChart); return(chart); }