public MainViewModel(IWindowManager manager,
                             SettingViewModel setting,
                             AboutViewModel about,
                             InfoViewModel albuminfo,
                             SearchViewModel search,
                             DllistViewModel dllist)
        {
            Manager   = manager;
            VMSetting = setting;
            VMAbout   = about;
            VMInfo    = albuminfo;
            VMSearch  = search;
            VMDllist  = dllist;
            ThreadTool.SetThreadNum(int.Parse(Config.ThreadNum()));

            UpdateThread = new Thread(ThreadUpdateFunc);
            UpdateThread.IsBackground = true;
            UpdateThread.Start();

            TidalTool.SetSearchMaxNum(int.Parse(Config.SearchNum()));

            ////test
            //CloudMusicAlbum album = Chinese.matchAlbum("Won't Cry", "Jay Chou");
            //string sName = Chinese.convertSongTitle("Won't Cry", album);
            //VMDllist.Convert();
            //return;
        }
예제 #2
0
        public MainViewModel(IWindowManager manager,
                             SettingViewModel setting,
                             AboutViewModel about,
                             InfoViewModel albuminfo,
                             SearchViewModel search,
                             DllistViewModel dllist)
        {
            Manager   = manager;
            VMSetting = setting;
            VMAbout   = about;
            VMInfo    = albuminfo;
            VMSearch  = search;
            VMDllist  = dllist;
            ThreadTool.SetThreadNum(int.Parse(Config.ThreadNum()));

            UpdateThread = new Thread(ThreadUpdateFunc);
            UpdateThread.IsBackground = true;
            UpdateThread.Start();

            QualityList        = TidalTool.getQualityList();
            SelectQualityIndex = QualityList.IndexOf(Config.Quality().ToUpper());
            if (SelectQualityIndex < 0)
            {
                SelectQualityIndex = 0;
            }

            ResolutionList        = TidalTool.getResolutionList();
            SelectResolutionIndex = ResolutionList.IndexOf(Config.Resolution().ToUpper());
            if (SelectResolutionIndex < 0)
            {
                SelectResolutionIndex = 0;
            }

            TidalTool.SetSearchMaxNum(int.Parse(Config.SearchNum()));

            //test
            //VMDllist.Convert();
            //return;
        }
예제 #3
0
        public MainViewModel(IWindowManager manager,
                             SettingViewModel setting,
                             AboutViewModel about,
                             InfoViewModel albuminfo,
                             SearchViewModel search,
                             DllistViewModel dllist)
        {
            Manager   = manager;
            VMSetting = setting;
            VMAbout   = about;
            VMInfo    = albuminfo;
            VMSearch  = search;
            VMDllist  = dllist;
            ThreadTool.SetThreadNum(int.Parse(Config.ThreadNum()));

            UpdateThread = new Thread(ThreadUpdateFunc);
            UpdateThread.IsBackground = true;
            UpdateThread.Start();

            ////test
            //VMDllist.Convert();
            return;
        }