コード例 #1
0
        private void AddOption(OptionViewModel option)
        {
            if (!option.Control.IsVisible)
            {
                return;
            }

            _options.Add(ElementFactory.CreateSummaryOption(option));

            var check = option.Control as CheckViewModel;

            if (check == null)
            {
                return;
            }

            if (check.Value.GetValueOrDefault())
            {
                foreach (var checkedOption in check.CheckedOptions)
                {
                    AddOption(checkedOption);
                }
            }
            else
            {
                foreach (var uncheckedOption in check.UncheckedOptions)
                {
                    AddOption(uncheckedOption);
                }
            }
        }
コード例 #2
0
 public SummaryOptionViewModel CreateSummaryOption(OptionViewModel option)
 {
     return(_container.Resolve <SummaryOptionViewModel>(
                new ParameterOverride(nameof(option), option)));
 }
コード例 #3
0
 public SummaryOptionViewModel(OptionViewModel option)
 {
     _option = option;
 }