public object Clone() { ZoneGridProperties copy = (ZoneGridProperties)this.MemberwiseClone(); copy._area = (BoundingBox)_area.Clone(); return(copy); }
public void Perform2DViewAction(CSharpFramework.Controls.Scene2DView view, GroupAction parent, string action) { if (action == RO_CREATEZONEGRID) { ZoneGridProperties properties = new ZoneGridProperties(); properties.Area = view.SelectionMarqueeWorldBox; using (PropertyGridDlg dlg = new PropertyGridDlg("Create a grid of zones", "Procedurally generate a grid of m times n streaming zones")) { dlg.DataObjectNoClone = properties; if (dlg.ShowDialog() != DialogResult.OK) { return; } CreateZoneGridAction createaction = new CreateZoneGridAction(properties); EditorManager.Actions.Add(createaction); } } }
private void menu_CreateZoneGrid_Click(object sender, EventArgs e) { if (EditorManager.Scene == null) return; ZoneGridProperties properties = new ZoneGridProperties(); properties.Area = EditorManager.Scene.SceneExtents; using (PropertyGridDlg dlg = new PropertyGridDlg("Create a grid of zones", "Procedurally generate a grid of m times n streaming zones")) { dlg.DataObjectNoClone = properties; if (dlg.ShowDialog() != DialogResult.OK) return; CreateZoneGridAction action = new CreateZoneGridAction(properties); EditorManager.Actions.Add(action); } }
public CreateZoneGridAction(ZoneGridProperties properties) : base("Create zone grid") { properties.CreateGrid(this); }
public void Perform2DViewAction(CSharpFramework.Controls.Scene2DView view, GroupAction parent, string action) { if (action == RO_CREATEZONEGRID) { ZoneGridProperties properties = new ZoneGridProperties(); properties.Area = view.SelectionMarqueeWorldBox; using (PropertyGridDlg dlg = new PropertyGridDlg("Create a grid of zones", "Procedurally generate a grid of m times n streaming zones")) { dlg.DataObjectNoClone = properties; if (dlg.ShowDialog() != DialogResult.OK) return; CreateZoneGridAction createaction = new CreateZoneGridAction(properties); EditorManager.Actions.Add(createaction); } } }