public TmxEditorControl()
{
InitializeComponent();
CreateXnaControl();
TilesetController.Self.Initialize(this.XnaControl, TilesetsListBox, this.StatusLabel,
this.TilesetTilePropertyGrid, this.HasCollisionsCheckBox, NameTextBox, EntitiesComboBox);
TilesetController.Self.AnyTileMapChange += HandleChangeInternal;
XnaControl.XnaUpdate += new Action(HandleXnaUpdate);
XnaControl.XnaDraw += new Action(HandleXnaDraw);
mScrollBarControlLogic = new ScrollBarControlLogic(this.splitContainer3.Panel1);
ApplicationEvents.Self.WireframePanning += delegate
{
mScrollBarControlLogic.UpdateScrollBars();
};
ApplicationEvents.Self.SelectedTilesetChanged += delegate
{
int width = 256;
int height = 256;
var texture = TilesetController.Self.CurrentTexture;
if(texture != null)
{
width = texture.Width;
height = texture.Height;
}
mScrollBarControlLogic.UpdateToImage(width, height);
};
LayersController.Self.Initialize(this.LayersListBox, LayerPropertyGrid);
LayersController.Self.AnyTileMapChange += HandleChangeInternal;
HandleXnaInitialize();
EditorObjects.IoC.Container.Set<TmxEditor.Managers.ResizeFixer>(new Managers.ResizeFixer());
}