From 0b15e5c7d02e885050643f23aa57d77ef1a458e7 Mon Sep 17 00:00:00 2001 From: sqdselo Date: Mon, 29 Apr 2024 13:26:18 +0400 Subject: [PATCH] =?UTF-8?q?=D0=93=D0=BE=D1=82=D0=BE=D0=B2=D0=B0=D1=8F=20?= =?UTF-8?q?=D0=BB=D0=B0=D0=B1=D0=BE=D1=80=D0=B0=D1=82=D0=BE=D1=80=D0=BD?= =?UTF-8?q?=D0=B0=D1=8F=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=206?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StorageCollection.cs | 6 +++--- .../FormCarCollection.Designer.cs | 20 +++++++++---------- ...йл_для_лабораторной_6.txt | 3 +++ допка3.txt | 3 +++ 4 files changed, 19 insertions(+), 13 deletions(-) create mode 100644 Файл_для_лабораторной_6.txt create mode 100644 допка3.txt diff --git a/HoistingCrane/HoistingCrane/CollectionGenericObjects/StorageCollection.cs b/HoistingCrane/HoistingCrane/CollectionGenericObjects/StorageCollection.cs index d696adb..637b638 100644 --- a/HoistingCrane/HoistingCrane/CollectionGenericObjects/StorageCollection.cs +++ b/HoistingCrane/HoistingCrane/CollectionGenericObjects/StorageCollection.cs @@ -1,5 +1,6 @@ using HoistingCrane.Drawning; using System; +using System.Configuration; using System.Text; namespace HoistingCrane.CollectionGenericObjects @@ -94,6 +95,7 @@ namespace HoistingCrane.CollectionGenericObjects using (StreamWriter writer = new StreamWriter(filename)) { writer.Write(_collectionKey); + foreach (KeyValuePair> value in dict) { StringBuilder sb = new(); @@ -123,10 +125,8 @@ namespace HoistingCrane.CollectionGenericObjects } writer.Write(sb); } - } return true; - } /// @@ -156,7 +156,7 @@ namespace HoistingCrane.CollectionGenericObjects while ((strs = fs.ReadLine()) != null) { string[] record = strs.Split(_separatorForKeyValue, StringSplitOptions.RemoveEmptyEntries); - if (record.Length != 4) + if (record.Length != 2) { continue; } diff --git a/HoistingCrane/HoistingCrane/FormCarCollection.Designer.cs b/HoistingCrane/HoistingCrane/FormCarCollection.Designer.cs index 4991414..47d3972 100644 --- a/HoistingCrane/HoistingCrane/FormCarCollection.Designer.cs +++ b/HoistingCrane/HoistingCrane/FormCarCollection.Designer.cs @@ -68,7 +68,7 @@ groupBoxTools.Dock = DockStyle.Right; groupBoxTools.Location = new Point(763, 24); groupBoxTools.Name = "groupBoxTools"; - groupBoxTools.Size = new Size(210, 485); + groupBoxTools.Size = new Size(210, 499); groupBoxTools.TabIndex = 0; groupBoxTools.TabStop = false; groupBoxTools.Text = "Инструменты"; @@ -81,7 +81,7 @@ panelCompanyTool.Controls.Add(buttonRefresh); panelCompanyTool.Controls.Add(buttonGoToChek); panelCompanyTool.Controls.Add(buttonDeleteCar); - panelCompanyTool.Location = new Point(6, 312); + panelCompanyTool.Location = new Point(6, 319); panelCompanyTool.Name = "panelCompanyTool"; panelCompanyTool.Size = new Size(204, 185); panelCompanyTool.TabIndex = 8; @@ -198,7 +198,7 @@ radioButtonList.AutoSize = true; radioButtonList.Location = new Point(128, 56); radioButtonList.Name = "radioButtonList"; - radioButtonList.Size = new Size(67, 19); + radioButtonList.Size = new Size(66, 19); radioButtonList.TabIndex = 3; radioButtonList.TabStop = true; radioButtonList.Text = "Список"; @@ -209,7 +209,7 @@ radioButtonMassive.AutoSize = true; radioButtonMassive.Location = new Point(18, 56); radioButtonMassive.Name = "radioButtonMassive"; - radioButtonMassive.Size = new Size(69, 19); + radioButtonMassive.Size = new Size(67, 19); radioButtonMassive.TabIndex = 2; radioButtonMassive.TabStop = true; radioButtonMassive.Text = "Массив"; @@ -227,7 +227,7 @@ labelCollectionName.AutoSize = true; labelCollectionName.Location = new Point(35, 0); labelCollectionName.Name = "labelCollectionName"; - labelCollectionName.Size = new Size(135, 15); + labelCollectionName.Size = new Size(125, 15); labelCollectionName.TabIndex = 0; labelCollectionName.Text = "Название коллекции:"; // @@ -248,7 +248,7 @@ pictureBox.Dock = DockStyle.Fill; pictureBox.Location = new Point(0, 24); pictureBox.Name = "pictureBox"; - pictureBox.Size = new Size(763, 485); + pictureBox.Size = new Size(763, 499); pictureBox.TabIndex = 1; pictureBox.TabStop = false; // @@ -265,14 +265,14 @@ // файлToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { saveToolStripMenuItem, loadToolStripMenuItem }); файлToolStripMenuItem.Name = "файлToolStripMenuItem"; - файлToolStripMenuItem.Size = new Size(50, 20); + файлToolStripMenuItem.Size = new Size(48, 20); файлToolStripMenuItem.Text = "Файл"; // // saveToolStripMenuItem // saveToolStripMenuItem.Name = "saveToolStripMenuItem"; saveToolStripMenuItem.ShortcutKeys = Keys.Control | Keys.S; - saveToolStripMenuItem.Size = new Size(186, 22); + saveToolStripMenuItem.Size = new Size(181, 22); saveToolStripMenuItem.Text = "Сохранение"; saveToolStripMenuItem.Click += saveToolStripMenuItem_Click; // @@ -280,7 +280,7 @@ // loadToolStripMenuItem.Name = "loadToolStripMenuItem"; loadToolStripMenuItem.ShortcutKeys = Keys.Control | Keys.L; - loadToolStripMenuItem.Size = new Size(186, 22); + loadToolStripMenuItem.Size = new Size(181, 22); loadToolStripMenuItem.Text = "Загрузка"; loadToolStripMenuItem.Click += loadToolStripMenuItem_Click; // @@ -296,7 +296,7 @@ // AutoScaleDimensions = new SizeF(7F, 15F); AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(973, 509); + ClientSize = new Size(973, 523); Controls.Add(pictureBox); Controls.Add(groupBoxTools); Controls.Add(menuStrip); diff --git a/Файл_для_лабораторной_6.txt b/Файл_для_лабораторной_6.txt new file mode 100644 index 0000000..9ad6433 --- /dev/null +++ b/Файл_для_лабораторной_6.txt @@ -0,0 +1,3 @@ +CollectionsStorage +массив|Massive|25|EntityTrackedVehicle:100:100:Green;EntityHoistingCrane:100:100:Yellow:Black:False:False;EntityTrackedVehicle:100:100:Gray; +список|List|2|EntityTrackedVehicle:100:100:Blue;EntityHoistingCrane:100:100:Gray:Black:True:True; \ No newline at end of file diff --git a/допка3.txt b/допка3.txt new file mode 100644 index 0000000..24b0dfa --- /dev/null +++ b/допка3.txt @@ -0,0 +1,3 @@ +CollectionsStorage +массив|Massive +список|List \ No newline at end of file