Some modifies with formLocoCollection
This commit is contained in:
parent
d397203f80
commit
aee4ec8c0e
@ -42,11 +42,18 @@
|
||||
this.ButtonAddObject = new System.Windows.Forms.Button();
|
||||
this.ButtonRemoveObject = new System.Windows.Forms.Button();
|
||||
this.Instruments = new System.Windows.Forms.GroupBox();
|
||||
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
this.файлToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.SaveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.LoadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveFileDialog = new System.Windows.Forms.SaveFileDialog();
|
||||
this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBoxCollections)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingSource2)).BeginInit();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.Instruments.SuspendLayout();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// maskedTextBoxNumber
|
||||
@ -56,14 +63,14 @@
|
||||
this.maskedTextBoxNumber.Location = new System.Drawing.Point(38, 532);
|
||||
this.maskedTextBoxNumber.Mask = "0";
|
||||
this.maskedTextBoxNumber.Name = "maskedTextBoxNumber";
|
||||
this.maskedTextBoxNumber.Size = new System.Drawing.Size(149, 27);
|
||||
this.maskedTextBoxNumber.Size = new System.Drawing.Size(156, 27);
|
||||
this.maskedTextBoxNumber.TabIndex = 4;
|
||||
//
|
||||
// ButtonRefreshCollection
|
||||
//
|
||||
this.ButtonRefreshCollection.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.ButtonRefreshCollection.Font = new System.Drawing.Font("Candara Light", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.ButtonRefreshCollection.Location = new System.Drawing.Point(38, 665);
|
||||
this.ButtonRefreshCollection.Location = new System.Drawing.Point(45, 663);
|
||||
this.ButtonRefreshCollection.Name = "ButtonRefreshCollection";
|
||||
this.ButtonRefreshCollection.Size = new System.Drawing.Size(150, 41);
|
||||
this.ButtonRefreshCollection.TabIndex = 2;
|
||||
@ -74,7 +81,7 @@
|
||||
//
|
||||
this.ButtonRemoveLocomotive.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.ButtonRemoveLocomotive.Font = new System.Drawing.Font("Candara Light", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.ButtonRemoveLocomotive.Location = new System.Drawing.Point(38, 592);
|
||||
this.ButtonRemoveLocomotive.Location = new System.Drawing.Point(45, 590);
|
||||
this.ButtonRemoveLocomotive.Name = "ButtonRemoveLocomotive";
|
||||
this.ButtonRemoveLocomotive.Size = new System.Drawing.Size(150, 44);
|
||||
this.ButtonRemoveLocomotive.TabIndex = 1;
|
||||
@ -86,7 +93,7 @@
|
||||
//
|
||||
this.ButtonAddLocomotive.Anchor = System.Windows.Forms.AnchorStyles.Top;
|
||||
this.ButtonAddLocomotive.Font = new System.Drawing.Font("Candara Light", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.ButtonAddLocomotive.Location = new System.Drawing.Point(38, 461);
|
||||
this.ButtonAddLocomotive.Location = new System.Drawing.Point(42, 461);
|
||||
this.ButtonAddLocomotive.Name = "ButtonAddLocomotive";
|
||||
this.ButtonAddLocomotive.Size = new System.Drawing.Size(150, 39);
|
||||
this.ButtonAddLocomotive.TabIndex = 0;
|
||||
@ -96,12 +103,10 @@
|
||||
//
|
||||
// pictureBoxCollections
|
||||
//
|
||||
this.pictureBoxCollections.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.pictureBoxCollections.Location = new System.Drawing.Point(-1, 5);
|
||||
this.pictureBoxCollections.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.pictureBoxCollections.Location = new System.Drawing.Point(-1, 27);
|
||||
this.pictureBoxCollections.Name = "pictureBoxCollections";
|
||||
this.pictureBoxCollections.Size = new System.Drawing.Size(798, 721);
|
||||
this.pictureBoxCollections.Size = new System.Drawing.Size(1104, 692);
|
||||
this.pictureBoxCollections.TabIndex = 1;
|
||||
this.pictureBoxCollections.TabStop = false;
|
||||
//
|
||||
@ -165,27 +170,71 @@
|
||||
//
|
||||
// Instruments
|
||||
//
|
||||
this.Instruments.Anchor = System.Windows.Forms.AnchorStyles.Right;
|
||||
this.Instruments.Controls.Add(this.ButtonRefreshCollection);
|
||||
this.Instruments.Controls.Add(this.groupBox1);
|
||||
this.Instruments.Controls.Add(this.maskedTextBoxNumber);
|
||||
this.Instruments.Controls.Add(this.ButtonAddLocomotive);
|
||||
this.Instruments.Controls.Add(this.ButtonRemoveLocomotive);
|
||||
this.Instruments.Location = new System.Drawing.Point(797, 5);
|
||||
this.Instruments.Location = new System.Drawing.Point(1102, 0);
|
||||
this.Instruments.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.Instruments.Name = "Instruments";
|
||||
this.Instruments.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.Instruments.Size = new System.Drawing.Size(229, 721);
|
||||
this.Instruments.Size = new System.Drawing.Size(236, 719);
|
||||
this.Instruments.TabIndex = 6;
|
||||
this.Instruments.TabStop = false;
|
||||
this.Instruments.Text = "Инструменты";
|
||||
//
|
||||
// menuStrip1
|
||||
//
|
||||
this.menuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.файлToolStripMenuItem});
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.Size = new System.Drawing.Size(1338, 28);
|
||||
this.menuStrip1.TabIndex = 7;
|
||||
this.menuStrip1.Text = "menuStrip1";
|
||||
//
|
||||
// файлToolStripMenuItem
|
||||
//
|
||||
this.файлToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.SaveToolStripMenuItem,
|
||||
this.LoadToolStripMenuItem});
|
||||
this.файлToolStripMenuItem.Name = "файлToolStripMenuItem";
|
||||
this.файлToolStripMenuItem.Size = new System.Drawing.Size(59, 24);
|
||||
this.файлToolStripMenuItem.Text = "Файл";
|
||||
//
|
||||
// SaveToolStripMenuItem
|
||||
//
|
||||
this.SaveToolStripMenuItem.Name = "SaveToolStripMenuItem";
|
||||
this.SaveToolStripMenuItem.Size = new System.Drawing.Size(224, 26);
|
||||
this.SaveToolStripMenuItem.Text = "Сохранить";
|
||||
//
|
||||
// LoadToolStripMenuItem
|
||||
//
|
||||
this.LoadToolStripMenuItem.Name = "LoadToolStripMenuItem";
|
||||
this.LoadToolStripMenuItem.Size = new System.Drawing.Size(224, 26);
|
||||
this.LoadToolStripMenuItem.Text = "Загрузить";
|
||||
//
|
||||
// saveFileDialog
|
||||
//
|
||||
this.saveFileDialog.Filter = "txt file | *.txt";
|
||||
//
|
||||
// openFileDialog
|
||||
//
|
||||
this.openFileDialog.FileName = "openFileDialog1";
|
||||
this.openFileDialog.Filter = "txt file | *.txt";
|
||||
//
|
||||
// FormLocomotiveCollections
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1033, 724);
|
||||
this.ClientSize = new System.Drawing.Size(1338, 724);
|
||||
this.Controls.Add(this.Instruments);
|
||||
this.Controls.Add(this.pictureBoxCollections);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.MainMenuStrip = this.menuStrip1;
|
||||
this.Name = "FormLocomotiveCollections";
|
||||
this.Text = "Набор локомотивов";
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBoxCollections)).EndInit();
|
||||
@ -195,7 +244,10 @@
|
||||
this.groupBox1.PerformLayout();
|
||||
this.Instruments.ResumeLayout(false);
|
||||
this.Instruments.PerformLayout();
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
@ -213,5 +265,11 @@
|
||||
private Button ButtonAddObject;
|
||||
private Button ButtonRemoveObject;
|
||||
private GroupBox Instruments;
|
||||
private MenuStrip menuStrip1;
|
||||
private ToolStripMenuItem файлToolStripMenuItem;
|
||||
private ToolStripMenuItem SaveToolStripMenuItem;
|
||||
private ToolStripMenuItem LoadToolStripMenuItem;
|
||||
private SaveFileDialog saveFileDialog;
|
||||
private OpenFileDialog openFileDialog;
|
||||
}
|
||||
}
|
@ -143,5 +143,35 @@ namespace ProjectElectricLocomotive
|
||||
}
|
||||
pictureBoxCollections.Image = obj.ShowLocomotives();
|
||||
}
|
||||
/// <summary>
|
||||
/// Обработка нажатия "Сохранение"
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void SaveToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (saveFileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
if (_storage.SaveData(saveFileDialog.FileName))
|
||||
{
|
||||
MessageBox.Show("Сохранение прошло успешно",
|
||||
"Результат", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Не сохранилось", "Результат",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Обработка нажатия "Загрузка"
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void LoadToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
// TODO продумать логику
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -63,7 +63,16 @@
|
||||
<metadata name="bindingSource2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>154, 17</value>
|
||||
</metadata>
|
||||
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>318, 17</value>
|
||||
</metadata>
|
||||
<metadata name="saveFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>453, 17</value>
|
||||
</metadata>
|
||||
<metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>615, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>25</value>
|
||||
<value>144</value>
|
||||
</metadata>
|
||||
</root>
|
Loading…
Reference in New Issue
Block a user