public void LoadGameInitialization(string directoryPath, string SAVname) { Game.LoadGame(directoryPath, SAVname); Images.LoadGraphicsAssetsFromFiles(directoryPath); // Make graphics for all tiles for (int col = 0; col < Map.Xdim; col++) { for (int row = 0; row < Map.Ydim; row++) { Map.Tile[col, row].Graphic = Draw.MakeTileGraphic(Map.Tile[col, row], col, row, Game.Options.FlatEarth); } } ViewPieceMode = Game.ActiveUnit == null; _choiceMenu.Visible = false; _choiceMenu.Dispose(); _choiceMenu = null; MainMenuStrip.Enabled = true; _sinaiPanel.Dispose(); _sinaiPanel = null; _mapPanel = new MapPanel(this, ClientSize.Width - 262, ClientSize.Height - MainMenuStrip.Height) { Location = new Point(0, MainMenuStrip.Height) }; Controls.Add(_mapPanel); _mapPanel.BringToFront(); _minimapPanel = new _MinimapPanel(this, 262, 149) { Location = new Point(ClientSize.Width - 262, MainMenuStrip.Height) }; Controls.Add(_minimapPanel); _statusPanel = new StatusPanel(this, 262, ClientSize.Height - MainMenuStrip.Height - 148) { Location = new Point(ClientSize.Width - 262, MainMenuStrip.Height + 148) }; Controls.Add(_statusPanel); //ZoomInItem.Click += MapPanel.ZoomINclicked; //ZoomOutItem.Click += MapPanel.ZoomOUTclicked; //MaxZoomInItem.Click += MapPanel.MaxZoomINclicked; //MaxZoomOutItem.Click += MapPanel.MaxZoomOUTclicked; //StandardZoomItem.Click += MapPanel.StandardZOOMclicked; //MediumZoomOutItem.Click += MapPanel.MediumZoomOUTclicked; StatusPanel.OnMapEvent += MapEventHappened; //MapPanel.OnMapEvent += MapEventHappened; }
public _NameCityPanel(Main parent, MapPanel mapPanel, int _width, int _height) : base(_width, _height, "", 38, 46) { //InitializeComponent(); Main = parent; MapPanel = mapPanel; Size = new Size(686, 126); Location = new Point(MapPanel.Width / 2 - this.Width / 2, MapPanel.Height / 2 - this.Height / 2); BackgroundImage = Images.PanelOuterWallpaper; Paint += new PaintEventHandler(NameCityPanel_Paint); MainPanel = new Panel { Location = new Point(9, 36), Size = new Size(668, 46), BackgroundImage = Images.PanelOuterWallpaper }; Controls.Add(MainPanel); MainPanel.Paint += MainPanel_Paint; //OK button Civ2button OKButton = new Civ2button { Location = new Point(9, 84), Size = new Size(333, 36), Font = new Font("Times New Roman", 11), Text = "OK" }; Controls.Add(OKButton); OKButton.Click += new EventHandler(OKButton_Click); //Cancel button Civ2button CancelButton = new Civ2button { Location = new Point(344, 84), Size = new Size(333, 36), Font = new Font("Times New Roman", 11), Text = "Cancel" }; Controls.Add(CancelButton); CancelButton.Click += new EventHandler(CancelButton_Click); }