├── .gitignore ├── BaiduCloudSupport.sln ├── BaiduCloudSupport ├── API │ ├── BDC.cs │ ├── DataInfo.cs │ ├── DataStruct.cs │ ├── PCS.cs │ ├── PCSException.cs │ └── ShortURL.cs ├── App.config ├── App.xaml ├── App.xaml.cs ├── BaiduCloudSupport.csproj ├── Images │ ├── About-Author.jpg │ ├── Icon │ │ ├── 128.ico │ │ ├── 16.ico │ │ ├── 64.ico │ │ ├── BT.png │ │ ├── Exe.png │ │ ├── Image.png │ │ ├── Iso.png │ │ ├── NormalFolder.png │ │ ├── NormalFolderWithPlus.png │ │ ├── ShareOk.png │ │ ├── Txt.png │ │ ├── Unknown.png │ │ ├── Video.png │ │ ├── Zip.png │ │ └── music.png │ └── UserInfo │ │ └── UserPortraitDefault.png ├── Language │ ├── GlobalLanguage.cs │ ├── Lang.en.xaml │ └── Lang.zh.xaml ├── Login │ └── BaiduLogin.cs ├── MainWindow.xaml ├── MainWindow.xaml.cs ├── Other │ ├── HttpHelper.cs │ ├── Imaging.cs │ ├── LogHelper.cs │ ├── Setting.cs │ ├── SimpleCommand.cs │ └── Tools.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── Resources │ ├── Entypo-license.txt │ ├── Entypo.ttf │ ├── Icons.xaml │ ├── IconsNonShared.xaml │ └── WindowsIcons-license.txt ├── TotalData.cs ├── Window │ ├── AboutWindow.xaml │ ├── AboutWindow.xaml.cs │ ├── FolderListWindow.xaml │ ├── FolderListWindow.xaml.cs │ ├── GenerateShareLinkWindow.xaml │ ├── GenerateShareLinkWindow.xaml.cs │ ├── LoginWindow.xaml │ ├── LoginWindow.xaml.cs │ ├── NewDownloadTaskWindow.xaml │ ├── NewDownloadTaskWindow.xaml.cs │ ├── TestWindow.xaml │ └── TestWindow.xaml.cs └── packages.config ├── LICENSE ├── MyDownloader.Core ├── CalculatedSegment.cs ├── Common │ ├── BoolFormatter.cs │ ├── ByteFormatter.cs │ ├── PathHelper.cs │ └── TimeSpanFormatter.cs ├── Concurrency │ ├── ObjectLocker.cs │ └── ReaderWriterObjectLocker.cs ├── DownloadManager.cs ├── Downloader.cs ├── DownloaderState.cs ├── EventArgs.cs ├── Extensions │ ├── IExtension.cs │ ├── IExtensionParameters.cs │ ├── IInitializable.cs │ └── IUIExtension.cs ├── IMirrorSelector.cs ├── IProtocolProvider.cs ├── ISegmentCalculator.cs ├── Instrumentation │ └── MyStopwatch.cs ├── MinSizeSegmentCalculator.cs ├── MyDownloader.Core.csproj ├── Properties │ └── AssemblyInfo.cs ├── ProtocolProviderFactory.cs ├── RemoteFileInfo.cs ├── ResourceLocation.cs ├── Segment.cs ├── SegmentState.cs ├── SequentialMirrorSelector.cs ├── Settings.Designer.cs ├── Settings.settings ├── UI │ ├── AppManager.cs │ ├── ApplicationSettings.Designer.cs │ ├── ApplicationSettings.cs │ ├── ApplicationSettings.resx │ ├── ClipboardHelper.cs │ ├── Connection.Designer.cs │ ├── Connection.cs │ ├── Connection.resx │ ├── CoreExtention.cs │ ├── CoreUIExtention.cs │ ├── DownloadFolder.Designer.cs │ ├── DownloadFolder.cs │ ├── DownloadFolder.resx │ ├── IApp.cs │ ├── Location.Designer.cs │ ├── Location.cs │ ├── Location.resx │ ├── WaitControl.Designer.cs │ ├── WaitControl.cs │ └── WaitControl.resx └── app.config ├── MyDownloader.Extension ├── AntiVirus │ ├── AntiVirusExtension.cs │ ├── AntiVirusParametersSettingsProxy.cs │ ├── AntiVirusUIExtension.cs │ ├── IAntiVirusParameters.cs │ ├── Settings.Designer.cs │ ├── Settings.settings │ └── UI │ │ ├── AVOptions.Designer.cs │ │ ├── AVOptions.cs │ │ └── AVOptions.resx ├── AutoDownloads │ ├── AutoDownloadsExtension.cs │ ├── AutoDownloadsParametersSettingsProxy.cs │ ├── AutoDownloadsUIExtension.cs │ ├── DayHourMatrix.cs │ ├── IAutoDownloadsParameters.cs │ ├── Settings.Designer.cs │ ├── Settings.settings │ └── UI │ │ ├── Jobs.Designer.cs │ │ ├── Jobs.cs │ │ ├── Jobs.resx │ │ ├── ScheduledDownloadEnabler.Designer.cs │ │ ├── ScheduledDownloadEnabler.cs │ │ ├── ScheduledDownloadEnabler.resx │ │ ├── TimeGrid.Designer.cs │ │ ├── TimeGrid.cs │ │ └── TimeGrid.resx ├── MyDownloader.Extension.csproj ├── Notifications │ ├── Helpers │ │ ├── BalloonHelper.cs │ │ └── SoundHelper.cs │ ├── INotificationsExtensionParameters.cs │ ├── NotificationsExtension.cs │ ├── NotificationsExtensionParametersSettingsProxy.cs │ ├── NotificationsUIExtension.cs │ ├── Settings.Designer.cs │ ├── Settings.settings │ └── UI │ │ ├── SoundChooser.Designer.cs │ │ ├── SoundChooser.cs │ │ ├── SoundChooser.resx │ │ ├── SoundsOptions.Designer.cs │ │ ├── SoundsOptions.cs │ │ ├── SoundsOptions.resx │ │ ├── XPBalloonOptions.Designer.cs │ │ ├── XPBalloonOptions.cs │ │ └── XPBalloonOptions.resx ├── PersistedList │ ├── PersistedListExtension.cs │ └── SerializableDictionary.cs ├── Properties │ └── AssemblyInfo.cs ├── Protocols │ ├── BaseProtocolProvider.cs │ ├── FtpProtocolProvider.cs │ ├── HttpFtpProtocolExtension.cs │ ├── HttpFtpProtocolParametersSettingsProxy.cs │ ├── HttpFtpProtocolUIExtension.cs │ ├── HttpProtocolProvider.cs │ ├── IHttpFtpProtocolParameters.cs │ ├── Settings.Designer.cs │ ├── Settings.settings │ └── UI │ │ ├── Proxy.Designer.cs │ │ ├── Proxy.cs │ │ └── Proxy.resx ├── SpeedLimit │ ├── ISpeedLimitParameters.cs │ ├── LimitedRateStreamProxy.cs │ ├── ProtocolProviderProxy.cs │ ├── Settings.Designer.cs │ ├── Settings.settings │ ├── SpeedLimitExtension.cs │ ├── SpeedLimitParametersSettingProxy.cs │ ├── SpeedLimitUIExtension.cs │ └── UI │ │ ├── LimitCfg.Designer.cs │ │ ├── LimitCfg.cs │ │ ├── LimitCfg.resx │ │ ├── SetSpeedLimitDialog.Designer.cs │ │ ├── SetSpeedLimitDialog.cs │ │ └── SetSpeedLimitDialog.resx ├── Video │ ├── Impl │ │ ├── BaseVideoDownloader.cs │ │ ├── BreakVideoDownloader.cs │ │ ├── GoogleVideoDownloader.cs │ │ ├── Logos │ │ │ ├── BreakVideoDownloader.png │ │ │ ├── GoogleVideoDownloader.png │ │ │ ├── MetaCafeVideoDownloader.png │ │ │ ├── PutfileVideoDownloader.PNG │ │ │ └── YouTubeDownloader.png │ │ ├── MetaCafeVideoDownloader.cs │ │ ├── PutfileVideoDownloader.cs │ │ └── YouTubeDownloader.cs │ ├── TextUtil.cs │ ├── UI │ │ ├── NewVideoDownload.Designer.cs │ │ ├── NewVideoDownload.cs │ │ ├── NewVideoDownload.resx │ │ ├── SupportedVideoSitesForm.Designer.cs │ │ ├── SupportedVideoSitesForm.cs │ │ ├── SupportedVideoSitesForm.resx │ │ ├── VideoFormatCtrl.Designer.cs │ │ ├── VideoFormatCtrl.cs │ │ └── VideoFormatCtrl.resx │ ├── VideoConverter.cs │ ├── VideoDownloadExtension.cs │ ├── VideoDownloadHandler.cs │ └── VideoDownloadUIExtension.cs ├── WindowsIntegration │ ├── ClipboardMonitor │ │ ├── ClipboardMonitor.cs │ │ └── IClipboardDataHandler.cs │ ├── Settings.Designer.cs │ ├── Settings.settings │ ├── WindowsIntegrationExtension.cs │ ├── WindowsIntegrationUI.Designer.cs │ ├── WindowsIntegrationUI.cs │ ├── WindowsIntegrationUI.resx │ ├── WindowsIntegrationUIExtension.cs │ └── WindowsStartupUtility.cs ├── Zip │ ├── NoCloseSubStream.cs │ ├── PartialInputStream.cs │ ├── StreamHelper.cs │ ├── ZipOutputStream.cs │ ├── ZipProtocolProvider.cs │ └── ZipRemoteFile.cs ├── app.config └── packages.config ├── PreviewShot ├── Login.png ├── MainWindow_01.png ├── MainWindow_02.png ├── MainWindow_DownloadTab.png └── MainWindow_Setting.png └── README.md /BaiduCloudSupport/API/DataInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows.Media.Imaging; 8 | 9 | namespace BaiduCloudSupport.API 10 | { 11 | public class SimpleUserInfo 12 | { 13 | public ulong uid { get; set; } 14 | public string uname { get; set; } 15 | public string portrait { get; set; } 16 | } 17 | 18 | 19 | public class QuotaInfo 20 | { 21 | public ulong quota { get; set; } 22 | public ulong used { get; set; } 23 | public ulong request_id { get; set; } 24 | } 25 | 26 | public class FileMeta 27 | { 28 | public ulong fs_id { get; set; } 29 | public string path { get; set; } 30 | public UInt32 ctime { get; set; } 31 | public UInt32 mtime { get; set; } 32 | public string block_list { get; set; } 33 | public ulong size { get; set; } 34 | public UInt32 isdir { get; set; } 35 | public UInt32 ifhassubdir { get; set; } 36 | public UInt32 filenum { get; set; } 37 | } 38 | 39 | public class FileList 40 | { 41 | public ulong fs_id { get; set; } 42 | public string path { get; set; } 43 | public UInt32 ctime { get; set; } 44 | public UInt32 mtime { get; set; } 45 | public string md5 { get; set; } 46 | public ulong size { get; set; } 47 | public UInt32 isdir { get; set; } 48 | } 49 | 50 | public class EachFilePath 51 | { 52 | public string path; 53 | } 54 | 55 | public class FilePath 56 | { 57 | public List list; 58 | } 59 | 60 | public class FileListDataItem : INotifyPropertyChanged 61 | { 62 | public event PropertyChangedEventHandler PropertyChanged; 63 | public ulong fs_id { get; set; } 64 | public string path { get; set; } 65 | public string file { get; set; } 66 | public DateTime mtime { get; set; } 67 | public string md5 { get; set; } 68 | public string size { get; set; } 69 | public UInt32 isdir { get; set; } 70 | private bool _isSelected = false; 71 | public bool isSelected 72 | { 73 | get { return _isSelected; } 74 | set 75 | { 76 | if (_isSelected != value) 77 | { 78 | _isSelected = value; 79 | if (PropertyChanged != null) 80 | { 81 | PropertyChanged(this, new PropertyChangedEventArgs("isSelected")); 82 | } 83 | } 84 | } 85 | 86 | } 87 | public BitmapImage Icon { get; set; } 88 | 89 | 90 | } 91 | 92 | public class DownloadListDataItem 93 | { 94 | public ulong fs_id { get; set; } 95 | public string file { get; set; } 96 | public long size { get; set; } 97 | public long received { get; set; } 98 | public double percentage { get; set; } 99 | public double rate { get; set; } 100 | public DateTime startTime { get; set; } 101 | public bool isSelected { get; set; } 102 | public TimeSpan left { get; set; } 103 | public MyDownloader.Core.DownloaderStateChinese state { get; set; } 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /BaiduCloudSupport/API/DataStruct.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace BaiduCloudSupport.API 8 | { 9 | public struct SimpleUserInfoStruct 10 | { 11 | public ulong uid; 12 | public string uname; 13 | public string portrait; 14 | } 15 | 16 | public struct PCSFileMetaStruct 17 | { 18 | public ulong fs_id; 19 | public string path; 20 | public UInt32 ctime; 21 | public UInt32 mtime; 22 | public string block_list; 23 | public ulong size; 24 | public UInt32 isdir; 25 | public UInt32 ifhassubdir; 26 | public UInt32 filenum; 27 | } 28 | 29 | public struct FileListStruct 30 | { 31 | public ulong fs_id; 32 | public string path; 33 | public UInt32 ctime; 34 | public UInt32 mtime; 35 | public string md5; 36 | public ulong size; 37 | public UInt32 isdir; 38 | } 39 | 40 | public struct DBCFileMetaStruct 41 | { 42 | public UInt32 category; 43 | public UInt32 dir_empty; 44 | public UInt32 empty; 45 | public ulong fs_id; 46 | public UInt32 isdir; 47 | public UInt32 local_ctime; 48 | public UInt32 local_mtime; 49 | public string md5; 50 | public UInt32 oper_id; 51 | public string path; 52 | public UInt32 server_ctime; 53 | public string server_filename; 54 | public UInt32 server_mtime; 55 | public ulong size; 56 | public string[] thumbs; 57 | public UInt32 unlist; 58 | } 59 | 60 | public struct DBCCopyStruct 61 | { 62 | public string path; 63 | public string dest; 64 | public string newname; 65 | } 66 | 67 | public struct DBCFolderListStruct 68 | { 69 | public int dir_empty; 70 | public string path; 71 | } 72 | 73 | public struct DBCFileShareStruct 74 | { 75 | public UInt32 ctime; 76 | public ulong shareid; 77 | public string link; 78 | public string shorturl; 79 | public string password; 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /BaiduCloudSupport/API/PCSException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace BaiduCloudSupport.API 8 | { 9 | class PCSException 10 | { 11 | } 12 | 13 | public class ErrorCodeException : ApplicationException 14 | { 15 | public ErrorCodeException() 16 | { 17 | 18 | } 19 | public ErrorCodeException(string message) : base(message) 20 | { 21 | 22 | } 23 | public ErrorCodeException(string message, Exception inner) : base(message, inner) 24 | { 25 | 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /BaiduCloudSupport/API/ShortURL.cs: -------------------------------------------------------------------------------- 1 | using DotNet4.Utilities; 2 | using Newtonsoft.Json; 3 | using Newtonsoft.Json.Linq; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.RegularExpressions; 9 | using System.Threading.Tasks; 10 | 11 | namespace BaiduCloudSupport.API 12 | { 13 | class ShortURL 14 | { 15 | public static string Shorten(string longUrl) 16 | { 17 | HttpHelper http = new HttpHelper(); 18 | HttpItem item = new HttpItem() 19 | { 20 | // Use your own source(App Key) 21 | URL = string.Format("http://api.t.sina.com.cn/short_url/shorten.json?source=4288490654&url_long={0}", Other.Tools.URLEncoding(longUrl, Encoding.UTF8)), 22 | Encoding = Encoding.UTF8, 23 | Timeout = 30000, 24 | }; 25 | string result = http.GetHtml(item).Html; 26 | if (result.Contains("url_short")) 27 | { 28 | Match match = Regex.Match(result, "(?<=url_short\":\").*?(?=\",\")"); 29 | if (match.Success) 30 | { 31 | return match.Value; 32 | } 33 | } 34 | throw new Exception("ShortURL.Shorten"); 35 | } 36 | 37 | public static Task ShortenAsync(string longUrl) 38 | { 39 | return Task.Factory.StartNew(()=> { 40 | return Shorten(longUrl); 41 | }); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /BaiduCloudSupport/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 |
7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /BaiduCloudSupport/App.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /BaiduCloudSupport/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace BaiduCloudSupport 10 | { 11 | /// 12 | /// App.xaml 的交互逻辑 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /BaiduCloudSupport/Images/About-Author.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gy12346123/BaiduCloudSupport/1612533647e04272a61ac5bf411d69ad8945308a/BaiduCloudSupport/Images/About-Author.jpg -------------------------------------------------------------------------------- /BaiduCloudSupport/Images/Icon/128.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gy12346123/BaiduCloudSupport/1612533647e04272a61ac5bf411d69ad8945308a/BaiduCloudSupport/Images/Icon/128.ico -------------------------------------------------------------------------------- /BaiduCloudSupport/Images/Icon/16.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gy12346123/BaiduCloudSupport/1612533647e04272a61ac5bf411d69ad8945308a/BaiduCloudSupport/Images/Icon/16.ico -------------------------------------------------------------------------------- /BaiduCloudSupport/Images/Icon/64.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gy12346123/BaiduCloudSupport/1612533647e04272a61ac5bf411d69ad8945308a/BaiduCloudSupport/Images/Icon/64.ico -------------------------------------------------------------------------------- /BaiduCloudSupport/Images/Icon/BT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gy12346123/BaiduCloudSupport/1612533647e04272a61ac5bf411d69ad8945308a/BaiduCloudSupport/Images/Icon/BT.png -------------------------------------------------------------------------------- /BaiduCloudSupport/Images/Icon/Exe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gy12346123/BaiduCloudSupport/1612533647e04272a61ac5bf411d69ad8945308a/BaiduCloudSupport/Images/Icon/Exe.png -------------------------------------------------------------------------------- /BaiduCloudSupport/Images/Icon/Image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gy12346123/BaiduCloudSupport/1612533647e04272a61ac5bf411d69ad8945308a/BaiduCloudSupport/Images/Icon/Image.png -------------------------------------------------------------------------------- /BaiduCloudSupport/Images/Icon/Iso.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gy12346123/BaiduCloudSupport/1612533647e04272a61ac5bf411d69ad8945308a/BaiduCloudSupport/Images/Icon/Iso.png -------------------------------------------------------------------------------- /BaiduCloudSupport/Images/Icon/NormalFolder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gy12346123/BaiduCloudSupport/1612533647e04272a61ac5bf411d69ad8945308a/BaiduCloudSupport/Images/Icon/NormalFolder.png -------------------------------------------------------------------------------- /BaiduCloudSupport/Images/Icon/NormalFolderWithPlus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gy12346123/BaiduCloudSupport/1612533647e04272a61ac5bf411d69ad8945308a/BaiduCloudSupport/Images/Icon/NormalFolderWithPlus.png -------------------------------------------------------------------------------- /BaiduCloudSupport/Images/Icon/ShareOk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gy12346123/BaiduCloudSupport/1612533647e04272a61ac5bf411d69ad8945308a/BaiduCloudSupport/Images/Icon/ShareOk.png -------------------------------------------------------------------------------- /BaiduCloudSupport/Images/Icon/Txt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gy12346123/BaiduCloudSupport/1612533647e04272a61ac5bf411d69ad8945308a/BaiduCloudSupport/Images/Icon/Txt.png -------------------------------------------------------------------------------- /BaiduCloudSupport/Images/Icon/Unknown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gy12346123/BaiduCloudSupport/1612533647e04272a61ac5bf411d69ad8945308a/BaiduCloudSupport/Images/Icon/Unknown.png -------------------------------------------------------------------------------- /BaiduCloudSupport/Images/Icon/Video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gy12346123/BaiduCloudSupport/1612533647e04272a61ac5bf411d69ad8945308a/BaiduCloudSupport/Images/Icon/Video.png -------------------------------------------------------------------------------- /BaiduCloudSupport/Images/Icon/Zip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gy12346123/BaiduCloudSupport/1612533647e04272a61ac5bf411d69ad8945308a/BaiduCloudSupport/Images/Icon/Zip.png -------------------------------------------------------------------------------- /BaiduCloudSupport/Images/Icon/music.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gy12346123/BaiduCloudSupport/1612533647e04272a61ac5bf411d69ad8945308a/BaiduCloudSupport/Images/Icon/music.png -------------------------------------------------------------------------------- /BaiduCloudSupport/Images/UserInfo/UserPortraitDefault.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gy12346123/BaiduCloudSupport/1612533647e04272a61ac5bf411d69ad8945308a/BaiduCloudSupport/Images/UserInfo/UserPortraitDefault.png -------------------------------------------------------------------------------- /BaiduCloudSupport/Language/GlobalLanguage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | 8 | namespace BaiduCloudSupport 9 | { 10 | /// 11 | /// Set text language and search text with resource key 12 | /// 13 | class GlobalLanguage 14 | { 15 | /// 16 | /// Language list, add new language need create new file in Language file with Lang.*.xaml named 17 | /// 18 | public enum LanguageList { en, zh }; 19 | 20 | /// 21 | /// Read language data 22 | /// 23 | /// Language Name 24 | public static void SetLanguage(string lang) 25 | { 26 | List dictionaryList = new List(); 27 | foreach (ResourceDictionary dictionary in Application.Current.Resources.MergedDictionaries) 28 | { 29 | dictionaryList.Add(dictionary); 30 | } 31 | string requestedCulture = string.Format(@"Language/Lang.{0}.xaml", lang); 32 | ResourceDictionary resourceDictionary = dictionaryList.FirstOrDefault(d => d.Source.OriginalString.Equals(requestedCulture)); 33 | if (resourceDictionary == null) 34 | { 35 | requestedCulture = @"Language/Lang.zh.xaml"; 36 | resourceDictionary = dictionaryList.FirstOrDefault(d => d.Source.OriginalString.Equals(requestedCulture)); 37 | } 38 | if (resourceDictionary != null) 39 | { 40 | Application.Current.Resources.MergedDictionaries.Remove(resourceDictionary); 41 | Application.Current.Resources.MergedDictionaries.Add(resourceDictionary); 42 | } 43 | } 44 | 45 | /// 46 | /// Read the language resource from /Language/Lang.*.xaml witch ResourceKey. 47 | /// 48 | /// Key 49 | /// 50 | public static string FindText(string ResourceKey) 51 | { 52 | try 53 | { 54 | return Application.Current.FindResource(ResourceKey).ToString(); 55 | } 56 | catch (Exception ex) 57 | { 58 | LogHelper.WriteLog("GlobalLanguage.FindText", ex); 59 | return ResourceKey; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /BaiduCloudSupport/Login/BaiduLogin.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace BaiduCloudSupport.Login 8 | { 9 | class BaiduLogin 10 | { 11 | public static string LoginWeb(string client_id,string redirect_uri = "oob",string scope = "netdisk") 12 | { 13 | return string.Format("https://openapi.baidu.com/oauth/2.0/authorize?response_type=token&client_id={0}&redirect_uri={1}&scope={2}", client_id,redirect_uri,scope); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /BaiduCloudSupport/Other/LogHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace BaiduCloudSupport 8 | { 9 | /// 10 | /// Log helper 11 | /// 12 | class LogHelper 13 | { 14 | private static log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 15 | 16 | /// 17 | /// Write log with information if IsInfoEnabled 18 | /// 19 | /// string information 20 | public static void WriteLog(string info) 21 | { 22 | if (log.IsInfoEnabled) 23 | { 24 | log.Info(info); 25 | } 26 | } 27 | 28 | /// 29 | /// Write log with information and exception if IsErrorEnabled 30 | /// 31 | /// string information 32 | /// Exception 33 | public static void WriteLog(string info,Exception ex) 34 | { 35 | if (log.IsErrorEnabled) 36 | { 37 | log.Error(info,ex); 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /BaiduCloudSupport/Other/SimpleCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Input; 3 | 4 | namespace BaiduCloudSupport 5 | { 6 | /// 7 | /// Simple command 8 | /// 9 | public class SimpleCommand : ICommand 10 | { 11 | public Predicate CanExecuteDelegate { get; set; } 12 | public Action ExecuteDelegate { get; set; } 13 | 14 | public bool CanExecute(object parameter) 15 | { 16 | if (CanExecuteDelegate != null) 17 | return CanExecuteDelegate(parameter); 18 | return true; // if there is no can execute default to true 19 | } 20 | 21 | public event EventHandler CanExecuteChanged 22 | { 23 | add { CommandManager.RequerySuggested += value; } 24 | remove { CommandManager.RequerySuggested -= value; } 25 | } 26 | 27 | public void Execute(object parameter) 28 | { 29 | if (ExecuteDelegate != null) 30 | ExecuteDelegate(parameter); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /BaiduCloudSupport/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | 7 | // 有关程序集的一般信息由以下 8 | // 控制。更改这些特性值可修改 9 | // 与程序集关联的信息。 10 | [assembly: AssemblyTitle("BaiduCloudSupport")] 11 | [assembly: AssemblyDescription("")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("")] 14 | [assembly: AssemblyProduct("BaiduCloudSupport")] 15 | [assembly: AssemblyCopyright("Copyright © 2016")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | 19 | //将 ComVisible 设置为 false 将使此程序集中的类型 20 | //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, 21 | //请将此类型的 ComVisible 特性设置为 true。 22 | [assembly: ComVisible(false)] 23 | 24 | //若要开始生成可本地化的应用程序,请 25 | // 中的 .csproj 文件中 26 | //例如,如果您在源文件中使用的是美国英语, 27 | //使用的是美国英语,请将 设置为 en-US。 然后取消 28 | //对以下 NeutralResourceLanguage 特性的注释。 更新 29 | //以下行中的“en-US”以匹配项目文件中的 UICulture 设置。 30 | 31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 32 | 33 | 34 | [assembly: ThemeInfo( 35 | ResourceDictionaryLocation.None, //主题特定资源词典所处位置 36 | //(当资源未在页面 37 | //或应用程序资源字典中找到时使用) 38 | ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置 39 | //(当资源未在页面 40 | //、应用程序或任何主题专用资源字典中找到时使用) 41 | )] 42 | 43 | 44 | // 程序集的版本信息由下列四个值组成: 45 | // 46 | // 主版本 47 | // 次版本 48 | // 生成号 49 | // 修订号 50 | // 51 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, 52 | // 方法是按如下所示使用“*”: : 53 | // [assembly: AssemblyVersion("1.0.*")] 54 | [assembly: AssemblyVersion("1.6.*")] 55 | [assembly: InternalsVisibleTo("BaiduCloudSupport.Tests")] 56 | [assembly: InternalsVisibleTo("BaiduCloudSupport.Explorables")] 57 | //[assembly: AssemblyFileVersion("1.0.*")] 58 | [assembly: log4net.Config.XmlConfigurator(ConfigFileExtension = "config", Watch = true)] -------------------------------------------------------------------------------- /BaiduCloudSupport/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本: 4.0.30319.42000 5 | // 6 | // 对此文件的更改可能导致不正确的行为,如果 7 | // 重新生成代码,则所做更改将丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace BaiduCloudSupport.Properties 12 | { 13 | 14 | 15 | /// 16 | /// 强类型资源类,用于查找本地化字符串等。 17 | /// 18 | // 此类是由 StronglyTypedResourceBuilder 19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 20 | // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen 21 | // (以 /str 作为命令选项),或重新生成 VS 项目。 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// 返回此类使用的缓存 ResourceManager 实例。 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("BaiduCloudSupport.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// 覆盖当前线程的 CurrentUICulture 属性 56 | /// 使用此强类型的资源类的资源查找。 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /BaiduCloudSupport/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace BaiduCloudSupport.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /BaiduCloudSupport/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /BaiduCloudSupport/Resources/Entypo-license.txt: -------------------------------------------------------------------------------- 1 | Entypo (http://www.entypo.com/) is created by Daniel Bruce and released under the Creative Commons, Share Alike/Attribution license. 2 | 3 | http://creativecommons.org/licenses/by-sa/3.0/ -------------------------------------------------------------------------------- /BaiduCloudSupport/Resources/Entypo.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gy12346123/BaiduCloudSupport/1612533647e04272a61ac5bf411d69ad8945308a/BaiduCloudSupport/Resources/Entypo.ttf -------------------------------------------------------------------------------- /BaiduCloudSupport/Resources/WindowsIcons-license.txt: -------------------------------------------------------------------------------- 1 | # License 2 | 3 | Please carefully understand the license and download the latest icons at ModernUIIcons.com. 4 | 5 | ## Understand Your Rights 6 | No Attribution and No Derived Works 7 | http://creativecommons.org/licenses/by-nd/3.0/ * 8 | 9 | - If your project is open source include this license file in the source. 10 | - Nothing is needed in the front facing project (UNLESS you 11 | are using any of the icons listed below in the attribution section). 12 | - Commercial use is not only allowed but encouraged. If it is an icon 13 | in the attribution list below, you still need to attribute those! 14 | - Do not distribute the entire package (I've allowed this dozens of 15 | times for open source projects, but email me first). 16 | 17 | ## Creator 18 | - Austin Andrews (@templarian) 19 | 20 | ## Contributor** 21 | - Jay Zawrotny (@JayZawrotny) 22 | - A Bunch 23 | - Oren Nachman 24 | - appbar.chevron.down 25 | - appbar.chevron.up 26 | - appbar.chevron.left 27 | - appbar.chevron.right 28 | 29 | ## Derived Works 30 | - Alex Peattie 31 | - Social: http://www.alexpeattie.com/projects/justvector_icons/ 32 | 33 | ## Attribution*** 34 | - Kris Vandermotten (@kvandermotten) 35 | - appbar.medical.pulse 36 | - Constantin Kichinsky (@kichinsky) 37 | - appbar.currency.rubles 38 | - appbar.currency.grivna 39 | - Massimo Savazzi (@msavazzi) 40 | - List of missing exported icons 41 | - Proletkult Graphik, from The Noun Project 42 | - appbar.draw.pen (inspired) 43 | - Olivier Guin, from The Noun Project 44 | - appbar.draw.marker 45 | - Gibran Bisio, from The Noun Project 46 | - appbar.draw.bucket 47 | Andrew Forrester, from The Noun Project 48 | - appbar.fingerprint 49 | 50 | * The license is for attribution, but this is not required. 51 | ** Developers and designers that emailed Templarian the source .design icons to be added into the package. PNGs also accepted, but may take longer to be added. 52 | *** Icons I've copied so closely you want to attribute them and are also under the CC license. 53 | 54 | Contact 55 | - http://templarian.com/ 56 | - admin[@]templarian[.]com 57 | 58 | * Does not apply to copyrighted logos 59 | - Skype 60 | - Facebook 61 | - Twitter 62 | - etc... 63 | -------------------------------------------------------------------------------- /BaiduCloudSupport/Window/AboutWindow.xaml: -------------------------------------------------------------------------------- 1 |  15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /BaiduCloudSupport/Window/AboutWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using MahApps.Metro.Controls; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using System.Windows; 9 | using System.Windows.Controls; 10 | using System.Windows.Data; 11 | using System.Windows.Documents; 12 | using System.Windows.Input; 13 | using System.Windows.Media; 14 | using System.Windows.Media.Imaging; 15 | using System.Windows.Shapes; 16 | 17 | namespace BaiduCloudSupport.Window 18 | { 19 | /// 20 | /// AboutWindow.xaml 的交互逻辑 21 | /// 22 | public partial class AboutWindow : MetroWindow, INotifyPropertyChanged 23 | { 24 | public event PropertyChangedEventHandler PropertyChanged; 25 | 26 | private string _version = ""; 27 | 28 | public AboutWindow() 29 | { 30 | InitializeComponent(); 31 | } 32 | 33 | private void MetroWindow_Loaded(object sender, RoutedEventArgs e) 34 | { 35 | grid_Main.DataContext = this; 36 | version = GetVersion(); 37 | } 38 | 39 | private static string GetVersion() 40 | { 41 | return System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); 42 | } 43 | 44 | public string version 45 | { 46 | get { return _version; } 47 | set 48 | { 49 | if (!_version.Equals(value)) 50 | { 51 | _version = value; 52 | if (PropertyChanged != null) 53 | { 54 | PropertyChanged(this, new PropertyChangedEventArgs("version")); 55 | } 56 | } 57 | } 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /BaiduCloudSupport/Window/FolderListWindow.xaml: -------------------------------------------------------------------------------- 1 |  16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |