コード例 #1
0
        public MainWindow() : base()
        {
            InitializeComponent();
            mlp    = MusicListPool.INSATNCE;
            laudio = LpsAudio.INSTANCE();
            mmdr   = new MediaMetaDataReader();
            mlp.AddToPool("F:/M2", mmdr);
            foreach (MusicEntity me in mlp.Musics)
            {
                dipMusic.Add(me);
            }
            intp = Interpreter.INSTANCE(@"F:\Lunalipse\TestUnit\bin\Debug");
            //if (intp.Load("prg2"))
            //{
            //    PlayFinished();
            //}
            alb.Source = mlp.ToCatalogue().GetCatalogueCover();

            AudioDelegations.PostionChanged += (x) =>
            {
                //Console.WriteLine(x);
            };
            AudioDelegations.PlayingFinished += PlayFinished;

            dipMusic.ItemSelectionChanged += DipMusic_ItemSelectionChanged;
        }
コード例 #2
0
        private void InitializeModules()
        {
            mlp         = MusicListPool.INSATNCE;
            CPOOL       = CataloguePool.INSATNCE;
            laudio      = LpsAudio.INSTANCE();
            cacheSystem = CacheHub.INSTANCE(Environment.CurrentDirectory);
            converter   = I18NConvertor.INSTANCE(I18NPages.INSTANCE);
            //mmdr = new MediaMetaDataReader(converter);
            //mlp.AddToPool("F:/M2", mmdr);

            //intp = Interpreter.INSTANCE(@"F:\Lunalipse\TestUnit\bin\Debug");
            //if (intp.Load("prg2"))
            //{
            //    PlayFinished();
            //}
            //alb.Source = mlp.ToCatalogue().GetCatalogueCover();
            AudioDelegations.PlayingFinished += PlayFinished;
            AudioDelegations.MusicLoaded     += MusicPerpeared;
            dipMusic.ItemSelectionChanged    += DipMusic_ItemSelectionChanged;
            ControlPanel.OnTrigging          += ControlPanel_OnTrigging;
            AudioDelegations.PostionChanged  += NotifyChanged;
            ControlPanel.Value              = 0;
            laudio.Volume                   = (float)ControlPanel.Value;
            ControlPanel.OnProgressChanged += ControlPanel_OnProgressChanged;
            ControlPanel.OnVolumeChanged   += ControlPanel_OnVolumeChanged;
            CATALOGUES.OnSelectionChange   += CATALOGUES_OnSelectionChange;
            CATALOGUES.TheMainCatalogue     = mlp.ToCatalogue();
            cacheSystem.RegisterOperator(CacheType.MUSIC_CATALOGUE_CACHE, new MusicCacheIndexer()
            {
                UseLZ78Compress = true
            });
        }