public void Start() { if (ThreadTool.GetThreadNum() <= 0) { ThreadTool.SetThreadNum(int.Parse(Config.ThreadNum())); } ThreadTool.AddWork(ThreadFuncDownlaod); }
public static void Change(Settings newItem, Settings oldItem = null) { if (oldItem == null || oldItem.ThemeType != newItem.ThemeType) { Theme.Change(newItem.ThemeType); } //if (oldItem == null || oldItem.LanguageType != newItem.LanguageType) // Language.Change(newItem.LanguageType); if (oldItem == null || oldItem.ThreadNum != newItem.ThreadNum) { ThreadTool.SetThreadNum(newItem.ThreadNum); } }
public void Start() { //Add to threadpool ThreadTool.AddWork((object[] data) => { if (Progress.GetStatus() != ProgressHelper.STATUS.WAIT) { return; } Progress.SetStatus(ProgressHelper.STATUS.RUNNING); Download(); }); }
public void Start() { ThreadTool.AddWork((object[] data) => { if (Progress.GetStatus() != ProgressHelper.STATUS.WAIT) return; ErrlabelHeight = 0; Progress.SetStatus(ProgressHelper.STATUS.RUNNING); if (TidalTrack != null) DownloadTrack(); else DownloadVideo(); }); }