Compare commits
No commits in common. "7f178888a55af06f4b4f6a270963aa731fe56ef2" and "533ec8fc70917faf6c1d690d1327ae2b240610b3" have entirely different histories.
7f178888a5
...
533ec8fc70
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.
Binary file not shown.
Binary file not shown.
2
Car.cs
2
Car.cs
@ -12,7 +12,6 @@ namespace GtaVUsersInfo
|
||||
public string Manufacturer { get; set; }
|
||||
public string Class { get; set; }
|
||||
public string Model { get; set; }
|
||||
public Color color { get; set; }
|
||||
|
||||
public Car() { }
|
||||
|
||||
@ -24,7 +23,6 @@ namespace GtaVUsersInfo
|
||||
Manufacturer = car.Manufacturer;
|
||||
Class = car.Class;
|
||||
Model = car.Model;
|
||||
color = car.color;
|
||||
}
|
||||
|
||||
public static List<Car> ConvertToCarList(List<CarControl> cars)
|
||||
|
405
Controls/CarControl.Designer.cs
generated
405
Controls/CarControl.Designer.cs
generated
@ -28,270 +28,255 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
components = new System.ComponentModel.Container();
|
||||
MainPanel = new Panel();
|
||||
PhotoPanel = new Panel();
|
||||
PhotoBox = new PictureBox();
|
||||
MoneyPanel = new Panel();
|
||||
MoneyTextBox = new TextBox();
|
||||
MoneyLabel = new Label();
|
||||
ClassPanel = new Panel();
|
||||
ClassTextBox = new TextBox();
|
||||
ClassLabel = new Label();
|
||||
NamePanel = new Panel();
|
||||
ManufacturerLabel = new Label();
|
||||
NameLabel = new Label();
|
||||
ModelPanel = new Panel();
|
||||
ModelTextBox = new TextBox();
|
||||
ModelLabel = new Label();
|
||||
contextMenuStrip1 = new ContextMenuStrip(components);
|
||||
MainPanel.SuspendLayout();
|
||||
PhotoPanel.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)PhotoBox).BeginInit();
|
||||
MoneyPanel.SuspendLayout();
|
||||
ClassPanel.SuspendLayout();
|
||||
NamePanel.SuspendLayout();
|
||||
ModelPanel.SuspendLayout();
|
||||
SuspendLayout();
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.MainPanel = new System.Windows.Forms.Panel();
|
||||
this.PhotoPanel = new System.Windows.Forms.Panel();
|
||||
this.PhotoBox = new System.Windows.Forms.PictureBox();
|
||||
this.MoneyPanel = new System.Windows.Forms.Panel();
|
||||
this.MoneyTextBox = new System.Windows.Forms.TextBox();
|
||||
this.MoneyLabel = new System.Windows.Forms.Label();
|
||||
this.ClassPanel = new System.Windows.Forms.Panel();
|
||||
this.ClassTextBox = new System.Windows.Forms.TextBox();
|
||||
this.ClassLabel = new System.Windows.Forms.Label();
|
||||
this.NamePanel = new System.Windows.Forms.Panel();
|
||||
this.ManufacturerLabel = new System.Windows.Forms.Label();
|
||||
this.NameLabel = new System.Windows.Forms.Label();
|
||||
this.ModelPanel = new System.Windows.Forms.Panel();
|
||||
this.ModelTextBox = new System.Windows.Forms.TextBox();
|
||||
this.ModelLabel = new System.Windows.Forms.Label();
|
||||
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.MainPanel.SuspendLayout();
|
||||
this.PhotoPanel.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.PhotoBox)).BeginInit();
|
||||
this.MoneyPanel.SuspendLayout();
|
||||
this.ClassPanel.SuspendLayout();
|
||||
this.NamePanel.SuspendLayout();
|
||||
this.ModelPanel.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// MainPanel
|
||||
//
|
||||
MainPanel.Controls.Add(PhotoPanel);
|
||||
MainPanel.Controls.Add(MoneyPanel);
|
||||
MainPanel.Controls.Add(ClassPanel);
|
||||
MainPanel.Controls.Add(NamePanel);
|
||||
MainPanel.Controls.Add(ModelPanel);
|
||||
MainPanel.Dock = DockStyle.Fill;
|
||||
MainPanel.Location = new Point(0, 0);
|
||||
MainPanel.Margin = new Padding(4, 3, 4, 3);
|
||||
MainPanel.Name = "MainPanel";
|
||||
MainPanel.Size = new Size(245, 235);
|
||||
MainPanel.TabIndex = 0;
|
||||
this.MainPanel.Controls.Add(this.PhotoPanel);
|
||||
this.MainPanel.Controls.Add(this.MoneyPanel);
|
||||
this.MainPanel.Controls.Add(this.ClassPanel);
|
||||
this.MainPanel.Controls.Add(this.NamePanel);
|
||||
this.MainPanel.Controls.Add(this.ModelPanel);
|
||||
this.MainPanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.MainPanel.Location = new System.Drawing.Point(0, 0);
|
||||
this.MainPanel.Name = "MainPanel";
|
||||
this.MainPanel.Size = new System.Drawing.Size(210, 204);
|
||||
this.MainPanel.TabIndex = 0;
|
||||
//
|
||||
// PhotoPanel
|
||||
//
|
||||
PhotoPanel.Controls.Add(PhotoBox);
|
||||
PhotoPanel.Dock = DockStyle.Fill;
|
||||
PhotoPanel.Location = new Point(0, 18);
|
||||
PhotoPanel.Margin = new Padding(4, 3, 4, 3);
|
||||
PhotoPanel.Name = "PhotoPanel";
|
||||
PhotoPanel.Size = new Size(245, 166);
|
||||
PhotoPanel.TabIndex = 4;
|
||||
this.PhotoPanel.Controls.Add(this.PhotoBox);
|
||||
this.PhotoPanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.PhotoPanel.Location = new System.Drawing.Point(0, 18);
|
||||
this.PhotoPanel.Name = "PhotoPanel";
|
||||
this.PhotoPanel.Size = new System.Drawing.Size(210, 135);
|
||||
this.PhotoPanel.TabIndex = 4;
|
||||
//
|
||||
// PhotoBox
|
||||
//
|
||||
PhotoBox.Dock = DockStyle.Fill;
|
||||
PhotoBox.Location = new Point(0, 0);
|
||||
PhotoBox.Margin = new Padding(4, 3, 4, 3);
|
||||
PhotoBox.Name = "PhotoBox";
|
||||
PhotoBox.Size = new Size(245, 166);
|
||||
PhotoBox.SizeMode = PictureBoxSizeMode.Zoom;
|
||||
PhotoBox.TabIndex = 0;
|
||||
PhotoBox.TabStop = false;
|
||||
this.PhotoBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.PhotoBox.Location = new System.Drawing.Point(0, 0);
|
||||
this.PhotoBox.Name = "PhotoBox";
|
||||
this.PhotoBox.Size = new System.Drawing.Size(210, 135);
|
||||
this.PhotoBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.PhotoBox.TabIndex = 0;
|
||||
this.PhotoBox.TabStop = false;
|
||||
//
|
||||
// MoneyPanel
|
||||
//
|
||||
MoneyPanel.AutoSize = true;
|
||||
MoneyPanel.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
MoneyPanel.BorderStyle = BorderStyle.FixedSingle;
|
||||
MoneyPanel.Controls.Add(MoneyTextBox);
|
||||
MoneyPanel.Controls.Add(MoneyLabel);
|
||||
MoneyPanel.Dock = DockStyle.Bottom;
|
||||
MoneyPanel.Location = new Point(0, 184);
|
||||
MoneyPanel.Margin = new Padding(4, 3, 4, 3);
|
||||
MoneyPanel.Name = "MoneyPanel";
|
||||
MoneyPanel.Size = new Size(245, 17);
|
||||
MoneyPanel.TabIndex = 3;
|
||||
this.MoneyPanel.AutoSize = true;
|
||||
this.MoneyPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.MoneyPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.MoneyPanel.Controls.Add(this.MoneyTextBox);
|
||||
this.MoneyPanel.Controls.Add(this.MoneyLabel);
|
||||
this.MoneyPanel.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.MoneyPanel.Location = new System.Drawing.Point(0, 153);
|
||||
this.MoneyPanel.Name = "MoneyPanel";
|
||||
this.MoneyPanel.Size = new System.Drawing.Size(210, 17);
|
||||
this.MoneyPanel.TabIndex = 3;
|
||||
//
|
||||
// MoneyTextBox
|
||||
//
|
||||
MoneyTextBox.BorderStyle = BorderStyle.None;
|
||||
MoneyTextBox.Dock = DockStyle.Top;
|
||||
MoneyTextBox.Font = new Font("Microsoft Sans Serif", 9.75F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
MoneyTextBox.Location = new Point(56, 0);
|
||||
MoneyTextBox.Margin = new Padding(4, 3, 4, 3);
|
||||
MoneyTextBox.Name = "MoneyTextBox";
|
||||
MoneyTextBox.Size = new Size(187, 15);
|
||||
MoneyTextBox.TabIndex = 1;
|
||||
MoneyTextBox.Enter += carPrice_Enter;
|
||||
MoneyTextBox.KeyPress += carPrice_KeyPress;
|
||||
MoneyTextBox.Leave += carPrice_Leave;
|
||||
this.MoneyTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.MoneyTextBox.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.MoneyTextBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.MoneyTextBox.Location = new System.Drawing.Point(56, 0);
|
||||
this.MoneyTextBox.Name = "MoneyTextBox";
|
||||
this.MoneyTextBox.Size = new System.Drawing.Size(152, 15);
|
||||
this.MoneyTextBox.TabIndex = 1;
|
||||
this.MoneyTextBox.Enter += new System.EventHandler(this.carPrice_Enter);
|
||||
this.MoneyTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.carPrice_KeyPress);
|
||||
this.MoneyTextBox.Leave += new System.EventHandler(this.carPrice_Leave);
|
||||
//
|
||||
// MoneyLabel
|
||||
//
|
||||
MoneyLabel.AutoSize = true;
|
||||
MoneyLabel.Dock = DockStyle.Left;
|
||||
MoneyLabel.Font = new Font("Microsoft Sans Serif", 9.75F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
MoneyLabel.Location = new Point(0, 0);
|
||||
MoneyLabel.Margin = new Padding(4, 0, 4, 0);
|
||||
MoneyLabel.Name = "MoneyLabel";
|
||||
MoneyLabel.Size = new Size(56, 16);
|
||||
MoneyLabel.TabIndex = 0;
|
||||
MoneyLabel.Text = "Деньги:";
|
||||
this.MoneyLabel.AutoSize = true;
|
||||
this.MoneyLabel.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.MoneyLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.MoneyLabel.Location = new System.Drawing.Point(0, 0);
|
||||
this.MoneyLabel.Name = "MoneyLabel";
|
||||
this.MoneyLabel.Size = new System.Drawing.Size(56, 16);
|
||||
this.MoneyLabel.TabIndex = 0;
|
||||
this.MoneyLabel.Text = "Деньги:";
|
||||
//
|
||||
// ClassPanel
|
||||
//
|
||||
ClassPanel.AutoSize = true;
|
||||
ClassPanel.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
ClassPanel.BorderStyle = BorderStyle.FixedSingle;
|
||||
ClassPanel.Controls.Add(ClassTextBox);
|
||||
ClassPanel.Controls.Add(ClassLabel);
|
||||
ClassPanel.Dock = DockStyle.Bottom;
|
||||
ClassPanel.Location = new Point(0, 201);
|
||||
ClassPanel.Margin = new Padding(4, 3, 4, 3);
|
||||
ClassPanel.Name = "ClassPanel";
|
||||
ClassPanel.Size = new Size(245, 17);
|
||||
ClassPanel.TabIndex = 2;
|
||||
this.ClassPanel.AutoSize = true;
|
||||
this.ClassPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.ClassPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.ClassPanel.Controls.Add(this.ClassTextBox);
|
||||
this.ClassPanel.Controls.Add(this.ClassLabel);
|
||||
this.ClassPanel.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.ClassPanel.Location = new System.Drawing.Point(0, 170);
|
||||
this.ClassPanel.Name = "ClassPanel";
|
||||
this.ClassPanel.Size = new System.Drawing.Size(210, 17);
|
||||
this.ClassPanel.TabIndex = 2;
|
||||
//
|
||||
// ClassTextBox
|
||||
//
|
||||
ClassTextBox.BackColor = SystemColors.Window;
|
||||
ClassTextBox.BorderStyle = BorderStyle.None;
|
||||
ClassTextBox.Dock = DockStyle.Top;
|
||||
ClassTextBox.Font = new Font("Microsoft Sans Serif", 9.75F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
ClassTextBox.Location = new Point(48, 0);
|
||||
ClassTextBox.Margin = new Padding(4, 3, 4, 3);
|
||||
ClassTextBox.Name = "ClassTextBox";
|
||||
ClassTextBox.ReadOnly = true;
|
||||
ClassTextBox.Size = new Size(195, 15);
|
||||
ClassTextBox.TabIndex = 3;
|
||||
this.ClassTextBox.BackColor = System.Drawing.Color.White;
|
||||
this.ClassTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.ClassTextBox.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.ClassTextBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.ClassTextBox.Location = new System.Drawing.Point(48, 0);
|
||||
this.ClassTextBox.Name = "ClassTextBox";
|
||||
this.ClassTextBox.ReadOnly = true;
|
||||
this.ClassTextBox.Size = new System.Drawing.Size(160, 15);
|
||||
this.ClassTextBox.TabIndex = 3;
|
||||
//
|
||||
// ClassLabel
|
||||
//
|
||||
ClassLabel.AutoSize = true;
|
||||
ClassLabel.Dock = DockStyle.Left;
|
||||
ClassLabel.Font = new Font("Microsoft Sans Serif", 9.75F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
ClassLabel.Location = new Point(0, 0);
|
||||
ClassLabel.Margin = new Padding(4, 0, 4, 0);
|
||||
ClassLabel.Name = "ClassLabel";
|
||||
ClassLabel.Size = new Size(48, 16);
|
||||
ClassLabel.TabIndex = 0;
|
||||
ClassLabel.Text = "Класс:";
|
||||
this.ClassLabel.AutoSize = true;
|
||||
this.ClassLabel.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.ClassLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.ClassLabel.Location = new System.Drawing.Point(0, 0);
|
||||
this.ClassLabel.Name = "ClassLabel";
|
||||
this.ClassLabel.Size = new System.Drawing.Size(48, 16);
|
||||
this.ClassLabel.TabIndex = 0;
|
||||
this.ClassLabel.Text = "Класс:";
|
||||
//
|
||||
// NamePanel
|
||||
//
|
||||
NamePanel.AutoSize = true;
|
||||
NamePanel.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
NamePanel.BorderStyle = BorderStyle.FixedSingle;
|
||||
NamePanel.Controls.Add(ManufacturerLabel);
|
||||
NamePanel.Controls.Add(NameLabel);
|
||||
NamePanel.Dock = DockStyle.Top;
|
||||
NamePanel.Location = new Point(0, 0);
|
||||
NamePanel.Margin = new Padding(4, 3, 4, 3);
|
||||
NamePanel.Name = "NamePanel";
|
||||
NamePanel.Size = new Size(245, 18);
|
||||
NamePanel.TabIndex = 1;
|
||||
this.NamePanel.AutoSize = true;
|
||||
this.NamePanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.NamePanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.NamePanel.Controls.Add(this.ManufacturerLabel);
|
||||
this.NamePanel.Controls.Add(this.NameLabel);
|
||||
this.NamePanel.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.NamePanel.Location = new System.Drawing.Point(0, 0);
|
||||
this.NamePanel.Name = "NamePanel";
|
||||
this.NamePanel.Size = new System.Drawing.Size(210, 18);
|
||||
this.NamePanel.TabIndex = 1;
|
||||
//
|
||||
// ManufacturerLabel
|
||||
//
|
||||
ManufacturerLabel.AutoSize = true;
|
||||
ManufacturerLabel.Dock = DockStyle.Right;
|
||||
ManufacturerLabel.Font = new Font("Microsoft Sans Serif", 9.75F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
ManufacturerLabel.Location = new Point(194, 0);
|
||||
ManufacturerLabel.Margin = new Padding(4, 0, 4, 0);
|
||||
ManufacturerLabel.Name = "ManufacturerLabel";
|
||||
ManufacturerLabel.Size = new Size(49, 16);
|
||||
ManufacturerLabel.TabIndex = 1;
|
||||
ManufacturerLabel.Text = "Марка";
|
||||
this.ManufacturerLabel.AutoSize = true;
|
||||
this.ManufacturerLabel.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.ManufacturerLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.ManufacturerLabel.Location = new System.Drawing.Point(159, 0);
|
||||
this.ManufacturerLabel.Name = "ManufacturerLabel";
|
||||
this.ManufacturerLabel.Size = new System.Drawing.Size(49, 16);
|
||||
this.ManufacturerLabel.TabIndex = 1;
|
||||
this.ManufacturerLabel.Text = "Марка";
|
||||
//
|
||||
// NameLabel
|
||||
//
|
||||
NameLabel.AutoSize = true;
|
||||
NameLabel.Dock = DockStyle.Fill;
|
||||
NameLabel.Font = new Font("Microsoft Sans Serif", 9.75F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
NameLabel.Location = new Point(0, 0);
|
||||
NameLabel.Margin = new Padding(4, 0, 4, 0);
|
||||
NameLabel.Name = "NameLabel";
|
||||
NameLabel.Size = new Size(73, 16);
|
||||
NameLabel.TabIndex = 0;
|
||||
NameLabel.Text = "Название";
|
||||
this.NameLabel.AutoSize = true;
|
||||
this.NameLabel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.NameLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.NameLabel.Location = new System.Drawing.Point(0, 0);
|
||||
this.NameLabel.Name = "NameLabel";
|
||||
this.NameLabel.Size = new System.Drawing.Size(73, 16);
|
||||
this.NameLabel.TabIndex = 0;
|
||||
this.NameLabel.Text = "Название";
|
||||
//
|
||||
// ModelPanel
|
||||
//
|
||||
ModelPanel.AutoSize = true;
|
||||
ModelPanel.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
ModelPanel.BorderStyle = BorderStyle.FixedSingle;
|
||||
ModelPanel.Controls.Add(ModelTextBox);
|
||||
ModelPanel.Controls.Add(ModelLabel);
|
||||
ModelPanel.Dock = DockStyle.Bottom;
|
||||
ModelPanel.Location = new Point(0, 218);
|
||||
ModelPanel.Margin = new Padding(4, 3, 4, 3);
|
||||
ModelPanel.Name = "ModelPanel";
|
||||
ModelPanel.Size = new Size(245, 17);
|
||||
ModelPanel.TabIndex = 0;
|
||||
this.ModelPanel.AutoSize = true;
|
||||
this.ModelPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.ModelPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.ModelPanel.Controls.Add(this.ModelTextBox);
|
||||
this.ModelPanel.Controls.Add(this.ModelLabel);
|
||||
this.ModelPanel.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.ModelPanel.Location = new System.Drawing.Point(0, 187);
|
||||
this.ModelPanel.Name = "ModelPanel";
|
||||
this.ModelPanel.Size = new System.Drawing.Size(210, 17);
|
||||
this.ModelPanel.TabIndex = 0;
|
||||
//
|
||||
// ModelTextBox
|
||||
//
|
||||
ModelTextBox.BackColor = SystemColors.Window;
|
||||
ModelTextBox.BorderStyle = BorderStyle.None;
|
||||
ModelTextBox.Dock = DockStyle.Top;
|
||||
ModelTextBox.Font = new Font("Microsoft Sans Serif", 9.75F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
ModelTextBox.Location = new Point(60, 0);
|
||||
ModelTextBox.Margin = new Padding(4, 3, 4, 3);
|
||||
ModelTextBox.Name = "ModelTextBox";
|
||||
ModelTextBox.ReadOnly = true;
|
||||
ModelTextBox.Size = new Size(183, 15);
|
||||
ModelTextBox.TabIndex = 2;
|
||||
this.ModelTextBox.BackColor = System.Drawing.Color.White;
|
||||
this.ModelTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.ModelTextBox.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.ModelTextBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.ModelTextBox.Location = new System.Drawing.Point(60, 0);
|
||||
this.ModelTextBox.Name = "ModelTextBox";
|
||||
this.ModelTextBox.ReadOnly = true;
|
||||
this.ModelTextBox.Size = new System.Drawing.Size(148, 15);
|
||||
this.ModelTextBox.TabIndex = 2;
|
||||
//
|
||||
// ModelLabel
|
||||
//
|
||||
ModelLabel.AutoSize = true;
|
||||
ModelLabel.Dock = DockStyle.Left;
|
||||
ModelLabel.Font = new Font("Microsoft Sans Serif", 9.75F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
ModelLabel.Location = new Point(0, 0);
|
||||
ModelLabel.Margin = new Padding(4, 0, 4, 0);
|
||||
ModelLabel.Name = "ModelLabel";
|
||||
ModelLabel.Size = new Size(60, 16);
|
||||
ModelLabel.TabIndex = 0;
|
||||
ModelLabel.Text = "Модель:";
|
||||
this.ModelLabel.AutoSize = true;
|
||||
this.ModelLabel.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.ModelLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.ModelLabel.Location = new System.Drawing.Point(0, 0);
|
||||
this.ModelLabel.Name = "ModelLabel";
|
||||
this.ModelLabel.Size = new System.Drawing.Size(60, 16);
|
||||
this.ModelLabel.TabIndex = 0;
|
||||
this.ModelLabel.Text = "Модель:";
|
||||
//
|
||||
// contextMenuStrip1
|
||||
//
|
||||
contextMenuStrip1.Name = "contextMenuStrip1";
|
||||
contextMenuStrip1.Size = new Size(61, 4);
|
||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||
this.contextMenuStrip1.Size = new System.Drawing.Size(61, 4);
|
||||
//
|
||||
// CarControl
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
BackColor = Color.White;
|
||||
BorderStyle = BorderStyle.FixedSingle;
|
||||
Controls.Add(MainPanel);
|
||||
Margin = new Padding(4, 3, 4, 3);
|
||||
Name = "CarControl";
|
||||
Size = new Size(245, 235);
|
||||
MainPanel.ResumeLayout(false);
|
||||
MainPanel.PerformLayout();
|
||||
PhotoPanel.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)PhotoBox).EndInit();
|
||||
MoneyPanel.ResumeLayout(false);
|
||||
MoneyPanel.PerformLayout();
|
||||
ClassPanel.ResumeLayout(false);
|
||||
ClassPanel.PerformLayout();
|
||||
NamePanel.ResumeLayout(false);
|
||||
NamePanel.PerformLayout();
|
||||
ModelPanel.ResumeLayout(false);
|
||||
ModelPanel.PerformLayout();
|
||||
ResumeLayout(false);
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.White;
|
||||
this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.Controls.Add(this.MainPanel);
|
||||
this.Name = "CarControl";
|
||||
this.Size = new System.Drawing.Size(210, 204);
|
||||
this.MainPanel.ResumeLayout(false);
|
||||
this.MainPanel.PerformLayout();
|
||||
this.PhotoPanel.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.PhotoBox)).EndInit();
|
||||
this.MoneyPanel.ResumeLayout(false);
|
||||
this.MoneyPanel.PerformLayout();
|
||||
this.ClassPanel.ResumeLayout(false);
|
||||
this.ClassPanel.PerformLayout();
|
||||
this.NamePanel.ResumeLayout(false);
|
||||
this.NamePanel.PerformLayout();
|
||||
this.ModelPanel.ResumeLayout(false);
|
||||
this.ModelPanel.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Panel MainPanel;
|
||||
private Panel MoneyPanel;
|
||||
private Label MoneyLabel;
|
||||
private Panel ClassPanel;
|
||||
private Label ClassLabel;
|
||||
private Panel NamePanel;
|
||||
private Label NameLabel;
|
||||
private Panel ModelPanel;
|
||||
private Label ModelLabel;
|
||||
private Panel PhotoPanel;
|
||||
private PictureBox PhotoBox;
|
||||
private Label ManufacturerLabel;
|
||||
private TextBox MoneyTextBox;
|
||||
private ContextMenuStrip contextMenuStrip1;
|
||||
private TextBox ModelTextBox;
|
||||
private TextBox ClassTextBox;
|
||||
private System.Windows.Forms.Panel MainPanel;
|
||||
private System.Windows.Forms.Panel MoneyPanel;
|
||||
private System.Windows.Forms.Label MoneyLabel;
|
||||
private System.Windows.Forms.Panel ClassPanel;
|
||||
private System.Windows.Forms.Label ClassLabel;
|
||||
private System.Windows.Forms.Panel NamePanel;
|
||||
private System.Windows.Forms.Label NameLabel;
|
||||
private System.Windows.Forms.Panel ModelPanel;
|
||||
private System.Windows.Forms.Label ModelLabel;
|
||||
private System.Windows.Forms.Panel PhotoPanel;
|
||||
private System.Windows.Forms.PictureBox PhotoBox;
|
||||
private System.Windows.Forms.Label ManufacturerLabel;
|
||||
private System.Windows.Forms.TextBox MoneyTextBox;
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
|
||||
private System.Windows.Forms.TextBox ModelTextBox;
|
||||
private System.Windows.Forms.TextBox ClassTextBox;
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,6 @@ using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using GtaVUsersInfo.Helpers;
|
||||
using GtaVUsersInfo.Sources;
|
||||
|
||||
namespace GtaVUsersInfo.Controls
|
||||
{
|
||||
@ -13,7 +12,6 @@ namespace GtaVUsersInfo.Controls
|
||||
{
|
||||
private static readonly HttpClient httpClient = new HttpClient();
|
||||
private Car car;
|
||||
|
||||
public Car Car
|
||||
{
|
||||
get { return car; }
|
||||
@ -38,8 +36,6 @@ namespace GtaVUsersInfo.Controls
|
||||
ModelTextBox.Text = Car.Model;
|
||||
MoneyTextBox.Text = '$' + Car.Price.ToString();
|
||||
|
||||
ChangeColor();
|
||||
|
||||
LoadImageAsync(Car.Photo);
|
||||
}
|
||||
|
||||
@ -115,25 +111,5 @@ namespace GtaVUsersInfo.Controls
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void ChangeColor()
|
||||
{
|
||||
this.BackColor = car.color;
|
||||
MoneyTextBox.BackColor = car.color;
|
||||
ClassTextBox.BackColor = car.color;
|
||||
ModelTextBox.BackColor = car.color;
|
||||
}
|
||||
|
||||
public void ChangeColor(object sender, EventArgs e)
|
||||
{
|
||||
using (ColorDialog colorDialog = new ColorDialog())
|
||||
{
|
||||
if (colorDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
car.color = colorDialog.Color;
|
||||
ChangeColor();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,24 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing"">Blue</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
@ -26,36 +26,36 @@
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
|
80
Controls/CarItemMenuStrip.Designer.cs
generated
80
Controls/CarItemMenuStrip.Designer.cs
generated
@ -28,69 +28,57 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
components = new System.ComponentModel.Container();
|
||||
myMenuStrip = new ContextMenuStrip(components);
|
||||
addNewToolStripMenuItem = new ToolStripMenuItem();
|
||||
editToolStripMenuItem = new ToolStripMenuItem();
|
||||
deleteToolStripMenuItem = new ToolStripMenuItem();
|
||||
colorToolStripMenuItem = new ToolStripMenuItem();
|
||||
toolStripSeparator1 = new ToolStripSeparator();
|
||||
myMenuStrip.SuspendLayout();
|
||||
SuspendLayout();
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.myMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.addNewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.myMenuStrip.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// myMenuStrip
|
||||
//
|
||||
myMenuStrip.Items.AddRange(new ToolStripItem[] { addNewToolStripMenuItem, editToolStripMenuItem, deleteToolStripMenuItem, toolStripSeparator1, colorToolStripMenuItem });
|
||||
myMenuStrip.Name = "contextMenuStrip";
|
||||
myMenuStrip.Size = new Size(181, 120);
|
||||
this.myMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.addNewToolStripMenuItem,
|
||||
this.editToolStripMenuItem,
|
||||
this.deleteToolStripMenuItem});
|
||||
this.myMenuStrip.Name = "contextMenuStrip";
|
||||
this.myMenuStrip.Size = new System.Drawing.Size(181, 92);
|
||||
//
|
||||
// addNewToolStripMenuItem
|
||||
//
|
||||
addNewToolStripMenuItem.Name = "addNewToolStripMenuItem";
|
||||
addNewToolStripMenuItem.Size = new Size(180, 22);
|
||||
addNewToolStripMenuItem.Text = "Создать";
|
||||
this.addNewToolStripMenuItem.Name = "addNewToolStripMenuItem";
|
||||
this.addNewToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.addNewToolStripMenuItem.Text = "Создать";
|
||||
//
|
||||
// editToolStripMenuItem
|
||||
//
|
||||
editToolStripMenuItem.Name = "editToolStripMenuItem";
|
||||
editToolStripMenuItem.Size = new Size(180, 22);
|
||||
editToolStripMenuItem.Text = "Изменить";
|
||||
this.editToolStripMenuItem.Name = "editToolStripMenuItem";
|
||||
this.editToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.editToolStripMenuItem.Text = "Изменить";
|
||||
//
|
||||
// deleteToolStripMenuItem
|
||||
//
|
||||
deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
|
||||
deleteToolStripMenuItem.Size = new Size(180, 22);
|
||||
deleteToolStripMenuItem.Text = "Удалить";
|
||||
this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
|
||||
this.deleteToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.deleteToolStripMenuItem.Text = "Удалить";
|
||||
//
|
||||
// colorToolStripMenuItem
|
||||
// CarMenuStrip
|
||||
//
|
||||
colorToolStripMenuItem.Name = "colorToolStripMenuItem";
|
||||
colorToolStripMenuItem.Size = new Size(180, 22);
|
||||
colorToolStripMenuItem.Text = "Цвет";
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
toolStripSeparator1.Size = new Size(177, 6);
|
||||
//
|
||||
// CarItemMenuStrip
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
Margin = new Padding(4, 3, 4, 3);
|
||||
Name = "CarItemMenuStrip";
|
||||
Size = new Size(184, 283);
|
||||
myMenuStrip.ResumeLayout(false);
|
||||
ResumeLayout(false);
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Name = "CarMenuStrip";
|
||||
this.Size = new System.Drawing.Size(158, 245);
|
||||
this.myMenuStrip.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private ContextMenuStrip myMenuStrip;
|
||||
private ToolStripMenuItem addNewToolStripMenuItem;
|
||||
private ToolStripMenuItem editToolStripMenuItem;
|
||||
private ToolStripMenuItem deleteToolStripMenuItem;
|
||||
private ToolStripSeparator toolStripSeparator1;
|
||||
private ToolStripMenuItem colorToolStripMenuItem;
|
||||
private System.Windows.Forms.ContextMenuStrip myMenuStrip;
|
||||
private System.Windows.Forms.ToolStripMenuItem addNewToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem deleteToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
|
@ -19,21 +19,19 @@ namespace GtaVUsersInfo.Controls
|
||||
|
||||
public CarControl Car;
|
||||
|
||||
public CarItemMenuStrip(EventHandler add, EventHandler edit, EventHandler delete, EventHandler color, CarControl car)
|
||||
public CarItemMenuStrip(EventHandler add, EventHandler edit, EventHandler delete, CarControl car)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
addNewToolStripMenuItem.Click += add;
|
||||
editToolStripMenuItem.Click += edit;
|
||||
deleteToolStripMenuItem.Click += delete;
|
||||
colorToolStripMenuItem.Click += color;
|
||||
|
||||
Car = car;
|
||||
|
||||
addNewToolStripMenuItem.Tag = this;
|
||||
editToolStripMenuItem.Tag = this;
|
||||
deleteToolStripMenuItem.Tag = this;
|
||||
colorToolStripMenuItem.Tag = this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,24 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing"">Blue</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
@ -26,36 +26,36 @@
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
|
89
Controls/ParameterControl.Designer.cs
generated
89
Controls/ParameterControl.Designer.cs
generated
@ -28,67 +28,64 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
namePanel = new Panel();
|
||||
Textbox = new TextBox();
|
||||
Label = new Label();
|
||||
namePanel.SuspendLayout();
|
||||
SuspendLayout();
|
||||
this.namePanel = new System.Windows.Forms.Panel();
|
||||
this.Textbox = new System.Windows.Forms.TextBox();
|
||||
this.Label = new System.Windows.Forms.Label();
|
||||
this.namePanel.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// namePanel
|
||||
//
|
||||
namePanel.AutoSize = true;
|
||||
namePanel.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
namePanel.Controls.Add(Textbox);
|
||||
namePanel.Controls.Add(Label);
|
||||
namePanel.Dock = DockStyle.Top;
|
||||
namePanel.Location = new Point(0, 0);
|
||||
namePanel.Margin = new Padding(4, 3, 4, 3);
|
||||
namePanel.Name = "namePanel";
|
||||
namePanel.Padding = new Padding(2);
|
||||
namePanel.Size = new Size(175, 42);
|
||||
namePanel.TabIndex = 2;
|
||||
this.namePanel.AutoSize = true;
|
||||
this.namePanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.namePanel.Controls.Add(this.Textbox);
|
||||
this.namePanel.Controls.Add(this.Label);
|
||||
this.namePanel.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.namePanel.Location = new System.Drawing.Point(0, 0);
|
||||
this.namePanel.Name = "namePanel";
|
||||
this.namePanel.Padding = new System.Windows.Forms.Padding(2);
|
||||
this.namePanel.Size = new System.Drawing.Size(150, 37);
|
||||
this.namePanel.TabIndex = 2;
|
||||
//
|
||||
// Textbox
|
||||
//
|
||||
Textbox.Dock = DockStyle.Top;
|
||||
Textbox.ImeMode = ImeMode.NoControl;
|
||||
Textbox.Location = new Point(2, 17);
|
||||
Textbox.Margin = new Padding(4, 3, 4, 3);
|
||||
Textbox.Name = "Textbox";
|
||||
Textbox.Size = new Size(171, 23);
|
||||
Textbox.TabIndex = 1;
|
||||
Textbox.KeyPress += textBox_KeyPress;
|
||||
this.Textbox.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.Textbox.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.Textbox.Location = new System.Drawing.Point(2, 15);
|
||||
this.Textbox.Name = "Textbox";
|
||||
this.Textbox.Size = new System.Drawing.Size(146, 20);
|
||||
this.Textbox.TabIndex = 1;
|
||||
this.Textbox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox_KeyPress);
|
||||
//
|
||||
// Label
|
||||
//
|
||||
Label.AutoSize = true;
|
||||
Label.Dock = DockStyle.Top;
|
||||
Label.Location = new Point(2, 2);
|
||||
Label.Margin = new Padding(4, 0, 4, 0);
|
||||
Label.Name = "Label";
|
||||
Label.Size = new Size(34, 15);
|
||||
Label.TabIndex = 0;
|
||||
Label.Text = "Имя:";
|
||||
this.Label.AutoSize = true;
|
||||
this.Label.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.Label.Location = new System.Drawing.Point(2, 2);
|
||||
this.Label.Name = "Label";
|
||||
this.Label.Size = new System.Drawing.Size(32, 13);
|
||||
this.Label.TabIndex = 0;
|
||||
this.Label.Text = "Имя:";
|
||||
//
|
||||
// ParameterControl
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
AutoSize = true;
|
||||
Controls.Add(namePanel);
|
||||
Margin = new Padding(4, 3, 4, 3);
|
||||
Name = "ParameterControl";
|
||||
Size = new Size(175, 48);
|
||||
namePanel.ResumeLayout(false);
|
||||
namePanel.PerformLayout();
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.AutoSize = true;
|
||||
this.Controls.Add(this.namePanel);
|
||||
this.Name = "ParameterControl";
|
||||
this.Size = new System.Drawing.Size(150, 37);
|
||||
this.namePanel.ResumeLayout(false);
|
||||
this.namePanel.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Panel namePanel;
|
||||
private TextBox Textbox;
|
||||
private Label Label;
|
||||
private System.Windows.Forms.Panel namePanel;
|
||||
private System.Windows.Forms.TextBox Textbox;
|
||||
private System.Windows.Forms.Label Label;
|
||||
}
|
||||
}
|
||||
|
@ -12,8 +12,8 @@ namespace GtaVUsersInfo.Controls
|
||||
{
|
||||
public partial class ParameterControl : UserControl
|
||||
{
|
||||
public string ParamName
|
||||
{
|
||||
public string ParamName
|
||||
{
|
||||
get { return Label.Text.TrimEnd(':'); }
|
||||
set { Label.Text = value + ':'; }
|
||||
}
|
||||
|
@ -1,24 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing"">Blue</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
@ -26,36 +26,36 @@
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
|
22
Forms/AddCars.Designer.cs
generated
22
Forms/AddCars.Designer.cs
generated
@ -46,8 +46,6 @@
|
||||
//
|
||||
// MainPanel
|
||||
//
|
||||
MainPanel.AutoSize = true;
|
||||
MainPanel.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
MainPanel.Controls.Add(saveItem);
|
||||
MainPanel.Controls.Add(separatopPanel2);
|
||||
MainPanel.Controls.Add(panel1);
|
||||
@ -63,15 +61,12 @@
|
||||
//
|
||||
// saveItem
|
||||
//
|
||||
saveItem.AutoSize = true;
|
||||
saveItem.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
saveItem.Dock = DockStyle.Top;
|
||||
saveItem.Dock = DockStyle.Right;
|
||||
saveItem.FlatStyle = FlatStyle.Flat;
|
||||
saveItem.Location = new Point(4, 103);
|
||||
saveItem.Location = new Point(204, 103);
|
||||
saveItem.Margin = new Padding(4, 3, 4, 3);
|
||||
saveItem.MinimumSize = new Size(288, 30);
|
||||
saveItem.Name = "saveItem";
|
||||
saveItem.Size = new Size(288, 30);
|
||||
saveItem.Size = new Size(88, 30);
|
||||
saveItem.TabIndex = 7;
|
||||
saveItem.Text = "Сохранить";
|
||||
saveItem.UseVisualStyleBackColor = true;
|
||||
@ -89,7 +84,6 @@
|
||||
// panel1
|
||||
//
|
||||
panel1.AutoSize = true;
|
||||
panel1.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
panel1.Controls.Add(carPrice);
|
||||
panel1.Controls.Add(priceLabel);
|
||||
panel1.Dock = DockStyle.Top;
|
||||
@ -134,7 +128,6 @@
|
||||
// CarPanel
|
||||
//
|
||||
CarPanel.AutoSize = true;
|
||||
CarPanel.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
CarPanel.Controls.Add(carComboBox);
|
||||
CarPanel.Controls.Add(carLabel);
|
||||
CarPanel.Dock = DockStyle.Top;
|
||||
@ -150,7 +143,6 @@
|
||||
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;
|
||||
@ -171,20 +163,17 @@
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
AutoSize = true;
|
||||
AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
BackColor = Color.White;
|
||||
ClientSize = new Size(296, 136);
|
||||
Controls.Add(MainPanel);
|
||||
Icon = (Icon)resources.GetObject("$this.Icon");
|
||||
Margin = new Padding(4, 3, 4, 3);
|
||||
MaximizeBox = false;
|
||||
MinimizeBox = false;
|
||||
MaximumSize = new Size(312, 175);
|
||||
MinimumSize = new Size(312, 175);
|
||||
Name = "AddCars";
|
||||
ShowInTaskbar = false;
|
||||
StartPosition = FormStartPosition.CenterParent;
|
||||
Text = "Автомобиль";
|
||||
TopMost = true;
|
||||
MainPanel.ResumeLayout(false);
|
||||
MainPanel.PerformLayout();
|
||||
panel1.ResumeLayout(false);
|
||||
@ -192,7 +181,6 @@
|
||||
CarPanel.ResumeLayout(false);
|
||||
CarPanel.PerformLayout();
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -1,5 +1,4 @@
|
||||
using GtaVUsersInfo.Helpers;
|
||||
using GtaVUsersInfo.Sources;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
@ -91,11 +90,5 @@ 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,14 +54,12 @@
|
||||
//
|
||||
// saveItem
|
||||
//
|
||||
saveItem.AutoSize = true;
|
||||
saveItem.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
saveItem.Dock = DockStyle.Top;
|
||||
saveItem.Dock = DockStyle.Right;
|
||||
saveItem.FlatStyle = FlatStyle.Flat;
|
||||
saveItem.Location = new Point(4, 53);
|
||||
saveItem.Location = new Point(204, 53);
|
||||
saveItem.Margin = new Padding(4, 3, 4, 3);
|
||||
saveItem.Name = "saveItem";
|
||||
saveItem.Size = new Size(288, 27);
|
||||
saveItem.Size = new Size(88, 29);
|
||||
saveItem.TabIndex = 7;
|
||||
saveItem.Text = "Сохранить";
|
||||
saveItem.UseVisualStyleBackColor = true;
|
||||
@ -112,7 +110,7 @@
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
AutoSize = true;
|
||||
AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
BackColor = Color.White;
|
||||
ClientSize = new Size(296, 85);
|
||||
Controls.Add(MainPanel);
|
||||
|
@ -1,6 +1,5 @@
|
||||
using GtaVUsersInfo.Controls;
|
||||
using GtaVUsersInfo.Helpers;
|
||||
using GtaVUsersInfo.Sources;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
@ -52,11 +51,5 @@ namespace GtaVUsersInfo.Forms
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public void ChangeFonts(FontSettings settings)
|
||||
{
|
||||
FontSettings.ChangeFontInControls(this, settings);
|
||||
this.Size = new Size(this.nameLabel.Width, this.Size.Height);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
74
MainForm.Designer.cs
generated
74
MainForm.Designer.cs
generated
@ -29,9 +29,9 @@
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
|
||||
upPanel = new Panel();
|
||||
panel1 = new Panel();
|
||||
debugCheck = new CheckBox();
|
||||
downPanel = new Panel();
|
||||
panel2 = new Panel();
|
||||
buttonsPanel = new Panel();
|
||||
readJsonButton = new Button();
|
||||
addParameter = new Button();
|
||||
@ -63,22 +63,22 @@
|
||||
splitterRigth = new Splitter();
|
||||
carsPanel = new Panel();
|
||||
carsItems = new FlowLayoutPanel();
|
||||
upPanel.SuspendLayout();
|
||||
panel1.SuspendLayout();
|
||||
buttonsPanel.SuspendLayout();
|
||||
menuStrip.SuspendLayout();
|
||||
carsPanel.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// upPanel
|
||||
// panel1
|
||||
//
|
||||
upPanel.BorderStyle = BorderStyle.FixedSingle;
|
||||
upPanel.Controls.Add(debugCheck);
|
||||
upPanel.Dock = DockStyle.Top;
|
||||
upPanel.Location = new Point(0, 24);
|
||||
upPanel.Margin = new Padding(4, 3, 4, 3);
|
||||
upPanel.Name = "upPanel";
|
||||
upPanel.Size = new Size(891, 23);
|
||||
upPanel.TabIndex = 0;
|
||||
panel1.BorderStyle = BorderStyle.FixedSingle;
|
||||
panel1.Controls.Add(debugCheck);
|
||||
panel1.Dock = DockStyle.Top;
|
||||
panel1.Location = new Point(0, 24);
|
||||
panel1.Margin = new Padding(4, 3, 4, 3);
|
||||
panel1.Name = "panel1";
|
||||
panel1.Size = new Size(891, 23);
|
||||
panel1.TabIndex = 0;
|
||||
//
|
||||
// debugCheck
|
||||
//
|
||||
@ -92,15 +92,15 @@
|
||||
debugCheck.UseVisualStyleBackColor = true;
|
||||
debugCheck.CheckedChanged += debugCheck_CheckedChanged;
|
||||
//
|
||||
// downPanel
|
||||
// panel2
|
||||
//
|
||||
downPanel.BorderStyle = BorderStyle.FixedSingle;
|
||||
downPanel.Dock = DockStyle.Bottom;
|
||||
downPanel.Location = new Point(0, 534);
|
||||
downPanel.Margin = new Padding(4, 3, 4, 3);
|
||||
downPanel.Name = "downPanel";
|
||||
downPanel.Size = new Size(891, 23);
|
||||
downPanel.TabIndex = 1;
|
||||
panel2.BorderStyle = BorderStyle.FixedSingle;
|
||||
panel2.Dock = DockStyle.Bottom;
|
||||
panel2.Location = new Point(0, 534);
|
||||
panel2.Margin = new Padding(4, 3, 4, 3);
|
||||
panel2.Name = "panel2";
|
||||
panel2.Size = new Size(891, 23);
|
||||
panel2.TabIndex = 1;
|
||||
//
|
||||
// buttonsPanel
|
||||
//
|
||||
@ -231,45 +231,45 @@
|
||||
// openFileToolStripMenuItem
|
||||
//
|
||||
openFileToolStripMenuItem.Name = "openFileToolStripMenuItem";
|
||||
openFileToolStripMenuItem.Size = new Size(170, 22);
|
||||
openFileToolStripMenuItem.Size = new Size(180, 22);
|
||||
openFileToolStripMenuItem.Text = "Открыть";
|
||||
openFileToolStripMenuItem.Click += openFileToolStripMenuItem_Click;
|
||||
//
|
||||
// saveToolStripMenuItem
|
||||
//
|
||||
saveToolStripMenuItem.Name = "saveToolStripMenuItem";
|
||||
saveToolStripMenuItem.Size = new Size(170, 22);
|
||||
saveToolStripMenuItem.Size = new Size(180, 22);
|
||||
saveToolStripMenuItem.Text = "Сохранить";
|
||||
saveToolStripMenuItem.Click += saveToolStripMenuItem_Click;
|
||||
//
|
||||
// saveAsКакToolStripMenuItem
|
||||
//
|
||||
saveAsКакToolStripMenuItem.Name = "saveAsКакToolStripMenuItem";
|
||||
saveAsКакToolStripMenuItem.Size = new Size(170, 22);
|
||||
saveAsКакToolStripMenuItem.Size = new Size(180, 22);
|
||||
saveAsКакToolStripMenuItem.Text = "Сохранить как";
|
||||
saveAsКакToolStripMenuItem.Click += saveAsКакToolStripMenuItem_Click;
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
toolStripSeparator2.Size = new Size(167, 6);
|
||||
toolStripSeparator2.Size = new Size(177, 6);
|
||||
//
|
||||
// newToolStripMenuItem
|
||||
//
|
||||
newToolStripMenuItem.Name = "newToolStripMenuItem";
|
||||
newToolStripMenuItem.Size = new Size(170, 22);
|
||||
newToolStripMenuItem.Size = new Size(180, 22);
|
||||
newToolStripMenuItem.Text = "Новый персонаж";
|
||||
newToolStripMenuItem.Click += newToolStripMenuItem_Click;
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
toolStripSeparator1.Size = new Size(167, 6);
|
||||
toolStripSeparator1.Size = new Size(177, 6);
|
||||
//
|
||||
// exitToolStripMenuItem
|
||||
//
|
||||
exitToolStripMenuItem.Name = "exitToolStripMenuItem";
|
||||
exitToolStripMenuItem.Size = new Size(170, 22);
|
||||
exitToolStripMenuItem.Size = new Size(180, 22);
|
||||
exitToolStripMenuItem.Text = "Выйти";
|
||||
exitToolStripMenuItem.Click += exitToolStripMenuItem_Click;
|
||||
//
|
||||
@ -325,28 +325,24 @@
|
||||
buttonPanelToolStripMenuItem.Name = "buttonPanelToolStripMenuItem";
|
||||
buttonPanelToolStripMenuItem.Size = new Size(188, 22);
|
||||
buttonPanelToolStripMenuItem.Text = "Левая панель";
|
||||
buttonPanelToolStripMenuItem.Click += buttonPanelToolStripMenuItem_Click;
|
||||
//
|
||||
// parameterPanelToolStripMenuItem
|
||||
//
|
||||
parameterPanelToolStripMenuItem.Name = "parameterPanelToolStripMenuItem";
|
||||
parameterPanelToolStripMenuItem.Size = new Size(188, 22);
|
||||
parameterPanelToolStripMenuItem.Text = "Правая панель";
|
||||
parameterPanelToolStripMenuItem.Click += parameterPanelToolStripMenuItem_Click;
|
||||
//
|
||||
// carPanelToolStripMenuItem
|
||||
//
|
||||
carPanelToolStripMenuItem.Name = "carPanelToolStripMenuItem";
|
||||
carPanelToolStripMenuItem.Size = new Size(188, 22);
|
||||
carPanelToolStripMenuItem.Text = "Центральная панель";
|
||||
carPanelToolStripMenuItem.Click += carPanelToolStripMenuItem_Click;
|
||||
//
|
||||
// top_downPanelToolStripMenuItem
|
||||
//
|
||||
top_downPanelToolStripMenuItem.Name = "top_downPanelToolStripMenuItem";
|
||||
top_downPanelToolStripMenuItem.Size = new Size(188, 22);
|
||||
top_downPanelToolStripMenuItem.Text = "Верх/низ";
|
||||
top_downPanelToolStripMenuItem.Click += top_downPanelToolStripMenuItem_Click;
|
||||
//
|
||||
// splitterLeft
|
||||
//
|
||||
@ -356,6 +352,7 @@
|
||||
splitterLeft.Size = new Size(6, 487);
|
||||
splitterLeft.TabIndex = 6;
|
||||
splitterLeft.TabStop = false;
|
||||
splitterLeft.SplitterMoved += SplitterMoved;
|
||||
//
|
||||
// splitterRigth
|
||||
//
|
||||
@ -366,6 +363,7 @@
|
||||
splitterRigth.Size = new Size(6, 487);
|
||||
splitterRigth.TabIndex = 7;
|
||||
splitterRigth.TabStop = false;
|
||||
splitterRigth.SplitterMoved += SplitterMoved;
|
||||
//
|
||||
// carsPanel
|
||||
//
|
||||
@ -381,7 +379,6 @@
|
||||
// carsItems
|
||||
//
|
||||
carsItems.AutoScroll = true;
|
||||
carsItems.BackColor = Color.White;
|
||||
carsItems.Dock = DockStyle.Fill;
|
||||
carsItems.Location = new Point(0, 0);
|
||||
carsItems.Margin = new Padding(4, 3, 4, 3);
|
||||
@ -400,8 +397,8 @@
|
||||
Controls.Add(splitterLeft);
|
||||
Controls.Add(parametersPanel);
|
||||
Controls.Add(buttonsPanel);
|
||||
Controls.Add(downPanel);
|
||||
Controls.Add(upPanel);
|
||||
Controls.Add(panel2);
|
||||
Controls.Add(panel1);
|
||||
Controls.Add(menuStrip);
|
||||
Icon = (Icon)resources.GetObject("$this.Icon");
|
||||
MainMenuStrip = menuStrip;
|
||||
@ -412,8 +409,9 @@
|
||||
Text = "null";
|
||||
FormClosing += MainForm_FormClosing;
|
||||
Load += MainForm_Load;
|
||||
upPanel.ResumeLayout(false);
|
||||
upPanel.PerformLayout();
|
||||
Resize += MainForm_Resize;
|
||||
panel1.ResumeLayout(false);
|
||||
panel1.PerformLayout();
|
||||
buttonsPanel.ResumeLayout(false);
|
||||
buttonsPanel.PerformLayout();
|
||||
menuStrip.ResumeLayout(false);
|
||||
@ -425,8 +423,8 @@
|
||||
|
||||
#endregion
|
||||
|
||||
private Panel upPanel;
|
||||
private Panel downPanel;
|
||||
private Panel panel1;
|
||||
private Panel panel2;
|
||||
private Panel buttonsPanel;
|
||||
private Panel parametersPanel;
|
||||
private MenuStrip menuStrip;
|
||||
|
130
MainForm.cs
130
MainForm.cs
@ -33,16 +33,14 @@ namespace GtaVUsersInfo
|
||||
private List<ParameterControl> parameters;
|
||||
private List<CarControl> cars;
|
||||
|
||||
private FontSettings fontSettings;
|
||||
|
||||
private Font defaultFont;
|
||||
private Color defaultColor;
|
||||
|
||||
private Color defaultPanelColor;
|
||||
|
||||
private List<Control> dtControls;
|
||||
|
||||
private FontSettings fontSettings;
|
||||
private WindowParameters window;
|
||||
private PanelColorSettings panelColorSettings;
|
||||
|
||||
private bool isUser;
|
||||
|
||||
@ -62,7 +60,7 @@ namespace GtaVUsersInfo
|
||||
cars = new List<CarControl>();
|
||||
parameters = new List<ParameterControl> { new ParameterControl("Имя"), new ParameterControl("Деньги") };
|
||||
|
||||
carsItems.ContextMenuStrip = new CarPanelMenuStrip(addCar_Click).Menu;
|
||||
carsItems.ContextMenuStrip = new CarPanelMenuStrip(addNewCar).Menu;
|
||||
parametersPanel.ContextMenuStrip = new ParameterPanelMenuStrip(addNewParameter).Menu;
|
||||
|
||||
dtControls = new List<Control> { parserButton, readJsonButton };
|
||||
@ -100,43 +98,13 @@ namespace GtaVUsersInfo
|
||||
}
|
||||
else
|
||||
{
|
||||
window = new WindowParameters(new Size(this.Width, this.Height), new Size(this.splitterLeft.SplitPosition, this.splitterRigth.SplitPosition), IsFormFullscreen());
|
||||
window = new WindowParameters(new Size(this.Width, this.Height), new Size(this.splitterLeft.SplitPosition, this.splitterRigth.SplitPosition));
|
||||
WindowParameters.SaveWindowParameters(window);
|
||||
WindowResize();
|
||||
}
|
||||
isUser = true;
|
||||
|
||||
panelColorSettings = PanelColorSettings.LoadPanelSettings();
|
||||
if (panelColorSettings != null)
|
||||
{
|
||||
ChangePanelColor();
|
||||
}
|
||||
else
|
||||
{
|
||||
panelColorSettings = new PanelColorSettings(defaultPanelColor, defaultPanelColor, defaultPanelColor, defaultPanelColor);
|
||||
ChangePanelColor();
|
||||
}
|
||||
}
|
||||
|
||||
private bool IsFormFullscreen()
|
||||
{
|
||||
if (this.WindowState == FormWindowState.Maximized)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void SetFullscreen(bool fullscreen)
|
||||
{
|
||||
if (fullscreen)
|
||||
{
|
||||
this.WindowState = FormWindowState.Maximized;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void MainForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
AllPanelCreate();
|
||||
@ -156,7 +124,6 @@ namespace GtaVUsersInfo
|
||||
this.Height = window.height;
|
||||
this.splitterLeft.SplitPosition = window.leftPos;
|
||||
this.splitterRigth.SplitPosition = window.rightPos;
|
||||
SetFullscreen(window.isFullScreen);
|
||||
}
|
||||
|
||||
private void ParameterPanelCreate()
|
||||
@ -178,7 +145,7 @@ namespace GtaVUsersInfo
|
||||
|
||||
foreach (CarControl car in cars)
|
||||
{
|
||||
car.MenuStrip = new CarItemMenuStrip(addCar_Click, editCar, deleteCar, car.ChangeColor, car).Menu;
|
||||
car.MenuStrip = new CarItemMenuStrip(addNewCar, editCar, deleteCar, car).Menu;
|
||||
carsItems.Controls.Add(car);
|
||||
}
|
||||
}
|
||||
@ -254,7 +221,6 @@ namespace GtaVUsersInfo
|
||||
|
||||
using (AddCars form = new AddCars(carList, car))
|
||||
{
|
||||
form.ChangeFonts(fontSettings);
|
||||
form.ShowDialog();
|
||||
}
|
||||
|
||||
@ -266,6 +232,11 @@ namespace GtaVUsersInfo
|
||||
}
|
||||
}
|
||||
|
||||
private void addNewCar(object sender, EventArgs e)
|
||||
{
|
||||
addCar_Click(sender, e);
|
||||
}
|
||||
|
||||
private void editCar(object sender, EventArgs e)
|
||||
{
|
||||
if (carList.Count <= 0)
|
||||
@ -348,7 +319,6 @@ namespace GtaVUsersInfo
|
||||
|
||||
using (AddParameter form = new AddParameter(parameters, parameter))
|
||||
{
|
||||
form.ChangeFonts(fontSettings);
|
||||
form.ShowDialog();
|
||||
}
|
||||
|
||||
@ -462,6 +432,7 @@ namespace GtaVUsersInfo
|
||||
var split = openFileDialog.FileName.Split('\\');
|
||||
this.Text = split[split.Length - 1];
|
||||
window.prevFile = openFileDialog.FileName;
|
||||
SaveWindowSize();
|
||||
return data;
|
||||
}
|
||||
return null; // Если пользователь отменил выбор файла
|
||||
@ -505,6 +476,7 @@ namespace GtaVUsersInfo
|
||||
this.Text = "null";
|
||||
|
||||
window.prevFile = null;
|
||||
SaveWindowSize();
|
||||
|
||||
AllPanelCreate();
|
||||
}
|
||||
@ -528,8 +500,6 @@ namespace GtaVUsersInfo
|
||||
e.Cancel = true;
|
||||
return;
|
||||
}
|
||||
|
||||
SaveWindowSize();
|
||||
}
|
||||
|
||||
#endregion
|
||||
@ -582,85 +552,19 @@ namespace GtaVUsersInfo
|
||||
{
|
||||
if (isUser)
|
||||
{
|
||||
window = new WindowParameters(new Size(this.Width, this.Height), new Size(this.splitterLeft.SplitPosition, this.splitterRigth.SplitPosition), IsFormFullscreen(), window.prevFile);
|
||||
window = new WindowParameters(new Size(this.Width, this.Height), new Size(this.splitterLeft.SplitPosition, this.splitterRigth.SplitPosition), window.prevFile);
|
||||
WindowParameters.SaveWindowParameters(window);
|
||||
}
|
||||
}
|
||||
|
||||
private void SaveColorPanel()
|
||||
private void MainForm_Resize(object sender, EventArgs e)
|
||||
{
|
||||
PanelColorSettings.SavePanelSettings(panelColorSettings);
|
||||
SaveWindowSize();
|
||||
}
|
||||
|
||||
private void ChangePanelColor()
|
||||
private void SplitterMoved(object sender, SplitterEventArgs e)
|
||||
{
|
||||
this.buttonsPanel.BackColor = panelColorSettings.leftPanel;
|
||||
this.parametersPanel.BackColor = panelColorSettings.rightPanel;
|
||||
this.carsPanel.BackColor = panelColorSettings.centerPanel;
|
||||
this.carsItems.BackColor = panelColorSettings.centerPanel;
|
||||
this.upPanel.BackColor = panelColorSettings.upDownPanel;
|
||||
this.downPanel.BackColor = panelColorSettings.upDownPanel;
|
||||
this.menuStrip.BackColor = panelColorSettings.upDownPanel;
|
||||
}
|
||||
|
||||
private void buttonPanelToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (ColorDialog colorDialog = new ColorDialog())
|
||||
{
|
||||
if (colorDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
panelColorSettings.leftPanel = colorDialog.Color;
|
||||
|
||||
ChangePanelColor();
|
||||
|
||||
SaveColorPanel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void parameterPanelToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (ColorDialog colorDialog = new ColorDialog())
|
||||
{
|
||||
if (colorDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
panelColorSettings.rightPanel = colorDialog.Color;
|
||||
|
||||
ChangePanelColor();
|
||||
|
||||
SaveColorPanel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void carPanelToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (ColorDialog colorDialog = new ColorDialog())
|
||||
{
|
||||
if (colorDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
panelColorSettings.centerPanel = colorDialog.Color;
|
||||
|
||||
ChangePanelColor();
|
||||
|
||||
SaveColorPanel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void top_downPanelToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (ColorDialog colorDialog = new ColorDialog())
|
||||
{
|
||||
if (colorDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
panelColorSettings.upDownPanel = colorDialog.Color;
|
||||
|
||||
ChangePanelColor();
|
||||
|
||||
SaveColorPanel();
|
||||
}
|
||||
}
|
||||
SaveWindowSize();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<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>
|
||||
<History>True|2024-10-10T07:55:42.4660156Z;True|2024-10-10T10:36:20.4890831+03:00;</History>
|
||||
<LastFailureDetails />
|
||||
</PropertyGroup>
|
||||
</Project>
|
9
Resources.Designer.cs
generated
9
Resources.Designer.cs
generated
@ -115,15 +115,6 @@ namespace GtaVUsersInfo {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ищет локализованную строку, похожую на data/panelColor.json.
|
||||
/// </summary>
|
||||
public static string paneColorlSettingsJsonPath {
|
||||
get {
|
||||
return ResourceManager.GetString("paneColorlSettingsJsonPath", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ищет локализованную строку, похожую на data/window.json.
|
||||
/// </summary>
|
||||
|
@ -136,9 +136,6 @@
|
||||
<data name="icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\icon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="paneColorlSettingsJsonPath" xml:space="preserve">
|
||||
<value>data/panelColor.json</value>
|
||||
</data>
|
||||
<data name="windowParametersJsonPath" xml:space="preserve">
|
||||
<value>data/window.json</value>
|
||||
</data>
|
||||
|
@ -76,7 +76,7 @@ namespace GtaVUsersInfo.Sources
|
||||
control.Size = new Size(newWidth, newHeight);
|
||||
}
|
||||
|
||||
if (control is TextBox || control is Button || control is ComboBox)
|
||||
if (control is TextBox || control is Button)
|
||||
{
|
||||
control.Font = font;
|
||||
control.ForeColor = color;
|
||||
|
@ -1,64 +0,0 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GtaVUsersInfo.Sources
|
||||
{
|
||||
[Serializable]
|
||||
public class PanelColorSettings
|
||||
{
|
||||
public Color leftPanel;
|
||||
public Color rightPanel;
|
||||
public Color centerPanel;
|
||||
public Color upDownPanel;
|
||||
|
||||
public PanelColorSettings() { }
|
||||
|
||||
public PanelColorSettings(Color left, Color right, Color center, Color upDown)
|
||||
{
|
||||
leftPanel = left;
|
||||
rightPanel = right;
|
||||
centerPanel = center;
|
||||
upDownPanel = upDown;
|
||||
}
|
||||
|
||||
public static void SavePanelSettings(PanelColorSettings color)
|
||||
{
|
||||
string json = JsonConvert.SerializeObject(color, Formatting.Indented);
|
||||
|
||||
if (!Directory.Exists(Path.GetDirectoryName(Resources.paneColorlSettingsJsonPath)))
|
||||
{
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(Resources.paneColorlSettingsJsonPath));
|
||||
}
|
||||
|
||||
File.WriteAllText(Resources.paneColorlSettingsJsonPath, json);
|
||||
}
|
||||
|
||||
public static PanelColorSettings LoadPanelSettings()
|
||||
{
|
||||
try
|
||||
{
|
||||
string json = File.ReadAllText(Resources.paneColorlSettingsJsonPath);
|
||||
return JsonConvert.DeserializeObject<PanelColorSettings>(json);
|
||||
}
|
||||
catch (FileNotFoundException)
|
||||
{
|
||||
Console.WriteLine($"Файл с цветами панелей не найден: {Resources.paneColorlSettingsJsonPath}");
|
||||
return null;
|
||||
}
|
||||
catch (JsonException ex)
|
||||
{
|
||||
Console.WriteLine($"Ошибка при десериализации JSON с цветами панелей: {ex.Message}");
|
||||
return null;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"Произошла неожиданная ошибка при открытии файла с цветами панелей: {ex.Message}");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -14,27 +14,24 @@ namespace GtaVUsersInfo.Sources
|
||||
public int height;
|
||||
public int leftPos;
|
||||
public int rightPos;
|
||||
public bool isFullScreen;
|
||||
public string? prevFile;
|
||||
|
||||
public WindowParameters() { }
|
||||
|
||||
public WindowParameters(Size window, Size pos, bool isfull)
|
||||
public WindowParameters(Size window, Size pos)
|
||||
{
|
||||
width = window.Width;
|
||||
height = window.Height;
|
||||
leftPos = pos.Width;
|
||||
rightPos = pos.Height;
|
||||
isFullScreen = isfull;
|
||||
}
|
||||
|
||||
public WindowParameters(Size window, Size pos, bool isfull, string file)
|
||||
public WindowParameters(Size window, Size pos, string file)
|
||||
{
|
||||
width = window.Width;
|
||||
height = window.Height;
|
||||
leftPos = pos.Width;
|
||||
rightPos = pos.Height;
|
||||
isFullScreen = isfull;
|
||||
prevFile = file;
|
||||
}
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
@ -2,5 +2,5 @@
|
||||
"FontFamily": "Segoe UI",
|
||||
"FontSize": 15.75,
|
||||
"FontStyle": 0,
|
||||
"FontColor": "Black"
|
||||
"FontColor": "64, 0, 64"
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"leftPanel": "Silver",
|
||||
"rightPanel": "Silver",
|
||||
"centerPanel": "Silver",
|
||||
"upDownPanel": "128, 128, 192"
|
||||
}
|
@ -1,8 +1,7 @@
|
||||
{
|
||||
"width": 1696,
|
||||
"height": 1026,
|
||||
"width": 1004,
|
||||
"height": 645,
|
||||
"leftPos": 150,
|
||||
"rightPos": 181,
|
||||
"isFullScreen": true,
|
||||
"prevFile": "C:\\Users\\eugen\\YandexDisk\\БТШ\\Карл.json"
|
||||
"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.
@ -1 +1 @@
|
||||
cffc69186f6bcce96c6d04f34e1dc7e20a79c6a9
|
||||
8a6478b13bc7a79a0338eb465c5bca8fb9e4c8be
|
||||
|
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 @@
|
||||
0e0620c9e90405a040536d7aa4bbce2e52cf4709
|
||||
5826764bf00f1472f674d5a16ee6f8dadffdc9fa
|
||||
|
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 @@
|
||||
355d640f87884ff864ea3cc2e918102d15c5316d
|
||||
14d8c8caa14b2814e328ab717eeee233fd30afb1
|
||||
|
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