using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace MetaEditor.Controls
{
    public partial class Int : UserControl
    {
        public Type type;

        public Int(uint value, string name)
        {
            InitializeComponent();
            label2.Text = name;
            textBox1.Text = value.ToString();
            type = typeof(uint);
        }
        public Int(int value, string name)
        {
            InitializeComponent();
            label2.Text = name;
            textBox1.Text = value.ToString();
            type = typeof(int);
        }

        public Int(long value, string name)
        {
            InitializeComponent();
            label2.Text = name;
            textBox1.Text = value.ToString();
            type = typeof(long);
        }

        public Int(ulong value, string name)
        {
            InitializeComponent();
            label2.Text = name;
            textBox1.Text = value.ToString();
            type = typeof(ulong);
        }

        public void Reload(uint value)
        {
            textBox1.Text = value.ToString();
        }

        public void Reload(int value)
        {
            textBox1.Text = value.ToString();
        }

        public void Reload(long value)
        {
            textBox1.Text = value.ToString();
        }

        public void Reload(ulong value)
        {
            textBox1.Text = value.ToString();
        }

        public string ReturnName()
        {
            return label2.Text.Replace(' ', '_');
        }

        public int ReturnValue()
        {
            return int.Parse(textBox1.Text);
        }
    }
}
