This commit is contained in:
antoc0der 2023-11-10 09:53:38 +03:00
parent 8daf34e524
commit 9d313781ba
2 changed files with 8 additions and 10 deletions

View File

@ -58,7 +58,7 @@
((System.ComponentModel.ISupportInitialize)numericSpeed).BeginInit();
allowPanel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)pictureBox).BeginInit();
//SuspendLayout();
SuspendLayout();
//
// configGroupBox
//
@ -311,7 +311,7 @@
cancelButton.Text = "Отменить";
cancelButton.UseVisualStyleBackColor = true;
//
// FormMonorailConfig
// FormAirplaneConfig
//
AutoScaleDimensions = new SizeF(8F, 20F);
AutoScaleMode = AutoScaleMode.Font;
@ -320,8 +320,8 @@
Controls.Add(addButton);
Controls.Add(allowPanel);
Controls.Add(configGroupBox);
Name = "FormMonorailConfig";
Text = "FormMonorailConfig";
Name = "FormAirplaneConfig";
Text = "FormAirplaneConfig";
configGroupBox.ResumeLayout(false);
configGroupBox.PerformLayout();
colorGroupBox.ResumeLayout(false);

View File

@ -17,9 +17,9 @@ namespace ProjectAirplaneWithRadar
DrawningAirplane? _airplane = null;
Action<DrawningAirplane>? EventAddAirplane;
private readonly int PictureWidth;
private readonly int PictureWidth;
private readonly int PictureHeight;
public void AddEvent(Action<DrawningAirplane>? ev)
{
if (EventAddAirplane == null)
@ -32,7 +32,7 @@ namespace ProjectAirplaneWithRadar
}
}
public FormAirplaneConfig( int width, int height)
public FormAirplaneConfig(int width, int height)
{
InitializeComponent();
blackPanel.MouseDown += PanelColor_MouseDown;
@ -61,7 +61,7 @@ namespace ProjectAirplaneWithRadar
private void PanelColor_MouseDown(object sender, MouseEventArgs e)
{
(sender as Panel)?.DoDragDrop((sender as Panel)?.BackColor,DragDropEffects.Move | DragDropEffects.Copy);
(sender as Panel)?.DoDragDrop((sender as Panel)?.BackColor, DragDropEffects.Move | DragDropEffects.Copy);
}
private void allowPanel_DragDrop(object sender, DragEventArgs e)
@ -98,7 +98,6 @@ namespace ProjectAirplaneWithRadar
private void addButton_Click(object sender, EventArgs e)
{
//_airplane?.SetPosition(5, 5);
EventAddAirplane?.Invoke(_airplane);
Close();
}
@ -108,7 +107,6 @@ namespace ProjectAirplaneWithRadar
(sender as Label)?.DoDragDrop((sender as Label)?.Name, DragDropEffects.Move | DragDropEffects.Copy);
}
private void colorLabel_DragDrop(object sender, DragEventArgs e)
{
if (_airplane == null)