Esempio n. 1
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);
                }
            }
        }
Esempio n. 2
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);
              }
        }
        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);
            }
              }
        }