public MainForm(string[] arguments) { InitializeComponent(); m_arguments = arguments; m_commandHistory = CommandHistory.Instance; m_tileBrushCollection = new TileBrushCollection(); }
public ApplicationBridge(MenuStrip menuStrip, ToolStripContainer toolStripContainer, MapPanel mapPanel) : base(false) { m_commandHistory = CommandHistory.Instance; m_menuStripBridge = new MenuStripBridge(menuStrip); m_toolStripContainer = toolStripContainer; m_toolBars = new List<ToolBarBridge>(); PopulateToolBars(toolStripContainer.TopToolStripPanel); PopulateToolBars(toolStripContainer.BottomToolStripPanel); PopulateToolBars(toolStripContainer.LeftToolStripPanel); PopulateToolBars(toolStripContainer.RightToolStripPanel); m_editorBridge = new EditorBridge(mapPanel); }
public MapPanel() { InitializeComponent(); m_commandHistory = CommandHistory.Instance; m_singleTileCursor = new Cursor(new MemoryStream(Properties.Resources.ToolsSingleTileCursor)); m_tileBlockCursor = new Cursor(new MemoryStream(Properties.Resources.ToolsTileBlockCursor)); m_eraserCursor = new Cursor(new MemoryStream(Properties.Resources.ToolsEraserCursor)); m_dropperCursor = new Cursor(new MemoryStream(Properties.Resources.ToolsDropperCursor)); m_viewport = new xTile.Dimensions.Rectangle( xTile.Dimensions.Location.Origin, xTile.Dimensions.Size.Zero); m_autoScaleViewport = true; m_zoomIndex = 5; m_zoom = 1.0f; m_layerCompositing = LayerCompositing.DimUnselected; m_editTool = EditTool.SingleTile; m_innerPanel.Cursor = m_singleTileCursor; m_mouseInside = false; m_mouseLocation = new Location(); m_tileLayerLocation = xTile.Dimensions.Location.Origin; m_dragTileStart = xTile.Dimensions.Location.Origin; m_tileSelection = new TileSelection(); m_ctrlKeyPressed = false; m_random = new Random(); m_textureDistribution = new List<Tile>(); m_tileGuides = false; m_veilBrush = new SolidBrush(Color.FromArgb(192, SystemColors.InactiveCaption)); m_imageAttributes = new ImageAttributes(); m_colorMatrix = new ColorMatrix(); m_tileSelectionPen = new Pen(SystemColors.ActiveCaption); m_tileSelectionBrush = new SolidBrush( Color.FromArgb(128, SystemColors.ActiveCaption)); m_dashPattern = new float[] { 1.0f, 1.0f, 1.0f, 1.0f }; m_tileGuidePen = new Pen(Color.Black); m_tileGuidePen.DashPattern = m_dashPattern; m_animationTimer.Enabled = !this.DesignMode; m_dtStart = DateTime.Now; this.MouseWheel += new MouseEventHandler(OnMouseWheel); }