Interaction logic for CommandLineArgumentsView.xaml
Inheritance: System.Windows.Controls.UserControl
示例#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();
            }
        }
        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();
        }