示例#1
0
文件: Helper.cs 项目: Gwee/csharp
        public static Control generateControl(ControlDesc desc, int position)
        {
            Control control = null;

            if (desc.type.Name == "Button")
            {
                control = new Button();
            }
            if (desc.type.Name == "Label")
            {
                control = new Label();
            }

            control.BackColor = desc.color;
            control.Size      = desc.size;
            control.Location  = new Point(position, 90);

            return(control);
        }
示例#2
0
 public void SetControls(ControlDesc item)
 {
     controlsDesc.Add(item);
 }