private void Init() { XLEngine = new XunleiDownloadTask(); ResetSidebarButtons(); File.Delete("avatar.png"); XLEngine.AddToTask(AT.ME.User.ProfileImageUrls.Px170x170, Path.Combine(Environment.CurrentDirectory, "avatar.png")); Username.Text = AT.ME.User.Name; LoadAvat(); GetRankingAll(); }
public XunleiDownloadTask() { if (Obj != null) { throw new XunleiDownloadEngineInitedExp(); } else { Obj = this; } NativeMethods.XLInitDownloadEngine(); Inited = true; Downloading = new List <AXunleiTask>(); NeedDownload = new List <AXunleiTask>(); Done = new List <AXunleiTask>(); CheckTasks(); }
/// <summary> /// 释放迅雷下载引擎 /// </summary> public void UnInitEngine() { NativeMethods.XLUninitDownloadEngine(); Inited = false; Obj = null; }