public Control.PixelLight2D AddNewMatrix(string name, int width, int height) { int scaleX = 12; int scaleY = 12; var moduleControl = new Control.ModuleControl(); moduleControl.Text = name; moduleControl.Size = new System.Drawing.Size(scaleX * width + 6, scaleY * height + 26); var control = new Control.PixelLight2D(scaleX, scaleY); moduleControl.ChildControl = control; flowLayoutPanelLights.Controls.Add(moduleControl); return(control); }
public Control.PixelLight2D AddNewMatrix(string name, int width, int height) { int scaleX = 12; int scaleY = 12; var moduleControl = new Control.ModuleControl(); moduleControl.Text = name; moduleControl.Size = new System.Drawing.Size(scaleX * width + 6, scaleY * height + 26); var control = new Control.PixelLight2D(scaleX, scaleY); moduleControl.ChildControl = control; flowLayoutPanelLights.Controls.Add(moduleControl); return control; }