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

namespace AppWindows
{
    public partial class frmPrincipale : Form
    {
        public frmPrincipale()
        {
            InitializeComponent();
        }

        private void edtNumeroInserito_MouseEnter(object sender, EventArgs e)
        {

        }

        private void btnConversione_Click(object sender, EventArgs e)
        {
            try
            {
                int numeroInserito = Convert.ToInt32(edtNumeroInserito.Text);
                edtConversione.Text = StrumentiMatematica.ConversioneDecimaleBinario(numeroInserito);

            }
            catch (Exception)
            {
                edtConversione.Text = "";
                MessageBox.Show("Errore nella convesione", "ATTENZIONE", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
    }
}
