Изменение стилей дополнительных форм
This commit is contained in:
parent
533ec8fc70
commit
5dc3e6269c
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
22
Forms/AddCars.Designer.cs
generated
22
Forms/AddCars.Designer.cs
generated
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
10
Forms/AddParameter.Designer.cs
generated
10
Forms/AddParameter.Designer.cs
generated
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
14
MainForm.Designer.cs
generated
14
MainForm.Designer.cs
generated
@ -231,45 +231,45 @@
|
||||
// openFileToolStripMenuItem
|
||||
//
|
||||
openFileToolStripMenuItem.Name = "openFileToolStripMenuItem";
|
||||
openFileToolStripMenuItem.Size = new Size(180, 22);
|
||||
openFileToolStripMenuItem.Size = new Size(170, 22);
|
||||
openFileToolStripMenuItem.Text = "Открыть";
|
||||
openFileToolStripMenuItem.Click += openFileToolStripMenuItem_Click;
|
||||
//
|
||||
// saveToolStripMenuItem
|
||||
//
|
||||
saveToolStripMenuItem.Name = "saveToolStripMenuItem";
|
||||
saveToolStripMenuItem.Size = new Size(180, 22);
|
||||
saveToolStripMenuItem.Size = new Size(170, 22);
|
||||
saveToolStripMenuItem.Text = "Сохранить";
|
||||
saveToolStripMenuItem.Click += saveToolStripMenuItem_Click;
|
||||
//
|
||||
// saveAsКакToolStripMenuItem
|
||||
//
|
||||
saveAsКакToolStripMenuItem.Name = "saveAsКакToolStripMenuItem";
|
||||
saveAsКакToolStripMenuItem.Size = new Size(180, 22);
|
||||
saveAsКакToolStripMenuItem.Size = new Size(170, 22);
|
||||
saveAsКакToolStripMenuItem.Text = "Сохранить как";
|
||||
saveAsКакToolStripMenuItem.Click += saveAsКакToolStripMenuItem_Click;
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
toolStripSeparator2.Size = new Size(177, 6);
|
||||
toolStripSeparator2.Size = new Size(167, 6);
|
||||
//
|
||||
// newToolStripMenuItem
|
||||
//
|
||||
newToolStripMenuItem.Name = "newToolStripMenuItem";
|
||||
newToolStripMenuItem.Size = new Size(180, 22);
|
||||
newToolStripMenuItem.Size = new Size(170, 22);
|
||||
newToolStripMenuItem.Text = "Новый персонаж";
|
||||
newToolStripMenuItem.Click += newToolStripMenuItem_Click;
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
toolStripSeparator1.Size = new Size(177, 6);
|
||||
toolStripSeparator1.Size = new Size(167, 6);
|
||||
//
|
||||
// exitToolStripMenuItem
|
||||
//
|
||||
exitToolStripMenuItem.Name = "exitToolStripMenuItem";
|
||||
exitToolStripMenuItem.Size = new Size(180, 22);
|
||||
exitToolStripMenuItem.Size = new Size(170, 22);
|
||||
exitToolStripMenuItem.Text = "Выйти";
|
||||
exitToolStripMenuItem.Click += exitToolStripMenuItem_Click;
|
||||
//
|
||||
|
11
MainForm.cs
11
MainForm.cs
@ -60,7 +60,7 @@ namespace GtaVUsersInfo
|
||||
cars = new List<CarControl>();
|
||||
parameters = new List<ParameterControl> { new ParameterControl("Имя"), new ParameterControl("Деньги") };
|
||||
|
||||
carsItems.ContextMenuStrip = new CarPanelMenuStrip(addNewCar).Menu;
|
||||
carsItems.ContextMenuStrip = new CarPanelMenuStrip(addCar_Click).Menu;
|
||||
parametersPanel.ContextMenuStrip = new ParameterPanelMenuStrip(addNewParameter).Menu;
|
||||
|
||||
dtControls = new List<Control> { parserButton, readJsonButton };
|
||||
@ -145,7 +145,7 @@ namespace GtaVUsersInfo
|
||||
|
||||
foreach (CarControl car in cars)
|
||||
{
|
||||
car.MenuStrip = new CarItemMenuStrip(addNewCar, editCar, deleteCar, car).Menu;
|
||||
car.MenuStrip = new CarItemMenuStrip(addCar_Click, editCar, deleteCar, car).Menu;
|
||||
carsItems.Controls.Add(car);
|
||||
}
|
||||
}
|
||||
@ -221,6 +221,7 @@ namespace GtaVUsersInfo
|
||||
|
||||
using (AddCars form = new AddCars(carList, car))
|
||||
{
|
||||
form.ChangeFonts(fontSettings);
|
||||
form.ShowDialog();
|
||||
}
|
||||
|
||||
@ -232,11 +233,6 @@ namespace GtaVUsersInfo
|
||||
}
|
||||
}
|
||||
|
||||
private void addNewCar(object sender, EventArgs e)
|
||||
{
|
||||
addCar_Click(sender, e);
|
||||
}
|
||||
|
||||
private void editCar(object sender, EventArgs e)
|
||||
{
|
||||
if (carList.Count <= 0)
|
||||
@ -319,6 +315,7 @@ namespace GtaVUsersInfo
|
||||
|
||||
using (AddParameter form = new AddParameter(parameters, parameter))
|
||||
{
|
||||
form.ChangeFonts(fontSettings);
|
||||
form.ShowDialog();
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<History>True|2024-10-10T07:55:42.4660156Z;True|2024-10-10T10:36:20.4890831+03:00;</History>
|
||||
<History>True|2024-10-10T09:30:25.7657642Z;True|2024-10-10T10:55:42.4660156+03:00;True|2024-10-10T10:36:20.4890831+03:00;</History>
|
||||
<LastFailureDetails />
|
||||
</PropertyGroup>
|
||||
</Project>
|
@ -76,7 +76,7 @@ namespace GtaVUsersInfo.Sources
|
||||
control.Size = new Size(newWidth, newHeight);
|
||||
}
|
||||
|
||||
if (control is TextBox || control is Button)
|
||||
if (control is TextBox || control is Button || control is ComboBox)
|
||||
{
|
||||
control.Font = font;
|
||||
control.ForeColor = color;
|
||||
|
Binary file not shown.
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
{
|
||||
"FontFamily": "Segoe UI",
|
||||
"FontSize": 15.75,
|
||||
"FontSize": 72.0,
|
||||
"FontStyle": 0,
|
||||
"FontColor": "64, 0, 64"
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"width": 1004,
|
||||
"height": 645,
|
||||
"width": 1696,
|
||||
"height": 1026,
|
||||
"leftPos": 150,
|
||||
"rightPos": 181,
|
||||
"prevFile": "C:\\Users\\eugen\\YandexDisk\\Важное\\GTAV\\Карл.json"
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
5826764bf00f1472f674d5a16ee6f8dadffdc9fa
|
||||
0e0620c9e90405a040536d7aa4bbce2e52cf4709
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
14d8c8caa14b2814e328ab717eeee233fd30afb1
|
||||
355d640f87884ff864ea3cc2e918102d15c5316d
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user