public ControlWrapper GetCandy() { ControlWrapper cw = new ControlWrapper(); DesignerGif dg = new DesignerGif(); dg.Size.Width = 200; dg.Size.Height = 200; dg.GIFImageSource = "GifDemo.gif"; dg.AutoPlay = true; BoardGif bf = new BoardGif(dg); cw.Protect(bf); return(cw); }
public UserControl GetCandy(DesignerControl control) { BoardGif bf = new BoardGif(control as DesignerGif); return(bf); }
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; } } }