private void MenuItem_Click(object sender, RoutedEventArgs e)
        {
            SerializationActions actions = new SerializationActions();

            actions.SerializeObject("test.xml", DataContext as UserViewModel);
            MessageBox.Show("Serializare efectuata cu succes!");
        }
        public StartViewModel()
        {
            try
            {
                FileStream file = new FileStream(Constants.UsersFile, FileMode.Open);
                file.Dispose();
                CanExecuteCommandSignIn = true;
            }
            catch (FileNotFoundException)
            {
                CanExecuteCommandSignIn = false;
            }

            try
            {
                FileStream file = new FileStream(Constants.WordsFile, FileMode.Open);
                file.Dispose();
            }
            catch (FileNotFoundException)
            {
                Words words = new Words();
                words.AddWords();
                SerializationActions actions = new SerializationActions();
                actions.SerializeWords(Constants.WordsFile, words);
            }

            //try
            //{
            //    FileStream file = new FileStream("Images.xml", FileMode.Open);
            //    file.Dispose();
            //}
            //catch (FileNotFoundException)
            //{
            //    Images images = new Images();
            //    images.AddImages();
            //    SerializationActions actions = new SerializationActions();
            //    actions.SerializeImages("Images.xml", images);
            //}
        }