void initiTunes(Core.ApplicationSetting.SettingClass set) { //iTunesと連携する if (itunes == null && songmanage == null) { itunes = new iTunes.LinkToiTunes(); songmanage = new Core.SongManagement(itunes); } //イベントハンドラを登録 songmanage.OnSongChangedEvent -= songmanage_OnSongChangedEvent; songmanage.OnSongChangedEvent += songmanage_OnSongChangedEvent; itunes.OniTunesStartExit -= itunes_OniTunesStartExit; itunes.OniTunesStartExit += itunes_OniTunesStartExit; //イベント発生条件を登録 songmanage.EventSetting.EnableAutoPost = set.EnableAutoPost; songmanage.EventSetting.CheckIsAlbumChanged = set.EnableCheckAlbum; songmanage.EventSetting.CheckIsTimeElapsedFromLastTweet = set.EnableCheckTime; songmanage.EventSetting.EnableLateTweet = set.EnablePostWait; songmanage.EventSetting.LateTweetSeconds = set.WaitSecond; songmanage.EventSetting.TimeElapsedFromLastTweetSec = set.WaitSecond2; songmanage.EventSetting.NoAlbumArtSameAlbum = set.NoAlbumArtworkOnSameAlbum; }
public SongChangeEventSenderClass(SongManagement sm) { SongManagementForEventSender = sm; }