commit 4e292c480b7357e1801149aec69297523034aaf6 Author: erius0 Date: Mon Jun 28 02:13:29 2021 +0300 Initial commit diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/.vs/Project/DesignTimeBuild/.dtbcache b/.vs/Project/DesignTimeBuild/.dtbcache new file mode 100644 index 0000000..32ca314 Binary files /dev/null and b/.vs/Project/DesignTimeBuild/.dtbcache differ diff --git a/.vs/Project/v15/.suo b/.vs/Project/v15/.suo new file mode 100644 index 0000000..1f6bf35 Binary files /dev/null and b/.vs/Project/v15/.suo differ diff --git a/.vs/Project/v15/Server/sqlite3/db.lock b/.vs/Project/v15/Server/sqlite3/db.lock new file mode 100644 index 0000000..e69de29 diff --git a/.vs/Project/v15/Server/sqlite3/storage.ide b/.vs/Project/v15/Server/sqlite3/storage.ide new file mode 100644 index 0000000..d437677 Binary files /dev/null and b/.vs/Project/v15/Server/sqlite3/storage.ide differ diff --git a/.vs/Project/v15/Server/sqlite3/storage.ide-shm b/.vs/Project/v15/Server/sqlite3/storage.ide-shm new file mode 100644 index 0000000..2a345e5 Binary files /dev/null and b/.vs/Project/v15/Server/sqlite3/storage.ide-shm differ diff --git a/.vs/Project/v15/Server/sqlite3/storage.ide-wal b/.vs/Project/v15/Server/sqlite3/storage.ide-wal new file mode 100644 index 0000000..565ccc7 Binary files /dev/null and b/.vs/Project/v15/Server/sqlite3/storage.ide-wal differ diff --git a/.vs/Project/v16/.suo b/.vs/Project/v16/.suo new file mode 100644 index 0000000..29a0c59 Binary files /dev/null and b/.vs/Project/v16/.suo differ diff --git a/App.config b/App.config new file mode 100644 index 0000000..731f6de --- /dev/null +++ b/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Form1.Designer.cs b/Form1.Designer.cs new file mode 100644 index 0000000..ce9788d --- /dev/null +++ b/Form1.Designer.cs @@ -0,0 +1,284 @@ +namespace Project +{ + partial class form + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(form)); + this.start = new System.Windows.Forms.Button(); + this.pole1 = new System.Windows.Forms.Panel(); + this.pole2 = new System.Windows.Forms.Panel(); + this.lscore = new System.Windows.Forms.Label(); + this.lshot = new System.Windows.Forms.Label(); + this.status = new System.Windows.Forms.Label(); + this.menu = new System.Windows.Forms.MenuStrip(); + this.settings = new System.Windows.Forms.ToolStripMenuItem(); + this.sound = new System.Windows.Forms.ToolStripMenuItem(); + this.bcolor = new System.Windows.Forms.ToolStripMenuItem(); + this.skyblue = new System.Windows.Forms.ToolStripMenuItem(); + this.white = new System.Windows.Forms.ToolStripMenuItem(); + this.black = new System.Windows.Forms.ToolStripMenuItem(); + this.barv = new System.Windows.Forms.ToolStripMenuItem(); + this.darkblue = new System.Windows.Forms.ToolStripMenuItem(); + this.help = new System.Windows.Forms.ToolStripMenuItem(); + this.rules = new System.Windows.Forms.ToolStripMenuItem(); + this.aboutme = new System.Windows.Forms.ToolStripMenuItem(); + this.res = new System.Windows.Forms.Button(); + this.menu.SuspendLayout(); + this.SuspendLayout(); + // + // start + // + this.start.Font = new System.Drawing.Font("Impact", 15.75F); + this.start.Location = new System.Drawing.Point(345, 405); + this.start.Name = "start"; + this.start.Size = new System.Drawing.Size(78, 31); + this.start.TabIndex = 53; + this.start.Text = "Старт"; + this.start.UseVisualStyleBackColor = true; + this.start.Click += new System.EventHandler(this.start_Click); + // + // pole1 + // + this.pole1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(199)))), ((int)(((byte)(255))))); + this.pole1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.pole1.Location = new System.Drawing.Point(400, 79); + this.pole1.Name = "pole1"; + this.pole1.Size = new System.Drawing.Size(300, 300); + this.pole1.TabIndex = 54; + // + // pole2 + // + this.pole2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(199)))), ((int)(((byte)(255))))); + this.pole2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.pole2.Location = new System.Drawing.Point(60, 79); + this.pole2.Name = "pole2"; + this.pole2.Size = new System.Drawing.Size(300, 300); + this.pole2.TabIndex = 55; + // + // lscore + // + this.lscore.AutoSize = true; + this.lscore.Font = new System.Drawing.Font("Impact", 15.75F); + this.lscore.ForeColor = System.Drawing.Color.Navy; + this.lscore.Location = new System.Drawing.Point(625, 407); + this.lscore.Name = "lscore"; + this.lscore.Size = new System.Drawing.Size(0, 26); + this.lscore.TabIndex = 56; + this.lscore.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // lshot + // + this.lshot.AutoSize = true; + this.lshot.Font = new System.Drawing.Font("Impact", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.lshot.ForeColor = System.Drawing.Color.Navy; + this.lshot.Location = new System.Drawing.Point(55, 410); + this.lshot.Name = "lshot"; + this.lshot.Size = new System.Drawing.Size(0, 26); + this.lshot.TabIndex = 57; + this.lshot.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // status + // + this.status.AutoSize = true; + this.status.Font = new System.Drawing.Font("Impact", 15.75F); + this.status.ForeColor = System.Drawing.Color.Navy; + this.status.ImageAlign = System.Drawing.ContentAlignment.TopCenter; + this.status.Location = new System.Drawing.Point(188, 24); + this.status.Name = "status"; + this.status.Size = new System.Drawing.Size(390, 26); + this.status.TabIndex = 58; + this.status.Text = "Нажмите кнопку \'Старт\' для начала игры"; + this.status.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // menu + // + this.menu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.settings, + this.help}); + this.menu.Location = new System.Drawing.Point(0, 0); + this.menu.Name = "menu"; + this.menu.Size = new System.Drawing.Size(800, 24); + this.menu.TabIndex = 59; + // + // settings + // + this.settings.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.sound, + this.bcolor}); + this.settings.Name = "settings"; + this.settings.Size = new System.Drawing.Size(79, 20); + this.settings.Text = "Настройки"; + // + // sound + // + this.sound.Checked = true; + this.sound.CheckOnClick = true; + this.sound.CheckState = System.Windows.Forms.CheckState.Checked; + this.sound.Name = "sound"; + this.sound.Size = new System.Drawing.Size(132, 22); + this.sound.Text = "Звук"; + this.sound.CheckedChanged += new System.EventHandler(this.sound_CheckedChange); + // + // bcolor + // + this.bcolor.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.skyblue, + this.white, + this.black, + this.barv, + this.darkblue}); + this.bcolor.Name = "bcolor"; + this.bcolor.Size = new System.Drawing.Size(132, 22); + this.bcolor.Text = "Цвет фона"; + this.bcolor.DropDownItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.bcolor_DropDownItemClicked); + // + // skyblue + // + this.skyblue.Checked = true; + this.skyblue.CheckOnClick = true; + this.skyblue.CheckState = System.Windows.Forms.CheckState.Checked; + this.skyblue.Name = "skyblue"; + this.skyblue.Size = new System.Drawing.Size(173, 22); + this.skyblue.Text = "Небесно-голубой"; + // + // white + // + this.white.CheckOnClick = true; + this.white.Name = "white"; + this.white.Size = new System.Drawing.Size(173, 22); + this.white.Text = "Белый"; + // + // black + // + this.black.CheckOnClick = true; + this.black.Name = "black"; + this.black.Size = new System.Drawing.Size(173, 22); + this.black.Text = "Чёрный"; + // + // barv + // + this.barv.CheckOnClick = true; + this.barv.Name = "barv"; + this.barv.Size = new System.Drawing.Size(173, 22); + this.barv.Text = "Барвинок"; + // + // darkblue + // + this.darkblue.CheckOnClick = true; + this.darkblue.Name = "darkblue"; + this.darkblue.Size = new System.Drawing.Size(173, 22); + this.darkblue.Text = "Тёмно-синий"; + // + // help + // + this.help.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.rules, + this.aboutme}); + this.help.Name = "help"; + this.help.Size = new System.Drawing.Size(65, 20); + this.help.Text = "Справка"; + // + // rules + // + this.rules.Name = "rules"; + this.rules.Size = new System.Drawing.Size(180, 22); + this.rules.Text = "Правила"; + this.rules.Click += new System.EventHandler(this.rules_Click); + // + // aboutme + // + this.aboutme.Name = "aboutme"; + this.aboutme.Size = new System.Drawing.Size(180, 22); + this.aboutme.Text = "Об авторе"; + this.aboutme.Click += new System.EventHandler(this.aboutme_Click); + // + // res + // + this.res.Enabled = false; + this.res.Font = new System.Drawing.Font("Impact", 15.75F); + this.res.Location = new System.Drawing.Point(336, 405); + this.res.Name = "res"; + this.res.Size = new System.Drawing.Size(97, 33); + this.res.TabIndex = 60; + this.res.Text = "Сдаться"; + this.res.UseVisualStyleBackColor = true; + this.res.Visible = false; + this.res.Click += new System.EventHandler(this.res_Click); + // + // form + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.DeepSkyBlue; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Controls.Add(this.res); + this.Controls.Add(this.status); + this.Controls.Add(this.lshot); + this.Controls.Add(this.lscore); + this.Controls.Add(this.pole2); + this.Controls.Add(this.pole1); + this.Controls.Add(this.start); + this.Controls.Add(this.menu); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MainMenuStrip = this.menu; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "form"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Морской бой"; + this.Load += new System.EventHandler(this.Form1_Load); + this.menu.ResumeLayout(false); + this.menu.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private System.Windows.Forms.Button start; + private System.Windows.Forms.Panel pole1; + private System.Windows.Forms.Panel pole2; + private System.Windows.Forms.Label lscore; + private System.Windows.Forms.Label lshot; + private System.Windows.Forms.Label status; + private System.Windows.Forms.MenuStrip menu; + private System.Windows.Forms.ToolStripMenuItem settings; + private System.Windows.Forms.ToolStripMenuItem sound; + private System.Windows.Forms.ToolStripMenuItem help; + private System.Windows.Forms.ToolStripMenuItem bcolor; + private System.Windows.Forms.ToolStripMenuItem skyblue; + private System.Windows.Forms.ToolStripMenuItem white; + private System.Windows.Forms.ToolStripMenuItem black; + private System.Windows.Forms.ToolStripMenuItem barv; + private System.Windows.Forms.ToolStripMenuItem darkblue; + private System.Windows.Forms.ToolStripMenuItem rules; + private System.Windows.Forms.ToolStripMenuItem aboutme; + private System.Windows.Forms.Button res; + } +} + diff --git a/Form1.cs b/Form1.cs new file mode 100644 index 0000000..d071fc4 --- /dev/null +++ b/Form1.cs @@ -0,0 +1,373 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.Media; + +namespace Project +{ + public partial class form : Form + { + public form() + { + InitializeComponent(); + } + int s, score, scorev, shot, kln, q; + int sd = 1; + Random myRnd = new Random(); + SoundPlayer popal = new SoundPlayer(Properties.Resources.explosion); + SoundPlayer promah = new SoundPlayer(Properties.Resources.mimo); + //объявляю все переменные + private void Form1_Load(object sender, EventArgs e) + { + pole2.Enabled = false; + } + private void klv_Click(object sender, EventArgs e) + { + PictureBox klv = (PictureBox)sender; + //проверка на то куда мы стреляем + if (klv.BackgroundImage == null) + { + status.Text = "Идёт игра"; + shot++; + lshot.Text = "Выстрелов: " + Convert.ToInt32(shot); + //если в ячейке был корабль то засчитывается очко и он становится подбитым + if (Convert.ToInt32(klv.Tag) == 2) + { + klv.BackgroundImage = Properties.Resources.popadanie; + score++; + klv.Tag = 3; + //воспроизведение звука если он включен + if (sd == 1) + { + popal.Play(); + } + } + //если корабля не было то появляется крестик + else + { + klv.BackgroundImage = Properties.Resources.krest; + //воспроизведение звука + if (sd==1) + { + promah.Play(); + } + } + //если мы достигаем 10 очков то игра завершается + if (score == 10) + { + pole2.Enabled = false; + start.Enabled = true; + status.Text = "Игра окончена! Вы победили!\nНажмите кнопку 'Старт' для повторной игры"; + } + else + { + //компьютер выбирает новую ячейку отличную от предыдущих + do + { + kln = myRnd.Next(0, 99); + } + while (Convert.ToInt32(pole1.Controls[kln].Tag) == 3 || Convert.ToInt32(pole1.Controls[kln].Tag) == 1); + //если там был корабль то он становится подбитым и дается очко компьютеру + if (Convert.ToInt32(pole1.Controls[kln].Tag) == 2) + { + pole1.Controls[kln].BackgroundImage = Properties.Resources.popadanie; + pole1.Controls[kln].Tag = 3; + scorev++; + } + //если там ничего не было то ставится крестик + if (Convert.ToInt32(pole1.Controls[kln].Tag) == 0) + { + pole1.Controls[kln].BackgroundImage = Properties.Resources.krest; + pole1.Controls[kln].Tag = 1; + } + //если компьютер достигает 10 очков то игра завершается + if (scorev == 10) + { + L(); + res.Visible = false; + res.Enabled = false; + start.Enabled = true; + start.Visible = true; + } + } + } + //объявление счета + lscore.Text = "Счет: " + Convert.ToInt32(scorev) + ":" + Convert.ToInt32(score); + } + private void kl_Click(object sender, EventArgs e) + { + PictureBox kl = (PictureBox)sender; + s++; + //если количество поставленных конраблей 10 то игра начинается + if (s == 10) + { + status.Text = "Игра началась! Уничтожьте все корабли противника"; + pole1.Enabled = false; + pole2.Enabled = true; + res.Visible = true; + res.Enabled = true; + lshot.Text = "Выстрелов: " + Convert.ToInt32(shot); + lscore.Text = "Счет: " + Convert.ToInt32(scorev) + ":" + Convert.ToInt32(score); + } + kl.BackgroundImage = Properties.Resources.ship; + kl.Tag = 2; + kl.Enabled = false; + } + + private void start_Click(object sender, EventArgs e) + { + //обнуление всех переменных и подготовка к началу новой игры + start.Enabled = false; + start.Visible = false; + status.Text = "Расставьте 10 кораблей по вашему полю"; + lscore.Text = null; + lshot.Text = null; + pole1.Enabled = true; + int p, k, i, x, y, t; + t = 0; + x = 0; + y = 0; + p = 1; + Random myRnd1 = new Random(); + List shipv = new List(); + shipv.Clear(); + pole1.Controls.Clear(); + pole2.Controls.Clear(); + s = 0; + score = 0; + scorev = 0; + shot = 0; + kln = 0; + //компьютер выбирает 10 не повторяющихся ячеек для кораблей + for (i = 1; i < 11; i++) + { + do + { + t = myRnd1.Next(1, 100); + } + while (shipv.Contains(t) == true); + shipv.Add(t); + } + for (k = 0; k < 10; k++) + { + //создание ячеек нашего поля + for (i = 1; i < 11; i++) + { + PictureBox kl = new PictureBox(); + kl.Click += new System.EventHandler(this.kl_Click); + kl.MouseEnter += new System.EventHandler(this.kl_MouseEnter); + kl.MouseLeave += new System.EventHandler(this.kl_MouseLeave); + kl.SizeMode = PictureBoxSizeMode.StretchImage; + kl.BackColor = Color.FromArgb(127, 199, 255); + kl.Width = 30; + kl.Height = 30; + kl.Location = new Point(x, y); + kl.BorderStyle = BorderStyle.FixedSingle; + pole1.Controls.Add(kl); + kl.Name = "kl" + p; + x += 30; + p++; + } + y += 30; + x = 0; + } + y = 0; + p = 1; + for (k = 0; k < 10; k++) + { + //создание ячеек поля врага + for (i = 1; i < 11; i++) + { + PictureBox klv = new PictureBox(); + klv.Click += new System.EventHandler(this.klv_Click); + klv.MouseEnter += new System.EventHandler(this.klv_MouseEnter); + klv.MouseLeave += new System.EventHandler(this.klv_MouseLeave); + //если номер который выбрал компьютер совпадает с номером ячейки то в этой ячейке появится корабль + if (shipv.ElementAt(0) == p || shipv.ElementAt(1) == p || shipv.ElementAt(2) == p || shipv.ElementAt(3) == p || shipv.ElementAt(4) == p || shipv.ElementAt(5) == p || shipv.ElementAt(6) == p || shipv.ElementAt(7) == p || shipv.ElementAt(8) == p || shipv.ElementAt(9) == p) + { + klv.Tag = 2; + } + klv.SizeMode = PictureBoxSizeMode.StretchImage; + klv.BackColor = Color.FromArgb(127, 199, 255); + klv.Width = 30; + klv.Height = 30; + klv.Location = new Point(x, y); + klv.BorderStyle = BorderStyle.FixedSingle; + pole2.Controls.Add(klv); + klv.Name = "klv" + p; + x += 30; + p++; + } + y += 30; + x = 0; + } + y = 0; + p = 1; + start.Enabled = false; + } + private void kl_MouseEnter(object sender, EventArgs e) + { + PictureBox kl = (PictureBox)sender; + //при ведении мышки над вашим полем появляется корабль с уменьшенной прозрачностью + if (s != 10) + { + kl.BackgroundImage = Properties.Resources.ship2; + } + } + + private void res_Click(object sender, EventArgs e) + { + if (MessageBox.Show("Вы уверены, что хотите сдаться?", "Сдаться", MessageBoxButtons.YesNo) == DialogResult.Yes) + { + //завершение игры и показ всех кораблей противника + L(); + for (q = 0; q < 100; q++) + { + if (Convert.ToInt32(pole1.Controls[q].Tag) == 2) + { + pole1.Controls[q].BackgroundImage = Properties.Resources.popadanie; + } + } + //воспроизведение звук + if (sd == 1) + { + popal.Play(); + } + res.Visible = false; + res.Enabled = false; + start.Enabled = true; + start.Visible = true; + } + } + + private void kl_MouseLeave(object sender, EventArgs e) + { + PictureBox kl = (PictureBox)sender; + //когда мышь покидает ячейку то полупрозрачный корабль исчезает + if (Convert.ToInt32(kl.Tag) != 2) + { + kl.BackgroundImage = null; + } + } + + private void rules_Click(object sender, EventArgs e) + { + //перенос на форму с правилами + fhelp myFrm = new fhelp(); + myFrm.Show(); + this.Hide(); + } + + private void aboutme_Click(object sender, EventArgs e) + { + //перенос на форму с информацией об авторе + fme myFrm3 = new fme(); + this.Hide(); + myFrm3.Show(); + } + + private void klv_MouseEnter(object sender, EventArgs e) + { + //появление прицела при наведении на поле противника + PictureBox klv = (PictureBox)sender; + klv.Image = Properties.Resources.aim; + } + private void klv_MouseLeave(object sender, EventArgs e) + { + //удаление прицела из ячейки + PictureBox klv = (PictureBox)sender; + klv.Image = null; + } + private void sound_CheckedChange(object sender, EventArgs e) + { + //включение и выключение звука + if (sound.Checked==true) + { + sd = 1; + } + else + { + sd = 0; + } + } + private void bcolor_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + //смена цвета фона и цвета шрифта + if (skyblue.Selected) + { + black.Checked = false; + white.Checked = false; + barv.Checked = false; + darkblue.Checked = false; + this.BackColor = Color.FromArgb(0, 191, 255); + lshot.ForeColor = Color.FromArgb(0, 0, 128); + status.ForeColor = Color.FromArgb(0, 0, 128); + lscore.ForeColor = Color.FromArgb(0, 0, 128); + } + if (black.Selected) + { + skyblue.Checked = false; + white.Checked = false; + barv.Checked = false; + darkblue.Checked = false; + this.BackColor = Color.FromArgb(0, 0, 0); + lshot.ForeColor = Color.FromArgb(255, 255, 255); + status.ForeColor = Color.FromArgb(255, 255, 255); + lscore.ForeColor = Color.FromArgb(255, 255, 255); + } + if (white.Selected) + { + black.Checked = false; + skyblue.Checked = false; + barv.Checked = false; + darkblue.Checked = false; + this.BackColor = Color.FromArgb(255, 255, 255); + lshot.ForeColor = Color.FromArgb(0, 0, 0); + status.ForeColor = Color.FromArgb(0, 0, 0); + lscore.ForeColor = Color.FromArgb(0, 0, 0); + } + if (barv.Selected) + { + black.Checked = false; + white.Checked = false; + skyblue.Checked = false; + darkblue.Checked = false; + this.BackColor = Color.FromArgb(204, 204, 255); + lshot.ForeColor = Color.FromArgb(93, 118, 203); + status.ForeColor = Color.FromArgb(93, 118, 203); + lscore.ForeColor = Color.FromArgb(93, 118, 203); + } + if (darkblue.Selected) + { + black.Checked = false; + white.Checked = false; + barv.Checked = false; + skyblue.Checked = false; + this.BackColor = Color.FromArgb(0, 0, 128); + lshot.ForeColor = Color.FromArgb(0, 191, 255); + status.ForeColor = Color.FromArgb(0, 191, 255); + lscore.ForeColor = Color.FromArgb(0, 191, 255); + } + } + private void L() + { + //кусочек повторяющегося кода записанный в виде метода + for (q = 0; q < 100; q++) + { + if (Convert.ToInt32(pole2.Controls[q].Tag) == 2) + { + pole2.Controls[q].BackgroundImage = Properties.Resources.ship; + } + } + pole2.Enabled = false; + start.Enabled = true; + status.Text = "Игра окончена! Победил компьютер...\nНажмите кнопку 'Старт' для повторной игры"; + } + } +} diff --git a/Form1.resx b/Form1.resx new file mode 100644 index 0000000..44f6404 --- /dev/null +++ b/Form1.resx @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + True + + + + + AAABAAIAICAQAAAAAADoAgAAJgAAABAQEAAAAAAAKAEAAA4DAAAoAAAAIAAAAEAAAAABAAQAAAAAAIAC + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAgAAAAICAAIAAAACAAIAAgIAAAICAgADAwMAAAAD/AAD/ + AAAA//8A/wAAAP8A/wD//wAA////AAAREREREREREREREREREQABEREREREREREREREREREQERERERER + ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERER/x//H/8f/x/xERERERER + H////////////xERERERER/////////////xEREREREf/////////////xERERERERERERERERERERER + ERERH//////////x//////ERER//////////8f/////xERER//////////H/////ERERER/////////x + /////xERERER////////8f////ERERERER////////H////xERERERER///////x////EREREREREf// + ////8f///xEREREREREf//////H///EREREREREREf/////x//8REREREREREREf////8f//ERERERER + EREREf////H/8REREREREREREREf///x//ERERERERERERERH///8f8RERERERERERERERH///H/ERER + ERERERERERERH//x8RERERERERERERERERH/8RERERERERERERERERERH/ERERERERERERERERERERHx + EREREREREREREREREREREREREREREQERERERERERERERERERERAAEREREREREREREREREREAwAAAA4AA + AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAcAA + AAMoAAAAEAAAACAAAAABAAQAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAgAAAAICAAIAA + AACAAIAAgIAAAICAgADAwMAAAAD/AAD/AAAA//8A/wAAAP8A/wD//wAA////AAEREREREREQERERERER + EREREf////EREREf/////xEREREREREREREf////8f//ERH////x//ERER////H/8REREf//8f8RERER + H//x/xERERER//HxEREREREf8fERERERERHxEREREREREREREREREREREREREQEREREREREQgAEAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAEAAA== + + + \ No newline at end of file diff --git a/Form2.Designer.cs b/Form2.Designer.cs new file mode 100644 index 0000000..4bb97e5 --- /dev/null +++ b/Form2.Designer.cs @@ -0,0 +1,188 @@ +namespace Project +{ + partial class fhelp + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fhelp)); + this.phelp = new System.Windows.Forms.PictureBox(); + this.lhelp = new System.Windows.Forms.Label(); + this.back = new System.Windows.Forms.Button(); + this.next = new System.Windows.Forms.Button(); + this.elhelp = new System.Windows.Forms.Label(); + this.yhelp = new System.Windows.Forms.Label(); + this.hl1 = new System.Windows.Forms.Label(); + this.hl2 = new System.Windows.Forms.Label(); + this.hl3 = new System.Windows.Forms.Label(); + ((System.ComponentModel.ISupportInitialize)(this.phelp)).BeginInit(); + this.SuspendLayout(); + // + // phelp + // + this.phelp.Image = global::Project.Properties.Resources.help1; + this.phelp.Location = new System.Drawing.Point(55, 159); + this.phelp.Name = "phelp"; + this.phelp.Size = new System.Drawing.Size(700, 333); + this.phelp.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.phelp.TabIndex = 0; + this.phelp.TabStop = false; + // + // lhelp + // + this.lhelp.AutoSize = true; + this.lhelp.Font = new System.Drawing.Font("Impact", 15.75F); + this.lhelp.ForeColor = System.Drawing.Color.Navy; + this.lhelp.Location = new System.Drawing.Point(114, 48); + this.lhelp.Name = "lhelp"; + this.lhelp.Size = new System.Drawing.Size(526, 78); + this.lhelp.TabIndex = 1; + this.lhelp.Text = "Сразу же после начала игры вам требуется расставить\r\nкорабли на вашем поле. Делае" + + "тся это нажатием левой\r\nкнопки мыши по ячейке вашего поля\r\n"; + this.lhelp.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // back + // + this.back.Font = new System.Drawing.Font("Impact", 15.75F); + this.back.Location = new System.Drawing.Point(12, 563); + this.back.Name = "back"; + this.back.Size = new System.Drawing.Size(79, 36); + this.back.TabIndex = 2; + this.back.Text = "Назад"; + this.back.UseVisualStyleBackColor = true; + this.back.Click += new System.EventHandler(this.back_Click); + // + // next + // + this.next.Font = new System.Drawing.Font("Impact", 15.75F); + this.next.Location = new System.Drawing.Point(350, 541); + this.next.Name = "next"; + this.next.Size = new System.Drawing.Size(124, 58); + this.next.TabIndex = 3; + this.next.Text = "Далее"; + this.next.UseVisualStyleBackColor = true; + this.next.Click += new System.EventHandler(this.next_Click); + // + // elhelp + // + this.elhelp.AutoSize = true; + this.elhelp.Font = new System.Drawing.Font("Impact", 15.75F); + this.elhelp.ForeColor = System.Drawing.Color.Navy; + this.elhelp.Location = new System.Drawing.Point(153, 507); + this.elhelp.Name = "elhelp"; + this.elhelp.Size = new System.Drawing.Size(172, 26); + this.elhelp.TabIndex = 4; + this.elhelp.Text = "Поле противника"; + this.elhelp.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // yhelp + // + this.yhelp.AutoSize = true; + this.yhelp.Font = new System.Drawing.Font("Impact", 15.75F); + this.yhelp.ForeColor = System.Drawing.Color.Navy; + this.yhelp.Location = new System.Drawing.Point(528, 507); + this.yhelp.Name = "yhelp"; + this.yhelp.Size = new System.Drawing.Size(112, 26); + this.yhelp.TabIndex = 5; + this.yhelp.Text = "Ваше поле"; + // + // hl1 + // + this.hl1.AutoSize = true; + this.hl1.BackColor = System.Drawing.Color.DeepSkyBlue; + this.hl1.Font = new System.Drawing.Font("Impact", 28F); + this.hl1.ForeColor = System.Drawing.Color.Navy; + this.hl1.Location = new System.Drawing.Point(481, 195); + this.hl1.Name = "hl1"; + this.hl1.Size = new System.Drawing.Size(159, 46); + this.hl1.TabIndex = 6; + this.hl1.Text = "Корабль"; + this.hl1.Visible = false; + // + // hl2 + // + this.hl2.AutoSize = true; + this.hl2.Font = new System.Drawing.Font("Impact", 28F); + this.hl2.ForeColor = System.Drawing.Color.Navy; + this.hl2.Location = new System.Drawing.Point(481, 295); + this.hl2.Name = "hl2"; + this.hl2.Size = new System.Drawing.Size(141, 46); + this.hl2.TabIndex = 7; + this.hl2.Text = "Промах"; + this.hl2.Visible = false; + // + // hl3 + // + this.hl3.AutoSize = true; + this.hl3.BackColor = System.Drawing.Color.DeepSkyBlue; + this.hl3.Font = new System.Drawing.Font("Impact", 28F); + this.hl3.ForeColor = System.Drawing.Color.Navy; + this.hl3.Location = new System.Drawing.Point(481, 405); + this.hl3.Name = "hl3"; + this.hl3.Size = new System.Drawing.Size(202, 46); + this.hl3.TabIndex = 8; + this.hl3.Text = "Попадание"; + this.hl3.Visible = false; + // + // fhelp + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.DeepSkyBlue; + this.ClientSize = new System.Drawing.Size(828, 611); + this.Controls.Add(this.hl3); + this.Controls.Add(this.hl2); + this.Controls.Add(this.hl1); + this.Controls.Add(this.yhelp); + this.Controls.Add(this.elhelp); + this.Controls.Add(this.next); + this.Controls.Add(this.back); + this.Controls.Add(this.lhelp); + this.Controls.Add(this.phelp); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "fhelp"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Правила"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.fhelp_FormClosing); + ((System.ComponentModel.ISupportInitialize)(this.phelp)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.PictureBox phelp; + private System.Windows.Forms.Label lhelp; + private System.Windows.Forms.Button back; + private System.Windows.Forms.Button next; + private System.Windows.Forms.Label elhelp; + private System.Windows.Forms.Label yhelp; + private System.Windows.Forms.Label hl1; + private System.Windows.Forms.Label hl2; + private System.Windows.Forms.Label hl3; + } +} \ No newline at end of file diff --git a/Form2.cs b/Form2.cs new file mode 100644 index 0000000..687b673 --- /dev/null +++ b/Form2.cs @@ -0,0 +1,64 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Project +{ + public partial class fhelp : Form + { + public fhelp() + { + InitializeComponent(); + } + int i = 0; + private void back_Click(object sender, EventArgs e) + { + //закрытие формы с правилами и возвращение на первоначальную форму + form myFrm2 = new form(); + myFrm2.Show(); + this.Hide(); + } + + private void next_Click(object sender, EventArgs e) + { + //смена событий при нажатии на кнопку после определенного кол-во нажатий + if (i == 0) + { + phelp.Image = Properties.Resources.help2; + lhelp.Text = "Компьютер случайным образом расставляет корабли по своему полю\nЦель игры: уничтожить все корабли противника\nНажатием левой кнопки мыши вы можете подбить вражеский корабль"; + } + if (i == 1) + { + phelp.Image = Properties.Resources.help3; + lhelp.Text = "Корабль обозначается небольшой желто-оранжевой точкой на поле\rВ случае промаха на месте клика появится красный крестик\rВ случае попадания по кораблю появится красная звездочка\rПобеждает тот, кто первее уничтожит все вражеские корабли"; + next.Text = "Назад"; + back.Visible = false; + back.Enabled = false; + elhelp.Text = null; + yhelp.Text = null; + hl1.Visible = true; + hl2.Visible = true; + hl3.Visible = true; + } + if (i == 2) + { + //закрытие формы с правилами и возвращение на первоначальную форму + form myFrm2 = new form(); + this.Close(); + myFrm2.Show(); + } + i++; + } + + private void fhelp_FormClosing(object sender, FormClosingEventArgs e) + { + Application.Exit(); + } + } +} diff --git a/Form2.resx b/Form2.resx new file mode 100644 index 0000000..5dff937 --- /dev/null +++ b/Form2.resx @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAIAICAQAAAAAADoAgAAJgAAABAQEAAAAAAAKAEAAA4DAAAoAAAAIAAAAEAAAAABAAQAAAAAAIAC + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAgAAAAICAAIAAAACAAIAAgIAAAICAgADAwMAAAAD/AAD/ + AAAA//8A/wAAAP8A/wD//wAA////AAAREREREREREREREREREQABEREREREREREREREREREQERERERER + ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERER/x//H/8f/x/xERERERER + H////////////xERERERER/////////////xEREREREf/////////////xERERERERERERERERERERER + ERERH//////////x//////ERER//////////8f/////xERER//////////H/////ERERER/////////x + /////xERERER////////8f////ERERERER////////H////xERERERER///////x////EREREREREf// + ////8f///xEREREREREf//////H///EREREREREREf/////x//8REREREREREREf////8f//ERERERER + EREREf////H/8REREREREREREREf///x//ERERERERERERERH///8f8RERERERERERERERH///H/ERER + ERERERERERERH//x8RERERERERERERERERH/8RERERERERERERERERERH/ERERERERERERERERERERHx + EREREREREREREREREREREREREREREQERERERERERERERERERERAAEREREREREREREREREREAwAAAA4AA + AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAcAA + AAMoAAAAEAAAACAAAAABAAQAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAgAAAAICAAIAA + AACAAIAAgIAAAICAgADAwMAAAAD/AAD/AAAA//8A/wAAAP8A/wD//wAA////AAEREREREREQERERERER + EREREf////EREREf/////xEREREREREREREf////8f//ERH////x//ERER////H/8REREf//8f8RERER + H//x/xERERER//HxEREREREf8fERERERERHxEREREREREREREREREREREREREQEREREREREQgAEAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAEAAA== + + + \ No newline at end of file diff --git a/Form3.Designer.cs b/Form3.Designer.cs new file mode 100644 index 0000000..b38377b --- /dev/null +++ b/Form3.Designer.cs @@ -0,0 +1,82 @@ +namespace Project +{ + partial class fme + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fme)); + this.about = new System.Windows.Forms.Label(); + this.backme = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // about + // + this.about.AutoSize = true; + this.about.Font = new System.Drawing.Font("Impact", 16F); + this.about.ForeColor = System.Drawing.Color.Navy; + this.about.Location = new System.Drawing.Point(23, 9); + this.about.Name = "about"; + this.about.Size = new System.Drawing.Size(305, 189); + this.about.TabIndex = 0; + this.about.Text = "Код программы \"Морской бой\"\r\nнаписал ученик k0224 группы\r\nКапралов Егор\r\n\r\nПрогра" + + "мма написана для\r\nзащиты моего проекта\r\nпо программированию на C#\r\n"; + this.about.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // backme + // + this.backme.Font = new System.Drawing.Font("Impact", 16F); + this.backme.Location = new System.Drawing.Point(128, 209); + this.backme.Name = "backme"; + this.backme.Size = new System.Drawing.Size(88, 37); + this.backme.TabIndex = 1; + this.backme.Text = "Назад"; + this.backme.UseVisualStyleBackColor = true; + this.backme.Click += new System.EventHandler(this.backme_Click); + // + // fme + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.DeepSkyBlue; + this.ClientSize = new System.Drawing.Size(350, 258); + this.Controls.Add(this.backme); + this.Controls.Add(this.about); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "fme"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Об авторе"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label about; + private System.Windows.Forms.Button backme; + } +} \ No newline at end of file diff --git a/Form3.cs b/Form3.cs new file mode 100644 index 0000000..ded5a74 --- /dev/null +++ b/Form3.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Project +{ + public partial class fme : Form + { + public fme() + { + InitializeComponent(); + } + + private void backme_Click(object sender, EventArgs e) + { + //закрытие формы с информацией обо мне и возвращение к исходной форме + form myFrm2 = new form(); + this.Close(); + myFrm2.Show(); + } + } +} diff --git a/Form3.resx b/Form3.resx new file mode 100644 index 0000000..5dff937 --- /dev/null +++ b/Form3.resx @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAIAICAQAAAAAADoAgAAJgAAABAQEAAAAAAAKAEAAA4DAAAoAAAAIAAAAEAAAAABAAQAAAAAAIAC + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAgAAAAICAAIAAAACAAIAAgIAAAICAgADAwMAAAAD/AAD/ + AAAA//8A/wAAAP8A/wD//wAA////AAAREREREREREREREREREQABEREREREREREREREREREQERERERER + ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERER/x//H/8f/x/xERERERER + H////////////xERERERER/////////////xEREREREf/////////////xERERERERERERERERERERER + ERERH//////////x//////ERER//////////8f/////xERER//////////H/////ERERER/////////x + /////xERERER////////8f////ERERERER////////H////xERERERER///////x////EREREREREf// + ////8f///xEREREREREf//////H///EREREREREREf/////x//8REREREREREREf////8f//ERERERER + EREREf////H/8REREREREREREREf///x//ERERERERERERERH///8f8RERERERERERERERH///H/ERER + ERERERERERERH//x8RERERERERERERERERH/8RERERERERERERERERERH/ERERERERERERERERERERHx + EREREREREREREREREREREREREREREQERERERERERERERERERERAAEREREREREREREREREREAwAAAA4AA + AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAcAA + AAMoAAAAEAAAACAAAAABAAQAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAgAAAAICAAIAA + AACAAIAAgIAAAICAgADAwMAAAAD/AAD/AAAA//8A/wAAAP8A/wD//wAA////AAEREREREREQERERERER + EREREf////EREREf/////xEREREREREREREf////8f//ERH////x//ERER////H/8REREf//8f8RERER + H//x/xERERER//HxEREREREf8fERERERERHxEREREREREREREREREREREREREQEREREREREQgAEAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAEAAA== + + + \ No newline at end of file diff --git a/Program.cs b/Program.cs new file mode 100644 index 0000000..26d4946 --- /dev/null +++ b/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Project +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new form()); + } + } +} diff --git a/Project.csproj b/Project.csproj new file mode 100644 index 0000000..67552f2 --- /dev/null +++ b/Project.csproj @@ -0,0 +1,123 @@ + + + + + Debug + AnyCPU + {80FCFAF9-7265-4BE7-9FCA-4FDE2A8C3991} + WinExe + Project + Project + v4.6.1 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + Form + + + Form1.cs + + + Form + + + Form2.cs + + + Form + + + Form3.cs + + + + + Form1.cs + + + Form2.cs + + + Form3.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Project.sln b/Project.sln new file mode 100644 index 0000000..c07e8c4 --- /dev/null +++ b/Project.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27703.2047 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Project", "Project.csproj", "{80FCFAF9-7265-4BE7-9FCA-4FDE2A8C3991}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {80FCFAF9-7265-4BE7-9FCA-4FDE2A8C3991}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {80FCFAF9-7265-4BE7-9FCA-4FDE2A8C3991}.Debug|Any CPU.Build.0 = Debug|Any CPU + {80FCFAF9-7265-4BE7-9FCA-4FDE2A8C3991}.Release|Any CPU.ActiveCfg = Release|Any CPU + {80FCFAF9-7265-4BE7-9FCA-4FDE2A8C3991}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {4066F511-E9CB-4333-AFBF-A79A75960CB2} + EndGlobalSection +EndGlobal diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..a9c5d46 --- /dev/null +++ b/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Project")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Project")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("80fcfaf9-7265-4be7-9fca-4fde2a8c3991")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs new file mode 100644 index 0000000..6bf2997 --- /dev/null +++ b/Properties/Resources.Designer.cs @@ -0,0 +1,181 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace Project.Properties { + using System; + + + /// + /// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д. + /// + // Этот класс создан автоматически классом StronglyTypedResourceBuilder + // с помощью такого средства, как ResGen или Visual Studio. + // Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen + // с параметром /str или перестройте свой проект VS. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Project.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Перезаписывает свойство CurrentUICulture текущего потока для всех + /// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap aim { + get { + object obj = ResourceManager.GetObject("aim", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Icon, аналогичного (Значок). + /// + internal static System.Drawing.Icon BULLSEYE { + get { + object obj = ResourceManager.GetObject("BULLSEYE", resourceCulture); + return ((System.Drawing.Icon)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.IO.UnmanagedMemoryStream, аналогичного System.IO.MemoryStream. + /// + internal static System.IO.UnmanagedMemoryStream explosion { + get { + return ResourceManager.GetStream("explosion", resourceCulture); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap help1 { + get { + object obj = ResourceManager.GetObject("help1", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap help2 { + get { + object obj = ResourceManager.GetObject("help2", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap help3 { + get { + object obj = ResourceManager.GetObject("help3", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap krest { + get { + object obj = ResourceManager.GetObject("krest", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.IO.UnmanagedMemoryStream, аналогичного System.IO.MemoryStream. + /// + internal static System.IO.UnmanagedMemoryStream mimo { + get { + return ResourceManager.GetStream("mimo", resourceCulture); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Icon, аналогичного (Значок). + /// + internal static System.Drawing.Icon MISC32 { + get { + object obj = ResourceManager.GetObject("MISC32", resourceCulture); + return ((System.Drawing.Icon)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap popadanie { + get { + object obj = ResourceManager.GetObject("popadanie", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ship { + get { + object obj = ResourceManager.GetObject("ship", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ship2 { + get { + object obj = ResourceManager.GetObject("ship2", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/Properties/Resources.resx b/Properties/Resources.resx new file mode 100644 index 0000000..70ea111 --- /dev/null +++ b/Properties/Resources.resx @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + Resources\BULLSEYE.ICO;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\explosion.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Resources\krest.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\mimo.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Resources\MISC32.ICO;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\popadanie.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\ship.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\aim.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\50ship.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\help1.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\help2.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\help3.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/Properties/Resources/50ship.gif b/Properties/Resources/50ship.gif new file mode 100644 index 0000000..9c187e6 Binary files /dev/null and b/Properties/Resources/50ship.gif differ diff --git a/Properties/Resources/BULLSEYE.ICO b/Properties/Resources/BULLSEYE.ICO new file mode 100644 index 0000000..7c2d65c Binary files /dev/null and b/Properties/Resources/BULLSEYE.ICO differ diff --git a/Properties/Resources/MISC32.ICO b/Properties/Resources/MISC32.ICO new file mode 100644 index 0000000..0f26d3c Binary files /dev/null and b/Properties/Resources/MISC32.ICO differ diff --git a/Properties/Resources/aim.gif b/Properties/Resources/aim.gif new file mode 100644 index 0000000..66d2dee Binary files /dev/null and b/Properties/Resources/aim.gif differ diff --git a/Properties/Resources/explosion.wav b/Properties/Resources/explosion.wav new file mode 100644 index 0000000..4671470 Binary files /dev/null and b/Properties/Resources/explosion.wav differ diff --git a/Properties/Resources/help1.gif b/Properties/Resources/help1.gif new file mode 100644 index 0000000..a82bc9d Binary files /dev/null and b/Properties/Resources/help1.gif differ diff --git a/Properties/Resources/help2.gif b/Properties/Resources/help2.gif new file mode 100644 index 0000000..f8f5ce3 Binary files /dev/null and b/Properties/Resources/help2.gif differ diff --git a/Properties/Resources/help3.gif b/Properties/Resources/help3.gif new file mode 100644 index 0000000..c1232b2 Binary files /dev/null and b/Properties/Resources/help3.gif differ diff --git a/Properties/Resources/krest.gif b/Properties/Resources/krest.gif new file mode 100644 index 0000000..e77fc12 Binary files /dev/null and b/Properties/Resources/krest.gif differ diff --git a/Properties/Resources/mimo.wav b/Properties/Resources/mimo.wav new file mode 100644 index 0000000..d8538a7 Binary files /dev/null and b/Properties/Resources/mimo.wav differ diff --git a/Properties/Resources/popadanie.gif b/Properties/Resources/popadanie.gif new file mode 100644 index 0000000..e1bc410 Binary files /dev/null and b/Properties/Resources/popadanie.gif differ diff --git a/Properties/Resources/ship.gif b/Properties/Resources/ship.gif new file mode 100644 index 0000000..1f25d11 Binary files /dev/null and b/Properties/Resources/ship.gif differ diff --git a/Properties/Resources/ship2.gif b/Properties/Resources/ship2.gif new file mode 100644 index 0000000..a16eff6 Binary files /dev/null and b/Properties/Resources/ship2.gif differ diff --git a/Properties/Settings.Designer.cs b/Properties/Settings.Designer.cs new file mode 100644 index 0000000..e67d0a1 --- /dev/null +++ b/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Project.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Properties/Settings.settings b/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/bin/Debug/Project.exe b/bin/Debug/Project.exe new file mode 100644 index 0000000..4aee3ea Binary files /dev/null and b/bin/Debug/Project.exe differ diff --git a/bin/Debug/Project.exe.config b/bin/Debug/Project.exe.config new file mode 100644 index 0000000..731f6de --- /dev/null +++ b/bin/Debug/Project.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/bin/Debug/Project.pdb b/bin/Debug/Project.pdb new file mode 100644 index 0000000..d0b86f1 Binary files /dev/null and b/bin/Debug/Project.pdb differ diff --git a/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/obj/Debug/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..88b2adf Binary files /dev/null and b/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..2788d8b Binary files /dev/null and b/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/obj/Debug/Project.Properties.Resources.resources b/obj/Debug/Project.Properties.Resources.resources new file mode 100644 index 0000000..500b4a4 Binary files /dev/null and b/obj/Debug/Project.Properties.Resources.resources differ diff --git a/obj/Debug/Project.csproj.CoreCompileInputs.cache b/obj/Debug/Project.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..460b12d --- /dev/null +++ b/obj/Debug/Project.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +36905cf4e3297aac64731188c0690052702a5fe2 diff --git a/obj/Debug/Project.csproj.FileListAbsolute.txt b/obj/Debug/Project.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..e573848 --- /dev/null +++ b/obj/Debug/Project.csproj.FileListAbsolute.txt @@ -0,0 +1,22 @@ +Z:\C#_Itog\Морской бой_Капралов_k0224\Project\bin\Debug\Project.exe.config +Z:\C#_Itog\Морской бой_Капралов_k0224\Project\bin\Debug\Project.exe +Z:\C#_Itog\Морской бой_Капралов_k0224\Project\bin\Debug\Project.pdb +Z:\C#_Itog\Морской бой_Капралов_k0224\Project\obj\Debug\Project.csprojAssemblyReference.cache +Z:\C#_Itog\Морской бой_Капралов_k0224\Project\obj\Debug\Project.Properties.Resources.resources +Z:\C#_Itog\Морской бой_Капралов_k0224\Project\obj\Debug\Project.csproj.GenerateResource.cache +Z:\C#_Itog\Морской бой_Капралов_k0224\Project\obj\Debug\Project.csproj.CoreCompileInputs.cache +Z:\C#_Itog\Морской бой_Капралов_k0224\Project\obj\Debug\Project.exe +Z:\C#_Itog\Морской бой_Капралов_k0224\Project\obj\Debug\Project.pdb +Z:\C#_Itog\Морской бой_Капралов_k0224\Project\obj\Debug\Project.form.resources +C:\Users\Егор\Desktop\Project\bin\Debug\Project.exe.config +C:\Users\Егор\Desktop\Project\bin\Debug\Project.exe +C:\Users\Егор\Desktop\Project\bin\Debug\Project.pdb +C:\Users\Егор\Desktop\Project\obj\Debug\Project.csprojAssemblyReference.cache +C:\Users\Егор\Desktop\Project\obj\Debug\Project.form.resources +C:\Users\Егор\Desktop\Project\obj\Debug\Project.Properties.Resources.resources +C:\Users\Егор\Desktop\Project\obj\Debug\Project.csproj.GenerateResource.cache +C:\Users\Егор\Desktop\Project\obj\Debug\Project.csproj.CoreCompileInputs.cache +C:\Users\Егор\Desktop\Project\obj\Debug\Project.exe +C:\Users\Егор\Desktop\Project\obj\Debug\Project.pdb +C:\Users\Егор\Desktop\Project\obj\Debug\Project.fhelp.resources +C:\Users\Егор\Desktop\Project\obj\Debug\Project.fme.resources diff --git a/obj/Debug/Project.csproj.GenerateResource.cache b/obj/Debug/Project.csproj.GenerateResource.cache new file mode 100644 index 0000000..74aefed Binary files /dev/null and b/obj/Debug/Project.csproj.GenerateResource.cache differ diff --git a/obj/Debug/Project.csprojAssemblyReference.cache b/obj/Debug/Project.csprojAssemblyReference.cache new file mode 100644 index 0000000..bc78443 Binary files /dev/null and b/obj/Debug/Project.csprojAssemblyReference.cache differ diff --git a/obj/Debug/Project.exe b/obj/Debug/Project.exe new file mode 100644 index 0000000..4aee3ea Binary files /dev/null and b/obj/Debug/Project.exe differ diff --git a/obj/Debug/Project.fhelp.resources b/obj/Debug/Project.fhelp.resources new file mode 100644 index 0000000..6d723f6 Binary files /dev/null and b/obj/Debug/Project.fhelp.resources differ diff --git a/obj/Debug/Project.fme.resources b/obj/Debug/Project.fme.resources new file mode 100644 index 0000000..6d723f6 Binary files /dev/null and b/obj/Debug/Project.fme.resources differ diff --git a/obj/Debug/Project.form.resources b/obj/Debug/Project.form.resources new file mode 100644 index 0000000..6d723f6 Binary files /dev/null and b/obj/Debug/Project.form.resources differ diff --git a/obj/Debug/Project.pdb b/obj/Debug/Project.pdb new file mode 100644 index 0000000..d0b86f1 Binary files /dev/null and b/obj/Debug/Project.pdb differ diff --git a/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll b/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll new file mode 100644 index 0000000..7a2ec3f Binary files /dev/null and b/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll differ diff --git a/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29