Лабораторная раб №6

This commit is contained in:
yuliya.mavrina@internet.ru 2023-11-27 12:18:16 +03:00
parent f8ce47bbd3
commit 31bad4e1a7
2 changed files with 20 additions and 13 deletions

View File

@ -39,8 +39,9 @@
ButtonDelObject = new Button();
ButtonAddObject = new Button();
menuStrip = new MenuStrip();
SaveToolStripMenuItem = new ToolStripMenuItem();
ToolStripMenuItem = new ToolStripMenuItem();
LoadToolStripMenuItem = new ToolStripMenuItem();
saveToolStripMenuItem = new ToolStripMenuItem();
openFileDialog = new OpenFileDialog();
saveFileDialog = new SaveFileDialog();
((System.ComponentModel.ISupportInitialize)pictureBoxCollection).BeginInit();
@ -155,28 +156,34 @@
//
// menuStrip
//
menuStrip.Items.AddRange(new ToolStripItem[] { SaveToolStripMenuItem });
menuStrip.Items.AddRange(new ToolStripItem[] { ToolStripMenuItem });
menuStrip.Location = new Point(0, 0);
menuStrip.Name = "menuStrip";
menuStrip.Size = new Size(168, 24);
menuStrip.TabIndex = 10;
menuStrip.Text = "menuStrip1";
//
// SaveToolStripMenuItem
// ToolStripMenuItem
//
SaveToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { LoadToolStripMenuItem });
SaveToolStripMenuItem.Name = "SaveToolStripMenuItem";
SaveToolStripMenuItem.Size = new Size(144, 20);
SaveToolStripMenuItem.Text = "SaveToolStripMenuItem";
SaveToolStripMenuItem.Click += SaveToolStripMenuItem_Click;
ToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { LoadToolStripMenuItem, saveToolStripMenuItem });
ToolStripMenuItem.Name = "ToolStripMenuItem";
ToolStripMenuItem.Size = new Size(48, 20);
ToolStripMenuItem.Text = "файл";
//
// LoadToolStripMenuItem
//
LoadToolStripMenuItem.Name = "LoadToolStripMenuItem";
LoadToolStripMenuItem.Size = new Size(201, 22);
LoadToolStripMenuItem.Text = "LoadToolStripMenuItem";
LoadToolStripMenuItem.Size = new Size(180, 22);
LoadToolStripMenuItem.Text = "Загрузить";
LoadToolStripMenuItem.Click += LoadToolStripMenuItem_Click;
//
// saveToolStripMenuItem
//
saveToolStripMenuItem.Name = "saveToolStripMenuItem";
saveToolStripMenuItem.Size = new Size(180, 22);
saveToolStripMenuItem.Text = "Сохранить";
saveToolStripMenuItem.Click += SaveToolStripMenuItem_Click;
//
// openFileDialog
//
openFileDialog.FileName = "openFileDialog";
@ -219,7 +226,8 @@
private OpenFileDialog openFileDialog;
private SaveFileDialog saveFileDialog;
private MenuStrip menuStrip;
private ToolStripMenuItem SaveToolStripMenuItem;
private ToolStripMenuItem ToolStripMenuItem;
private ToolStripMenuItem LoadToolStripMenuItem;
private ToolStripMenuItem saveToolStripMenuItem;
}
}

View File

@ -87,8 +87,7 @@ namespace DoubleDeckerBus.Generics
string[] set = record[1].Split(_separatorRecords, StringSplitOptions.RemoveEmptyEntries);
foreach (string elem in set)
{
DrawningBus? bus =
elem?.CreateDrawningBus(_separatorForObject, _pictureWidth, _pictureHeight);
DrawningBus? bus = elem?.CreateDrawningBus(_separatorForObject, _pictureWidth, _pictureHeight);
if (bus != null)
{
if (!(collection + bus))