public void setItem(object sender, EventArgs e, int x, int y) { MapChangedEventArgs MapChange = new MapChangedEventArgs(); MapChange.x = x; MapChange.y = y; MapChange.Part = Part; MapChange.setting = false; OnMapChange(MapChange); }
public void setItem(object sender, EventArgs e, string name) { MapChangedEventArgs MapChange = new MapChangedEventArgs(); Regex regex = new Regex("/"); string[] location = regex.Split(name); MapChange.x = Int32.Parse(location[0]); MapChange.y = Int32.Parse(location[1]); MapChange.Part = Part; MapChange.setting = false; OnMapChange(MapChange); }
private void btnCheck_Click(object sender, EventArgs e) { MapChangedEventArgs check = new MapChangedEventArgs(); check.check = true; check.setting = false; OnMapChange(check); if (this.Errors.Items.Count < 1) { this.BtnSave.Enabled = true; } }
private void setMap(object sender, MapChangedEventArgs e) { if (e.setting) { Model.setSize(e.x, e.y); } else if (e.check) { View.setErrors(Model.getErrors()); } else { Model.setItem(e.Part); Model.placeItem(e.x, e.y); } }
private void sizeGenerate_Click(object sender, EventArgs e) { clear(); this.Picture = Image.FromFile(Directory.GetCurrentDirectory().ToString() + "\\Assets\\empty.png"); int y = (int)this.ySize.Value; int x = (int)this.xSize.Value; theWidth = x; theHeight = y; MapChangedEventArgs MapChange = new MapChangedEventArgs(); MapChange.x = x; MapChange.y = y; MapChange.Part = Part; MapChange.setting = true; OnMapChange(MapChange); setCells(x, y); this.btnCheck.Enabled = true; this.BtnSave.Enabled = false; }
private void sizeGenerate_Click(object sender, EventArgs e) { clear(); this.Picture = Items['-']; int y = (int)this.ySize.Value; int x = (int)this.xSize.Value; theWidth = x; theHeight = y; MapChangedEventArgs MapChange = new MapChangedEventArgs(); MapChange.x = x; MapChange.y = y; MapChange.Part = Part; MapChange.setting = true; OnMapChange(MapChange); setPanels(x, y); this.btnCheck.Enabled = true; this.BtnSave.Enabled = false; this.btnTest.Enabled = false; }
protected void OnMapChange(MapChangedEventArgs e) { MapChanged(this, e); }