private void grid_checkbox_CheckedChanged(object sender, EventArgs e) { if (draw.IsGridEmpty()) { draw.SetGrid(grid = new Grid((float)gridSize_nud.Value, showField.Width, showField.Height)); axle = new Axle(showField.Width, showField.Height); } draw.SetShowGrid(grid_checkbox.Checked); showField.Image = draw.ShowDrawing(); }
public Form1() { InitializeComponent(); Bitmap bmp = new Bitmap(showField.Width, showField.Height); showField.Image = bmp; draw = new Draw((Bitmap)showField.Image); grid = new Grid((float)gridSize_nud.Value, showField.Width, showField.Height); axle = new Axle(showField.Width, showField.Height); draw.SetGrid(grid); }
public void SetAxle(Axle _axle) { axle = _axle; }