Example #1
0
        private void InitializeTab()
        {
            try
            {
                mControl = new TmxEditor.TmxEditorControl();
            }
            catch (System.NotSupportedException exc)
            {
                GlueCommands.PrintError("Could not find a graphics device that supports XNA hi-def. Attempting to load Tiled plugin without the control tab");
            }

            if (mControl != null)
            {
                mControl.AnyTileMapChange += HandleUserChangeTmx;
                mControl.LoadEntities     += OnLoadEntities;


                EntityCreationManager.Self.AddEntityCreationView(mControl);


                var commandLineArgumentsView = new TileGraphicsPlugin.Views.CommandLineArgumentsView();
                mCommandLineViewModel = new CommandLineViewModel();
                mCommandLineViewModel.CommandLineChanged += HandleCommandLinePropertyChanged;
                commandLineArgumentsView.DataContext      = mCommandLineViewModel;
                mControl.AddTab("Command Line", commandLineArgumentsView);

                mTilesetXnaRightClickController = new TilesetXnaRightClickController();
                mTilesetXnaRightClickController.Initialize(mControl.TilesetXnaContextMenu);
                mControl.TilesetDisplayRightClick += (o, s) => mTilesetXnaRightClickController.RefreshMenuItems();
            }
        }
        public Form1()
        {
            InitializeComponent();
            this.tmxEditorControl1 = new TmxEditor.TmxEditorControl();

            //
            // tmxEditorControl1
            //
            this.tmxEditorControl1.Location = new System.Drawing.Point(12, 27);
            this.tmxEditorControl1.Name = "tmxEditorControl1";
            this.tmxEditorControl1.Size = new System.Drawing.Size(468, 404);
            this.tmxEditorControl1.TabIndex = 5;
            this.tmxEditorControl1.Dock = DockStyle.Fill;

            this.Controls.Add(this.tmxEditorControl1);
            this.tmxEditorControl1.BringToFront();
        }
        private void InitializeTab()
        {
            mControl = new TmxEditor.TmxEditorControl();
            mControl.AnyTileMapChange += HandleUserChangeTmx;
            mControl.LoadEntities     += OnLoadEntities;
            var commandLineArgumentsView = new TileGraphicsPlugin.Views.CommandLineArgumentsView();

            mCommandLineViewModel = new CommandLineViewModel();

            mCommandLineViewModel.CommandLineChanged += HandleCommandLinePropertyChanged;

            commandLineArgumentsView.DataContext = mCommandLineViewModel;
            mControl.AddTab("Command Line", commandLineArgumentsView);


            mTilesetXnaRightClickController = new TilesetXnaRightClickController();
            mTilesetXnaRightClickController.Initialize(mControl.TilesetXnaContextMenu);
            mControl.TilesetDisplayRightClick += (o, s) => mTilesetXnaRightClickController.RefreshMenuItems();
        }
        private void InitializeTab()
        {
            mControl = new TmxEditor.TmxEditorControl();
            mControl.AnyTileMapChange += HandleUserChangeTmx;
            mControl.LoadEntities += OnLoadEntities;
            var commandLineArgumentsView = new TileGraphicsPlugin.Views.CommandLineArgumentsView();
            mCommandLineViewModel = new CommandLineViewModel();

            mCommandLineViewModel.CommandLineChanged += HandleCommandLinePropertyChanged;

            commandLineArgumentsView.DataContext = mCommandLineViewModel;
            mControl.AddTab("Command Line", commandLineArgumentsView);

            mTilesetXnaRightClickController = new TilesetXnaRightClickController();
            mTilesetXnaRightClickController.Initialize(mControl.TilesetXnaContextMenu);
            mControl.TilesetDisplayRightClick += (o, s) => mTilesetXnaRightClickController.RefreshMenuItems();
        }