Exemple #1
0
        public Form2(int rate, Form1 f)
        {
            InitializeComponent();

            tanksDoc = new TanksDoc();

            MaximizeBox = false;
            FormBorderStyle = FormBorderStyle.FixedSingle;
            MinimizeBox = false;

            background = new Bitmap(Properties.Resources.dirt_texture_small2);
            turret = new Bitmap(Properties.Resources.tower);
            boomImg = new Bitmap(Properties.Resources.khbomb);

            r = new Random();
            pause = false;

            Rate = rate;

            form1 = f;

            sounds = true;

            btnSound.Image = Properties.Resources.sound;

            song = new SoundPlayer("Laser Shot.wav");
            bum = new SoundPlayer("boom.wav");

            words = new List<string>();

            db = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=Shot_the_words_DB.accdb");

            db.Open();
            getWords = new OleDbCommand();
            getWords.Connection = db;

            if (rate == 40)
            {
                getWords.CommandText = "SELECT * FROM Words WHERE LEN(zbor)<5";

            }
            else if (rate == 30)
            {
                getWords.CommandText = "SELECT * FROM Words WHERE LEN(zbor)<7";
            }
            else
            {
                getWords.CommandText = "SELECT * FROM Words WHERE LEN(zbor)<10";
            }
            wordsReader = getWords.ExecuteReader();

            while (wordsReader.Read())
            {
                words.Add(wordsReader[1].ToString());
            }
        }
Exemple #2
0
        public Form1()
        {
            InitializeComponent();

            listBox.Visible = false;

            tanksDoc = new TanksDoc();

            MaximizeBox = false;
            FormBorderStyle = FormBorderStyle.FixedSingle;
            MinimizeBox = false;

            background = new Bitmap(Properties.Resources.dirt_texture_small2);

            r = new Random();
        }
Exemple #3
0
        public Form3(string points, Form1 f1, Form2 f2)
        {
            InitializeComponent();

            tanksDoc = new TanksDoc();

            MaximizeBox = false;
            FormBorderStyle = FormBorderStyle.FixedSingle;
            MinimizeBox = false;

            background = new Bitmap(Properties.Resources.dirt_texture_small2);

            r = new Random();

            lblPoints.Text = points;

            form1 = f1;
            form2 = f2;

            db = new OleDbConnection();
            db.ConnectionString = (@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=Shot_the_words_DB.accdb");
        }