示例#1
0
文件: View.cs 项目: Bamvkefadf/Tanks
 public View(ModeGame model)
 {
     Thread.CurrentThread.CurrentUICulture = new CultureInfo(Properties.Settings.Default.language);
     InitializeComponent();
     r = new Random();
     this.model = model;
 }
示例#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);
        }