Пример #1
0
        protected override void OnLoaded(ContentControl view)
        {
            var users = _mountUserRepository.GetAll();

            if (MountUserCollection == null)
            {
                MountUserCollection = new ObservableCollection <IMountUser>();
            }
            foreach (var item in users)
            {
                MountUserCollection.Add(item);
            }
            var passwordBox = (view as SignInMountPage)?.PasswordBox;

            if (FillAccontPageInfo(passwordBox, users.FirstOrDefault(item => item.IsAutoSignIn)))
            {
                IsAutoSignIn = true;
                if (SignInCommand.CanExecute(passwordBox))
                {
                    SignInCommand.Execute(passwordBox);
                }
                return;
            }
            FillAccontPageInfo(passwordBox, users.FirstOrDefault(item => item.IsRememberPassword));
        }