예제 #1
0
        public object Clone()
        {
            ZoneGridProperties copy = (ZoneGridProperties)this.MemberwiseClone();

            copy._area = (BoundingBox)_area.Clone();
            return(copy);
        }
예제 #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);
                }
            }
        }
예제 #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);
              }
        }
예제 #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);
            }
              }
        }