void SubmitButton_Clicked(object sender, EventArgs e)
        {
            PersonaleMedico userToBeSaved;


            if (!this.toggledArgs)
            {
                userToBeSaved = new Medico(nameEntry.Text.ToString() + "."
                                           + surnameEntry.Text.ToString(),
                                           pswEntry.Text.ToString(),
                                           nameEntry.Text.ToString(),
                                           surnameEntry.Text.ToString(),
                                           specEntry.Text.ToString());
                List <Medico> list;

                String path = "../../Properties/Archive/ListaMedici.xml";
                if (File.Exists(path))
                {
                    DataReader <List <Medico> > reader = new DataReader <List <Medico> >();
                    list = reader.readXML(path);
                }
                else
                {
                    list = new List <Medico>();
                }

                list.Add((Medico)userToBeSaved);

                DataSaver <List <Medico> > saver = new DataSaver <List <Medico> >();
                saver.save(list, path);
            }
            else
            {
                userToBeSaved = new Infermiere(nameEntry.Text.ToString() + "."
                                               + surnameEntry.Text.ToString(),
                                               pswEntry.Text.ToString(),
                                               nameEntry.Text.ToString(),
                                               surnameEntry.Text.ToString());
                String            path = "../../Properties/Archive/ListaInfermieri.xml";
                List <Infermiere> list;
                if (File.Exists(path))
                {
                    DataReader <List <Infermiere> > reader = new DataReader <List <Infermiere> >();
                    list = reader.readXML(path);
                }
                else
                {
                    list = new List <Infermiere>();
                }
                list.Add((Infermiere)userToBeSaved);

                DataSaver <List <Infermiere> > saver = new DataSaver <List <Infermiere> >();
                saver.save(list, path);
            }

            Console.WriteLine(userToBeSaved.GetUsername());
            this.Hide();
            this.isInstantiated = false;
        }
        public User(String password)
        {
            if (File.Exists(idCounterPath))
            {
                DataReader <int> reader = new DataReader <int>();
                DataSaver <int>  saver  = new DataSaver <int>();
                this.id = reader.readXML(idCounterPath) + 1;
                saver.save(this.id, idCounterPath);
            }
            else
            {
                this.id = 0;
            }

            this.psw = password.GetHashCode();
        }