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 Float : UserControl
    {
        public Type type;

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

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

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

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

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

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