예제 #1
0
 public MainViewModel()
 {
     var events = new EventAggregator();
     var config = new Configuration(events: events).WithCss().WithDefaultLoader(m => 
     {
         m.IsNavigationEnabled = true;
         m.IsResourceLoadingEnabled = true;
     });
     context = BrowsingContext.New(config);
     profiler = new ProfilerViewModel(events);
     errors = new ErrorsViewModel(events);
     dom = new DOMViewModel();
     query = new QueryViewModel();
     repl = new ReplViewModel();
     settings = new SettingsViewModel();
     statistics = new StatisticsViewModel();
     tree = new TreeViewModel();
     sheets = new SheetViewModel();
     cts = new CancellationTokenSource();
     views = new ITabViewModel[] 
     {
         dom,
         query,
         repl,
         statistics,
         tree,
         sheets
     };
     logs = new IEventViewModel[]
     {
         profiler,
         errors
     };
 }
예제 #2
0
 public Profiler()
 {
     InitializeComponent();
     vm = ProfilerViewModel.Data;
     DataContext = vm;
     vm.PropertyChanged += ProfilePropertyChanged;
 }