Ejemplo n.º 1
0
        public object Clone()
        {
            ZoneGridProperties copy = (ZoneGridProperties)this.MemberwiseClone();

            copy._area = (BoundingBox)_area.Clone();
            return(copy);
        }
Ejemplo n.º 2
0
        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);
                }
            }
        }
Ejemplo n.º 3
0
        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);
              }
        }
Ejemplo n.º 4
0
 public CreateZoneGridAction(ZoneGridProperties properties)
     : base("Create zone grid")
 {
     properties.CreateGrid(this);
 }
 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);
            }
              }
        }