コード例 #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);
                }
            }
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: bgarrels/projectanarchy
        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);
              }
        }
コード例 #3
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);
            }
              }
        }