Beispiel #1
0
        private async void OnLoaded(object sender, RoutedEventArgs e)
        {
            var mailBoxInfo = await JsonSettings.ReadAsync <MailBoxInfo>("Mails.json");

            HostBox.Text     = mailBoxInfo?.ImapHost ?? "";
            UserNameBox.Text = mailBoxInfo?.UserName ?? "";
            PasswordBox.Focus(FocusState.Programmatic);
        }
        private async void OnLoaded(object sender, RoutedEventArgs e)
        {
            var ruleSet =
                await JsonSettings.ReadAsync <VariableDefinitionRuleSetViewModel>(
                    "VariableRuleSet.json") ?? new VariableDefinitionRuleSetViewModel();

            DataContext = ruleSet;
            if (!ruleSet.Rules.Any())
            {
                ruleSet.Rules.Add(new VariableDefinitionRuleViewModel());
            }
            RuleListView.SelectedIndex = 0;
        }
 private async void OnLoaded(object sender, RoutedEventArgs e)
 {
     _rules = (await JsonSettings.ReadAsync <VariableDefinitionRuleSetViewModel>(
                   "VariableRuleSet.json"))?.Rules;
 }