Exemple #1
0
 public Controller_MainForm(int amountTanks, int speedGame, int amountWalls)
 {
     InitializeComponent();
     model = new Model(amountTanks, speedGame, amountWalls);
     view = new View(model);
     view.Location = new Point(50, 50);
     this.Controls.Add(view);
 }
Exemple #2
0
        public Controller_MainForm(int amountSimpleTanks, int speedGame, int amountWalls, int amountHunterTanks)
        {
            Thread.CurrentThread.CurrentUICulture = new CultureInfo(Properties.Settings.Default.language);
            cultureInfo = new CultureInfo(Properties.Settings.Default.language);
            InitializeComponent();

            sp = new SoundPlayer(Properties.Resources.cannon_fire1);

            model = new ModeGame(Properties.Settings.Default.amountSimpleTanks, Properties.Settings.Default.speedGame, Properties.Settings.Default.amountWalls, Properties.Settings.Default.amountHunterTanks);
            view = new View(model);
            view.Location = new Point(10, 20);
            this.Controls.Add(view);
            SetLanguage(out wantToExit, out cancelButtonText, out okButtonText);
            SetLanguageButtonsToPlay();
            ChangeLanguage.Instance.localizeForm(this, cultureInfo);
        }