diff --git a/Catamaran/Catamaran.csproj b/Catamaran/Catamaran.csproj index 2fdf47c..76631a9 100644 --- a/Catamaran/Catamaran.csproj +++ b/Catamaran/Catamaran.csproj @@ -46,14 +46,20 @@ - + + + + Form - - Form1.cs + + CatamaranForm.cs + + CatamaranForm.cs + ResXFileCodeGenerator Resources.Designer.cs @@ -62,6 +68,7 @@ True Resources.resx + True SettingsSingleFileGenerator @@ -76,5 +83,17 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/Catamaran/CatamaranForm.Designer.cs b/Catamaran/CatamaranForm.Designer.cs new file mode 100644 index 0000000..70467ce --- /dev/null +++ b/Catamaran/CatamaranForm.Designer.cs @@ -0,0 +1,184 @@ +namespace Catamaran +{ + partial class CatamaranForm + { + /// + /// Обязательная переменная конструктора. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Освободить все используемые ресурсы. + /// + /// истинно, если управляемый ресурс должен быть удален; иначе ложно. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Код, автоматически созданный конструктором форм Windows + + /// + /// Требуемый метод для поддержки конструктора — не изменяйте + /// содержимое этого метода с помощью редактора кода. + /// + private void InitializeComponent() + { + this.statusStrip1 = new System.Windows.Forms.StatusStrip(); + this.toolStripStatusLabelSpeed = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabelWeight = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabelColor = new System.Windows.Forms.ToolStripStatusLabel(); + this.pictureBoxCatamaran = new System.Windows.Forms.PictureBox(); + this.buttonUp = new System.Windows.Forms.Button(); + this.buttonDown = new System.Windows.Forms.Button(); + this.buttonLeft = new System.Windows.Forms.Button(); + this.buttonRight = new System.Windows.Forms.Button(); + this.buttonCreate = new System.Windows.Forms.Button(); + this.statusStrip1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxCatamaran)).BeginInit(); + this.SuspendLayout(); + // + // statusStrip1 + // + this.statusStrip1.ImageScalingSize = new System.Drawing.Size(24, 24); + this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripStatusLabelSpeed, + this.toolStripStatusLabelWeight, + this.toolStripStatusLabelColor}); + this.statusStrip1.Location = new System.Drawing.Point(0, 429); + this.statusStrip1.Name = "statusStrip1"; + this.statusStrip1.Size = new System.Drawing.Size(796, 32); + this.statusStrip1.TabIndex = 0; + this.statusStrip1.Text = "statusStrip1"; + // + // toolStripStatusLabelSpeed + // + this.toolStripStatusLabelSpeed.Name = "toolStripStatusLabelSpeed"; + this.toolStripStatusLabelSpeed.Size = new System.Drawing.Size(62, 25); + this.toolStripStatusLabelSpeed.Text = "Speed"; + // + // toolStripStatusLabelWeight + // + this.toolStripStatusLabelWeight.Name = "toolStripStatusLabelWeight"; + this.toolStripStatusLabelWeight.Size = new System.Drawing.Size(68, 25); + this.toolStripStatusLabelWeight.Text = "Weight"; + // + // toolStripStatusLabelColor + // + this.toolStripStatusLabelColor.Name = "toolStripStatusLabelColor"; + this.toolStripStatusLabelColor.Size = new System.Drawing.Size(55, 25); + this.toolStripStatusLabelColor.Text = "Color"; + this.toolStripStatusLabelColor.Click += new System.EventHandler(this.toolStripStatusLabel3_Click); + // + // pictureBoxCatamaran + // + this.pictureBoxCatamaran.Dock = System.Windows.Forms.DockStyle.Fill; + this.pictureBoxCatamaran.Location = new System.Drawing.Point(0, 0); + this.pictureBoxCatamaran.Name = "pictureBoxCatamaran"; + this.pictureBoxCatamaran.Size = new System.Drawing.Size(796, 429); + this.pictureBoxCatamaran.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; + this.pictureBoxCatamaran.TabIndex = 1; + this.pictureBoxCatamaran.TabStop = false; + this.pictureBoxCatamaran.Resize += new System.EventHandler(this.PictureBoxCatamaran_Resize); + // + // buttonUp + // + this.buttonUp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonUp.BackgroundImage = global::Catamaran.Properties.Resources.Up; + this.buttonUp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.buttonUp.Location = new System.Drawing.Point(683, 344); + this.buttonUp.Name = "buttonUp"; + this.buttonUp.Size = new System.Drawing.Size(30, 30); + this.buttonUp.TabIndex = 2; + this.buttonUp.UseVisualStyleBackColor = true; + this.buttonUp.Click += new System.EventHandler(this.buttonMove_Click); + // + // buttonDown + // + this.buttonDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonDown.BackgroundImage = global::Catamaran.Properties.Resources.Down; + this.buttonDown.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.buttonDown.Location = new System.Drawing.Point(683, 380); + this.buttonDown.Name = "buttonDown"; + this.buttonDown.Size = new System.Drawing.Size(30, 30); + this.buttonDown.TabIndex = 3; + this.buttonDown.UseVisualStyleBackColor = true; + this.buttonDown.Click += new System.EventHandler(this.buttonMove_Click); + // + // buttonLeft + // + this.buttonLeft.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonLeft.BackgroundImage = global::Catamaran.Properties.Resources.Left; + this.buttonLeft.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.buttonLeft.Location = new System.Drawing.Point(647, 372); + this.buttonLeft.Name = "buttonLeft"; + this.buttonLeft.Size = new System.Drawing.Size(30, 30); + this.buttonLeft.TabIndex = 4; + this.buttonLeft.UseVisualStyleBackColor = true; + this.buttonLeft.Click += new System.EventHandler(this.buttonMove_Click); + // + // buttonRight + // + this.buttonRight.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonRight.BackgroundImage = global::Catamaran.Properties.Resources.Right; + this.buttonRight.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.buttonRight.Location = new System.Drawing.Point(719, 372); + this.buttonRight.Name = "buttonRight"; + this.buttonRight.Size = new System.Drawing.Size(30, 30); + this.buttonRight.TabIndex = 5; + this.buttonRight.UseVisualStyleBackColor = true; + this.buttonRight.Click += new System.EventHandler(this.buttonMove_Click); + // + // buttonCreate + // + this.buttonCreate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.buttonCreate.Location = new System.Drawing.Point(14, 380); + this.buttonCreate.Name = "buttonCreate"; + this.buttonCreate.Size = new System.Drawing.Size(70, 30); + this.buttonCreate.TabIndex = 6; + this.buttonCreate.Text = "Cteate"; + this.buttonCreate.UseVisualStyleBackColor = true; + this.buttonCreate.Click += new System.EventHandler(this.buttonCreate_Click); + // + // CatamaranForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(796, 461); + this.Controls.Add(this.buttonCreate); + this.Controls.Add(this.buttonRight); + this.Controls.Add(this.buttonLeft); + this.Controls.Add(this.buttonDown); + this.Controls.Add(this.buttonUp); + this.Controls.Add(this.pictureBoxCatamaran); + this.Controls.Add(this.statusStrip1); + this.Name = "CatamaranForm"; + this.Text = "Catamaran"; + this.Load += new System.EventHandler(this.CatamaranForm_Load); + this.statusStrip1.ResumeLayout(false); + this.statusStrip1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxCatamaran)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.StatusStrip statusStrip1; + private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabelSpeed; + private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabelWeight; + private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabelColor; + private System.Windows.Forms.PictureBox pictureBoxCatamaran; + private System.Windows.Forms.Button buttonUp; + private System.Windows.Forms.Button buttonDown; + private System.Windows.Forms.Button buttonLeft; + private System.Windows.Forms.Button buttonRight; + private System.Windows.Forms.Button buttonCreate; + } +} + diff --git a/Catamaran/CatamaranForm.cs b/Catamaran/CatamaranForm.cs new file mode 100644 index 0000000..623dde3 --- /dev/null +++ b/Catamaran/CatamaranForm.cs @@ -0,0 +1,77 @@ +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 Catamaran +{ + public partial class CatamaranForm : Form + { + private DrawingCatamaran _catamaran; + public CatamaranForm() + { + InitializeComponent(); + } + private void Draw() + { + Bitmap bmp = new Bitmap(pictureBoxCatamaran.Width, pictureBoxCatamaran.Height); + Graphics gr = Graphics.FromImage(bmp); + _catamaran?.DrawTransport(gr); + pictureBoxCatamaran.Image = bmp; + } + + private void CatamaranForm_Load(object sender, EventArgs e) + { + + } + private void toolStripStatusLabel3_Click(object sender, EventArgs e) + { + + } + private void buttonCreate_Click(object sender, EventArgs e) + { + Random rnd = new Random(); + _catamaran = new DrawingCatamaran(); + _catamaran.Init(rnd.Next(100, 300), rnd.Next(1000, 2000), + Color.FromArgb(rnd.Next(0, 256), rnd.Next(0, 256), rnd.Next(0, 256))); + _catamaran.SetPosition(rnd.Next(10, 100), rnd.Next(10, 100), + pictureBoxCatamaran.Width, pictureBoxCatamaran.Height); + toolStripStatusLabelSpeed.Text = $"Скорость: {_catamaran.Catamaran.Speed}"; + toolStripStatusLabelWeight.Text = $"Вес: {_catamaran.Catamaran.Weight}"; + toolStripStatusLabelColor.Text = $"Цвет:{ _catamaran.Catamaran.BodyColor.Name}"; + Draw(); + } + private void buttonMove_Click(object sender, EventArgs e) + { + //получаем имя кнопки + string name = ((Button)sender)?.Name ?? string.Empty; + switch (name) + { + case "buttonUp": + _catamaran?.MoveTransport(Direction.Up); + break; + case "buttonDown": + _catamaran?.MoveTransport(Direction.Down); + break; + case "buttonLeft": + _catamaran?.MoveTransport(Direction.Left); + break; + case "buttonRight": + _catamaran?.MoveTransport(Direction.Right); + break; + } + Draw(); + + } + private void PictureBoxCatamaran_Resize(object sender, EventArgs e) + { + _catamaran?.ChangeBorders(pictureBoxCatamaran.Width, pictureBoxCatamaran.Height); + Draw(); + } + } +} diff --git a/Catamaran/CatamaranForm.resx b/Catamaran/CatamaranForm.resx new file mode 100644 index 0000000..174ebc7 --- /dev/null +++ b/Catamaran/CatamaranForm.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/Catamaran/Direction.cs b/Catamaran/Direction.cs new file mode 100644 index 0000000..97c9f4e --- /dev/null +++ b/Catamaran/Direction.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Catamaran +{ + /// + /// Направление перемещения + /// + internal enum Direction + { + Up = 1, + Down = 2, + Left = 3, + Right = 4 + } +} diff --git a/Catamaran/DrawingCatamaran.cs b/Catamaran/DrawingCatamaran.cs new file mode 100644 index 0000000..574e993 --- /dev/null +++ b/Catamaran/DrawingCatamaran.cs @@ -0,0 +1,164 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Catamaran +{ + internal class DrawingCatamaran + { + /// + /// Класс-сущность + /// + public EntityCatamaran Catamaran { private set; get; } + /// + /// Левая координата отрисовки лодки + /// + private float _startPosX; + /// + /// Верхняя кооридната отрисовки лодки + /// + private float _startPosY; + /// + /// Ширина окна отрисовки + /// + private int? _pictureWidth = null; + /// + /// Высота окна отрисовки + /// + private int? _pictureHeight = null; + /// + /// Ширина отрисовки лодки + /// + private readonly int _catamaranWidth = 80; + /// + /// Высота отрисовки лодки + /// + private readonly int _catamaranHeight = 50; + /// + /// Инициализация свойств + /// + /// Скорость + /// Вес лодки + /// Цвет лодки + public void Init(int speed, float weight, Color bodyColor) + { + Catamaran = new EntityCatamaran(); + Catamaran.Init(speed, weight, bodyColor); + } + /// + /// Установка позиции лодки + /// + /// Координата X + /// Координата Y + /// Ширина картинки + /// Высота картинки + public void SetPosition(int x, int y, int width, int height) + { + if (x < 0 || y < 0 || x + _catamaranWidth > width || y + _catamaranHeight > height) return; + _startPosX = x; + _startPosY = y; + _pictureWidth = width; + _pictureHeight = height; + } + /// + /// Изменение направления перемещения + /// + /// Направление + public void MoveTransport(Direction direction) + { + if (!_pictureWidth.HasValue || !_pictureHeight.HasValue) + { + return; + } + switch (direction) + { + // вправо + case Direction.Right: + if (_startPosX + _catamaranWidth + Catamaran.Step < _pictureWidth) + { + _startPosX += Catamaran.Step; + } + break; + //влево + case Direction.Left: + if (_startPosX - Catamaran.Step > 0) + { + _startPosX -= Catamaran.Step; + } + break; + //вверх + case Direction.Up: + if (_startPosY - Catamaran.Step > 0) + { + _startPosY -= Catamaran.Step; + } + break; + //вниз + case Direction.Down: + if (_startPosY + _catamaranHeight + Catamaran.Step < _pictureHeight) + { + _startPosY += Catamaran.Step; + } + break; + } + } + /// + /// Отрисовка лодки + /// + /// + public void DrawTransport(Graphics g) + { + if (_startPosX < 0 || _startPosY < 0 + || !_pictureHeight.HasValue || !_pictureWidth.HasValue) + { + return; + } + Pen pen = new Pen(Color.Black); + //границы + g.DrawRectangle(pen, _startPosX, _startPosY, _catamaranWidth * 3 / 4, _catamaranHeight); + + Point point_1 = new Point((int)(_startPosX + _catamaranWidth * 3 / 4), (int)_startPosY); + Point point_2 = new Point((int)(_startPosX + _catamaranWidth), (int)(_startPosY + _catamaranHeight / 2)); + Point point_3 = new Point((int)(_startPosX + _catamaranWidth * 3 / 4), (int)(_startPosY + _catamaranHeight)); + Point[] pointsArray = {point_1, point_2, point_3}; + g.DrawPolygon(pen, pointsArray); + Brush br = new SolidBrush(Catamaran?.BodyColor ?? Color.Black); + g.FillRectangle(br, _startPosX, _startPosY, _catamaranWidth * 3 / 4, _catamaranHeight); + g.FillPolygon(br, pointsArray); + + // середина + g.DrawEllipse(pen, _startPosX + 5, _startPosY + 5, _catamaranWidth - 15, _catamaranHeight - 15); + Brush brBlue = new SolidBrush(Color.LightBlue); + g.FillEllipse(brBlue, _startPosX + 5, _startPosY + 5, _catamaranWidth - 15, _catamaranHeight - 15); + } + /// + /// Смена границ формы отрисовки + /// + /// Ширина картинки + /// Высота картинки + public void ChangeBorders(int width, int height) + { + _pictureWidth = width; + _pictureHeight = height; + if (_pictureWidth <= _catamaranWidth || _pictureHeight <= _catamaranHeight) + { + _pictureWidth = null; + _pictureHeight = null; + return; + } + if (_startPosX + _catamaranWidth > _pictureWidth) + { + _startPosX = _pictureWidth.Value - _catamaranWidth; + } + if (_startPosY + _catamaranHeight > _pictureHeight) + { + _startPosY = _pictureHeight.Value - _catamaranHeight; + } + } + } +} + + diff --git a/Catamaran/EntityCatamaran.cs b/Catamaran/EntityCatamaran.cs new file mode 100644 index 0000000..2b103ab --- /dev/null +++ b/Catamaran/EntityCatamaran.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Catamaran +{ + internal class EntityCatamaran + { + /// + /// Скорость + /// + public int Speed { get; private set; } + /// + /// Вес + /// + public float Weight { get; private set; } + /// + /// Цвет + /// + public Color BodyColor { get; private set; } + /// + /// Шаг перемещения + /// + public float Step => Speed * 100 / Weight; + /// + /// Инициализация полей объекта-класса + /// + /// + /// + /// + /// + public void Init(int speed, float weight, Color bodyColor) + { + Random rnd = new Random(); + Speed = speed <= 0 ? rnd.Next(50, 150) : speed; + Weight = weight <= 0 ? rnd.Next(40, 70) : weight; + BodyColor = bodyColor; + } + } +} diff --git a/Catamaran/Form1.Designer.cs b/Catamaran/Form1.Designer.cs deleted file mode 100644 index b17e198..0000000 --- a/Catamaran/Form1.Designer.cs +++ /dev/null @@ -1,40 +0,0 @@ -namespace Catamaran -{ - partial class Form1 - { - /// - /// Обязательная переменная конструктора. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Освободить все используемые ресурсы. - /// - /// истинно, если управляемый ресурс должен быть удален; иначе ложно. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Код, автоматически созданный конструктором форм Windows - - /// - /// Требуемый метод для поддержки конструктора — не изменяйте - /// содержимое этого метода с помощью редактора кода. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(800, 450); - this.Text = "Form1"; - } - - #endregion - } -} - diff --git a/Catamaran/Form1.cs b/Catamaran/Form1.cs deleted file mode 100644 index de5e66d..0000000 --- a/Catamaran/Form1.cs +++ /dev/null @@ -1,20 +0,0 @@ -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 Catamaran -{ - public partial class Form1 : Form - { - public Form1() - { - InitializeComponent(); - } - } -} diff --git a/Catamaran/Program.cs b/Catamaran/Program.cs index 252a967..ed74524 100644 --- a/Catamaran/Program.cs +++ b/Catamaran/Program.cs @@ -16,7 +16,7 @@ namespace Catamaran { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new Form1()); + Application.Run(new CatamaranForm()); } } } diff --git a/Catamaran/Properties/Resources.Designer.cs b/Catamaran/Properties/Resources.Designer.cs index 763006c..651f3b3 100644 --- a/Catamaran/Properties/Resources.Designer.cs +++ b/Catamaran/Properties/Resources.Designer.cs @@ -1,71 +1,103 @@ //------------------------------------------------------------------------------ // -// Этот код создан программным средством. -// Версия среды выполнения: 4.0.30319.42000 +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 // -// Изменения в этом файле могут привести к неправильному поведению и будут утрачены, если -// код создан повторно. +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. // //------------------------------------------------------------------------------ -namespace Catamaran.Properties -{ - - +namespace Catamaran.Properties { + using System; + + /// - /// Класс ресурсов со строгим типом для поиска локализованных строк и пр. + /// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д. /// - // Этот класс был автоматически создан при помощи StronglyTypedResourceBuilder - // класс с помощью таких средств, как ResGen или Visual Studio. - // Для добавления или удаления члена измените файл .ResX, а затем перезапустите ResGen - // с параметром /str или заново постройте свой VS-проект. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + // Этот класс создан автоматически классом StronglyTypedResourceBuilder + // с помощью такого средства, как ResGen или Visual Studio. + // Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen + // с параметром /str или перестройте свой проект VS. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources - { - + 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() - { + internal Resources() { } - + /// - /// Возврат кэшированного экземпляра ResourceManager, используемого этим классом. + /// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager - { - get - { - if ((resourceMan == null)) - { + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Catamaran.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } - + /// - /// Переопределяет свойство CurrentUICulture текущего потока для всех - /// подстановки ресурсов с помощью этого класса ресурсов со строгим типом. + /// Перезаписывает свойство CurrentUICulture текущего потока для всех + /// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture - { - get - { + internal static global::System.Globalization.CultureInfo Culture { + get { return resourceCulture; } - set - { + set { resourceCulture = value; } } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Down { + get { + object obj = ResourceManager.GetObject("Down", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Left { + get { + object obj = ResourceManager.GetObject("Left", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Right { + get { + object obj = ResourceManager.GetObject("Right", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Up { + get { + object obj = ResourceManager.GetObject("Up", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/Catamaran/Properties/Resources.resx b/Catamaran/Properties/Resources.resx index af7dbeb..38bb323 100644 --- a/Catamaran/Properties/Resources.resx +++ b/Catamaran/Properties/Resources.resx @@ -46,7 +46,7 @@ mimetype: application/x-microsoft.net.object.binary.base64 value : The object must be serialized with - : System.Serialization.Formatters.Binary.BinaryFormatter + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.soap.base64 @@ -60,6 +60,7 @@ : and then encoded with base64 encoding. --> + @@ -68,9 +69,10 @@ - + + @@ -85,9 +87,10 @@ - + + @@ -109,9 +112,22 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\Down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\Left.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\Right.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\Up.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/Catamaran/Resources/Down.png b/Catamaran/Resources/Down.png new file mode 100644 index 0000000..eed75ec Binary files /dev/null and b/Catamaran/Resources/Down.png differ diff --git a/Catamaran/Resources/Left.png b/Catamaran/Resources/Left.png new file mode 100644 index 0000000..f6ede67 Binary files /dev/null and b/Catamaran/Resources/Left.png differ diff --git a/Catamaran/Resources/Right.png b/Catamaran/Resources/Right.png new file mode 100644 index 0000000..9a236d9 Binary files /dev/null and b/Catamaran/Resources/Right.png differ diff --git a/Catamaran/Resources/Up.png b/Catamaran/Resources/Up.png new file mode 100644 index 0000000..2a78cd4 Binary files /dev/null and b/Catamaran/Resources/Up.png differ