public UserCardsControl(MainForm mainForm, BattleControl battleControl) { this.mainForm = mainForm; this.battleControl = battleControl; InitializeComponent(); }
private void Init() { DoubleBuffered = true; var width = 800; var height = 500; startControl = new StartControl(this); heroesControl = new HeroesControl(this); levelsControl = new LevelsControl(this); levelsControl.Dock = System.Windows.Forms.DockStyle.Fill; levelsControl.Location = new System.Drawing.Point(0, 0); levelsControl.Name = "levelsControl"; levelsControl.Size = new System.Drawing.Size(width, height); startControl.Dock = System.Windows.Forms.DockStyle.Fill; startControl.Location = new System.Drawing.Point(0, 0); startControl.Name = "startControl"; startControl.Size = new System.Drawing.Size(width, height); heroesControl.Dock = System.Windows.Forms.DockStyle.Fill; heroesControl.Location = new System.Drawing.Point(0, 0); heroesControl.Name = "heroesControl"; heroesControl.Size = new System.Drawing.Size(width, height); // Main Window Settings AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); //AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; ClientSize = new System.Drawing.Size(width, height); Controls.Add(startControl); Controls.Add(heroesControl); Controls.Add(levelsControl); Controls.Add(pausedControl); Margin = Padding.Empty; Padding = Padding.Empty; InitializeFont(); SetBackgroundImage(); battleControl = new BattleControl(this); battleControl.Dock = DockStyle.Fill; Controls.Add(battleControl); WindowState = FormWindowState.Maximized; InitGameInfo(); InitPlayerInfoLabel(); }
public PausedControl(MainForm mainForm, BattleControl battleControl) : base(mainForm) { this.battleControl = battleControl; InitComponent(); }