Изменение стилей дополнительных форм

This commit is contained in:
2024-10-10 12:30:53 +03:00
parent 533ec8fc70
commit 5dc3e6269c
43 changed files with 55 additions and 30 deletions

View File

@@ -46,6 +46,8 @@
//
// MainPanel
//
MainPanel.AutoSize = true;
MainPanel.AutoSizeMode = AutoSizeMode.GrowAndShrink;
MainPanel.Controls.Add(saveItem);
MainPanel.Controls.Add(separatopPanel2);
MainPanel.Controls.Add(panel1);
@@ -61,12 +63,15 @@
//
// saveItem
//
saveItem.Dock = DockStyle.Right;
saveItem.AutoSize = true;
saveItem.AutoSizeMode = AutoSizeMode.GrowAndShrink;
saveItem.Dock = DockStyle.Top;
saveItem.FlatStyle = FlatStyle.Flat;
saveItem.Location = new Point(204, 103);
saveItem.Location = new Point(4, 103);
saveItem.Margin = new Padding(4, 3, 4, 3);
saveItem.MinimumSize = new Size(288, 30);
saveItem.Name = "saveItem";
saveItem.Size = new Size(88, 30);
saveItem.Size = new Size(288, 30);
saveItem.TabIndex = 7;
saveItem.Text = "Сохранить";
saveItem.UseVisualStyleBackColor = true;
@@ -84,6 +89,7 @@
// panel1
//
panel1.AutoSize = true;
panel1.AutoSizeMode = AutoSizeMode.GrowAndShrink;
panel1.Controls.Add(carPrice);
panel1.Controls.Add(priceLabel);
panel1.Dock = DockStyle.Top;
@@ -128,6 +134,7 @@
// CarPanel
//
CarPanel.AutoSize = true;
CarPanel.AutoSizeMode = AutoSizeMode.GrowAndShrink;
CarPanel.Controls.Add(carComboBox);
CarPanel.Controls.Add(carLabel);
CarPanel.Dock = DockStyle.Top;
@@ -143,6 +150,7 @@
carComboBox.FormattingEnabled = true;
carComboBox.Location = new Point(0, 15);
carComboBox.Margin = new Padding(4, 3, 4, 3);
carComboBox.MinimumSize = new Size(259, 0);
carComboBox.Name = "carComboBox";
carComboBox.Size = new Size(288, 23);
carComboBox.TabIndex = 3;
@@ -163,17 +171,20 @@
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
AutoSizeMode = AutoSizeMode.GrowAndShrink;
AutoSize = true;
BackColor = Color.White;
ClientSize = new Size(296, 136);
Controls.Add(MainPanel);
Icon = (Icon)resources.GetObject("$this.Icon");
Margin = new Padding(4, 3, 4, 3);
MaximumSize = new Size(312, 175);
MaximizeBox = false;
MinimizeBox = false;
MinimumSize = new Size(312, 175);
Name = "AddCars";
ShowInTaskbar = false;
StartPosition = FormStartPosition.CenterParent;
Text = "Автомобиль";
TopMost = true;
MainPanel.ResumeLayout(false);
MainPanel.PerformLayout();
panel1.ResumeLayout(false);
@@ -181,6 +192,7 @@
CarPanel.ResumeLayout(false);
CarPanel.PerformLayout();
ResumeLayout(false);
PerformLayout();
}
#endregion

View File

@@ -1,4 +1,5 @@
using GtaVUsersInfo.Helpers;
using GtaVUsersInfo.Sources;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -90,5 +91,11 @@ namespace GtaVUsersInfo.Forms
return;
}
}
public void ChangeFonts(FontSettings settings)
{
FontSettings.ChangeFontInControls(this, settings);
this.Size = new Size(this.carLabel.Width, this.Size.Height);
}
}
}

View File

@@ -54,12 +54,14 @@
//
// saveItem
//
saveItem.Dock = DockStyle.Right;
saveItem.AutoSize = true;
saveItem.AutoSizeMode = AutoSizeMode.GrowAndShrink;
saveItem.Dock = DockStyle.Top;
saveItem.FlatStyle = FlatStyle.Flat;
saveItem.Location = new Point(204, 53);
saveItem.Location = new Point(4, 53);
saveItem.Margin = new Padding(4, 3, 4, 3);
saveItem.Name = "saveItem";
saveItem.Size = new Size(88, 29);
saveItem.Size = new Size(288, 27);
saveItem.TabIndex = 7;
saveItem.Text = "Сохранить";
saveItem.UseVisualStyleBackColor = true;
@@ -110,7 +112,7 @@
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
AutoSizeMode = AutoSizeMode.GrowAndShrink;
AutoSize = true;
BackColor = Color.White;
ClientSize = new Size(296, 85);
Controls.Add(MainPanel);

View File

@@ -1,5 +1,6 @@
using GtaVUsersInfo.Controls;
using GtaVUsersInfo.Helpers;
using GtaVUsersInfo.Sources;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -51,5 +52,11 @@ namespace GtaVUsersInfo.Forms
return;
}
}
public void ChangeFonts(FontSettings settings)
{
FontSettings.ChangeFontInControls(this, settings);
this.Size = new Size(this.nameLabel.Width, this.Size.Height);
}
}
}