Пример #1
0
 public BodyVm(
     RevitService service,
     IReadOnlyCollection <Document> docs,
     OptionsVm optionsVm)
 {
     Docs     = docs;
     _service = service;
     Tabs     = _service.Providers.Select(x => new TabVm(x, docs, optionsVm)).ToList();
 }
Пример #2
0
        public TabVm(IRenameableProvider provider, IReadOnlyCollection <Document> docs, OptionsVm optionsVm)
        {
            _provider  = provider;
            _optionsVm = optionsVm;

            Renameables = new ObservableCollection <RenameableVm>();

            foreach (var doc in docs)
            {
                var renameables = provider.GetRenameables(doc);
                foreach (var renameableVm in renameables.GroupBy(x => x.Source)
                         .Select(x => new RenameableVm(x.ToList())))
                {
                    renameableVm.Checked += (sender, b) => OptionsVmOnPropertyChanged();
                    Renameables.Add(renameableVm);
                }
            }

            _optionsVm.PropertyChanged += (s, e) => OptionsVmOnPropertyChanged();
        }
Пример #3
0
 public MainVm(RevitService service)
 {
     _service = service;
     Options  = new OptionsVm();
 }