コード例 #1
0
        public RoomsEditorTexturesEdit(RoomsEditorMapView mapView)
        {
            InitializeComponent();

            this.mapView = mapView;
            textureBrowser = new TgcTextureBrowser();
            textureBrowser.CurrentDir = mapView.defaultTextureDir;

            //Cargar imagenes default
            string defaultTextureImage = mapView.defaultTextureImage;
            roofImage.ImageLocation = defaultTextureImage;
            floorImage.ImageLocation = defaultTextureImage;
            eastWallImage.ImageLocation = defaultTextureImage;
            westWallImage.ImageLocation = defaultTextureImage;
            northWallImage.ImageLocation = defaultTextureImage;
            southWallImage.ImageLocation = defaultTextureImage;
        }
コード例 #2
0
        public RoomsEditorTexturesEdit(RoomsEditorMapView mapView)
        {
            InitializeComponent();

            this.mapView              = mapView;
            textureBrowser            = new TgcTextureBrowser();
            textureBrowser.CurrentDir = mapView.defaultTextureDir;

            //Cargar imagenes default
            string defaultTextureImage = mapView.defaultTextureImage;

            roofImage.ImageLocation      = defaultTextureImage;
            floorImage.ImageLocation     = defaultTextureImage;
            eastWallImage.ImageLocation  = defaultTextureImage;
            westWallImage.ImageLocation  = defaultTextureImage;
            northWallImage.ImageLocation = defaultTextureImage;
            southWallImage.ImageLocation = defaultTextureImage;
        }
コード例 #3
0
            public RoomPanel(string name, RoomsEditorMapView mapView, Point location, Size size)
            {
                this.mapView = mapView;

                label             = new Label();
                label.Text        = name;
                label.AutoSize    = false;
                label.Location    = location;
                label.Size        = size;
                label.BorderStyle = BorderStyle.FixedSingle;
                label.BackColor   = DEFAULT_ROOM_COLOR;
                label.TextAlign   = ContentAlignment.MiddleCenter;

                label.MouseDown      += new MouseEventHandler(label_MouseDown);
                label.MouseUp        += new MouseEventHandler(label_MouseUp);
                label.MouseMove      += new MouseEventHandler(label_MouseMove);
                label.MouseEnter     += new EventHandler(label_MouseEnter);
                label.PreviewKeyDown += new PreviewKeyDownEventHandler(label_PreviewKeyDown);
            }
コード例 #4
0
        public RoomsEditorControl(TgcRoomsEditor editor)
        {
            InitializeComponent();

            this.editor = editor;
            this.mapView = new RoomsEditorMapView(this);
            this.helpWindow = new RoomsEditorHelpWindow();

            //openMapDialog
            openMapDialog = new OpenFileDialog();
            openMapDialog.CheckFileExists = true;
            openMapDialog.Title = "Select a Map file";
            openMapDialog.Filter = ".XML |*.xml";
            openMapDialog.Multiselect = false;
            openMapDialog.InitialDirectory = GuiController.Instance.ExamplesMediaDir;

            //saveDialog
            saveDialog = new SaveFileDialog();
            saveDialog.DefaultExt = ".xml";
            saveDialog.Filter = ".XML |*.xml";
            saveDialog.AddExtension = true;
        }
コード例 #5
0
        public RoomsEditorControl(TgcRoomsEditor editor)
        {
            InitializeComponent();

            this.editor     = editor;
            this.mapView    = new RoomsEditorMapView(this);
            this.helpWindow = new RoomsEditorHelpWindow();

            //openMapDialog
            openMapDialog = new OpenFileDialog();
            openMapDialog.CheckFileExists  = true;
            openMapDialog.Title            = "Select a Map file";
            openMapDialog.Filter           = ".XML |*.xml";
            openMapDialog.Multiselect      = false;
            openMapDialog.InitialDirectory = GuiController.Instance.ExamplesMediaDir;

            //saveDialog
            saveDialog              = new SaveFileDialog();
            saveDialog.DefaultExt   = ".xml";
            saveDialog.Filter       = ".XML |*.xml";
            saveDialog.AddExtension = true;
        }
コード例 #6
0
            public RoomPanel(string name, RoomsEditorMapView mapView, Point location, Size size)
            {
                this.mapView = mapView;

                label = new Label();
                label.Text = name;
                label.AutoSize = false;
                label.Location = location;
                label.Size = size;
                label.BorderStyle = BorderStyle.FixedSingle;
                label.BackColor = DEFAULT_ROOM_COLOR;
                label.TextAlign = ContentAlignment.MiddleCenter;

                label.MouseDown += new MouseEventHandler(label_MouseDown);
                label.MouseUp += new MouseEventHandler(label_MouseUp);
                label.MouseMove += new MouseEventHandler(label_MouseMove);
                label.MouseEnter += new EventHandler(label_MouseEnter);
                label.PreviewKeyDown += new PreviewKeyDownEventHandler(label_PreviewKeyDown);
            }