Quasar/Quasar.Server/Forms/FrmRegValueEditString.cs

32 lines
839 B
C#
Raw Normal View History

2018-09-27 01:05:10 -07:00
using System;
using System.Windows.Forms;
2018-09-27 01:05:10 -07:00
using Quasar.Common.Models;
using Quasar.Common.Utilities;
2018-10-04 12:49:24 -07:00
using Quasar.Server.Registry;
2018-09-27 01:05:10 -07:00
namespace Quasar.Server.Forms
{
public partial class FrmRegValueEditString : Form
{
private readonly RegValueData _value;
public FrmRegValueEditString(RegValueData value)
{
_value = value;
InitializeComponent();
this.valueNameTxtBox.Text = RegValueHelper.GetName(value.Name);
this.valueDataTxtBox.Text = ByteConverter.ToString(value.Data);
}
private void okButton_Click(object sender, EventArgs e)
{
_value.Data = ByteConverter.GetBytes(valueDataTxtBox.Text);
this.Tag = _value;
this.DialogResult = DialogResult.OK;
this.Close();
}
}
}