Ejemplo n.º 1
0
        /// <summary>
        ///     Wird aufgerufen sobald die View initialisiert wurde
        /// </summary>
        /// <param name="args"></param>
        /// <returns></returns>
        public override Task OnActivated(object args = null)
        {
            if (UserAccountData == null)
            {
                Logging.Log.LogError("UserAccount null?");
                Nav.ToView("ViewMain");
            }

            if (args is bool fromRegistration)
            {
                FromRegistration = fromRegistration;
            }

            Data = new EditUserData
            {
                LastName  = UserAccountData.LastName,
                FirstName = UserAccountData.FirstName,
            };

            CheckSaveBehavior.SetCompareData(Data.ToJson());
            Data.PropertyChanged         += (sender, eventArgs) => { CmdSave.CanExecute(); };
            _saveCheck.CheckSaveComparer += (sender, a) => { a.JsonToCompare = Data.ToJson(); };

            return(Task.CompletedTask);
        }
Ejemplo n.º 2
0
 private void UpdateData()
 {
     Data = new EditUserData
     {
         City       = UserAccountData.City,
         FirstName  = UserAccountData.FirstName,
         LastName   = UserAccountData.LastName,
         PostalCode = UserAccountData.PostalCode,
         Street     = UserAccountData.Street
     };
 }