Пример #1
0
 public override void InitializeComponent(ICore core)
 {
     this.LibraryHierarchyBrowser = this.Core.Components.LibraryHierarchyBrowser;
     this.LibraryHierarchyBrowser.FilterChanged += this.OnFilterChanged;
     this.PlaylistManager       = this.Core.Managers.Playlist;
     this.DatabaseFactory       = this.Core.Factories.Database;
     this.SignalEmitter         = this.Core.Components.SignalEmitter;
     this.SignalEmitter.Signal += this.OnSignal;
     this.LibraryManager        = this.Core.Managers.Library;
     this.LibraryManager.SelectedHierarchyChanged += this.OnSelectedHierarchyChanged;
     this.LibraryManager.SelectedItemChanged      += this.OnSelectedItemChanged;
     this.Configuration = this.Core.Components.Configuration;
     this.Configuration.GetElement <IntegerConfigurationElement>(
         SearchBehaviourConfiguration.SECTION,
         SearchBehaviourConfiguration.SEARCH_INTERVAL_ELEMENT
         ).ConnectValue(value => this.SearchInterval = value);
     this.Configuration.GetElement <SelectionConfigurationElement>(
         SearchBehaviourConfiguration.SECTION,
         SearchBehaviourConfiguration.SEARCH_COMMIT_ELEMENT
         ).ConnectValue(option => this.SearchCommitBehaviour = SearchBehaviourConfiguration.GetCommitBehaviour(option));
     this.Configuration.GetElement <BooleanConfigurationElement>(
         WindowsUserInterfaceConfiguration.SECTION,
         WindowsUserInterfaceConfiguration.SHOW_CURSOR_ADORNERS
         ).ConnectValue(value => this.ShowCursorAdorners = value);
     //TODO: Bad .Wait().
     this.Reload().Wait();
     base.InitializeComponent(core);
 }
Пример #2
0
 protected override void InitializeComponent(ICore core)
 {
     this.LibraryHierarchyBrowser = core.Components.LibraryHierarchyBrowser;
     this.LibraryHierarchyBrowser.FilterChanged += this.OnFilterChanged;
     this.LibraryManager  = core.Managers.Library;
     this.PlaylistManager = core.Managers.Playlist;
     this.Configuration   = core.Components.Configuration;
     this.Configuration.GetElement <IntegerConfigurationElement>(
         SearchBehaviourConfiguration.SECTION,
         SearchBehaviourConfiguration.SEARCH_INTERVAL_ELEMENT
         ).ConnectValue(value => this.SearchInterval = value);
     this.Configuration.GetElement <SelectionConfigurationElement>(
         SearchBehaviourConfiguration.SECTION,
         SearchBehaviourConfiguration.SEARCH_COMMIT_ELEMENT
         ).ConnectValue(option => this.SearchCommitBehaviour = SearchBehaviourConfiguration.GetCommitBehaviour(option));
     base.InitializeComponent(core);
 }