2024-10-08 09:53:24 +03:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
|
|
|
|
namespace GtaVUsersInfo.Controls
|
|
|
|
|
{
|
|
|
|
|
public partial class ParameterControl : UserControl
|
|
|
|
|
{
|
2024-10-10 13:47:29 +03:00
|
|
|
|
public string ParamName
|
|
|
|
|
{
|
2024-10-08 11:44:50 +03:00
|
|
|
|
get { return Label.Text.TrimEnd(':'); }
|
|
|
|
|
set { Label.Text = value + ':'; }
|
|
|
|
|
}
|
|
|
|
|
|
2024-10-08 18:33:19 +03:00
|
|
|
|
public string ParamText
|
2024-10-08 11:44:50 +03:00
|
|
|
|
{
|
2024-10-08 18:33:19 +03:00
|
|
|
|
get { return Textbox.Text; }
|
|
|
|
|
set { Textbox.Text = value; }
|
2024-10-08 11:44:50 +03:00
|
|
|
|
}
|
|
|
|
|
|
2024-10-08 15:14:10 +03:00
|
|
|
|
public ContextMenuStrip MenuStrip
|
|
|
|
|
{
|
|
|
|
|
get { return ContextMenuStrip; }
|
|
|
|
|
set { ContextMenuStrip = value; }
|
|
|
|
|
}
|
|
|
|
|
|
2024-10-08 18:33:19 +03:00
|
|
|
|
public ParameterControl()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
|
|
|
|
Label.Text = "";
|
|
|
|
|
Textbox.Text = "";
|
|
|
|
|
}
|
|
|
|
|
|
2024-10-08 09:53:24 +03:00
|
|
|
|
public ParameterControl(string name, string text = "")
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
|
|
|
|
Label.Text = name + ':';
|
|
|
|
|
Textbox.Text = text;
|
|
|
|
|
}
|
2024-10-08 11:44:50 +03:00
|
|
|
|
|
2024-10-08 18:33:19 +03:00
|
|
|
|
public ParameterControl(Parameter parameter)
|
2024-10-08 11:44:50 +03:00
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
2024-10-08 18:33:19 +03:00
|
|
|
|
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;
|
|
|
|
|
}
|
2024-10-08 11:44:50 +03:00
|
|
|
|
}
|
2024-10-08 09:53:24 +03:00
|
|
|
|
}
|
|
|
|
|
}
|