public void ReadXml(Stream s)
        {
            // load config
            var config = new Configuration();

            config.Load(s);

            // apply it's changes to us
            UserName.Value = config.UserName;

            SynchronizeLists.Sync(Sites, config.Sites, siteXml =>
            {
                var site                  = new ConfigurationSiteViewModel();
                site.Login.Value          = siteXml.Login;
                site.SiteName.Value       = siteXml.SiteName;
                site.Counter.Value        = siteXml.Counter;
                site.TypeOfPassword.Value = siteXml.Type;
                return(site);
            }
                                  );

            SelectedItem.Value = Sites.FirstOrDefault();

            ResetMasterPassword.SetValue(true);
        }
        public void Reset()
        {
            UserName.Value = null;
            Sites.Clear();

            GeneratedPassword.SetValue(string.Empty);
            GeneratedForSite.SetValue(string.Empty);

            // Notify Window to reset the entered passwd
            ResetMasterPassword.SetValue(true);
        }