FormUnitActionDefinition.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using CommonAI.Zone;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel;
  5. using System.Data;
  6. using System.Drawing;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Windows.Forms;
  10. namespace CommonAIEditor
  11. {
  12. public partial class FormUnitActionDefinition : Form
  13. {
  14. private UnitActionDefinitionMap data;
  15. public UnitActionDefinitionMap Data { get { return data; } }
  16. public FormUnitActionDefinition()
  17. {
  18. InitializeComponent();
  19. this.data = Editor.Instance.UnitActionDefinition.Clone() as UnitActionDefinitionMap;
  20. this.g2DPropertyGrid1.SetSelectedObject(data);
  21. // this.g2DPropertyGrid1.ExpandAllGridItems();
  22. this.Refresh();
  23. }
  24. protected override void OnClosing(CancelEventArgs e)
  25. {
  26. base.OnClosing(e);
  27. this.data = g2DPropertyGrid1.GetSelectedValue() as UnitActionDefinitionMap;
  28. }
  29. private void button_OK_Click(object sender, EventArgs e)
  30. {
  31. this.Close();
  32. }
  33. }
  34. }