lab7
This commit is contained in:
parent
2a4b5ecabc
commit
ce4dd23448
@ -8,4 +8,28 @@
|
|||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
|
||||||
|
<PackageReference Include="NLog.Extensions.Logging" Version="5.3.7" />
|
||||||
|
<PackageReference Include="Serilog" Version="3.1.1" />
|
||||||
|
<PackageReference Include="Serilog.AspNetCore" Version="8.0.0" />
|
||||||
|
<PackageReference Include="Serilog.Settings.Configuration" Version="8.0.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Update="Properties\Resources.Designer.cs">
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Update="Properties\Resources.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
@ -43,14 +43,14 @@ namespace ProjectCruiser
|
|||||||
return collect?._collection.Insert(obj);
|
return collect?._collection.Insert(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool operator -(CruiserGenericCollection<T, U> collect, int pos)
|
public static T operator -(CruiserGenericCollection<T, U> collect, int pos)
|
||||||
{
|
{
|
||||||
T? obj = collect._collection[pos];
|
T? obj = collect._collection[pos];
|
||||||
if (obj != null)
|
if (obj != null)
|
||||||
{
|
{
|
||||||
collect._collection.Remove(pos);
|
collect._collection.Remove(pos);
|
||||||
}
|
}
|
||||||
return false;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
public U? GetU(int pos)
|
public U? GetU(int pos)
|
||||||
@ -91,15 +91,18 @@ namespace ProjectCruiser
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
foreach (var cruiser in _collection.GetCruiser())
|
foreach (var cruiser in _collection.GetCruiser())
|
||||||
{
|
{
|
||||||
cruiser._pictureHeight = _pictureHeight;
|
if (cruiser != null)
|
||||||
cruiser._pictureWidth = _pictureWidth;
|
|
||||||
_collection[i]?.SetPosition(Ix, Iy);
|
|
||||||
_collection[i]?.DrawTransport(g);
|
|
||||||
Ix += _placeSizeWidth;
|
|
||||||
if (Ix + _placeSizeHeight > _pictureWidth)
|
|
||||||
{
|
{
|
||||||
Ix = 0;
|
cruiser._pictureHeight = _pictureHeight;
|
||||||
Iy = _placeSizeHeight;
|
cruiser._pictureWidth = _pictureWidth;
|
||||||
|
_collection[i]?.SetPosition(Ix, Iy);
|
||||||
|
_collection[i]?.DrawTransport(g);
|
||||||
|
Ix += _placeSizeWidth;
|
||||||
|
if (Ix + _placeSizeHeight > _pictureWidth)
|
||||||
|
{
|
||||||
|
Ix = 3;
|
||||||
|
Iy = _placeSizeHeight+15;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
using ProjectCruiser.DrawningObjects;
|
using Cruiser;
|
||||||
|
using Cruiser.Exceptions;
|
||||||
|
using ProjectCruiser.DrawningObjects;
|
||||||
using ProjectCruiser.MovementStrategy;
|
using ProjectCruiser.MovementStrategy;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@ -62,7 +64,7 @@ DrawningObjectCruiser>> _CruiserStorages;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool SaveData(string filename)
|
public void SaveData(string filename)
|
||||||
{
|
{
|
||||||
if (File.Exists(filename))
|
if (File.Exists(filename))
|
||||||
{
|
{
|
||||||
@ -80,22 +82,20 @@ DrawningObjectCruiser>> _CruiserStorages;
|
|||||||
}
|
}
|
||||||
if (data.Length == 0)
|
if (data.Length == 0)
|
||||||
{
|
{
|
||||||
return false;
|
throw new Exception("Невалидная операция, нет данных для сохранения");
|
||||||
}
|
}
|
||||||
|
|
||||||
using (StreamWriter writer = new StreamWriter(filename))
|
using (StreamWriter writer = new StreamWriter(filename))
|
||||||
{
|
{
|
||||||
writer.Write($"CruiserStorage{Environment.NewLine}{data}");
|
writer.Write($"CruiserStorage{Environment.NewLine}{data}");
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool LoadData(string filename)
|
public void LoadData(string filename)
|
||||||
{
|
{
|
||||||
if (!File.Exists(filename))
|
if (!File.Exists(filename))
|
||||||
{
|
{
|
||||||
return false;
|
throw new Exception("Файл не найден");
|
||||||
}
|
}
|
||||||
|
|
||||||
using (StreamReader reader = new StreamReader(filename))
|
using (StreamReader reader = new StreamReader(filename))
|
||||||
@ -103,11 +103,11 @@ DrawningObjectCruiser>> _CruiserStorages;
|
|||||||
string cheker = reader.ReadLine();
|
string cheker = reader.ReadLine();
|
||||||
if (cheker == null)
|
if (cheker == null)
|
||||||
{
|
{
|
||||||
return false;
|
throw new Exception("Нет данных для загрузки");
|
||||||
}
|
}
|
||||||
if (!cheker.StartsWith("CruiserStorage"))
|
if (!cheker.StartsWith("CruiserStorage"))
|
||||||
{
|
{
|
||||||
return false;
|
throw new Exception("Неверный формат ввода");
|
||||||
}
|
}
|
||||||
_CruiserStorages.Clear();
|
_CruiserStorages.Clear();
|
||||||
string strs;
|
string strs;
|
||||||
@ -116,11 +116,11 @@ DrawningObjectCruiser>> _CruiserStorages;
|
|||||||
{
|
{
|
||||||
if (strs == null && firstinit)
|
if (strs == null && firstinit)
|
||||||
{
|
{
|
||||||
return false;
|
throw new Exception("Нет данных для загрузки");
|
||||||
}
|
}
|
||||||
if (strs == null)
|
if (strs == null)
|
||||||
{
|
{
|
||||||
return false;
|
break;
|
||||||
}
|
}
|
||||||
firstinit = false;
|
firstinit = false;
|
||||||
string name = strs.Split(_separatorForKeyValue)[0];
|
string name = strs.Split(_separatorForKeyValue)[0];
|
||||||
@ -131,16 +131,19 @@ DrawningObjectCruiser>> _CruiserStorages;
|
|||||||
data?.CreateDrawningCruiser(_separatorForObject, _pictureWidth, _pictureHeight);
|
data?.CreateDrawningCruiser(_separatorForObject, _pictureWidth, _pictureHeight);
|
||||||
if (cruiser != null)
|
if (cruiser != null)
|
||||||
{
|
{
|
||||||
int? result = collection + cruiser;
|
try { _ = collection + cruiser; }
|
||||||
if (result == null || result.Value == -1)
|
catch (CruiserNotFoundException e)
|
||||||
{
|
{
|
||||||
return false;
|
throw e;
|
||||||
|
}
|
||||||
|
catch (StorageOverflowException e)
|
||||||
|
{
|
||||||
|
throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_CruiserStorages.Add(name, collection);
|
_CruiserStorages.Add(name, collection);
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
19
Cruiser/Cruiser/CruiserNotFoundException.cs
Normal file
19
Cruiser/Cruiser/CruiserNotFoundException.cs
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Cruiser
|
||||||
|
{
|
||||||
|
[Serializable] internal class CruiserNotFoundException : ApplicationException
|
||||||
|
{
|
||||||
|
public CruiserNotFoundException(int i) : base($"Не найден объект по позиции {i}") { }
|
||||||
|
public CruiserNotFoundException() : base() { }
|
||||||
|
public CruiserNotFoundException(string message) : base(message) { }
|
||||||
|
public CruiserNotFoundException(string message, Exception exception) : base(message, exception) { }
|
||||||
|
protected CruiserNotFoundException(SerializationInfo info, StreamingContext contex) : base(info, contex) { }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
209
Cruiser/Cruiser/FormCruiser.Designer.cs
generated
209
Cruiser/Cruiser/FormCruiser.Designer.cs
generated
@ -28,146 +28,147 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
comboBoxStrategy = new System.Windows.Forms.ComboBox();
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormCruiser));
|
||||||
ButtonCreateCruiserBat = new System.Windows.Forms.Button();
|
this.comboBoxStrategy = new System.Windows.Forms.ComboBox();
|
||||||
ButtonCreateCruiser = new System.Windows.Forms.Button();
|
this.ButtonCreateCruiserBat = new System.Windows.Forms.Button();
|
||||||
ButtonStep = new System.Windows.Forms.Button();
|
this.ButtonCreateCruiser = new System.Windows.Forms.Button();
|
||||||
buttonUp = new System.Windows.Forms.Button();
|
this.ButtonStep = new System.Windows.Forms.Button();
|
||||||
buttonDown = new System.Windows.Forms.Button();
|
this.buttonUp = new System.Windows.Forms.Button();
|
||||||
buttonLeft = new System.Windows.Forms.Button();
|
this.buttonDown = new System.Windows.Forms.Button();
|
||||||
buttonRight = new System.Windows.Forms.Button();
|
this.buttonLeft = new System.Windows.Forms.Button();
|
||||||
pictureBoxCruiser = new System.Windows.Forms.PictureBox();
|
this.buttonRight = new System.Windows.Forms.Button();
|
||||||
ButtonSelectCruiser = new System.Windows.Forms.Button();
|
this.pictureBoxCruiser = new System.Windows.Forms.PictureBox();
|
||||||
((System.ComponentModel.ISupportInitialize)(pictureBoxCruiser)).BeginInit();
|
this.ButtonSelectCruiser = new System.Windows.Forms.Button();
|
||||||
SuspendLayout();
|
((System.ComponentModel.ISupportInitialize)(this.pictureBoxCruiser)).BeginInit();
|
||||||
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// comboBoxStrategy
|
// comboBoxStrategy
|
||||||
//
|
//
|
||||||
comboBoxStrategy.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
this.comboBoxStrategy.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
comboBoxStrategy.FormattingEnabled = true;
|
this.comboBoxStrategy.FormattingEnabled = true;
|
||||||
comboBoxStrategy.Items.AddRange(new object[] {
|
this.comboBoxStrategy.Items.AddRange(new object[] {
|
||||||
"MoveToCenter",
|
"MoveToCenter",
|
||||||
"MoveToBorder",
|
"MoveToBorder",
|
||||||
"-"});
|
"-"});
|
||||||
comboBoxStrategy.Location = new System.Drawing.Point(667, 12);
|
this.comboBoxStrategy.Location = new System.Drawing.Point(667, 12);
|
||||||
comboBoxStrategy.Name = "comboBoxStrategy";
|
this.comboBoxStrategy.Name = "comboBoxStrategy";
|
||||||
comboBoxStrategy.Size = new System.Drawing.Size(121, 23);
|
this.comboBoxStrategy.Size = new System.Drawing.Size(121, 23);
|
||||||
comboBoxStrategy.TabIndex = 0;
|
this.comboBoxStrategy.TabIndex = 0;
|
||||||
//
|
//
|
||||||
// ButtonCreateCruiserBat
|
// ButtonCreateCruiserBat
|
||||||
//
|
//
|
||||||
ButtonCreateCruiserBat.Location = new System.Drawing.Point(19, 386);
|
this.ButtonCreateCruiserBat.Location = new System.Drawing.Point(19, 386);
|
||||||
ButtonCreateCruiserBat.Name = "ButtonCreateCruiserBat";
|
this.ButtonCreateCruiserBat.Name = "ButtonCreateCruiserBat";
|
||||||
ButtonCreateCruiserBat.Size = new System.Drawing.Size(160, 57);
|
this.ButtonCreateCruiserBat.Size = new System.Drawing.Size(160, 57);
|
||||||
ButtonCreateCruiserBat.TabIndex = 1;
|
this.ButtonCreateCruiserBat.TabIndex = 1;
|
||||||
ButtonCreateCruiserBat.Text = "Создать крейсер с ракетными шахтами и площадкой под вертолет";
|
this.ButtonCreateCruiserBat.Text = "Создать крейсер с ракетными шахтами и площадкой под вертолет";
|
||||||
ButtonCreateCruiserBat.UseVisualStyleBackColor = true;
|
this.ButtonCreateCruiserBat.UseVisualStyleBackColor = true;
|
||||||
ButtonCreateCruiserBat.Click += new System.EventHandler(ButtonCreateCruiserBat_Click);
|
this.ButtonCreateCruiserBat.Click += new System.EventHandler(this.ButtonCreateCruiserBat_Click);
|
||||||
//
|
//
|
||||||
// ButtonCreateCruiser
|
// ButtonCreateCruiser
|
||||||
//
|
//
|
||||||
ButtonCreateCruiser.Location = new System.Drawing.Point(185, 386);
|
this.ButtonCreateCruiser.Location = new System.Drawing.Point(185, 386);
|
||||||
ButtonCreateCruiser.Name = "ButtonCreateCruiser";
|
this.ButtonCreateCruiser.Name = "ButtonCreateCruiser";
|
||||||
ButtonCreateCruiser.Size = new System.Drawing.Size(160, 57);
|
this.ButtonCreateCruiser.Size = new System.Drawing.Size(160, 57);
|
||||||
ButtonCreateCruiser.TabIndex = 2;
|
this.ButtonCreateCruiser.TabIndex = 2;
|
||||||
ButtonCreateCruiser.Text = "Создать крейсер";
|
this.ButtonCreateCruiser.Text = "Создать крейсер";
|
||||||
ButtonCreateCruiser.UseVisualStyleBackColor = true;
|
this.ButtonCreateCruiser.UseVisualStyleBackColor = true;
|
||||||
ButtonCreateCruiser.Click += new System.EventHandler(ButtonCreateCruiser_Click);
|
this.ButtonCreateCruiser.Click += new System.EventHandler(this.ButtonCreateCruiser_Click);
|
||||||
//
|
//
|
||||||
// ButtonStep
|
// ButtonStep
|
||||||
//
|
//
|
||||||
ButtonStep.Location = new System.Drawing.Point(713, 50);
|
this.ButtonStep.Location = new System.Drawing.Point(713, 50);
|
||||||
ButtonStep.Name = "ButtonStep";
|
this.ButtonStep.Name = "ButtonStep";
|
||||||
ButtonStep.Size = new System.Drawing.Size(75, 23);
|
this.ButtonStep.Size = new System.Drawing.Size(75, 23);
|
||||||
ButtonStep.TabIndex = 3;
|
this.ButtonStep.TabIndex = 3;
|
||||||
ButtonStep.Text = "Шаг";
|
this.ButtonStep.Text = "Шаг";
|
||||||
ButtonStep.UseVisualStyleBackColor = true;
|
this.ButtonStep.UseVisualStyleBackColor = true;
|
||||||
ButtonStep.Click += new System.EventHandler(ButtonStep_Click);
|
this.ButtonStep.Click += new System.EventHandler(this.ButtonStep_Click);
|
||||||
//
|
//
|
||||||
// buttonUp
|
// buttonUp
|
||||||
//
|
//
|
||||||
buttonUp.BackgroundImage = global::ProjectCruiser.Properties.Resources.вверх;
|
this.buttonUp.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("buttonUp.BackgroundImage")));
|
||||||
buttonUp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
|
this.buttonUp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
|
||||||
buttonUp.Location = new System.Drawing.Point(678, 352);
|
this.buttonUp.Location = new System.Drawing.Point(678, 352);
|
||||||
buttonUp.Name = "buttonUp";
|
this.buttonUp.Name = "buttonUp";
|
||||||
buttonUp.Size = new System.Drawing.Size(44, 38);
|
this.buttonUp.Size = new System.Drawing.Size(44, 38);
|
||||||
buttonUp.TabIndex = 4;
|
this.buttonUp.TabIndex = 4;
|
||||||
buttonUp.UseVisualStyleBackColor = true;
|
this.buttonUp.UseVisualStyleBackColor = true;
|
||||||
buttonUp.Click += new System.EventHandler(ButtonMove_Click);
|
this.buttonUp.Click += new System.EventHandler(this.ButtonMove_Click);
|
||||||
//
|
//
|
||||||
// buttonDown
|
// buttonDown
|
||||||
//
|
//
|
||||||
buttonDown.BackgroundImage = global::ProjectCruiser.Properties.Resources.вниз;
|
this.buttonDown.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("buttonDown.BackgroundImage")));
|
||||||
buttonDown.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
|
this.buttonDown.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
|
||||||
buttonDown.Location = new System.Drawing.Point(678, 395);
|
this.buttonDown.Location = new System.Drawing.Point(678, 395);
|
||||||
buttonDown.Name = "buttonDown";
|
this.buttonDown.Name = "buttonDown";
|
||||||
buttonDown.Size = new System.Drawing.Size(44, 38);
|
this.buttonDown.Size = new System.Drawing.Size(44, 38);
|
||||||
buttonDown.TabIndex = 5;
|
this.buttonDown.TabIndex = 5;
|
||||||
buttonDown.UseVisualStyleBackColor = true;
|
this.buttonDown.UseVisualStyleBackColor = true;
|
||||||
buttonDown.Click += new System.EventHandler(ButtonMove_Click);
|
this.buttonDown.Click += new System.EventHandler(this.ButtonMove_Click);
|
||||||
//
|
//
|
||||||
// buttonLeft
|
// buttonLeft
|
||||||
//
|
//
|
||||||
buttonLeft.BackgroundImage = global::ProjectCruiser.Properties.Resources.влево;
|
this.buttonLeft.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("buttonLeft.BackgroundImage")));
|
||||||
buttonLeft.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
|
this.buttonLeft.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
|
||||||
buttonLeft.Location = new System.Drawing.Point(629, 395);
|
this.buttonLeft.Location = new System.Drawing.Point(629, 395);
|
||||||
buttonLeft.Name = "buttonLeft";
|
this.buttonLeft.Name = "buttonLeft";
|
||||||
buttonLeft.Size = new System.Drawing.Size(44, 38);
|
this.buttonLeft.Size = new System.Drawing.Size(44, 38);
|
||||||
buttonLeft.TabIndex = 6;
|
this.buttonLeft.TabIndex = 6;
|
||||||
buttonLeft.UseVisualStyleBackColor = true;
|
this.buttonLeft.UseVisualStyleBackColor = true;
|
||||||
buttonLeft.Click += new System.EventHandler(ButtonMove_Click);
|
this.buttonLeft.Click += new System.EventHandler(this.ButtonMove_Click);
|
||||||
//
|
//
|
||||||
// buttonRight
|
// buttonRight
|
||||||
//
|
//
|
||||||
buttonRight.BackgroundImage = global::ProjectCruiser.Properties.Resources.вправо;
|
this.buttonRight.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("buttonRight.BackgroundImage")));
|
||||||
buttonRight.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
|
this.buttonRight.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
|
||||||
buttonRight.Location = new System.Drawing.Point(727, 395);
|
this.buttonRight.Location = new System.Drawing.Point(727, 395);
|
||||||
buttonRight.Name = "buttonRight";
|
this.buttonRight.Name = "buttonRight";
|
||||||
buttonRight.Size = new System.Drawing.Size(44, 38);
|
this.buttonRight.Size = new System.Drawing.Size(44, 38);
|
||||||
buttonRight.TabIndex = 7;
|
this.buttonRight.TabIndex = 7;
|
||||||
buttonRight.UseVisualStyleBackColor = true;
|
this.buttonRight.UseVisualStyleBackColor = true;
|
||||||
buttonRight.Click += new System.EventHandler(ButtonMove_Click);
|
this.buttonRight.Click += new System.EventHandler(this.ButtonMove_Click);
|
||||||
//
|
//
|
||||||
// pictureBoxCruiser
|
// pictureBoxCruiser
|
||||||
//
|
//
|
||||||
pictureBoxCruiser.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.pictureBoxCruiser.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
pictureBoxCruiser.Location = new System.Drawing.Point(0, 0);
|
this.pictureBoxCruiser.Location = new System.Drawing.Point(0, 0);
|
||||||
pictureBoxCruiser.Name = "pictureBoxCruiser";
|
this.pictureBoxCruiser.Name = "pictureBoxCruiser";
|
||||||
pictureBoxCruiser.Size = new System.Drawing.Size(800, 450);
|
this.pictureBoxCruiser.Size = new System.Drawing.Size(800, 450);
|
||||||
pictureBoxCruiser.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
|
this.pictureBoxCruiser.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
|
||||||
pictureBoxCruiser.TabIndex = 8;
|
this.pictureBoxCruiser.TabIndex = 8;
|
||||||
pictureBoxCruiser.TabStop = false;
|
this.pictureBoxCruiser.TabStop = false;
|
||||||
//
|
//
|
||||||
// ButtonSelectCruiser
|
// ButtonSelectCruiser
|
||||||
//
|
//
|
||||||
ButtonSelectCruiser.Location = new System.Drawing.Point(351, 386);
|
this.ButtonSelectCruiser.Location = new System.Drawing.Point(351, 386);
|
||||||
ButtonSelectCruiser.Name = "ButtonSelectCruiser";
|
this.ButtonSelectCruiser.Name = "ButtonSelectCruiser";
|
||||||
ButtonSelectCruiser.Size = new System.Drawing.Size(160, 57);
|
this.ButtonSelectCruiser.Size = new System.Drawing.Size(160, 57);
|
||||||
ButtonSelectCruiser.TabIndex = 9;
|
this.ButtonSelectCruiser.TabIndex = 9;
|
||||||
ButtonSelectCruiser.Text = "Выбор";
|
this.ButtonSelectCruiser.Text = "Выбор";
|
||||||
ButtonSelectCruiser.UseVisualStyleBackColor = true;
|
this.ButtonSelectCruiser.UseVisualStyleBackColor = true;
|
||||||
ButtonSelectCruiser.Click += new System.EventHandler(ButtonSelectCruiser_Click);
|
this.ButtonSelectCruiser.Click += new System.EventHandler(this.ButtonSelectCruiser_Click);
|
||||||
//
|
//
|
||||||
// FormCruiser
|
// FormCruiser
|
||||||
//
|
//
|
||||||
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||||
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
ClientSize = new System.Drawing.Size(800, 450);
|
this.ClientSize = new System.Drawing.Size(800, 450);
|
||||||
Controls.Add(ButtonSelectCruiser);
|
this.Controls.Add(this.ButtonSelectCruiser);
|
||||||
Controls.Add(buttonRight);
|
this.Controls.Add(this.buttonRight);
|
||||||
Controls.Add(buttonLeft);
|
this.Controls.Add(this.buttonLeft);
|
||||||
Controls.Add(buttonDown);
|
this.Controls.Add(this.buttonDown);
|
||||||
Controls.Add(buttonUp);
|
this.Controls.Add(this.buttonUp);
|
||||||
Controls.Add(ButtonStep);
|
this.Controls.Add(this.ButtonStep);
|
||||||
Controls.Add(ButtonCreateCruiser);
|
this.Controls.Add(this.ButtonCreateCruiser);
|
||||||
Controls.Add(ButtonCreateCruiserBat);
|
this.Controls.Add(this.ButtonCreateCruiserBat);
|
||||||
Controls.Add(comboBoxStrategy);
|
this.Controls.Add(this.comboBoxStrategy);
|
||||||
Controls.Add(pictureBoxCruiser);
|
this.Controls.Add(this.pictureBoxCruiser);
|
||||||
Name = "FormCruiser";
|
this.Name = "FormCruiser";
|
||||||
Text = "FormCruiser";
|
this.Text = "FormCruiser";
|
||||||
((System.ComponentModel.ISupportInitialize)(pictureBoxCruiser)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.pictureBoxCruiser)).EndInit();
|
||||||
ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
124
Cruiser/Cruiser/FormCruiserCollection.Designer.cs
generated
124
Cruiser/Cruiser/FormCruiserCollection.Designer.cs
generated
@ -28,27 +28,27 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
groupBox1 = new System.Windows.Forms.GroupBox();
|
groupBox1 = new GroupBox();
|
||||||
groupBox2 = new System.Windows.Forms.GroupBox();
|
groupBox2 = new GroupBox();
|
||||||
listBoxStorage = new System.Windows.Forms.ListBox();
|
listBoxStorage = new ListBox();
|
||||||
textBoxStorageName = new System.Windows.Forms.TextBox();
|
textBoxStorageName = new TextBox();
|
||||||
ButtonAddObject = new System.Windows.Forms.Button();
|
ButtonAddObject = new Button();
|
||||||
ButtonDelObject = new System.Windows.Forms.Button();
|
ButtonDelObject = new Button();
|
||||||
maskedTextBoxNumber = new System.Windows.Forms.MaskedTextBox();
|
maskedTextBoxNumber = new MaskedTextBox();
|
||||||
ButtonRefreshCollection = new System.Windows.Forms.Button();
|
ButtonRefreshCollection = new Button();
|
||||||
ButtonRemoveCruiser = new System.Windows.Forms.Button();
|
ButtonRemoveCruiser = new Button();
|
||||||
buttonAddCruiser = new System.Windows.Forms.Button();
|
buttonAddCruiser = new Button();
|
||||||
pictureBoxCollection = new System.Windows.Forms.PictureBox();
|
menuStrip = new MenuStrip();
|
||||||
menuStrip = new System.Windows.Forms.MenuStrip();
|
fileToolStripMenuItem = new ToolStripMenuItem();
|
||||||
fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
SaveToolStripMenuItem = new ToolStripMenuItem();
|
||||||
SaveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
LoadToolStripMenuItem = new ToolStripMenuItem();
|
||||||
LoadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
pictureBoxCollection = new PictureBox();
|
||||||
openFileDialog = new System.Windows.Forms.OpenFileDialog();
|
openFileDialog = new OpenFileDialog();
|
||||||
saveFileDialog = new System.Windows.Forms.SaveFileDialog();
|
saveFileDialog = new SaveFileDialog();
|
||||||
groupBox1.SuspendLayout();
|
groupBox1.SuspendLayout();
|
||||||
groupBox2.SuspendLayout();
|
groupBox2.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(pictureBoxCollection)).BeginInit();
|
|
||||||
menuStrip.SuspendLayout();
|
menuStrip.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)pictureBoxCollection).BeginInit();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// groupBox1
|
// groupBox1
|
||||||
@ -59,9 +59,9 @@
|
|||||||
groupBox1.Controls.Add(ButtonRemoveCruiser);
|
groupBox1.Controls.Add(ButtonRemoveCruiser);
|
||||||
groupBox1.Controls.Add(buttonAddCruiser);
|
groupBox1.Controls.Add(buttonAddCruiser);
|
||||||
groupBox1.Controls.Add(menuStrip);
|
groupBox1.Controls.Add(menuStrip);
|
||||||
groupBox1.Location = new System.Drawing.Point(643, 12);
|
groupBox1.Location = new Point(637, 10);
|
||||||
groupBox1.Name = "groupBox1";
|
groupBox1.Name = "groupBox1";
|
||||||
groupBox1.Size = new System.Drawing.Size(196, 483);
|
groupBox1.Size = new Size(183, 467);
|
||||||
groupBox1.TabIndex = 0;
|
groupBox1.TabIndex = 0;
|
||||||
groupBox1.TabStop = false;
|
groupBox1.TabStop = false;
|
||||||
groupBox1.Text = "Инструменты";
|
groupBox1.Text = "Инструменты";
|
||||||
@ -72,9 +72,9 @@
|
|||||||
groupBox2.Controls.Add(textBoxStorageName);
|
groupBox2.Controls.Add(textBoxStorageName);
|
||||||
groupBox2.Controls.Add(ButtonAddObject);
|
groupBox2.Controls.Add(ButtonAddObject);
|
||||||
groupBox2.Controls.Add(ButtonDelObject);
|
groupBox2.Controls.Add(ButtonDelObject);
|
||||||
groupBox2.Location = new System.Drawing.Point(9, 58);
|
groupBox2.Location = new Point(9, 58);
|
||||||
groupBox2.Name = "groupBox2";
|
groupBox2.Name = "groupBox2";
|
||||||
groupBox2.Size = new System.Drawing.Size(179, 256);
|
groupBox2.Size = new Size(179, 256);
|
||||||
groupBox2.TabIndex = 4;
|
groupBox2.TabIndex = 4;
|
||||||
groupBox2.TabStop = false;
|
groupBox2.TabStop = false;
|
||||||
groupBox2.Text = "Наборы";
|
groupBox2.Text = "Наборы";
|
||||||
@ -83,25 +83,25 @@
|
|||||||
//
|
//
|
||||||
listBoxStorage.FormattingEnabled = true;
|
listBoxStorage.FormattingEnabled = true;
|
||||||
listBoxStorage.ItemHeight = 15;
|
listBoxStorage.ItemHeight = 15;
|
||||||
listBoxStorage.Location = new System.Drawing.Point(6, 93);
|
listBoxStorage.Location = new Point(6, 93);
|
||||||
listBoxStorage.Name = "listBoxStorage";
|
listBoxStorage.Name = "listBoxStorage";
|
||||||
listBoxStorage.Size = new System.Drawing.Size(167, 109);
|
listBoxStorage.Size = new Size(154, 94);
|
||||||
listBoxStorage.TabIndex = 5;
|
listBoxStorage.TabIndex = 5;
|
||||||
listBoxStorage.SelectedIndexChanged += listBoxStorage_SelectedIndexChanged;
|
listBoxStorage.SelectedIndexChanged += listBoxStorage_SelectedIndexChanged;
|
||||||
//
|
//
|
||||||
// textBoxStorageName
|
// textBoxStorageName
|
||||||
//
|
//
|
||||||
textBoxStorageName.Font = new System.Drawing.Font("Lucida Sans Unicode", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
textBoxStorageName.Font = new Font("Lucida Sans Unicode", 9F, FontStyle.Regular, GraphicsUnit.Point);
|
||||||
textBoxStorageName.Location = new System.Drawing.Point(6, 22);
|
textBoxStorageName.Location = new Point(6, 22);
|
||||||
textBoxStorageName.Name = "textBoxStorageName";
|
textBoxStorageName.Name = "textBoxStorageName";
|
||||||
textBoxStorageName.Size = new System.Drawing.Size(167, 26);
|
textBoxStorageName.Size = new Size(154, 26);
|
||||||
textBoxStorageName.TabIndex = 4;
|
textBoxStorageName.TabIndex = 4;
|
||||||
//
|
//
|
||||||
// ButtonAddObject
|
// ButtonAddObject
|
||||||
//
|
//
|
||||||
ButtonAddObject.Location = new System.Drawing.Point(6, 54);
|
ButtonAddObject.Location = new Point(6, 54);
|
||||||
ButtonAddObject.Name = "ButtonAddObject";
|
ButtonAddObject.Name = "ButtonAddObject";
|
||||||
ButtonAddObject.Size = new System.Drawing.Size(167, 33);
|
ButtonAddObject.Size = new Size(154, 30);
|
||||||
ButtonAddObject.TabIndex = 3;
|
ButtonAddObject.TabIndex = 3;
|
||||||
ButtonAddObject.Text = "Добавить набор";
|
ButtonAddObject.Text = "Добавить набор";
|
||||||
ButtonAddObject.UseVisualStyleBackColor = true;
|
ButtonAddObject.UseVisualStyleBackColor = true;
|
||||||
@ -109,9 +109,9 @@
|
|||||||
//
|
//
|
||||||
// ButtonDelObject
|
// ButtonDelObject
|
||||||
//
|
//
|
||||||
ButtonDelObject.Location = new System.Drawing.Point(6, 217);
|
ButtonDelObject.Location = new Point(6, 217);
|
||||||
ButtonDelObject.Name = "ButtonDelObject";
|
ButtonDelObject.Name = "ButtonDelObject";
|
||||||
ButtonDelObject.Size = new System.Drawing.Size(167, 33);
|
ButtonDelObject.Size = new Size(154, 30);
|
||||||
ButtonDelObject.TabIndex = 2;
|
ButtonDelObject.TabIndex = 2;
|
||||||
ButtonDelObject.Text = "Удалить набор";
|
ButtonDelObject.Text = "Удалить набор";
|
||||||
ButtonDelObject.UseVisualStyleBackColor = true;
|
ButtonDelObject.UseVisualStyleBackColor = true;
|
||||||
@ -119,18 +119,18 @@
|
|||||||
//
|
//
|
||||||
// maskedTextBoxNumber
|
// maskedTextBoxNumber
|
||||||
//
|
//
|
||||||
maskedTextBoxNumber.Font = new System.Drawing.Font("Lucida Sans Unicode", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
maskedTextBoxNumber.Font = new Font("Lucida Sans Unicode", 9F, FontStyle.Regular, GraphicsUnit.Point);
|
||||||
maskedTextBoxNumber.Location = new System.Drawing.Point(34, 359);
|
maskedTextBoxNumber.Location = new Point(34, 359);
|
||||||
maskedTextBoxNumber.Mask = "00";
|
maskedTextBoxNumber.Mask = "00";
|
||||||
maskedTextBoxNumber.Name = "maskedTextBoxNumber";
|
maskedTextBoxNumber.Name = "maskedTextBoxNumber";
|
||||||
maskedTextBoxNumber.Size = new System.Drawing.Size(130, 26);
|
maskedTextBoxNumber.Size = new Size(117, 26);
|
||||||
maskedTextBoxNumber.TabIndex = 3;
|
maskedTextBoxNumber.TabIndex = 3;
|
||||||
//
|
//
|
||||||
// ButtonRefreshCollection
|
// ButtonRefreshCollection
|
||||||
//
|
//
|
||||||
ButtonRefreshCollection.Location = new System.Drawing.Point(6, 430);
|
ButtonRefreshCollection.Location = new Point(6, 430);
|
||||||
ButtonRefreshCollection.Name = "ButtonRefreshCollection";
|
ButtonRefreshCollection.Name = "ButtonRefreshCollection";
|
||||||
ButtonRefreshCollection.Size = new System.Drawing.Size(184, 33);
|
ButtonRefreshCollection.Size = new Size(171, 30);
|
||||||
ButtonRefreshCollection.TabIndex = 2;
|
ButtonRefreshCollection.TabIndex = 2;
|
||||||
ButtonRefreshCollection.Text = "Обовить коллекцию";
|
ButtonRefreshCollection.Text = "Обовить коллекцию";
|
||||||
ButtonRefreshCollection.UseVisualStyleBackColor = true;
|
ButtonRefreshCollection.UseVisualStyleBackColor = true;
|
||||||
@ -138,9 +138,9 @@
|
|||||||
//
|
//
|
||||||
// ButtonRemoveCruiser
|
// ButtonRemoveCruiser
|
||||||
//
|
//
|
||||||
ButtonRemoveCruiser.Location = new System.Drawing.Point(6, 391);
|
ButtonRemoveCruiser.Location = new Point(6, 391);
|
||||||
ButtonRemoveCruiser.Name = "ButtonRemoveCruiser";
|
ButtonRemoveCruiser.Name = "ButtonRemoveCruiser";
|
||||||
ButtonRemoveCruiser.Size = new System.Drawing.Size(184, 33);
|
ButtonRemoveCruiser.Size = new Size(171, 30);
|
||||||
ButtonRemoveCruiser.TabIndex = 1;
|
ButtonRemoveCruiser.TabIndex = 1;
|
||||||
ButtonRemoveCruiser.Text = "Удалить крейсер";
|
ButtonRemoveCruiser.Text = "Удалить крейсер";
|
||||||
ButtonRemoveCruiser.UseVisualStyleBackColor = true;
|
ButtonRemoveCruiser.UseVisualStyleBackColor = true;
|
||||||
@ -148,58 +148,55 @@
|
|||||||
//
|
//
|
||||||
// buttonAddCruiser
|
// buttonAddCruiser
|
||||||
//
|
//
|
||||||
buttonAddCruiser.Location = new System.Drawing.Point(6, 320);
|
buttonAddCruiser.Location = new Point(6, 320);
|
||||||
buttonAddCruiser.Name = "buttonAddCruiser";
|
buttonAddCruiser.Name = "buttonAddCruiser";
|
||||||
buttonAddCruiser.Size = new System.Drawing.Size(184, 33);
|
buttonAddCruiser.Size = new Size(171, 30);
|
||||||
buttonAddCruiser.TabIndex = 0;
|
buttonAddCruiser.TabIndex = 0;
|
||||||
buttonAddCruiser.Text = "Добавить крейсер";
|
buttonAddCruiser.Text = "Добавить крейсер";
|
||||||
buttonAddCruiser.UseVisualStyleBackColor = true;
|
buttonAddCruiser.UseVisualStyleBackColor = true;
|
||||||
buttonAddCruiser.Click += buttonAddCruiser_Click;
|
buttonAddCruiser.Click += buttonAddCruiser_Click;
|
||||||
//
|
//
|
||||||
// pictureBoxCollection
|
|
||||||
//
|
|
||||||
pictureBoxCollection.Location = new System.Drawing.Point(1, 4);
|
|
||||||
pictureBoxCollection.Name = "pictureBoxCollection";
|
|
||||||
pictureBoxCollection.Size = new System.Drawing.Size(637, 491);
|
|
||||||
pictureBoxCollection.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
|
||||||
pictureBoxCollection.TabIndex = 1;
|
|
||||||
pictureBoxCollection.TabStop = false;
|
|
||||||
//
|
|
||||||
// menuStrip
|
// menuStrip
|
||||||
//
|
//
|
||||||
menuStrip.ImageScalingSize = new Size(20, 20);
|
menuStrip.ImageScalingSize = new Size(20, 20);
|
||||||
menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
menuStrip.Items.AddRange(new ToolStripItem[] { fileToolStripMenuItem });
|
||||||
fileToolStripMenuItem});
|
menuStrip.Location = new Point(3, 19);
|
||||||
menuStrip.Location = new System.Drawing.Point(3, 19);
|
|
||||||
menuStrip.Name = "menuStrip";
|
menuStrip.Name = "menuStrip";
|
||||||
menuStrip.Padding = new Padding(7, 3, 0, 3);
|
menuStrip.Padding = new Padding(7, 3, 0, 3);
|
||||||
menuStrip.Size = new System.Drawing.Size(190, 24);
|
menuStrip.Size = new Size(177, 25);
|
||||||
menuStrip.TabIndex = 5;
|
menuStrip.TabIndex = 5;
|
||||||
menuStrip.Text = "menuStrip1";
|
menuStrip.Text = "menuStrip1";
|
||||||
//
|
//
|
||||||
// fileToolStripMenuItem
|
// fileToolStripMenuItem
|
||||||
//
|
//
|
||||||
fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
fileToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { SaveToolStripMenuItem, LoadToolStripMenuItem });
|
||||||
SaveToolStripMenuItem,
|
|
||||||
LoadToolStripMenuItem});
|
|
||||||
fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||||
fileToolStripMenuItem.Size = new System.Drawing.Size(48, 20);
|
fileToolStripMenuItem.Size = new Size(48, 19);
|
||||||
fileToolStripMenuItem.Text = "Файл";
|
fileToolStripMenuItem.Text = "Файл";
|
||||||
//
|
//
|
||||||
// SaveToolStripMenuItem
|
// SaveToolStripMenuItem
|
||||||
//
|
//
|
||||||
SaveToolStripMenuItem.Name = "SaveToolStripMenuItem";
|
SaveToolStripMenuItem.Name = "SaveToolStripMenuItem";
|
||||||
SaveToolStripMenuItem.Size = new System.Drawing.Size(141, 22);
|
SaveToolStripMenuItem.Size = new Size(141, 22);
|
||||||
SaveToolStripMenuItem.Text = "Сохранение";
|
SaveToolStripMenuItem.Text = "Сохранение";
|
||||||
SaveToolStripMenuItem.Click += SaveToolStripMenuItem_Click;
|
SaveToolStripMenuItem.Click += SaveToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// LoadToolStripMenuItem
|
// LoadToolStripMenuItem
|
||||||
//
|
//
|
||||||
LoadToolStripMenuItem.Name = "LoadToolStripMenuItem";
|
LoadToolStripMenuItem.Name = "LoadToolStripMenuItem";
|
||||||
LoadToolStripMenuItem.Size = new System.Drawing.Size(141, 22);
|
LoadToolStripMenuItem.Size = new Size(141, 22);
|
||||||
LoadToolStripMenuItem.Text = "Загрузка";
|
LoadToolStripMenuItem.Text = "Загрузка";
|
||||||
LoadToolStripMenuItem.Click += LoadToolStripMenuItem_Click;
|
LoadToolStripMenuItem.Click += LoadToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
|
// pictureBoxCollection
|
||||||
|
//
|
||||||
|
pictureBoxCollection.Location = new Point(1, 4);
|
||||||
|
pictureBoxCollection.Name = "pictureBoxCollection";
|
||||||
|
pictureBoxCollection.Size = new Size(630, 266);
|
||||||
|
pictureBoxCollection.SizeMode = PictureBoxSizeMode.Zoom;
|
||||||
|
pictureBoxCollection.TabIndex = 1;
|
||||||
|
pictureBoxCollection.TabStop = false;
|
||||||
|
//
|
||||||
// openFileDialog
|
// openFileDialog
|
||||||
//
|
//
|
||||||
openFileDialog.FileName = "openFileDialog1";
|
openFileDialog.FileName = "openFileDialog1";
|
||||||
@ -213,9 +210,9 @@
|
|||||||
//
|
//
|
||||||
// FormCruiserCollection
|
// FormCruiserCollection
|
||||||
//
|
//
|
||||||
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||||
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
ClientSize = new System.Drawing.Size(853, 536);
|
ClientSize = new Size(826, 480);
|
||||||
Controls.Add(pictureBoxCollection);
|
Controls.Add(pictureBoxCollection);
|
||||||
Controls.Add(groupBox1);
|
Controls.Add(groupBox1);
|
||||||
MainMenuStrip = menuStrip;
|
MainMenuStrip = menuStrip;
|
||||||
@ -226,11 +223,10 @@
|
|||||||
groupBox1.PerformLayout();
|
groupBox1.PerformLayout();
|
||||||
groupBox2.ResumeLayout(false);
|
groupBox2.ResumeLayout(false);
|
||||||
groupBox2.PerformLayout();
|
groupBox2.PerformLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(pictureBoxCollection)).EndInit();
|
|
||||||
menuStrip.ResumeLayout(false);
|
menuStrip.ResumeLayout(false);
|
||||||
menuStrip.PerformLayout();
|
menuStrip.PerformLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)pictureBoxCollection).EndInit();
|
||||||
ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
using ProjectCruiser.Drawnings;
|
using ProjectCruiser.Drawnings;
|
||||||
using ProjectCruiser.Generics;
|
using ProjectCruiser.Generics;
|
||||||
using ProjectCruiser.MovementStrategy;
|
using ProjectCruiser.MovementStrategy;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace ProjectCruiser
|
namespace ProjectCruiser
|
||||||
@ -10,11 +11,14 @@ namespace ProjectCruiser
|
|||||||
{
|
{
|
||||||
private readonly CruiserGenericStorage _storage;
|
private readonly CruiserGenericStorage _storage;
|
||||||
|
|
||||||
public FormCruiserCollection()
|
private readonly ILogger _logger;
|
||||||
|
|
||||||
|
public FormCruiserCollection(ILogger<FormCruiserCollection> logger)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
_storage = new CruiserGenericStorage(pictureBoxCollection.Width,
|
_storage = new CruiserGenericStorage(pictureBoxCollection.Width,
|
||||||
pictureBoxCollection.Height);
|
pictureBoxCollection.Height);
|
||||||
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ReloadObjects()
|
private void ReloadObjects()
|
||||||
@ -43,10 +47,12 @@ namespace ProjectCruiser
|
|||||||
{
|
{
|
||||||
MessageBox.Show("Не все данные заполнены", "Ошибка",
|
MessageBox.Show("Не все данные заполнены", "Ошибка",
|
||||||
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
_logger.LogWarning("Пустое название набора");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_storage.AddSet(textBoxStorageName.Text);
|
_storage.AddSet(textBoxStorageName.Text);
|
||||||
ReloadObjects();
|
ReloadObjects();
|
||||||
|
_logger.LogInformation($"Добавлен набор:{textBoxStorageName.Text}");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void listBoxStorage_SelectedIndexChanged(object sender,
|
private void listBoxStorage_SelectedIndexChanged(object sender,
|
||||||
@ -60,49 +66,59 @@ namespace ProjectCruiser
|
|||||||
{
|
{
|
||||||
if (listBoxStorage.SelectedIndex == -1)
|
if (listBoxStorage.SelectedIndex == -1)
|
||||||
{
|
{
|
||||||
|
_logger.LogWarning("Удаление невыбранного набора");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
string name = listBoxStorage.SelectedItem.ToString() ?? string.Empty;
|
||||||
if (MessageBox.Show($"Удалить объект {listBoxStorage.SelectedItem}?", "Удаление", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
if (MessageBox.Show($"Удалить объект {listBoxStorage.SelectedItem}?", "Удаление", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||||
|
|
||||||
{
|
{
|
||||||
_storage.DelSet(listBoxStorage.SelectedItem.ToString()
|
_storage.DelSet(listBoxStorage.SelectedItem.ToString()
|
||||||
?? string.Empty);
|
?? string.Empty);
|
||||||
ReloadObjects();
|
ReloadObjects();
|
||||||
}
|
_logger.LogInformation($"Удален набор: {name}");
|
||||||
}
|
|
||||||
|
|
||||||
private void AddCruiser(DrawningCruiser cruiser)
|
|
||||||
{
|
|
||||||
if (listBoxStorage.SelectedIndex == -1)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var obj = _storage[listBoxStorage.SelectedItem.ToString() ?? string.Empty];
|
|
||||||
if (obj != null)
|
|
||||||
{
|
|
||||||
if (obj + cruiser != 1)
|
|
||||||
{
|
|
||||||
MessageBox.Show("Объект добавлен");
|
|
||||||
pictureBoxCollection.Image = obj.ShowCruiser();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MessageBox.Show("Не удалось добавить объект");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buttonAddCruiser_Click(object sender, EventArgs e)
|
private void buttonAddCruiser_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
if (listBoxStorage.SelectedIndex == -1)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var formCruiserConfig = new FormCruiserConfig();
|
var formCruiserConfig = new FormCruiserConfig();
|
||||||
|
|
||||||
|
formCruiserConfig.AddEvent(cruiser =>
|
||||||
|
{
|
||||||
|
var obj = _storage[listBoxStorage.SelectedItem.ToString() ?? string.Empty];
|
||||||
|
if (obj == null)
|
||||||
|
{
|
||||||
|
_logger.LogWarning("Добавление пустого объекта");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
_ = obj + cruiser;
|
||||||
|
|
||||||
|
MessageBox.Show("Объект добавлен");
|
||||||
|
pictureBoxCollection.Image = obj.ShowCruiser();
|
||||||
|
_logger.LogInformation($"Добавлен объект в набор {listBoxStorage.SelectedItem.ToString()}");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show("Не удалось добавить объект");
|
||||||
|
_logger.LogWarning($"{ex.Message} в наборе {listBoxStorage.SelectedItem.ToString()}");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
formCruiserConfig.Show();
|
formCruiserConfig.Show();
|
||||||
formCruiserConfig.AddEvent(AddCruiser);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ButtonRemoveCruiser_Click(object sender, EventArgs e)
|
private void ButtonRemoveCruiser_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (listBoxStorage.SelectedIndex == -1)
|
if (listBoxStorage.SelectedIndex == -1)
|
||||||
{
|
{
|
||||||
|
_logger.LogWarning("Удаление объекта из несуществующего набора");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var obj = _storage[listBoxStorage.SelectedItem.ToString() ??
|
var obj = _storage[listBoxStorage.SelectedItem.ToString() ??
|
||||||
@ -121,10 +137,12 @@ namespace ProjectCruiser
|
|||||||
{
|
{
|
||||||
MessageBox.Show("Объект удален");
|
MessageBox.Show("Объект удален");
|
||||||
pictureBoxCollection.Image = obj.ShowCruiser();
|
pictureBoxCollection.Image = obj.ShowCruiser();
|
||||||
|
_logger.LogInformation($"Удален объект из набора {listBoxStorage.SelectedItem.ToString()}");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MessageBox.Show("Не удалось удалить объект");
|
MessageBox.Show("Не удалось удалить объект");
|
||||||
|
_logger.LogWarning($"Не удалось удалить объект из набора {listBoxStorage.SelectedItem.ToString()}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -146,15 +164,16 @@ namespace ProjectCruiser
|
|||||||
{
|
{
|
||||||
if (saveFileDialog.ShowDialog() == DialogResult.OK)
|
if (saveFileDialog.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
if (_storage.SaveData(saveFileDialog.FileName))
|
try
|
||||||
{
|
{
|
||||||
MessageBox.Show("Сохранение прошло успешно",
|
_storage.SaveData(saveFileDialog.FileName);
|
||||||
"Результат", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
MessageBox.Show("Сохранение прошло успешно", "Результат", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
|
_logger.LogInformation($"Сохранение наборов в файл {saveFileDialog.FileName}");
|
||||||
}
|
}
|
||||||
else
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
MessageBox.Show("Не сохранилось", "Результат",
|
MessageBox.Show($"Не сохранилось: {ex.Message}", "Результат", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
_logger.LogWarning($"Не удалось сохранить наборы с ошибкой: {ex.Message}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -163,14 +182,17 @@ namespace ProjectCruiser
|
|||||||
{
|
{
|
||||||
if (openFileDialog.ShowDialog() == DialogResult.OK)
|
if (openFileDialog.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
if (_storage.LoadData(openFileDialog.FileName))
|
try
|
||||||
{
|
{
|
||||||
MessageBox.Show("Данные успешно загружены.", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
_storage.LoadData(openFileDialog.FileName);
|
||||||
ReloadObjects();
|
ReloadObjects();
|
||||||
|
MessageBox.Show("Загрузка прошла успешно", "Результат", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
|
_logger.LogInformation($"Загрузились наборы из файла {openFileDialog.FileName}");
|
||||||
}
|
}
|
||||||
else
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
MessageBox.Show("Ошибка при загрузке данных.", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
MessageBox.Show($"Не загрузилось: {ex.Message}", "Результат", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
_logger.LogWarning($"Не удалось загрузить наборы с ошибкой: {ex.Message}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,64 @@
|
|||||||
<root>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
@ -66,7 +126,4 @@
|
|||||||
<metadata name="saveFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="saveFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>281, 16</value>
|
<value>281, 16</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="$TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>74</value>
|
|
||||||
</metadata>
|
|
||||||
</root>
|
</root>
|
@ -1,17 +1,41 @@
|
|||||||
|
using ProjectCruiser;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using NLog.Extensions.Logging;
|
||||||
|
using Serilog;
|
||||||
namespace ProjectCruiser
|
namespace ProjectCruiser
|
||||||
{
|
{
|
||||||
internal static class Program
|
internal static class Program
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// The main entry point for the application.
|
|
||||||
/// </summary>
|
|
||||||
[STAThread]
|
[STAThread]
|
||||||
static void Main()
|
static void Main()
|
||||||
{
|
{
|
||||||
// To customize application configuration such as set high DPI settings or default font,
|
|
||||||
// see https://aka.ms/applicationconfiguration.
|
|
||||||
ApplicationConfiguration.Initialize();
|
ApplicationConfiguration.Initialize();
|
||||||
Application.Run(new FormCruiserCollection());
|
var services = new ServiceCollection();
|
||||||
|
ConfigureServices(services);
|
||||||
|
using (ServiceProvider serviceProvider = services.BuildServiceProvider())
|
||||||
|
{
|
||||||
|
Application.Run(serviceProvider.GetRequiredService<FormCruiserCollection>());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void ConfigureServices(ServiceCollection services)
|
||||||
|
{
|
||||||
|
services.AddSingleton<FormCruiserCollection>().AddLogging(option =>
|
||||||
|
{
|
||||||
|
string[] path = Directory.GetCurrentDirectory().Split('\\');
|
||||||
|
string pathNeed = "";
|
||||||
|
for (int i = 0; i < path.Length - 3; i++)
|
||||||
|
{
|
||||||
|
pathNeed += path[i] + "\\";
|
||||||
|
}
|
||||||
|
var configuration = new ConfigurationBuilder().SetBasePath(Directory.GetCurrentDirectory()).AddJsonFile(path: $"{pathNeed}appsettings.json", optional: false, reloadOnChange: true).Build();
|
||||||
|
var logger = new LoggerConfiguration().ReadFrom.Configuration(configuration).CreateLogger();
|
||||||
|
|
||||||
|
option.SetMinimumLevel(LogLevel.Information);
|
||||||
|
option.AddSerilog(logger);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
4
Cruiser/Cruiser/Properties/Resources.Designer.cs
generated
4
Cruiser/Cruiser/Properties/Resources.Designer.cs
generated
@ -8,7 +8,7 @@
|
|||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace ProjectCruiser.Properties {
|
namespace Cruiser.Properties {
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ namespace ProjectCruiser.Properties {
|
|||||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
get {
|
get {
|
||||||
if (object.ReferenceEquals(resourceMan, null)) {
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ProjectCruiser.Properties.Resources", typeof(Resources).Assembly);
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Cruiser.Properties.Resources", typeof(Resources).Assembly);
|
||||||
resourceMan = temp;
|
resourceMan = temp;
|
||||||
}
|
}
|
||||||
return resourceMan;
|
return resourceMan;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
using System;
|
using Cruiser;
|
||||||
|
using Cruiser.Exceptions;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@ -23,25 +25,51 @@ namespace ProjectCruiser.Generics
|
|||||||
|
|
||||||
public int Insert(T cruiser)
|
public int Insert(T cruiser)
|
||||||
{
|
{
|
||||||
return Insert(cruiser, 0);
|
if (_places.Count == 0)
|
||||||
|
{
|
||||||
|
_places.Add(cruiser);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (_places.Count < _maxCount)
|
||||||
|
{
|
||||||
|
_places.Add(cruiser);
|
||||||
|
for (int i = 0; i < _places.Count; i++)
|
||||||
|
{
|
||||||
|
T temp = _places[i];
|
||||||
|
_places[i] = _places[_places.Count - 1];
|
||||||
|
_places[_places.Count - 1] = temp;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new StorageOverflowException(_places.Count);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Insert(T cruiser, int position)
|
public bool Insert(T cruiser, int position)
|
||||||
{
|
{
|
||||||
if (position < 0 || position >= _maxCount)
|
if (position < 0 || position >= _maxCount)
|
||||||
return -1;
|
throw new CruiserNotFoundException(position);
|
||||||
|
|
||||||
if (Count >= _maxCount)
|
if (Count >= _maxCount)
|
||||||
return -1;
|
throw new StorageOverflowException(position);
|
||||||
|
_places.Insert(0, cruiser);
|
||||||
_places.Insert(position, cruiser);
|
return true;
|
||||||
return position;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Remove(int position)
|
public bool Remove(int position)
|
||||||
{
|
{
|
||||||
if ((position < 0) || (position > _maxCount)) return false;
|
if (position < 0 || position > _maxCount || position >= Count)
|
||||||
_places.RemoveAt(position);
|
throw new CruiserNotFoundException();
|
||||||
|
if (_places[position] == null)
|
||||||
|
{
|
||||||
|
throw new CruiserNotFoundException();
|
||||||
|
}
|
||||||
|
_places[position] = null;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
18
Cruiser/Cruiser/StorageOverflowException.cs
Normal file
18
Cruiser/Cruiser/StorageOverflowException.cs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Cruiser.Exceptions
|
||||||
|
{
|
||||||
|
[Serializable] internal class StorageOverflowException : ApplicationException
|
||||||
|
{
|
||||||
|
public StorageOverflowException(int count) : base($"В наборе превышено допустимое количество: {count}") { }
|
||||||
|
public StorageOverflowException() : base() { }
|
||||||
|
public StorageOverflowException(string message) : base(message) { }
|
||||||
|
public StorageOverflowException(string message, Exception exception) : base(message, exception) { }
|
||||||
|
protected StorageOverflowException(SerializationInfo info, StreamingContext contex) : base(info, contex) { }
|
||||||
|
}
|
||||||
|
}
|
20
Cruiser/Cruiser/appsettings.json
Normal file
20
Cruiser/Cruiser/appsettings.json
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"Serilog": {
|
||||||
|
"Using": [ "Serilog.Sinks.File" ],
|
||||||
|
"MinimumLevel": "Information",
|
||||||
|
"WriteTo": [
|
||||||
|
{
|
||||||
|
"Name": "File",
|
||||||
|
"Args": {
|
||||||
|
"path": "Logs/log_.log",
|
||||||
|
"rollingInterval": "Day",
|
||||||
|
"outputTemplate": "[{Timestamp:HH:mm:ss.fff}]{Level:u4}: {Message:lj}{NewLine}{Exception}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Enrich": [ "FromLogContext", "WithMachineName", "WithThreadId" ],
|
||||||
|
"Properties": {
|
||||||
|
"Application": "GasolineTanker"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user