Добавлены сохранение и загрузка персонажей
This commit is contained in:
4
Controls/CarControl.Designer.cs
generated
4
Controls/CarControl.Designer.cs
generated
@@ -235,14 +235,14 @@
|
||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||
this.contextMenuStrip1.Size = new System.Drawing.Size(61, 4);
|
||||
//
|
||||
// CarItem
|
||||
// CarControl
|
||||
//
|
||||
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 = "CarItem";
|
||||
this.Name = "CarControl";
|
||||
this.Size = new System.Drawing.Size(210, 204);
|
||||
this.MainPanel.ResumeLayout(false);
|
||||
this.MainPanel.PerformLayout();
|
||||
|
3
Controls/ParameterControl.Designer.cs
generated
3
Controls/ParameterControl.Designer.cs
generated
@@ -50,11 +50,12 @@
|
||||
// Textbox
|
||||
//
|
||||
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.Multiline = true;
|
||||
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
|
||||
//
|
||||
|
@@ -18,10 +18,10 @@ namespace GtaVUsersInfo.Controls
|
||||
set { Label.Text = value + ':'; }
|
||||
}
|
||||
|
||||
public int ParamText
|
||||
public string ParamText
|
||||
{
|
||||
get { return int.Parse(Textbox.Text); }
|
||||
set { Textbox.Text = value.ToString(); }
|
||||
get { return Textbox.Text; }
|
||||
set { Textbox.Text = value; }
|
||||
}
|
||||
|
||||
public ContextMenuStrip MenuStrip
|
||||
@@ -30,6 +30,14 @@ namespace GtaVUsersInfo.Controls
|
||||
set { ContextMenuStrip = value; }
|
||||
}
|
||||
|
||||
public ParameterControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
Label.Text = "";
|
||||
Textbox.Text = "";
|
||||
}
|
||||
|
||||
public ParameterControl(string name, string text = "")
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -38,12 +46,21 @@ namespace GtaVUsersInfo.Controls
|
||||
Textbox.Text = text;
|
||||
}
|
||||
|
||||
public ParameterControl()
|
||||
public ParameterControl(Parameter parameter)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
Label.Text = "";
|
||||
Textbox.Text = "";
|
||||
Label.Text = parameter.Name + ':';
|
||||
Textbox.Text = parameter.Text;
|
||||
}
|
||||
|
||||
private void textBox_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == (char)Keys.Enter)
|
||||
{
|
||||
Label.Focus();
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user