Усё
This commit is contained in:
parent
e12182dbf3
commit
f74fd6dc1a
@ -1,8 +1,5 @@
|
||||
|
||||
|
||||
using BackpackGreedyAlgorithm.Algorithm;
|
||||
using BackpackGreedyAlgorithm.Algorithm;
|
||||
using BackpackGreedyAlgorithm.Storages;
|
||||
using static System.Runtime.InteropServices.JavaScript.JSType;
|
||||
|
||||
namespace BackpackGreedyAlgorithm.Communications;
|
||||
|
||||
@ -16,7 +13,7 @@ public class Manager
|
||||
/// <summary>
|
||||
/// Реализатор
|
||||
/// </summary>
|
||||
GreedyAlgorithm backpack;
|
||||
private GreedyAlgorithm _backpack;
|
||||
|
||||
/// <summary>
|
||||
/// Конструктор
|
||||
@ -24,11 +21,11 @@ public class Manager
|
||||
/// <param name="data">Параметры для работы алгоритма</param>
|
||||
public Manager(Datas? data)
|
||||
{
|
||||
backpack = new GreedyAlgorithm(data);
|
||||
_backpack = new GreedyAlgorithm(data);
|
||||
if (data != null)
|
||||
{
|
||||
backpack.SaveStatus();
|
||||
storage.AddStatus(backpack.status);
|
||||
_backpack.SaveStatus();
|
||||
storage.AddStatus(_backpack.status);
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,9 +35,9 @@ public class Manager
|
||||
/// <returns>Хранилище с результатом шага</returns>
|
||||
public Storage MakeStap()
|
||||
{
|
||||
backpack.PutGem();
|
||||
backpack.SaveStatus();
|
||||
storage.AddStatus(backpack.status);
|
||||
_backpack.PutGem();
|
||||
_backpack.SaveStatus();
|
||||
if (_backpack.status.maxWeight > _backpack.status.weight + _backpack.status.gems[_backpack.status.gems.Count - 1].weight) storage.AddStatus(_backpack.status);
|
||||
return storage;
|
||||
}
|
||||
|
||||
@ -51,7 +48,7 @@ public class Manager
|
||||
/// <param name="storage">Хранилище</param>
|
||||
public void SetStatusAlgoritm(Status status, Storage storage)
|
||||
{
|
||||
backpack.ReturnToStatus(status);
|
||||
_backpack.ReturnToStatus(status);
|
||||
this.storage = storage;
|
||||
}
|
||||
}
|
||||
|
@ -16,12 +16,12 @@ public class Visualizer
|
||||
private string _weightBackpack;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// Текст с ценностью рюкзака
|
||||
/// </summary>
|
||||
private Label _valueL;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// Текст с весом рюкзака
|
||||
/// </summary>
|
||||
private Label _weightL;
|
||||
|
||||
@ -73,6 +73,9 @@ public class Visualizer
|
||||
case "panelWeight":
|
||||
GetLabel((Panel)info, "labelWeight").Text = gem.weight.ToString();
|
||||
break;
|
||||
case "labelId":
|
||||
((Label)info).Text = gem.id.ToString();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -78,26 +78,29 @@
|
||||
labelAboutAlgoritm = new Label();
|
||||
labelInfo = new Label();
|
||||
groupBoxMainWindow = new GroupBox();
|
||||
label13 = new Label();
|
||||
panel8 = new Panel();
|
||||
label14 = new Label();
|
||||
label30 = new Label();
|
||||
buttonData = new Button();
|
||||
label29 = new Label();
|
||||
label28 = new Label();
|
||||
label27 = new Label();
|
||||
label26 = new Label();
|
||||
label25 = new Label();
|
||||
panel7 = new Panel();
|
||||
label24 = new Label();
|
||||
pictureBox1 = new PictureBox();
|
||||
groupBoxTools = new GroupBox();
|
||||
buttonStart = new Button();
|
||||
buttonStep = new Button();
|
||||
buttonReset = new Button();
|
||||
buttonStepPrev = new Button();
|
||||
buttonStepNext = new Button();
|
||||
panelElem = new Panel();
|
||||
panelWeight0 = new Panel();
|
||||
pictureBoxElem0 = new PictureBox();
|
||||
panelValue0 = new Panel();
|
||||
panel8 = new Panel();
|
||||
label13 = new Label();
|
||||
label14 = new Label();
|
||||
label15 = new Label();
|
||||
label27 = new Label();
|
||||
label31 = new Label();
|
||||
groupBoxAboutAlgoritm.SuspendLayout();
|
||||
groupBox3.SuspendLayout();
|
||||
groupBox1.SuspendLayout();
|
||||
@ -115,12 +118,12 @@
|
||||
groupBoxInfo.SuspendLayout();
|
||||
groupBox2.SuspendLayout();
|
||||
groupBoxMainWindow.SuspendLayout();
|
||||
panel8.SuspendLayout();
|
||||
panel7.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit();
|
||||
groupBoxTools.SuspendLayout();
|
||||
panelElem.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBoxElem0).BeginInit();
|
||||
panel8.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// groupBoxAboutAlgoritm
|
||||
@ -647,13 +650,15 @@
|
||||
//
|
||||
// groupBoxMainWindow
|
||||
//
|
||||
groupBoxMainWindow.Controls.Add(label31);
|
||||
groupBoxMainWindow.Controls.Add(label27);
|
||||
groupBoxMainWindow.Controls.Add(label15);
|
||||
groupBoxMainWindow.Controls.Add(label13);
|
||||
groupBoxMainWindow.Controls.Add(panel8);
|
||||
groupBoxMainWindow.Controls.Add(label30);
|
||||
groupBoxMainWindow.Controls.Add(buttonData);
|
||||
groupBoxMainWindow.Controls.Add(label29);
|
||||
groupBoxMainWindow.Controls.Add(label28);
|
||||
groupBoxMainWindow.Controls.Add(label27);
|
||||
groupBoxMainWindow.Controls.Add(label26);
|
||||
groupBoxMainWindow.Controls.Add(label25);
|
||||
groupBoxMainWindow.Controls.Add(panel7);
|
||||
@ -668,10 +673,40 @@
|
||||
groupBoxMainWindow.Text = "О главном окне";
|
||||
groupBoxMainWindow.Visible = false;
|
||||
//
|
||||
// label13
|
||||
//
|
||||
label13.AutoSize = true;
|
||||
label13.Location = new Point(241, 297);
|
||||
label13.Name = "label13";
|
||||
label13.Size = new Size(146, 20);
|
||||
label13.TabIndex = 27;
|
||||
label13.Text = "- Текущая ценность";
|
||||
//
|
||||
// panel8
|
||||
//
|
||||
panel8.BackgroundImage = (Image)resources.GetObject("panel8.BackgroundImage");
|
||||
panel8.BackgroundImageLayout = ImageLayout.Zoom;
|
||||
panel8.Controls.Add(label14);
|
||||
panel8.Location = new Point(168, 267);
|
||||
panel8.Name = "panel8";
|
||||
panel8.Size = new Size(74, 78);
|
||||
panel8.TabIndex = 26;
|
||||
//
|
||||
// label14
|
||||
//
|
||||
label14.AutoSize = true;
|
||||
label14.BackColor = Color.Transparent;
|
||||
label14.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
label14.Location = new Point(29, 29);
|
||||
label14.Name = "label14";
|
||||
label14.Size = new Size(18, 20);
|
||||
label14.TabIndex = 28;
|
||||
label14.Text = "0";
|
||||
//
|
||||
// label30
|
||||
//
|
||||
label30.AutoSize = true;
|
||||
label30.Location = new Point(501, 153);
|
||||
label30.Location = new Point(496, 176);
|
||||
label30.Name = "label30";
|
||||
label30.Size = new Size(228, 20);
|
||||
label30.TabIndex = 25;
|
||||
@ -679,7 +714,7 @@
|
||||
//
|
||||
// buttonData
|
||||
//
|
||||
buttonData.Location = new Point(343, 149);
|
||||
buttonData.Location = new Point(338, 172);
|
||||
buttonData.Name = "buttonData";
|
||||
buttonData.Size = new Size(157, 29);
|
||||
buttonData.TabIndex = 24;
|
||||
@ -698,20 +733,11 @@
|
||||
// label28
|
||||
//
|
||||
label28.AutoSize = true;
|
||||
label28.Location = new Point(501, 95);
|
||||
label28.Location = new Point(501, 53);
|
||||
label28.Name = "label28";
|
||||
label28.Size = new Size(287, 20);
|
||||
label28.Size = new Size(236, 20);
|
||||
label28.TabIndex = 22;
|
||||
label28.Text = "- Сделать шаг в выполнении алгоритма";
|
||||
//
|
||||
// label27
|
||||
//
|
||||
label27.AutoSize = true;
|
||||
label27.Location = new Point(501, 60);
|
||||
label27.Name = "label27";
|
||||
label27.Size = new Size(157, 20);
|
||||
label27.TabIndex = 21;
|
||||
label27.Text = "- Запустить алгоритм";
|
||||
label28.Text = "- Сделать вперёд шаг алгоритма";
|
||||
//
|
||||
// label26
|
||||
//
|
||||
@ -765,32 +791,42 @@
|
||||
//
|
||||
// groupBoxTools
|
||||
//
|
||||
groupBoxTools.Controls.Add(buttonStart);
|
||||
groupBoxTools.Controls.Add(buttonStep);
|
||||
groupBoxTools.Controls.Add(buttonReset);
|
||||
groupBoxTools.Controls.Add(buttonStepPrev);
|
||||
groupBoxTools.Controls.Add(buttonStepNext);
|
||||
groupBoxTools.Location = new Point(337, 23);
|
||||
groupBoxTools.Name = "groupBoxTools";
|
||||
groupBoxTools.Size = new Size(169, 117);
|
||||
groupBoxTools.Size = new Size(169, 143);
|
||||
groupBoxTools.TabIndex = 15;
|
||||
groupBoxTools.TabStop = false;
|
||||
groupBoxTools.Text = "Инструменты";
|
||||
//
|
||||
// buttonStart
|
||||
// buttonReset
|
||||
//
|
||||
buttonStart.Location = new Point(6, 33);
|
||||
buttonStart.Name = "buttonStart";
|
||||
buttonStart.Size = new Size(157, 29);
|
||||
buttonStart.TabIndex = 2;
|
||||
buttonStart.Text = "Запустить";
|
||||
buttonStart.UseVisualStyleBackColor = true;
|
||||
buttonReset.Location = new Point(12, 94);
|
||||
buttonReset.Name = "buttonReset";
|
||||
buttonReset.Size = new Size(146, 29);
|
||||
buttonReset.TabIndex = 7;
|
||||
buttonReset.Text = "Сброс";
|
||||
buttonReset.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// buttonStep
|
||||
// buttonStepPrev
|
||||
//
|
||||
buttonStep.Location = new Point(6, 68);
|
||||
buttonStep.Name = "buttonStep";
|
||||
buttonStep.Size = new Size(157, 29);
|
||||
buttonStep.TabIndex = 0;
|
||||
buttonStep.Text = "Шаг";
|
||||
buttonStep.UseVisualStyleBackColor = true;
|
||||
buttonStepPrev.Location = new Point(12, 59);
|
||||
buttonStepPrev.Name = "buttonStepPrev";
|
||||
buttonStepPrev.Size = new Size(146, 29);
|
||||
buttonStepPrev.TabIndex = 6;
|
||||
buttonStepPrev.Text = "Шаг назад";
|
||||
buttonStepPrev.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// buttonStepNext
|
||||
//
|
||||
buttonStepNext.Location = new Point(12, 25);
|
||||
buttonStepNext.Name = "buttonStepNext";
|
||||
buttonStepNext.Size = new Size(146, 29);
|
||||
buttonStepNext.TabIndex = 5;
|
||||
buttonStepNext.Text = "Шаг вперёд";
|
||||
buttonStepNext.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// panelElem
|
||||
//
|
||||
@ -831,35 +867,32 @@
|
||||
panelValue0.Size = new Size(48, 47);
|
||||
panelValue0.TabIndex = 10;
|
||||
//
|
||||
// panel8
|
||||
// label15
|
||||
//
|
||||
panel8.BackgroundImage = (Image)resources.GetObject("panel8.BackgroundImage");
|
||||
panel8.BackgroundImageLayout = ImageLayout.Zoom;
|
||||
panel8.Controls.Add(label14);
|
||||
panel8.Location = new Point(168, 267);
|
||||
panel8.Name = "panel8";
|
||||
panel8.Size = new Size(74, 78);
|
||||
panel8.TabIndex = 26;
|
||||
label15.AutoSize = true;
|
||||
label15.Location = new Point(501, 87);
|
||||
label15.Name = "label15";
|
||||
label15.Size = new Size(226, 20);
|
||||
label15.TabIndex = 28;
|
||||
label15.Text = "- Сделать шаг назад алгоритма";
|
||||
//
|
||||
// label13
|
||||
// label27
|
||||
//
|
||||
label13.AutoSize = true;
|
||||
label13.Location = new Point(241, 297);
|
||||
label13.Name = "label13";
|
||||
label13.Size = new Size(146, 20);
|
||||
label13.TabIndex = 27;
|
||||
label13.Text = "- Текущая ценность";
|
||||
label27.AutoSize = true;
|
||||
label27.Location = new Point(501, 120);
|
||||
label27.Name = "label27";
|
||||
label27.Size = new Size(218, 20);
|
||||
label27.TabIndex = 29;
|
||||
label27.Text = "- Сбросить алгоритм к началу";
|
||||
//
|
||||
// label14
|
||||
// label31
|
||||
//
|
||||
label14.AutoSize = true;
|
||||
label14.BackColor = Color.Transparent;
|
||||
label14.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
label14.Location = new Point(29, 29);
|
||||
label14.Name = "label14";
|
||||
label14.Size = new Size(18, 20);
|
||||
label14.TabIndex = 28;
|
||||
label14.Text = "0";
|
||||
label31.AutoSize = true;
|
||||
label31.Location = new Point(496, 265);
|
||||
label31.Name = "label31";
|
||||
label31.Size = new Size(312, 100);
|
||||
label31.TabIndex = 30;
|
||||
label31.Text = "Так же в алгоритме присутствует\r\nвозможность сохранения и загрузки\r\n\r\nЗагрузка: Файл -> Загрузить (CTRL+L)\r\nСохранение: Файл -> Сохранить (CTRL+S)\r\n";
|
||||
//
|
||||
// InformationForm
|
||||
//
|
||||
@ -902,14 +935,14 @@
|
||||
groupBox2.PerformLayout();
|
||||
groupBoxMainWindow.ResumeLayout(false);
|
||||
groupBoxMainWindow.PerformLayout();
|
||||
panel8.ResumeLayout(false);
|
||||
panel8.PerformLayout();
|
||||
panel7.ResumeLayout(false);
|
||||
panel7.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit();
|
||||
groupBoxTools.ResumeLayout(false);
|
||||
panelElem.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)pictureBoxElem0).EndInit();
|
||||
panel8.ResumeLayout(false);
|
||||
panel8.PerformLayout();
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
@ -968,8 +1001,6 @@
|
||||
private PictureBox pictureBoxElem0;
|
||||
private Panel panelValue0;
|
||||
private GroupBox groupBoxTools;
|
||||
private Button buttonStart;
|
||||
private Button buttonStep;
|
||||
private Panel panel7;
|
||||
private Label label24;
|
||||
private PictureBox pictureBox1;
|
||||
@ -977,11 +1008,16 @@
|
||||
private Label label25;
|
||||
private Label label29;
|
||||
private Label label28;
|
||||
private Label label27;
|
||||
private Label label30;
|
||||
private Button buttonData;
|
||||
private Label label13;
|
||||
private Panel panel8;
|
||||
private Label label14;
|
||||
private Button buttonReset;
|
||||
private Button buttonStepPrev;
|
||||
private Button buttonStepNext;
|
||||
private Label label31;
|
||||
private Label label27;
|
||||
private Label label15;
|
||||
}
|
||||
}
|
@ -1,5 +1,4 @@
|
||||
using BackpackGreedyAlgorithm.Algorithm;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace BackpackGreedyAlgorithm;
|
||||
@ -188,6 +187,4 @@ public partial class InputForm : Form
|
||||
{
|
||||
e.Effect = e.Data.GetDataPresent(typeof(Bitmap)) ? DragDropEffects.Copy : DragDropEffects.None;
|
||||
}
|
||||
|
||||
// TODO Сделать кнопку рандомайзер значений
|
||||
}
|
||||
|
@ -234,11 +234,14 @@
|
||||
//
|
||||
labelValue0.AutoSize = true;
|
||||
labelValue0.BackColor = Color.Transparent;
|
||||
labelValue0.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelValue0.Location = new Point(1, 12);
|
||||
labelValue0.MinimumSize = new Size(48, 0);
|
||||
labelValue0.Name = "labelValue0";
|
||||
labelValue0.Size = new Size(45, 20);
|
||||
labelValue0.Size = new Size(48, 20);
|
||||
labelValue0.TabIndex = 15;
|
||||
labelValue0.Text = "None";
|
||||
labelValue0.TextAlign = ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// panelWeight0
|
||||
//
|
||||
@ -254,12 +257,15 @@
|
||||
//
|
||||
labelWeight0.AutoSize = true;
|
||||
labelWeight0.BackColor = Color.Transparent;
|
||||
labelWeight0.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelWeight0.ForeColor = Color.White;
|
||||
labelWeight0.Location = new Point(2, 21);
|
||||
labelWeight0.MinimumSize = new Size(48, 0);
|
||||
labelWeight0.Name = "labelWeight0";
|
||||
labelWeight0.Size = new Size(45, 20);
|
||||
labelWeight0.Size = new Size(48, 20);
|
||||
labelWeight0.TabIndex = 14;
|
||||
labelWeight0.Text = "None";
|
||||
labelWeight0.TextAlign = ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// pictureBoxElem0
|
||||
//
|
||||
@ -308,11 +314,13 @@
|
||||
labelBackpackWeight.AutoSize = true;
|
||||
labelBackpackWeight.BackColor = Color.Transparent;
|
||||
labelBackpackWeight.ForeColor = Color.White;
|
||||
labelBackpackWeight.Location = new Point(14, 45);
|
||||
labelBackpackWeight.Location = new Point(0, 45);
|
||||
labelBackpackWeight.MinimumSize = new Size(74, 0);
|
||||
labelBackpackWeight.Name = "labelBackpackWeight";
|
||||
labelBackpackWeight.Size = new Size(45, 20);
|
||||
labelBackpackWeight.Size = new Size(74, 20);
|
||||
labelBackpackWeight.TabIndex = 0;
|
||||
labelBackpackWeight.Text = "None";
|
||||
labelBackpackWeight.TextAlign = ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// panelBackpackValue
|
||||
//
|
||||
@ -329,11 +337,13 @@
|
||||
labelBackpackValue.AutoSize = true;
|
||||
labelBackpackValue.BackColor = Color.Transparent;
|
||||
labelBackpackValue.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelBackpackValue.Location = new Point(13, 30);
|
||||
labelBackpackValue.Location = new Point(0, 28);
|
||||
labelBackpackValue.MinimumSize = new Size(74, 0);
|
||||
labelBackpackValue.Name = "labelBackpackValue";
|
||||
labelBackpackValue.Size = new Size(47, 20);
|
||||
labelBackpackValue.Size = new Size(74, 20);
|
||||
labelBackpackValue.TabIndex = 0;
|
||||
labelBackpackValue.Text = "None";
|
||||
labelBackpackValue.TextAlign = ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// groupBoxElems
|
||||
//
|
||||
@ -380,12 +390,15 @@
|
||||
//
|
||||
labelWeight8.AutoSize = true;
|
||||
labelWeight8.BackColor = Color.Transparent;
|
||||
labelWeight8.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelWeight8.ForeColor = Color.White;
|
||||
labelWeight8.Location = new Point(2, 21);
|
||||
labelWeight8.MinimumSize = new Size(48, 0);
|
||||
labelWeight8.Name = "labelWeight8";
|
||||
labelWeight8.Size = new Size(45, 20);
|
||||
labelWeight8.Size = new Size(48, 20);
|
||||
labelWeight8.TabIndex = 14;
|
||||
labelWeight8.Text = "None";
|
||||
labelWeight8.TextAlign = ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// labelId8
|
||||
//
|
||||
@ -421,11 +434,14 @@
|
||||
//
|
||||
labelValue8.AutoSize = true;
|
||||
labelValue8.BackColor = Color.Transparent;
|
||||
labelValue8.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelValue8.Location = new Point(1, 12);
|
||||
labelValue8.MinimumSize = new Size(48, 0);
|
||||
labelValue8.Name = "labelValue8";
|
||||
labelValue8.Size = new Size(45, 20);
|
||||
labelValue8.Size = new Size(48, 20);
|
||||
labelValue8.TabIndex = 15;
|
||||
labelValue8.Text = "None";
|
||||
labelValue8.TextAlign = ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// panelElem7
|
||||
//
|
||||
@ -453,12 +469,15 @@
|
||||
//
|
||||
labelWeight7.AutoSize = true;
|
||||
labelWeight7.BackColor = Color.Transparent;
|
||||
labelWeight7.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelWeight7.ForeColor = Color.White;
|
||||
labelWeight7.Location = new Point(2, 21);
|
||||
labelWeight7.MinimumSize = new Size(48, 0);
|
||||
labelWeight7.Name = "labelWeight7";
|
||||
labelWeight7.Size = new Size(45, 20);
|
||||
labelWeight7.Size = new Size(48, 20);
|
||||
labelWeight7.TabIndex = 14;
|
||||
labelWeight7.Text = "None";
|
||||
labelWeight7.TextAlign = ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// labelId7
|
||||
//
|
||||
@ -494,11 +513,14 @@
|
||||
//
|
||||
labelValue7.AutoSize = true;
|
||||
labelValue7.BackColor = Color.Transparent;
|
||||
labelValue7.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelValue7.Location = new Point(1, 12);
|
||||
labelValue7.MinimumSize = new Size(48, 0);
|
||||
labelValue7.Name = "labelValue7";
|
||||
labelValue7.Size = new Size(45, 20);
|
||||
labelValue7.Size = new Size(48, 20);
|
||||
labelValue7.TabIndex = 15;
|
||||
labelValue7.Text = "None";
|
||||
labelValue7.TextAlign = ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// panelElem6
|
||||
//
|
||||
@ -526,12 +548,15 @@
|
||||
//
|
||||
labelWeight6.AutoSize = true;
|
||||
labelWeight6.BackColor = Color.Transparent;
|
||||
labelWeight6.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelWeight6.ForeColor = Color.White;
|
||||
labelWeight6.Location = new Point(2, 21);
|
||||
labelWeight6.MinimumSize = new Size(48, 0);
|
||||
labelWeight6.Name = "labelWeight6";
|
||||
labelWeight6.Size = new Size(45, 20);
|
||||
labelWeight6.Size = new Size(48, 20);
|
||||
labelWeight6.TabIndex = 14;
|
||||
labelWeight6.Text = "None";
|
||||
labelWeight6.TextAlign = ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// labelId6
|
||||
//
|
||||
@ -567,11 +592,14 @@
|
||||
//
|
||||
labelValue6.AutoSize = true;
|
||||
labelValue6.BackColor = Color.Transparent;
|
||||
labelValue6.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelValue6.Location = new Point(1, 12);
|
||||
labelValue6.MinimumSize = new Size(48, 0);
|
||||
labelValue6.Name = "labelValue6";
|
||||
labelValue6.Size = new Size(45, 20);
|
||||
labelValue6.Size = new Size(48, 20);
|
||||
labelValue6.TabIndex = 15;
|
||||
labelValue6.Text = "None";
|
||||
labelValue6.TextAlign = ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// panelElem5
|
||||
//
|
||||
@ -599,12 +627,15 @@
|
||||
//
|
||||
labelWeight5.AutoSize = true;
|
||||
labelWeight5.BackColor = Color.Transparent;
|
||||
labelWeight5.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelWeight5.ForeColor = Color.White;
|
||||
labelWeight5.Location = new Point(2, 21);
|
||||
labelWeight5.MinimumSize = new Size(48, 0);
|
||||
labelWeight5.Name = "labelWeight5";
|
||||
labelWeight5.Size = new Size(45, 20);
|
||||
labelWeight5.Size = new Size(48, 20);
|
||||
labelWeight5.TabIndex = 14;
|
||||
labelWeight5.Text = "None";
|
||||
labelWeight5.TextAlign = ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// labelId5
|
||||
//
|
||||
@ -640,11 +671,14 @@
|
||||
//
|
||||
labelValue5.AutoSize = true;
|
||||
labelValue5.BackColor = Color.Transparent;
|
||||
labelValue5.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelValue5.Location = new Point(1, 12);
|
||||
labelValue5.MinimumSize = new Size(48, 0);
|
||||
labelValue5.Name = "labelValue5";
|
||||
labelValue5.Size = new Size(45, 20);
|
||||
labelValue5.Size = new Size(48, 20);
|
||||
labelValue5.TabIndex = 15;
|
||||
labelValue5.Text = "None";
|
||||
labelValue5.TextAlign = ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// panelElem4
|
||||
//
|
||||
@ -672,12 +706,15 @@
|
||||
//
|
||||
labelWeight4.AutoSize = true;
|
||||
labelWeight4.BackColor = Color.Transparent;
|
||||
labelWeight4.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelWeight4.ForeColor = Color.White;
|
||||
labelWeight4.Location = new Point(2, 21);
|
||||
labelWeight4.MinimumSize = new Size(48, 0);
|
||||
labelWeight4.Name = "labelWeight4";
|
||||
labelWeight4.Size = new Size(45, 20);
|
||||
labelWeight4.Size = new Size(48, 20);
|
||||
labelWeight4.TabIndex = 14;
|
||||
labelWeight4.Text = "None";
|
||||
labelWeight4.TextAlign = ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// labelId4
|
||||
//
|
||||
@ -713,11 +750,14 @@
|
||||
//
|
||||
labelValue4.AutoSize = true;
|
||||
labelValue4.BackColor = Color.Transparent;
|
||||
labelValue4.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelValue4.Location = new Point(1, 12);
|
||||
labelValue4.MinimumSize = new Size(48, 0);
|
||||
labelValue4.Name = "labelValue4";
|
||||
labelValue4.Size = new Size(45, 20);
|
||||
labelValue4.Size = new Size(48, 20);
|
||||
labelValue4.TabIndex = 15;
|
||||
labelValue4.Text = "None";
|
||||
labelValue4.TextAlign = ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// panelElem3
|
||||
//
|
||||
@ -745,12 +785,15 @@
|
||||
//
|
||||
labelWeight3.AutoSize = true;
|
||||
labelWeight3.BackColor = Color.Transparent;
|
||||
labelWeight3.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelWeight3.ForeColor = Color.White;
|
||||
labelWeight3.Location = new Point(2, 21);
|
||||
labelWeight3.MinimumSize = new Size(48, 0);
|
||||
labelWeight3.Name = "labelWeight3";
|
||||
labelWeight3.Size = new Size(45, 20);
|
||||
labelWeight3.Size = new Size(48, 20);
|
||||
labelWeight3.TabIndex = 14;
|
||||
labelWeight3.Text = "None";
|
||||
labelWeight3.TextAlign = ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// labelId3
|
||||
//
|
||||
@ -786,11 +829,14 @@
|
||||
//
|
||||
labelValue3.AutoSize = true;
|
||||
labelValue3.BackColor = Color.Transparent;
|
||||
labelValue3.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelValue3.Location = new Point(1, 12);
|
||||
labelValue3.MinimumSize = new Size(48, 0);
|
||||
labelValue3.Name = "labelValue3";
|
||||
labelValue3.Size = new Size(45, 20);
|
||||
labelValue3.Size = new Size(48, 20);
|
||||
labelValue3.TabIndex = 15;
|
||||
labelValue3.Text = "None";
|
||||
labelValue3.TextAlign = ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// panelElem2
|
||||
//
|
||||
@ -818,12 +864,15 @@
|
||||
//
|
||||
labelWeight2.AutoSize = true;
|
||||
labelWeight2.BackColor = Color.Transparent;
|
||||
labelWeight2.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelWeight2.ForeColor = Color.White;
|
||||
labelWeight2.Location = new Point(2, 21);
|
||||
labelWeight2.MinimumSize = new Size(48, 0);
|
||||
labelWeight2.Name = "labelWeight2";
|
||||
labelWeight2.Size = new Size(45, 20);
|
||||
labelWeight2.Size = new Size(48, 20);
|
||||
labelWeight2.TabIndex = 14;
|
||||
labelWeight2.Text = "None";
|
||||
labelWeight2.TextAlign = ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// labelId2
|
||||
//
|
||||
@ -859,11 +908,14 @@
|
||||
//
|
||||
labelValue2.AutoSize = true;
|
||||
labelValue2.BackColor = Color.Transparent;
|
||||
labelValue2.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelValue2.Location = new Point(1, 12);
|
||||
labelValue2.MinimumSize = new Size(48, 0);
|
||||
labelValue2.Name = "labelValue2";
|
||||
labelValue2.Size = new Size(45, 20);
|
||||
labelValue2.Size = new Size(48, 20);
|
||||
labelValue2.TabIndex = 15;
|
||||
labelValue2.Text = "None";
|
||||
labelValue2.TextAlign = ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// panelElem1
|
||||
//
|
||||
@ -891,12 +943,15 @@
|
||||
//
|
||||
labelWeight1.AutoSize = true;
|
||||
labelWeight1.BackColor = Color.Transparent;
|
||||
labelWeight1.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelWeight1.ForeColor = Color.White;
|
||||
labelWeight1.Location = new Point(2, 21);
|
||||
labelWeight1.MinimumSize = new Size(48, 0);
|
||||
labelWeight1.Name = "labelWeight1";
|
||||
labelWeight1.Size = new Size(45, 20);
|
||||
labelWeight1.Size = new Size(48, 20);
|
||||
labelWeight1.TabIndex = 14;
|
||||
labelWeight1.Text = "None";
|
||||
labelWeight1.TextAlign = ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// labelId1
|
||||
//
|
||||
@ -932,16 +987,19 @@
|
||||
//
|
||||
labelValue1.AutoSize = true;
|
||||
labelValue1.BackColor = Color.Transparent;
|
||||
labelValue1.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelValue1.Location = new Point(1, 12);
|
||||
labelValue1.MinimumSize = new Size(48, 0);
|
||||
labelValue1.Name = "labelValue1";
|
||||
labelValue1.Size = new Size(45, 20);
|
||||
labelValue1.Size = new Size(48, 20);
|
||||
labelValue1.TabIndex = 15;
|
||||
labelValue1.Text = "None";
|
||||
labelValue1.TextAlign = ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// menuStrip
|
||||
//
|
||||
menuStrip.ImageScalingSize = new Size(20, 20);
|
||||
menuStrip.Items.AddRange(new ToolStripItem[] { менюToolStripMenuItem, файлToolStripMenuItem });
|
||||
menuStrip.Items.AddRange(new ToolStripItem[] { файлToolStripMenuItem, менюToolStripMenuItem });
|
||||
menuStrip.Location = new Point(0, 0);
|
||||
menuStrip.Name = "menuStrip";
|
||||
menuStrip.Size = new Size(677, 28);
|
||||
@ -952,13 +1010,13 @@
|
||||
//
|
||||
менюToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { infoToolStripMenuItem });
|
||||
менюToolStripMenuItem.Name = "менюToolStripMenuItem";
|
||||
менюToolStripMenuItem.Size = new Size(65, 24);
|
||||
менюToolStripMenuItem.Text = "Меню";
|
||||
менюToolStripMenuItem.Size = new Size(81, 24);
|
||||
менюToolStripMenuItem.Text = "Справка";
|
||||
//
|
||||
// infoToolStripMenuItem
|
||||
//
|
||||
infoToolStripMenuItem.Name = "infoToolStripMenuItem";
|
||||
infoToolStripMenuItem.Size = new Size(131, 26);
|
||||
infoToolStripMenuItem.Size = new Size(224, 26);
|
||||
infoToolStripMenuItem.Text = "Инфо";
|
||||
infoToolStripMenuItem.Click += InfoToolStripMenuItem_Click;
|
||||
//
|
||||
@ -973,7 +1031,7 @@
|
||||
//
|
||||
SaveToolStripMenuItem.Name = "SaveToolStripMenuItem";
|
||||
SaveToolStripMenuItem.ShortcutKeys = Keys.Control | Keys.S;
|
||||
SaveToolStripMenuItem.Size = new Size(224, 26);
|
||||
SaveToolStripMenuItem.Size = new Size(216, 26);
|
||||
SaveToolStripMenuItem.Text = "Сохранить";
|
||||
SaveToolStripMenuItem.Click += SaveToolStripMenuItem_Click;
|
||||
//
|
||||
@ -981,7 +1039,7 @@
|
||||
//
|
||||
LoadToolStripMenuItem.Name = "LoadToolStripMenuItem";
|
||||
LoadToolStripMenuItem.ShortcutKeys = Keys.Control | Keys.L;
|
||||
LoadToolStripMenuItem.Size = new Size(224, 26);
|
||||
LoadToolStripMenuItem.Size = new Size(216, 26);
|
||||
LoadToolStripMenuItem.Text = "Загрузить";
|
||||
LoadToolStripMenuItem.Click += LoadToolStripMenuItem_Click;
|
||||
//
|
||||
|
@ -1,7 +1,6 @@
|
||||
using BackpackGreedyAlgorithm.Storages;
|
||||
using BackpackGreedyAlgorithm.Communications;
|
||||
using BackpackGreedyAlgorithm.Algorithm;
|
||||
using static System.Runtime.InteropServices.JavaScript.JSType;
|
||||
|
||||
namespace BackpackGreedyAlgorithm;
|
||||
|
||||
@ -106,11 +105,6 @@ public partial class MainForm : Form
|
||||
groupBoxTools.Enabled = true;
|
||||
}
|
||||
|
||||
|
||||
// TODO Сделать меню с функциями:
|
||||
// - Сохранения
|
||||
// - Загрузки
|
||||
|
||||
/// <summary>
|
||||
/// Выпадающее меню для сохранения данных
|
||||
/// </summary>
|
||||
|
Loading…
Reference in New Issue
Block a user