public BrowserProfileViewModel(IBrowserStateNotificationService browserStateNotificationService, IMediator mediator, BrowserProfile browserProfile) { _browserProfile = browserProfile; Browser = new BrowserViewModel(browserStateNotificationService, mediator, _browserProfile.Browser); Profile = new ProfileViewModel(browserStateNotificationService, mediator, _browserProfile.Profile); }
public ProfileViewModel(IBrowserStateNotificationService browserStateNotificationService, IMediator mediator, Profile profile) { _browserStateNotificationService = browserStateNotificationService; _mediator = mediator; _profile = profile; SelectionRules = new ObservableCollection <SelectionRuleViewModel>(_profile.SelectionRules.Select(x => new SelectionRuleViewModel(mediator, x))); _browserStateNotificationService.SelectionRuleCreated += _browserStateNotificationService_SelectionRuleCreated; _browserStateNotificationService.SelectionRuleDeleted += _browserStateNotificationService_SelectionRuleDeleted; AddSelectionRuleCommand = new RelayCommand(async() => await AddNewSelectionRule()); }
public ProfileSelectionRuleDeletedNotificationHandler(IBrowserStateNotificationService browserStateNotificationService) { _browserStateNotificationService = browserStateNotificationService; }
public BrowserViewModel(IBrowserStateNotificationService browserStateNotificationService, IMediator mediator, Browser browser) { _browser = browser; Profiles = new ObservableCollection <ProfileViewModel>(_browser.Profiles.Select(x => new ProfileViewModel(browserStateNotificationService, mediator, x))); }