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,
                      WaitViewModel wait,
                      InfoViewModel albuminfo,
                      SearchViewModel search)
 {
     Manager    = manager;
     VMSetting  = setting;
     VMAbout    = about;
     VMWait     = wait;
     VMInfo     = albuminfo;
     VMSearch   = search;
     SearchList = Config.HistorySearchs();
     SearchStr  = SearchList.Count > 0 ? SearchList[0] : null;
     return;
 }
        public MainViewModel(IWindowManager manager,
                             SettingViewModel setting,
                             AboutViewModel about,
                             InfoViewModel albuminfo,
                             SearchViewModel search)
        {
            Manager   = manager;
            VMSetting = setting;
            VMAbout   = about;
            VMInfo    = albuminfo;
            VMSearch  = search;
            ThreadTool.SetThreadNum(int.Parse(Config.ThreadNum()));

            Thread UpdateThread = new Thread(ThreadUpdateFunc);

            UpdateThread.IsBackground = true;
            UpdateThread.Start();
            return;
        }
        public MainViewModel(IWindowManager manager,
                             SettingViewModel setting,
                             AboutViewModel about,
                             WaitViewModel wait,
                             InfoViewModel albuminfo,
                             SearchViewModel search)
        {
            Manager    = manager;
            VMSetting  = setting;
            VMAbout    = about;
            VMWait     = wait;
            VMInfo     = albuminfo;
            VMSearch   = search;
            SearchList = Config.HistorySearchs();
            SearchStr  = SearchList.Count > 0 ? SearchList[0] : null;

            UpdateThread = new Thread(ThreadUpdateFunc);
            UpdateThread.IsBackground = true;
            UpdateThread.Start();
            return;
        }
예제 #5
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;
        }