Esempio n. 1
0
        public override void OnNavigatedTo()
        {
            base.OnNavigatedTo();

            _logger.LogDebug("Syncing Properties with {type}: '{name}'", BackupItem.TypeName(), BackupItem.Name);
            PropertySync.Sync(BackupItem, this);
        }
Esempio n. 2
0
        public void SyncStringDiff(string firstName, string lastName)
        {
            var personModel = new PersonModel {
                FirstName = firstName, LastName = lastName
            };
            var c = new MyClass();

            PropertySync.Sync(personModel, c);
            Assert.AreNotEqual(personModel.FirstName, c.StringProperty);
        }
Esempio n. 3
0
        public override void OnNavigatedTo()
        {
            base.OnNavigatedTo();

            _logger.LogTrace("Opened settings");

            SettingsDir = _settings.GetSettingsDir();

            _logger.LogDebug("Syncing settings properties");
            PropertySync.Sync(_settings.Data, this);
        }
Esempio n. 4
0
        public void SyncStringPerson(string firstName, string lastName)
        {
            var personModel = new PersonModel {
                FirstName = firstName, LastName = lastName
            };
            var personViewModel = new PersonViewModel();

            PropertySync.Sync(personModel, personViewModel);
            Assert.AreEqual(personModel.FirstName, personViewModel.FirstName);
            Assert.AreEqual(personModel.LastName, personViewModel.LastName);
        }
Esempio n. 5
0
        public override void OnNavigatedTo()
        {
            base.OnNavigatedTo();

            Triggers = new BindableCollection <string> {
                "None", "Cron", "Timed", "BackupItem"
            };
            var ignores = new HashSet <string> {
                "BackupItem"
            };

            _logger.LogDebug("Syncing Properties with {type}: '{name}'", BackupItem.TypeName(), BackupItem.Name);
            PropertySync.Sync(BackupItem, this, ignores);

            BackupNames = new List <string>(_backupData.Data.Keys);

            Title = $"Edit '{Name}'";
        }