├── EPUBium Desktop ├── icon.ico ├── zip.exe ├── runtimes.zip ├── htdocs │ ├── pack.png │ ├── favicon.ico │ ├── common │ │ ├── img │ │ │ ├── add.png │ │ │ ├── menu.png │ │ │ ├── bm_bg.png │ │ │ ├── theme.png │ │ │ ├── ic_list_go.png │ │ │ ├── bg_drawer_head.png │ │ │ ├── ic_menu_about.png │ │ │ ├── ic_menu_folder.png │ │ │ ├── ic_menu_home.png │ │ │ ├── ic_menu_load.png │ │ │ ├── ic_menu_reload.png │ │ │ ├── ic_menu_rescan.png │ │ │ ├── ic_menu_save.png │ │ │ ├── slider_handle.png │ │ │ ├── ic_menu_bookmark.png │ │ │ ├── ic_menu_chapters.png │ │ │ ├── ic_menu_daylight.png │ │ │ ├── ic_menu_setting.png │ │ │ ├── ic_menu_textsize.png │ │ │ ├── ic_launcher_round.png │ │ │ ├── ic_menu_bookmark_lock.png │ │ │ ├── ic_menu_bookmark_unlock.png │ │ │ └── ic_menu_searchinlibrary.png │ │ ├── common.js │ │ ├── style.css │ │ └── lib │ │ │ └── vue-lazyload.js │ ├── readme.md │ ├── meta.json │ ├── index.html │ └── epubjs │ │ ├── static │ │ └── index.html │ │ └── read.html ├── Resources │ └── default.png ├── Costura32 │ └── SQLite.Interop.dll ├── Costura64 │ └── SQLite.Interop.dll ├── FodyWeavers.xml ├── packages.config ├── Settings.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Settings.settings │ ├── Resources.Designer.cs │ ├── Settings.Designer.cs │ └── Resources.resx ├── Form1.Designer.cs ├── InputDialog.cs ├── App.config ├── app.manifest ├── Form1.resx ├── InputDialog.resx ├── InputDialog.designer.cs ├── FodyWeavers.xsd ├── FrmChangeResource.resx ├── EPUBium Desktop.csproj ├── FrmChangeResource.cs ├── Form1.cs └── FrmChangeResource.Designer.cs ├── README.md ├── EPUBiumDesktop.sln └── .gitignore /EPUBium Desktop/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZYFDroid/EPUBiumDesktop/HEAD/EPUBium Desktop/icon.ico -------------------------------------------------------------------------------- /EPUBium Desktop/zip.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZYFDroid/EPUBiumDesktop/HEAD/EPUBium Desktop/zip.exe -------------------------------------------------------------------------------- /EPUBium Desktop/runtimes.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZYFDroid/EPUBiumDesktop/HEAD/EPUBium Desktop/runtimes.zip -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/pack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZYFDroid/EPUBiumDesktop/HEAD/EPUBium Desktop/htdocs/pack.png -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZYFDroid/EPUBiumDesktop/HEAD/EPUBium Desktop/htdocs/favicon.ico -------------------------------------------------------------------------------- /EPUBium Desktop/Resources/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZYFDroid/EPUBiumDesktop/HEAD/EPUBium Desktop/Resources/default.png -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/common/img/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZYFDroid/EPUBiumDesktop/HEAD/EPUBium Desktop/htdocs/common/img/add.png -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/common/img/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZYFDroid/EPUBiumDesktop/HEAD/EPUBium Desktop/htdocs/common/img/menu.png -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/readme.md: -------------------------------------------------------------------------------- 1 | 2 | ![图标](pack.png) 3 | 4 | # default 5 | 6 | The default look of EPUBium 7 | 8 | Author: ZYFDroid -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # EPUBiumDesktop 2 | EPUBium 电脑版 3 | 4 | 拥有手机版全部特性 5 | 6 | 下载地址:https://zyfdroid.lanzoui.com/b0659ltub 7 | 密码:bd5i 8 | 9 | -------------------------------------------------------------------------------- /EPUBium Desktop/Costura32/SQLite.Interop.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZYFDroid/EPUBiumDesktop/HEAD/EPUBium Desktop/Costura32/SQLite.Interop.dll -------------------------------------------------------------------------------- /EPUBium Desktop/Costura64/SQLite.Interop.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZYFDroid/EPUBiumDesktop/HEAD/EPUBium Desktop/Costura64/SQLite.Interop.dll -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/common/img/bm_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZYFDroid/EPUBiumDesktop/HEAD/EPUBium Desktop/htdocs/common/img/bm_bg.png -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/common/img/theme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZYFDroid/EPUBiumDesktop/HEAD/EPUBium Desktop/htdocs/common/img/theme.png -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/common/img/ic_list_go.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZYFDroid/EPUBiumDesktop/HEAD/EPUBium Desktop/htdocs/common/img/ic_list_go.png -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/common/img/bg_drawer_head.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZYFDroid/EPUBiumDesktop/HEAD/EPUBium Desktop/htdocs/common/img/bg_drawer_head.png -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/common/img/ic_menu_about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZYFDroid/EPUBiumDesktop/HEAD/EPUBium Desktop/htdocs/common/img/ic_menu_about.png -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/common/img/ic_menu_folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZYFDroid/EPUBiumDesktop/HEAD/EPUBium Desktop/htdocs/common/img/ic_menu_folder.png -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/common/img/ic_menu_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZYFDroid/EPUBiumDesktop/HEAD/EPUBium Desktop/htdocs/common/img/ic_menu_home.png -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/common/img/ic_menu_load.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZYFDroid/EPUBiumDesktop/HEAD/EPUBium Desktop/htdocs/common/img/ic_menu_load.png -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/common/img/ic_menu_reload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZYFDroid/EPUBiumDesktop/HEAD/EPUBium Desktop/htdocs/common/img/ic_menu_reload.png -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/common/img/ic_menu_rescan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZYFDroid/EPUBiumDesktop/HEAD/EPUBium Desktop/htdocs/common/img/ic_menu_rescan.png -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/common/img/ic_menu_save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZYFDroid/EPUBiumDesktop/HEAD/EPUBium Desktop/htdocs/common/img/ic_menu_save.png -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/common/img/slider_handle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZYFDroid/EPUBiumDesktop/HEAD/EPUBium Desktop/htdocs/common/img/slider_handle.png -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/common/img/ic_menu_bookmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZYFDroid/EPUBiumDesktop/HEAD/EPUBium Desktop/htdocs/common/img/ic_menu_bookmark.png -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/common/img/ic_menu_chapters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZYFDroid/EPUBiumDesktop/HEAD/EPUBium Desktop/htdocs/common/img/ic_menu_chapters.png -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/common/img/ic_menu_daylight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZYFDroid/EPUBiumDesktop/HEAD/EPUBium Desktop/htdocs/common/img/ic_menu_daylight.png -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/common/img/ic_menu_setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZYFDroid/EPUBiumDesktop/HEAD/EPUBium Desktop/htdocs/common/img/ic_menu_setting.png -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/common/img/ic_menu_textsize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZYFDroid/EPUBiumDesktop/HEAD/EPUBium Desktop/htdocs/common/img/ic_menu_textsize.png -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/common/img/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZYFDroid/EPUBiumDesktop/HEAD/EPUBium Desktop/htdocs/common/img/ic_launcher_round.png -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/common/img/ic_menu_bookmark_lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZYFDroid/EPUBiumDesktop/HEAD/EPUBium Desktop/htdocs/common/img/ic_menu_bookmark_lock.png -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/common/img/ic_menu_bookmark_unlock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZYFDroid/EPUBiumDesktop/HEAD/EPUBium Desktop/htdocs/common/img/ic_menu_bookmark_unlock.png -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/common/img/ic_menu_searchinlibrary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZYFDroid/EPUBiumDesktop/HEAD/EPUBium Desktop/htdocs/common/img/ic_menu_searchinlibrary.png -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "name":"Default", 3 | "description":"The default look of EPUBium", 4 | "author":"ZYFDroid", 5 | "version":"1.0.0.0", 6 | "link":"https://github.com/ZYFDroid/EPUBiumDesktop/tree/main/EPUBium%20Desktop/htdocs" 7 | } 8 | -------------------------------------------------------------------------------- /EPUBium Desktop/FodyWeavers.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | SQLite.Interop 5 | 6 | 7 | SQLite.Interop 8 | 9 | 10 | -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/common/common.js: -------------------------------------------------------------------------------- 1 | function keyToDirection(e){ 2 | if(e.altKey || e.ctrlKey || e.metaKey || e.shiftKey){ 3 | return ""; 4 | } 5 | if(e.code=="ArrowUp" || e.code=="ArrowLeft" || e.code=="PageUp" || e.code=="KeyK"){ 6 | return "prev();"; 7 | } 8 | if(e.code=="ArrowDown" || e.code=="ArrowRight" || e.code=="PageDown" || e.code=="KeyJ"){ 9 | return "next();"; 10 | } 11 | } -------------------------------------------------------------------------------- /EPUBium Desktop/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /EPUBium Desktop/Settings.cs: -------------------------------------------------------------------------------- 1 | namespace EPUBium_Desktop.Properties { 2 | 3 | 4 | // 通过此类可以处理设置类的特定事件: 5 | // 在更改某个设置的值之前将引发 SettingChanging 事件。 6 | // 在更改某个设置的值之后将引发 PropertyChanged 事件。 7 | // 在加载设置值之后将引发 SettingsLoaded 事件。 8 | // 在保存设置值之前将引发 SettingsSaving 事件。 9 | internal sealed partial class Settings { 10 | 11 | public Settings() { 12 | // // 若要为保存和更改设置添加事件处理程序,请取消注释下列行: 13 | // 14 | // this.SettingChanging += this.SettingChangingEventHandler; 15 | // 16 | // this.SettingsSaving += this.SettingsSavingEventHandler; 17 | // 18 | } 19 | 20 | private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) { 21 | // 在此处添加用于处理 SettingChangingEvent 事件的代码。 22 | } 23 | 24 | private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) { 25 | // 在此处添加用于处理 SettingsSaving 事件的代码。 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /EPUBium Desktop/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的一般信息由以下 6 | // 控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("EPUBium Desktop")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("ZYFDroid")] 12 | [assembly: AssemblyProduct("EPUBium Desktop")] 13 | [assembly: AssemblyCopyright("")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 会使此程序集中的类型 18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 19 | //请将此类型的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("9822c1c8-9b97-40e9-a904-9c31f80fa753")] 24 | 25 | // 程序集的版本信息由下列四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 33 | //通过使用 "*",如下所示: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("3.0.2.2")] 36 | [assembly: AssemblyFileVersion("3.0.2.2")] 37 | -------------------------------------------------------------------------------- /EPUBium Desktop/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 1024, 720 7 | 8 | 9 | 10 | 11 | 12 | 30, 30 13 | 14 | 15 | False 16 | 17 | 18 | 19 | 20 | 21 | True 22 | 23 | 24 | http://localhost:8080 25 | 26 | 27 | -------------------------------------------------------------------------------- /EPUBium Desktop/Form1.Designer.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace EPUBium_Desktop 3 | { 4 | partial class Form1 5 | { 6 | /// 7 | /// 必需的设计器变量。 8 | /// 9 | private System.ComponentModel.IContainer components = null; 10 | 11 | /// 12 | /// 清理所有正在使用的资源。 13 | /// 14 | /// 如果应释放托管资源,为 true;否则为 false。 15 | protected override void Dispose(bool disposing) 16 | { 17 | if (disposing && (components != null)) 18 | { 19 | components.Dispose(); 20 | } 21 | base.Dispose(disposing); 22 | } 23 | 24 | #region Windows 窗体设计器生成的代码 25 | 26 | /// 27 | /// 设计器支持所需的方法 - 不要修改 28 | /// 使用代码编辑器修改此方法的内容。 29 | /// 30 | private void InitializeComponent() 31 | { 32 | this.SuspendLayout(); 33 | // 34 | // Form1 35 | // 36 | this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F); 37 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 38 | this.BackColor = System.Drawing.Color.White; 39 | this.ClientSize = new System.Drawing.Size(1956, 1388); 40 | this.Margin = new System.Windows.Forms.Padding(6); 41 | this.MinimumSize = new System.Drawing.Size(814, 1209); 42 | this.Name = "Form1"; 43 | this.Text = "EPUBium Desktop"; 44 | this.Load += new System.EventHandler(this.Form1_Load); 45 | this.ResumeLayout(false); 46 | 47 | } 48 | 49 | #endregion 50 | } 51 | } 52 | 53 | -------------------------------------------------------------------------------- /EPUBiumDesktop.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.1.32210.238 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EPUBium Desktop", "EPUBium Desktop\EPUBium Desktop.csproj", "{9822C1C8-9B97-40E9-A904-9C31F80FA753}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Debug|x64 = Debug|x64 12 | Debug|x86 = Debug|x86 13 | Release|Any CPU = Release|Any CPU 14 | Release|x64 = Release|x64 15 | Release|x86 = Release|x86 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {9822C1C8-9B97-40E9-A904-9C31F80FA753}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 19 | {9822C1C8-9B97-40E9-A904-9C31F80FA753}.Debug|Any CPU.Build.0 = Debug|Any CPU 20 | {9822C1C8-9B97-40E9-A904-9C31F80FA753}.Debug|x64.ActiveCfg = Debug|x64 21 | {9822C1C8-9B97-40E9-A904-9C31F80FA753}.Debug|x64.Build.0 = Debug|x64 22 | {9822C1C8-9B97-40E9-A904-9C31F80FA753}.Debug|x86.ActiveCfg = Debug|x86 23 | {9822C1C8-9B97-40E9-A904-9C31F80FA753}.Debug|x86.Build.0 = Debug|x86 24 | {9822C1C8-9B97-40E9-A904-9C31F80FA753}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {9822C1C8-9B97-40E9-A904-9C31F80FA753}.Release|Any CPU.Build.0 = Release|Any CPU 26 | {9822C1C8-9B97-40E9-A904-9C31F80FA753}.Release|x64.ActiveCfg = Release|x64 27 | {9822C1C8-9B97-40E9-A904-9C31F80FA753}.Release|x64.Build.0 = Release|x64 28 | {9822C1C8-9B97-40E9-A904-9C31F80FA753}.Release|x86.ActiveCfg = Release|x86 29 | {9822C1C8-9B97-40E9-A904-9C31F80FA753}.Release|x86.Build.0 = Release|x86 30 | EndGlobalSection 31 | GlobalSection(SolutionProperties) = preSolution 32 | HideSolutionNode = FALSE 33 | EndGlobalSection 34 | GlobalSection(ExtensibilityGlobals) = postSolution 35 | SolutionGuid = {4F49C4E7-3D66-4171-8201-953E54929C75} 36 | EndGlobalSection 37 | EndGlobal 38 | -------------------------------------------------------------------------------- /EPUBium Desktop/InputDialog.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | 11 | namespace EPUBium_Desktop 12 | { 13 | public partial class InputDialog : Form 14 | { 15 | public InputDialog() 16 | { 17 | InitializeComponent(); 18 | } 19 | 20 | 21 | 22 | public static string Input(Form owner, String hint,string prefilled = "") { 23 | bool ownerToplevel = owner.TopMost; 24 | String text = ""; 25 | InputDialog form = new InputDialog(); 26 | form.Text = hint; 27 | form.textBox1.Text = prefilled; 28 | if (form.ShowDialog(owner) == DialogResult.OK) { 29 | text = form.textBox1.Text; 30 | } 31 | else 32 | { 33 | text = null; 34 | } 35 | owner.TopMost = ownerToplevel; 36 | return text; 37 | } 38 | 39 | 40 | private void button2_Click(object sender, EventArgs e) 41 | { 42 | 43 | string t = ""; 44 | try 45 | { 46 | t= Clipboard.GetText().Trim().Replace("\r","").Replace("\n",""); 47 | } 48 | catch 49 | { 50 | t = ""; 51 | } 52 | if(t != null && t.Length > 0) 53 | { 54 | textBox1.Text = t; 55 | } 56 | } 57 | 58 | private void textBox1_TextChanged(object sender, EventArgs e) 59 | { 60 | if (textBox1.Text.Contains("\n")) 61 | { 62 | textBox1.Text = textBox1.Text.Replace("\n", "").Replace("\r", ""); 63 | DialogResult = DialogResult.OK; 64 | } 65 | } 66 | 67 | private void InputDialog_Load(object sender, EventArgs e) 68 | { 69 | 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /EPUBium Desktop/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 |
9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1024, 720 20 | 21 | 22 | 23 | 24 | 25 | 30, 30 26 | 27 | 28 | False 29 | 30 | 31 | 32 | 33 | 34 | http://localhost:8080 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | True 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /EPUBium Desktop/app.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 53 | 54 | 55 | 56 | true 57 | true 58 | 59 | 60 | 61 | 62 | 63 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /EPUBium Desktop/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace EPUBium_Desktop.Properties { 12 | using System; 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", "17.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// 返回此类使用的缓存的 ResourceManager 实例。 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("EPUBium_Desktop.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// 重写当前线程的 CurrentUICulture 属性,对 51 | /// 使用此强类型资源类的所有资源查找执行重写。 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// 查找 System.Drawing.Bitmap 类型的本地化资源。 65 | /// 66 | internal static System.Drawing.Bitmap _default { 67 | get { 68 | object obj = ResourceManager.GetObject("default", resourceCulture); 69 | return ((System.Drawing.Bitmap)(obj)); 70 | } 71 | } 72 | 73 | /// 74 | /// 查找 System.Byte[] 类型的本地化资源。 75 | /// 76 | internal static byte[] htdocs { 77 | get { 78 | object obj = ResourceManager.GetObject("htdocs", resourceCulture); 79 | return ((byte[])(obj)); 80 | } 81 | } 82 | 83 | /// 84 | /// 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 85 | /// 86 | internal static System.Drawing.Icon icon { 87 | get { 88 | object obj = ResourceManager.GetObject("icon", resourceCulture); 89 | return ((System.Drawing.Icon)(obj)); 90 | } 91 | } 92 | 93 | /// 94 | /// 查找 System.Byte[] 类型的本地化资源。 95 | /// 96 | internal static byte[] runtimes { 97 | get { 98 | object obj = ResourceManager.GetObject("runtimes", resourceCulture); 99 | return ((byte[])(obj)); 100 | } 101 | } 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /EPUBium Desktop/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace EPUBium_Desktop.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.1.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | 26 | [global::System.Configuration.UserScopedSettingAttribute()] 27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 28 | [global::System.Configuration.DefaultSettingValueAttribute("1024, 720")] 29 | public global::System.Drawing.Size windowsize { 30 | get { 31 | return ((global::System.Drawing.Size)(this["windowsize"])); 32 | } 33 | set { 34 | this["windowsize"] = value; 35 | } 36 | } 37 | 38 | [global::System.Configuration.UserScopedSettingAttribute()] 39 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 40 | [global::System.Configuration.DefaultSettingValueAttribute("")] 41 | public string themepack { 42 | get { 43 | return ((string)(this["themepack"])); 44 | } 45 | set { 46 | this["themepack"] = value; 47 | } 48 | } 49 | 50 | [global::System.Configuration.UserScopedSettingAttribute()] 51 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 52 | [global::System.Configuration.DefaultSettingValueAttribute("30, 30")] 53 | public global::System.Drawing.Point windowloc { 54 | get { 55 | return ((global::System.Drawing.Point)(this["windowloc"])); 56 | } 57 | set { 58 | this["windowloc"] = value; 59 | } 60 | } 61 | 62 | [global::System.Configuration.UserScopedSettingAttribute()] 63 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 64 | [global::System.Configuration.DefaultSettingValueAttribute("False")] 65 | public bool ismaxium { 66 | get { 67 | return ((bool)(this["ismaxium"])); 68 | } 69 | set { 70 | this["ismaxium"] = value; 71 | } 72 | } 73 | 74 | [global::System.Configuration.UserScopedSettingAttribute()] 75 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 76 | [global::System.Configuration.DefaultSettingValueAttribute("")] 77 | public string respack { 78 | get { 79 | return ((string)(this["respack"])); 80 | } 81 | set { 82 | this["respack"] = value; 83 | } 84 | } 85 | 86 | [global::System.Configuration.ApplicationScopedSettingAttribute()] 87 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 88 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 89 | public bool EnableWindowsFormsHighDpiAutoResizing { 90 | get { 91 | return ((bool)(this["EnableWindowsFormsHighDpiAutoResizing"])); 92 | } 93 | } 94 | 95 | [global::System.Configuration.UserScopedSettingAttribute()] 96 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 97 | [global::System.Configuration.DefaultSettingValueAttribute("http://localhost:8080")] 98 | public string devLastUrl { 99 | get { 100 | return ((string)(this["devLastUrl"])); 101 | } 102 | set { 103 | this["devLastUrl"] = value; 104 | } 105 | } 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /EPUBium Desktop/Form1.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 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 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /EPUBium Desktop/InputDialog.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 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 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /EPUBium Desktop/InputDialog.designer.cs: -------------------------------------------------------------------------------- 1 | namespace EPUBium_Desktop 2 | { 3 | partial class InputDialog 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.textBox1 = new System.Windows.Forms.TextBox(); 32 | this.button1 = new System.Windows.Forms.Button(); 33 | this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); 34 | this.panel1 = new System.Windows.Forms.Panel(); 35 | this.button2 = new System.Windows.Forms.Button(); 36 | this.tableLayoutPanel1.SuspendLayout(); 37 | this.panel1.SuspendLayout(); 38 | this.SuspendLayout(); 39 | // 40 | // textBox1 41 | // 42 | this.textBox1.AcceptsReturn = true; 43 | this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill; 44 | this.textBox1.Location = new System.Drawing.Point(0, 0); 45 | this.textBox1.Margin = new System.Windows.Forms.Padding(6); 46 | this.textBox1.Multiline = true; 47 | this.textBox1.Name = "textBox1"; 48 | this.textBox1.Size = new System.Drawing.Size(505, 45); 49 | this.textBox1.TabIndex = 0; 50 | this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged); 51 | // 52 | // button1 53 | // 54 | this.button1.DialogResult = System.Windows.Forms.DialogResult.OK; 55 | this.button1.Dock = System.Windows.Forms.DockStyle.Fill; 56 | this.button1.Location = new System.Drawing.Point(427, 73); 57 | this.button1.Margin = new System.Windows.Forms.Padding(6); 58 | this.button1.Name = "button1"; 59 | this.button1.Size = new System.Drawing.Size(161, 40); 60 | this.button1.TabIndex = 1; 61 | this.button1.Text = "确定"; 62 | this.button1.UseVisualStyleBackColor = true; 63 | // 64 | // tableLayoutPanel1 65 | // 66 | this.tableLayoutPanel1.ColumnCount = 2; 67 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 70.93552F)); 68 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 29.06449F)); 69 | this.tableLayoutPanel1.Controls.Add(this.panel1, 0, 0); 70 | this.tableLayoutPanel1.Controls.Add(this.button1, 1, 2); 71 | this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; 72 | this.tableLayoutPanel1.Location = new System.Drawing.Point(24, 24); 73 | this.tableLayoutPanel1.Name = "tableLayoutPanel1"; 74 | this.tableLayoutPanel1.RowCount = 3; 75 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 43.11377F)); 76 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 13.77246F)); 77 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 43.11377F)); 78 | this.tableLayoutPanel1.Size = new System.Drawing.Size(594, 119); 79 | this.tableLayoutPanel1.TabIndex = 2; 80 | // 81 | // panel1 82 | // 83 | this.tableLayoutPanel1.SetColumnSpan(this.panel1, 2); 84 | this.panel1.Controls.Add(this.textBox1); 85 | this.panel1.Controls.Add(this.button2); 86 | this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; 87 | this.panel1.Location = new System.Drawing.Point(3, 3); 88 | this.panel1.Name = "panel1"; 89 | this.panel1.Size = new System.Drawing.Size(588, 45); 90 | this.panel1.TabIndex = 0; 91 | // 92 | // button2 93 | // 94 | this.button2.Dock = System.Windows.Forms.DockStyle.Right; 95 | this.button2.Location = new System.Drawing.Point(505, 0); 96 | this.button2.Name = "button2"; 97 | this.button2.Size = new System.Drawing.Size(83, 45); 98 | this.button2.TabIndex = 0; 99 | this.button2.Text = "粘贴"; 100 | this.button2.UseVisualStyleBackColor = true; 101 | this.button2.Click += new System.EventHandler(this.button2_Click); 102 | // 103 | // InputDialog 104 | // 105 | this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F); 106 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 107 | this.ClientSize = new System.Drawing.Size(642, 167); 108 | this.Controls.Add(this.tableLayoutPanel1); 109 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; 110 | this.Margin = new System.Windows.Forms.Padding(6); 111 | this.Name = "InputDialog"; 112 | this.Padding = new System.Windows.Forms.Padding(24); 113 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 114 | this.Text = "请输入URL"; 115 | this.Load += new System.EventHandler(this.InputDialog_Load); 116 | this.tableLayoutPanel1.ResumeLayout(false); 117 | this.panel1.ResumeLayout(false); 118 | this.panel1.PerformLayout(); 119 | this.ResumeLayout(false); 120 | 121 | } 122 | 123 | #endregion 124 | 125 | private System.Windows.Forms.TextBox textBox1; 126 | private System.Windows.Forms.Button button1; 127 | private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; 128 | private System.Windows.Forms.Panel panel1; 129 | private System.Windows.Forms.Button button2; 130 | } 131 | } -------------------------------------------------------------------------------- /EPUBium Desktop/FodyWeavers.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks 13 | 14 | 15 | 16 | 17 | A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks. 18 | 19 | 20 | 21 | 22 | A list of unmanaged 32 bit assembly names to include, delimited with line breaks. 23 | 24 | 25 | 26 | 27 | A list of unmanaged 64 bit assembly names to include, delimited with line breaks. 28 | 29 | 30 | 31 | 32 | The order of preloaded assemblies, delimited with line breaks. 33 | 34 | 35 | 36 | 37 | 38 | This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file. 39 | 40 | 41 | 42 | 43 | Controls if .pdbs for reference assemblies are also embedded. 44 | 45 | 46 | 47 | 48 | Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option. 49 | 50 | 51 | 52 | 53 | As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off. 54 | 55 | 56 | 57 | 58 | Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code. 59 | 60 | 61 | 62 | 63 | Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior. 64 | 65 | 66 | 67 | 68 | A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with | 69 | 70 | 71 | 72 | 73 | A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |. 74 | 75 | 76 | 77 | 78 | A list of unmanaged 32 bit assembly names to include, delimited with |. 79 | 80 | 81 | 82 | 83 | A list of unmanaged 64 bit assembly names to include, delimited with |. 84 | 85 | 86 | 87 | 88 | The order of preloaded assemblies, delimited with |. 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. 97 | 98 | 99 | 100 | 101 | A comma-separated list of error codes that can be safely ignored in assembly verification. 102 | 103 | 104 | 105 | 106 | 'false' to turn off automatic generation of the XML Schema file. 107 | 108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /EPUBium Desktop/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 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 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | ..\icon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 123 | 124 | 125 | ..\Resources\default.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 126 | 127 | 128 | ..\htdocs.pak;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 129 | 130 | 131 | ..\runtimes.zip;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 132 | 133 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Aa][Rr][Mm]/ 27 | [Aa][Rr][Mm]64/ 28 | bld/ 29 | [Bb]in/ 30 | [Oo]bj/ 31 | [Ll]og/ 32 | [Ll]ogs/ 33 | 34 | # Visual Studio 2015/2017 cache/options directory 35 | .vs/ 36 | # Uncomment if you have tasks that create the project's static files in wwwroot 37 | #wwwroot/ 38 | 39 | # Visual Studio 2017 auto generated files 40 | Generated\ Files/ 41 | 42 | # MSTest test Results 43 | [Tt]est[Rr]esult*/ 44 | [Bb]uild[Ll]og.* 45 | 46 | # NUnit 47 | *.VisualState.xml 48 | TestResult.xml 49 | nunit-*.xml 50 | 51 | # Build Results of an ATL Project 52 | [Dd]ebugPS/ 53 | [Rr]eleasePS/ 54 | dlldata.c 55 | 56 | # Benchmark Results 57 | BenchmarkDotNet.Artifacts/ 58 | 59 | # .NET Core 60 | project.lock.json 61 | project.fragment.lock.json 62 | artifacts/ 63 | 64 | # StyleCop 65 | StyleCopReport.xml 66 | 67 | # Files built by Visual Studio 68 | *_i.c 69 | *_p.c 70 | *_h.h 71 | *.ilk 72 | *.meta 73 | *.obj 74 | *.iobj 75 | *.pch 76 | *.pdb 77 | *.ipdb 78 | *.pgc 79 | *.pgd 80 | *.rsp 81 | *.sbr 82 | *.tlb 83 | *.tli 84 | *.tlh 85 | *.tmp 86 | *.tmp_proj 87 | *_wpftmp.csproj 88 | *.log 89 | *.vspscc 90 | *.vssscc 91 | .builds 92 | *.pidb 93 | *.svclog 94 | *.scc 95 | 96 | # Chutzpah Test files 97 | _Chutzpah* 98 | 99 | # Visual C++ cache files 100 | ipch/ 101 | *.aps 102 | *.ncb 103 | *.opendb 104 | *.opensdf 105 | *.sdf 106 | *.cachefile 107 | *.VC.db 108 | *.VC.VC.opendb 109 | 110 | # Visual Studio profiler 111 | *.psess 112 | *.vsp 113 | *.vspx 114 | *.sap 115 | 116 | # Visual Studio Trace Files 117 | *.e2e 118 | 119 | # TFS 2012 Local Workspace 120 | $tf/ 121 | 122 | # Guidance Automation Toolkit 123 | *.gpState 124 | 125 | # ReSharper is a .NET coding add-in 126 | _ReSharper*/ 127 | *.[Rr]e[Ss]harper 128 | *.DotSettings.user 129 | 130 | # TeamCity is a build add-in 131 | _TeamCity* 132 | 133 | # DotCover is a Code Coverage Tool 134 | *.dotCover 135 | 136 | # AxoCover is a Code Coverage Tool 137 | .axoCover/* 138 | !.axoCover/settings.json 139 | 140 | # Visual Studio code coverage results 141 | *.coverage 142 | *.coveragexml 143 | 144 | # NCrunch 145 | _NCrunch_* 146 | .*crunch*.local.xml 147 | nCrunchTemp_* 148 | 149 | # MightyMoose 150 | *.mm.* 151 | AutoTest.Net/ 152 | 153 | # Web workbench (sass) 154 | .sass-cache/ 155 | 156 | # Installshield output folder 157 | [Ee]xpress/ 158 | 159 | # DocProject is a documentation generator add-in 160 | DocProject/buildhelp/ 161 | DocProject/Help/*.HxT 162 | DocProject/Help/*.HxC 163 | DocProject/Help/*.hhc 164 | DocProject/Help/*.hhk 165 | DocProject/Help/*.hhp 166 | DocProject/Help/Html2 167 | DocProject/Help/html 168 | 169 | # Click-Once directory 170 | publish/ 171 | 172 | # Publish Web Output 173 | *.[Pp]ublish.xml 174 | *.azurePubxml 175 | # Note: Comment the next line if you want to checkin your web deploy settings, 176 | # but database connection strings (with potential passwords) will be unencrypted 177 | *.pubxml 178 | *.publishproj 179 | 180 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 181 | # checkin your Azure Web App publish settings, but sensitive information contained 182 | # in these scripts will be unencrypted 183 | PublishScripts/ 184 | 185 | # NuGet Packages 186 | *.nupkg 187 | # NuGet Symbol Packages 188 | *.snupkg 189 | # The packages folder can be ignored because of Package Restore 190 | **/[Pp]ackages/* 191 | # except build/, which is used as an MSBuild target. 192 | !**/[Pp]ackages/build/ 193 | # Uncomment if necessary however generally it will be regenerated when needed 194 | #!**/[Pp]ackages/repositories.config 195 | # NuGet v3's project.json files produces more ignorable files 196 | *.nuget.props 197 | *.nuget.targets 198 | 199 | # Microsoft Azure Build Output 200 | csx/ 201 | *.build.csdef 202 | 203 | # Microsoft Azure Emulator 204 | ecf/ 205 | rcf/ 206 | 207 | # Windows Store app package directories and files 208 | AppPackages/ 209 | BundleArtifacts/ 210 | Package.StoreAssociation.xml 211 | _pkginfo.txt 212 | *.appx 213 | *.appxbundle 214 | *.appxupload 215 | 216 | # Visual Studio cache files 217 | # files ending in .cache can be ignored 218 | *.[Cc]ache 219 | # but keep track of directories ending in .cache 220 | !?*.[Cc]ache/ 221 | 222 | # Others 223 | ClientBin/ 224 | ~$* 225 | *~ 226 | *.dbmdl 227 | *.dbproj.schemaview 228 | *.jfm 229 | *.pfx 230 | *.publishsettings 231 | orleans.codegen.cs 232 | 233 | # Including strong name files can present a security risk 234 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 235 | #*.snk 236 | 237 | # Since there are multiple workflows, uncomment next line to ignore bower_components 238 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 239 | #bower_components/ 240 | 241 | # RIA/Silverlight projects 242 | Generated_Code/ 243 | 244 | # Backup & report files from converting an old project file 245 | # to a newer Visual Studio version. Backup files are not needed, 246 | # because we have git ;-) 247 | _UpgradeReport_Files/ 248 | Backup*/ 249 | UpgradeLog*.XML 250 | UpgradeLog*.htm 251 | ServiceFabricBackup/ 252 | *.rptproj.bak 253 | 254 | # SQL Server files 255 | *.mdf 256 | *.ldf 257 | *.ndf 258 | 259 | # Business Intelligence projects 260 | *.rdl.data 261 | *.bim.layout 262 | *.bim_*.settings 263 | *.rptproj.rsuser 264 | *- [Bb]ackup.rdl 265 | *- [Bb]ackup ([0-9]).rdl 266 | *- [Bb]ackup ([0-9][0-9]).rdl 267 | 268 | # Microsoft Fakes 269 | FakesAssemblies/ 270 | 271 | # GhostDoc plugin setting file 272 | *.GhostDoc.xml 273 | 274 | # Node.js Tools for Visual Studio 275 | .ntvs_analysis.dat 276 | node_modules/ 277 | 278 | # Visual Studio 6 build log 279 | *.plg 280 | 281 | # Visual Studio 6 workspace options file 282 | *.opt 283 | 284 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 285 | *.vbw 286 | 287 | # Visual Studio LightSwitch build output 288 | **/*.HTMLClient/GeneratedArtifacts 289 | **/*.DesktopClient/GeneratedArtifacts 290 | **/*.DesktopClient/ModelManifest.xml 291 | **/*.Server/GeneratedArtifacts 292 | **/*.Server/ModelManifest.xml 293 | _Pvt_Extensions 294 | 295 | # Paket dependency manager 296 | .paket/paket.exe 297 | paket-files/ 298 | 299 | # FAKE - F# Make 300 | .fake/ 301 | 302 | # CodeRush personal settings 303 | .cr/personal 304 | 305 | # Python Tools for Visual Studio (PTVS) 306 | __pycache__/ 307 | *.pyc 308 | 309 | # Cake - Uncomment if you are using it 310 | # tools/** 311 | # !tools/packages.config 312 | 313 | # Tabs Studio 314 | *.tss 315 | 316 | # Telerik's JustMock configuration file 317 | *.jmconfig 318 | 319 | # BizTalk build output 320 | *.btp.cs 321 | *.btm.cs 322 | *.odx.cs 323 | *.xsd.cs 324 | 325 | # OpenCover UI analysis results 326 | OpenCover/ 327 | 328 | # Azure Stream Analytics local run output 329 | ASALocalRun/ 330 | 331 | # MSBuild Binary and Structured Log 332 | *.binlog 333 | 334 | # NVidia Nsight GPU debugger configuration file 335 | *.nvuser 336 | 337 | # MFractors (Xamarin productivity tool) working folder 338 | .mfractor/ 339 | 340 | # Local History for Visual Studio 341 | .localhistory/ 342 | 343 | # BeatPulse healthcheck temp database 344 | healthchecksdb 345 | 346 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 347 | MigrationBackup/ 348 | 349 | # Ionide (cross platform F# VS Code tools) working folder 350 | .ionide/ 351 | /EPUBium Desktop/htdocs.pak 352 | -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/index.html: -------------------------------------------------------------------------------- 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 | 33 | 62 |
63 | 64 |
65 | 66 | 76 | 77 | 92 | 93 | 209 | 210 | -------------------------------------------------------------------------------- /EPUBium Desktop/FrmChangeResource.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 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 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | True 122 | 123 | 124 | True 125 | 126 | 127 | True 128 | 129 | 130 | True 131 | 132 | 133 | True 134 | 135 | 136 | True 137 | 138 | 139 | 140 | 141 | Qk32AgAAAAAAADYAAAAoAAAADgAAABAAAAABABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 142 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACEgoTGw8bGw8bGw8bGw8bGw8bGw8bG 143 | w8bGw8bGw8bGw8bGw8bGw8YAAAAAAISChP///////////////////////////////////////////8bD 144 | xgAAAAAAhIKE////////////////////////////////////////////xsPGAAAAAACEgoT///////// 145 | ///////////////////////////////////Gw8YAAAAAAISChP////////////////////////////// 146 | /////////////8bDxgAAAAAAhIKE////////////AAD/AAD/////////AAD/AAD/////////xsPGAAAA 147 | AACEgoT///////////////8AAP8AAP8AAP8AAP/////////////Gw8YAAAAAAISChP////////////// 148 | /////wAA/wAA/////////////////8bDxgAAAAAAhIKE////////////////AAD/AAD/AAD/AAD///// 149 | ////////xsPGAAAAAACEgoT///////////8AAP8AAP////////8AAP8AAP/////////Gw8YAAAAAAISC 150 | hP///////////////////////////////////////////8bDxgAAAAAAhIKE//////////////////// 151 | ////////////////////////xsPGAAAAAACEgoT///////////////////////////////////////// 152 | ///Gw8YAAAAAAISChP///////////////////////////////////////////8bDxgAAAAAAhIKEhIKE 153 | hIKEhIKEhIKEhIKEhIKEhIKEhIKEhIKEhIKEhIKEhIKEhIKEAAA= 154 | 155 | 156 | 157 | True 158 | 159 | 160 | True 161 | 162 | 163 | 17, 17 164 | 165 | 166 | 281, 17 167 | 168 | -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/epubjs/static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 45 | 46 | 47 | 48 |
49 | 50 | 292 | 293 | 294 | 295 | 299 | 300 | 301 | 302 | 303 | -------------------------------------------------------------------------------- /EPUBium Desktop/EPUBium Desktop.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Debug 7 | AnyCPU 8 | {9822C1C8-9B97-40E9-A904-9C31F80FA753} 9 | WinExe 10 | EPUBium_Desktop 11 | EPUBium Desktop 12 | v4.7.2 13 | 512 14 | true 15 | true 16 | 17 | 18 | 19 | 20 | 21 | AnyCPU 22 | true 23 | full 24 | false 25 | bin\Debug\ 26 | DEBUG;TRACE 27 | prompt 28 | 4 29 | false 30 | 31 | 32 | AnyCPU 33 | pdbonly 34 | true 35 | bin\Release\ 36 | TRACE 37 | prompt 38 | 4 39 | false 40 | 41 | 42 | true 43 | bin\x64\Debug\ 44 | DEBUG;TRACE 45 | full 46 | x64 47 | 7.3 48 | prompt 49 | true 50 | 51 | 52 | bin\x64\Release\ 53 | TRACE 54 | true 55 | none 56 | x64 57 | 7.3 58 | prompt 59 | true 60 | Off 61 | false 62 | 63 | 64 | icon.ico 65 | 66 | 67 | app.manifest 68 | 69 | 70 | true 71 | bin\x86\Debug\ 72 | DEBUG;TRACE 73 | full 74 | x86 75 | 7.3 76 | prompt 77 | true 78 | 79 | 80 | bin\x86\Release\ 81 | TRACE 82 | true 83 | pdbonly 84 | x86 85 | 7.3 86 | prompt 87 | 88 | 89 | 90 | ..\packages\Costura.Fody.4.1.0\lib\net40\Costura.dll 91 | 92 | 93 | ..\packages\SharpZipLib.1.3.3\lib\net45\ICSharpCode.SharpZipLib.dll 94 | 95 | 96 | ..\packages\Microsoft.Web.WebView2.1.0.2535.41\lib\net462\Microsoft.Web.WebView2.Core.dll 97 | 98 | 99 | ..\packages\Microsoft.Web.WebView2.1.0.2535.41\lib\net462\Microsoft.Web.WebView2.WinForms.dll 100 | 101 | 102 | ..\packages\Microsoft.Web.WebView2.1.0.2535.41\lib\net462\Microsoft.Web.WebView2.Wpf.dll 103 | 104 | 105 | C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.dll 106 | 107 | 108 | 109 | 110 | ..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.114.0\lib\net451\System.Data.SQLite.dll 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.Drawing.dll 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | Form 130 | 131 | 132 | Form1.cs 133 | 134 | 135 | Form 136 | 137 | 138 | FrmChangeResource.cs 139 | 140 | 141 | Form 142 | 143 | 144 | InputDialog.cs 145 | 146 | 147 | 148 | 149 | 150 | 151 | Form1.cs 152 | 153 | 154 | FrmChangeResource.cs 155 | 156 | 157 | InputDialog.cs 158 | 159 | 160 | ResXFileCodeGenerator 161 | Resources.Designer.cs 162 | Designer 163 | 164 | 165 | True 166 | Resources.resx 167 | True 168 | 169 | 170 | 171 | 172 | 173 | SettingsSingleFileGenerator 174 | Settings.Designer.cs 175 | 176 | 177 | True 178 | Settings.settings 179 | True 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | cd "$(ProjectDir)htdocs" 210 | "$(ProjectDir)zip.exe" -r -0 ..\htdocs.pak . 211 | 212 | 213 | 214 | -------------------------------------------------------------------------------- /EPUBium Desktop/FrmChangeResource.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | using System.IO; 11 | using System.Net; 12 | 13 | namespace EPUBium_Desktop 14 | { 15 | public partial class FrmChangeResource : Form 16 | { 17 | public FrmChangeResource() 18 | { 19 | InitializeComponent(); 20 | doDGVAutoScale(); 21 | } 22 | 23 | void doDGVAutoScale() 24 | { 25 | SizeF designTimeScale = new SizeF(192,192);// 200%缩放 26 | SizeF currentScale = CurrentAutoScaleDimensions; 27 | float mulX = currentScale.Width / designTimeScale.Width; 28 | float mulY = currentScale.Height / designTimeScale.Height; 29 | tblItems.Columns[1].Width = scale(tblItems.Columns[1].Width, mulX); 30 | tblItems.Columns[3].Width = scale(tblItems.Columns[3].Width, mulX); 31 | tblItems.RowTemplate.Height = scale(tblItems.RowTemplate.Height, mulY); 32 | tblItems.Columns[1].DefaultCellStyle.Padding = new Padding(scale(tblItems.Columns[1].DefaultCellStyle.Padding.Right,mulX)); 33 | tblItems.Columns[3].DefaultCellStyle.Padding = new Padding(scale(tblItems.Columns[3].DefaultCellStyle.Padding.Right,mulX)); 34 | } 35 | 36 | int scale(int i,float f) 37 | { 38 | return (int)((float)i * f); 39 | } 40 | 41 | Point scale(Point p,float fx,float fy) 42 | { 43 | Point s = new Point(scale(p.X,fx), scale(p.Y,fy)); 44 | return s; 45 | } 46 | 47 | private void FrmChangeResource_Load(object sender, EventArgs e) 48 | { 49 | loadData(); 50 | } 51 | Image defaultImage = Properties.Resources._default; 52 | void loadData() 53 | { 54 | string basePath = Path.Combine(".", "app", "respack"); 55 | string[] list = Directory.GetFiles(basePath, "*.zip"); 56 | List resPackInfos = new List(); 57 | foreach (string file in list) 58 | { 59 | ResPackInfo resPackInfo = new ResPackInfo(); 60 | resPackInfo.key = Path.GetFileName(file); 61 | try 62 | { 63 | using (MyPakFile myPakFile = new MyPakFile(file)) 64 | { 65 | try 66 | { 67 | Stream imageStream = myPakFile.OpenRead("pack.png"); 68 | if (imageStream != null) 69 | { 70 | using (Stream s = imageStream) 71 | { 72 | resPackInfo.thumbnail = Image.FromStream(s); 73 | } 74 | } 75 | } 76 | catch { } 77 | try 78 | { 79 | Stream metaStream = myPakFile.OpenRead("meta.json"); 80 | if (metaStream != null) 81 | { 82 | using (StreamReader s = new StreamReader(metaStream)) 83 | { 84 | resPackInfo.metadata = JsonConvert.DeserializeObject(s.ReadToEnd()); 85 | if (resPackInfo.metadata == null) 86 | { 87 | resPackInfo.metadata = new ResPackMeta(); 88 | } 89 | } 90 | } 91 | else 92 | { 93 | resPackInfo.metadata = new ResPackMeta(); 94 | 95 | } 96 | 97 | resPackInfo.metadata.safeValue(file); 98 | } 99 | catch { } 100 | } 101 | } 102 | catch { 103 | resPackInfo.thumbnail = null; 104 | resPackInfo.metadata.name = Path.GetFileName(file); 105 | } 106 | resPackInfos.Add(resPackInfo); 107 | } 108 | 109 | tblItems.Rows.Clear(); 110 | resPackInfos.ForEach(resPackInfo => { 111 | tblItems.Rows.Add(resPackInfo.key, resPackInfo.thumbnail, resPackInfo.metadata.ToString(), "链接"); 112 | tblItems.Rows[tblItems.RowCount - 1].Cells[3].Tag = resPackInfo.metadata.link; 113 | }); 114 | } 115 | 116 | class ResPackInfo 117 | { 118 | public Image thumbnail; 119 | public string key; 120 | public ResPackMeta metadata; 121 | } 122 | class ResPackMeta 123 | { 124 | public string name = ""; 125 | public string description = ""; 126 | public string author = ""; 127 | public string version = ""; 128 | public string link = ""; 129 | 130 | public void safeValue(string filename) 131 | { 132 | name = name ?? Path.GetFileName(filename); 133 | description = description ?? ""; 134 | author = author ?? ""; 135 | version = version ?? ""; 136 | link = link ?? ""; 137 | 138 | name = name.Trim() == "" ? Path.GetFileName(filename) : name; 139 | 140 | 141 | } 142 | 143 | public override string ToString() 144 | { 145 | if(version == "" || author == "") 146 | { 147 | return $"{name}\r\n \r\n "; 148 | } 149 | return $"{name} v{version}\r\n{description}\r\n作者:{author}"; 150 | } 151 | } 152 | 153 | private void tblItems_CellContentClick(object sender, DataGridViewCellEventArgs e) 154 | { 155 | if(e.ColumnIndex == 3 && e.RowIndex >= 0) 156 | { 157 | string link = (tblItems[e.ColumnIndex, e.RowIndex].Tag ?? (object)"").ToString(); 158 | if(link.Trim() != "") 159 | { 160 | if (link.StartsWith("http") && link.Contains("://")) 161 | { 162 | if (MessageBox.Show(this, "是否打开链接:\r\n" + link, "安全警告", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2) == DialogResult.Yes) 163 | { 164 | try 165 | { 166 | System.Diagnostics.Process.Start(link); 167 | } 168 | catch { } 169 | } 170 | } 171 | else 172 | { 173 | MessageBox.Show("未知的链接格式。按Ctrl+C可以复制内容\r\n"+link); 174 | } 175 | } 176 | } 177 | } 178 | 179 | string selected = null; 180 | 181 | private void tblItems_CellClick(object sender, DataGridViewCellEventArgs e) 182 | { 183 | if (e.RowIndex >= 0) 184 | { 185 | selected = tblItems[0, e.RowIndex].Value.ToString(); 186 | } 187 | } 188 | 189 | void setTheme(string key) 190 | { 191 | Properties.Settings.Default.respack = key; 192 | Properties.Settings.Default.Save(); 193 | if(key == null || key.Length == 0) 194 | { 195 | 196 | Program.HtDocs.Overrides?.Dispose(); 197 | Program.HtDocs.Overrides = null; 198 | } 199 | else 200 | { 201 | 202 | string path = Path.GetFullPath(Path.Combine(".", "app", "respack", key)); 203 | Program.HtDocs.Overrides = new MyPakFile(path); 204 | } 205 | MessageBox.Show(this,"主题包已应用。在界面上右键刷新生效"); 206 | } 207 | 208 | private void btnOpenDir_Click(object sender, EventArgs e) 209 | { 210 | string path = Path.GetFullPath(Path.Combine(".", "app", "respack")); 211 | if(path.Contains(" ")) 212 | { 213 | path = "\"" + path + "\""; 214 | } 215 | System.Diagnostics.Process.Start("explorer",path); 216 | } 217 | 218 | private void btnDefault_Click(object sender, EventArgs e) 219 | { 220 | setTheme(""); 221 | } 222 | 223 | private void btnUse_Click(object sender, EventArgs e) 224 | { 225 | if(selected != null) 226 | { 227 | setTheme(selected); 228 | } 229 | } 230 | 231 | private void btnThemeDev_Click(object sender, EventArgs e) 232 | { 233 | mnuDevMode.Show(btnThemeDev, 0, btnThemeDev.Height); 234 | } 235 | 236 | private void mnuThemeDevUseDir_Click(object sender, EventArgs e) 237 | { 238 | MessageBox.Show(this, "开发模式可以指定本地的一个目录作为资源包的根目录,应用后刷新生效,重启或点击恢复默认按钮可还原。"); 239 | if (openFileDialog1.ShowDialog(this) == DialogResult.OK) 240 | { 241 | Program.HtDocs.Overrides?.Dispose(); 242 | Program.HtDocs.Overrides = new LocalDirRoot(Path.GetDirectoryName(openFileDialog1.FileName)); 243 | MessageBox.Show(this, "主题包已应用。在界面上右键刷新生效"); 244 | } 245 | } 246 | 247 | private void mnuThemeDevUseUrl_Click(object sender, EventArgs e) 248 | { 249 | MessageBox.Show(this, "开发模式可以指定一个URL作为资源包的根目录,应用后刷新生效,重启或点击恢复默认按钮可还原。"); 250 | string url = InputDialog.Input(this, "请输入url根目录",Properties.Settings.Default.devLastUrl ?? ""); 251 | if (url != null) 252 | { 253 | if (url.StartsWith("http") && url.Contains("://")) 254 | { 255 | Program.HtDocs.Overrides?.Dispose(); 256 | Program.HtDocs.Overrides = new UrlPackFile(url); 257 | Properties.Settings.Default.devLastUrl = url; 258 | Properties.Settings.Default.Save(); 259 | MessageBox.Show(this, "主题包已应用。在界面上右键刷新生效"); 260 | } 261 | else 262 | { 263 | MessageBox.Show("无效的URL路径"); 264 | } 265 | } 266 | } 267 | } 268 | 269 | class UrlPackFile : IPakFile 270 | { 271 | 272 | private string urlRoot; 273 | 274 | public UrlPackFile(string urlRoot) 275 | { 276 | if (urlRoot.EndsWith("/")) 277 | { 278 | urlRoot = urlRoot.Substring(0, urlRoot.Length - 1); 279 | } 280 | this.urlRoot = urlRoot; 281 | } 282 | 283 | public IPakFile Overrides { get; set; } 284 | 285 | public void Dispose() 286 | { 287 | try 288 | { 289 | webClient.Dispose(); 290 | }catch { } 291 | } 292 | private WebClient webClient = new WebClient(); 293 | public Stream OpenRead(string path) 294 | { 295 | if (path.StartsWith("/")) 296 | { 297 | path = path.Substring(1); 298 | } 299 | string url = urlRoot + "/" + path; 300 | try 301 | { 302 | return webClient.OpenRead(url); 303 | }catch 304 | { 305 | return null; 306 | } 307 | } 308 | } 309 | } 310 | -------------------------------------------------------------------------------- /EPUBium Desktop/Form1.cs: -------------------------------------------------------------------------------- 1 | 2 | using Microsoft.Web.WebView2.Core; 3 | using Microsoft.Web.WebView2.WinForms; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.ComponentModel; 7 | using System.Data; 8 | using System.Diagnostics; 9 | using System.Drawing; 10 | using System.IO; 11 | using System.Linq; 12 | using System.Net; 13 | using System.Text; 14 | using System.Threading.Tasks; 15 | using System.Windows.Forms; 16 | 17 | namespace EPUBium_Desktop 18 | { 19 | public partial class Form1 : Form 20 | { 21 | 22 | 23 | CoreWebView2 webView; 24 | WebView2 webViewControl; 25 | public Form1() 26 | { 27 | InitializeComponent(); 28 | this.BackColor = Color.White; 29 | this.Icon = Properties.Resources.icon; 30 | try 31 | { 32 | webViewControl = new WebView2(); 33 | Task createEnvTask = CoreWebView2Environment.CreateAsync(userDataFolder: Path.GetFullPath("app\\data\\cefdata")); 34 | createEnvTask.Wait(); 35 | CoreWebView2Environment env = createEnvTask.Result; 36 | Controls.Add(webViewControl); 37 | webViewControl.Dock = DockStyle.Fill; 38 | webViewControl.EnsureCoreWebView2Async(env); 39 | webViewControl.CoreWebView2InitializationCompleted += WebView2_CoreWebView2InitializationCompleted; 40 | }catch (Exception ex) 41 | { 42 | if(ex.InnerException is WebView2RuntimeNotFoundException) 43 | { 44 | MessageBox.Show("此计算机上没有安装WebView2运行时。\r\n访问:https://developer.microsoft.com/zh-cn/microsoft-edge/webview2/consumer/ 获取运行时", "", MessageBoxButtons.OK, MessageBoxIcon.Warning); 45 | string runtimeDownloadUrl = "https://developer.microsoft.com/zh-cn/microsoft-edge/webview2/consumer/"; 46 | Process.Start(runtimeDownloadUrl); 47 | Application.Exit(); 48 | } 49 | } 50 | Disposed += Form1_Disposed; 51 | 52 | } 53 | 54 | private string startUrl = null; 55 | private bool isSubWindow = false; 56 | 57 | public Form1(string startUrl) : this() 58 | { 59 | this.startUrl = startUrl; 60 | isSubWindow = true; 61 | } 62 | 63 | private void WebView2_CoreWebView2InitializationCompleted(object sender, CoreWebView2InitializationCompletedEventArgs e) 64 | { 65 | if (e.IsSuccess) 66 | { 67 | webView = webViewControl.CoreWebView2; 68 | initWebView2(); 69 | webViewControl.Source = new Uri(startUrl ?? "http://epub.zyf-internal.com"); 70 | webViewControl.NavigationCompleted += WebViewControl_NavigationCompleted; 71 | } 72 | else 73 | { 74 | if(e.InitializationException is WebView2RuntimeNotFoundException) 75 | { 76 | MessageBox.Show("此计算机上没有安装WebView2运行时。\r\n访问:https://developer.microsoft.com/zh-cn/microsoft-edge/webview2/consumer/ 获取运行时", "",MessageBoxButtons.OK,MessageBoxIcon.Warning); 77 | string runtimeDownloadUrl = "https://developer.microsoft.com/zh-cn/microsoft-edge/webview2/consumer/"; 78 | Process.Start(runtimeDownloadUrl); 79 | Application.Exit(); 80 | } 81 | else 82 | { 83 | MessageBox.Show(e.InitializationException.ToString(),"Web页面初始化失败"); 84 | Application.Exit(); 85 | } 86 | } 87 | } 88 | 89 | private void WebViewControl_NavigationCompleted(object sender, CoreWebView2NavigationCompletedEventArgs e) 90 | { 91 | 92 | } 93 | 94 | private void WebView_DocumentTitleChanged(object sender, object e) 95 | { 96 | Invoke(new Action(() => { 97 | this.Text = webView.DocumentTitle + " - EPUBium Desktop " + Application.ProductVersion; 98 | })); 99 | } 100 | 101 | private void Form1_Disposed(object sender, EventArgs e) 102 | { 103 | webViewControl.Dispose(); 104 | } 105 | 106 | private void Form1_Load(object sender, EventArgs e) 107 | { 108 | this.Size = Properties.Settings.Default.windowsize; 109 | this.Location = Properties.Settings.Default.windowloc; 110 | this.WindowState = Properties.Settings.Default.ismaxium ? FormWindowState.Maximized : FormWindowState.Normal; 111 | Rectangle workingArea = Screen.FromControl(this).WorkingArea; 112 | if (!workingArea.Contains(this.Location)) 113 | { 114 | this.Location = workingArea.Location; 115 | } 116 | } 117 | 118 | void handleEvent(string eventType) 119 | { 120 | switch (eventType) 121 | { 122 | case "respack": 123 | BeginInvoke(new Action(() => { new FrmChangeResource().ShowDialog(this); })); 124 | break; 125 | default: 126 | MessageBox.Show("未知Event:"+eventType); 127 | break; 128 | } 129 | } 130 | 131 | protected override void OnFormClosing(FormClosingEventArgs e) 132 | { 133 | if (!isSubWindow) 134 | { 135 | Properties.Settings.Default.windowsize = this.Size; 136 | Properties.Settings.Default.windowloc = this.Location; 137 | Properties.Settings.Default.ismaxium = this.WindowState == FormWindowState.Maximized; 138 | Properties.Settings.Default.Save(); 139 | } 140 | base.OnFormClosing(e); 141 | Controls.Remove(webViewControl); 142 | } 143 | void initWebView2() 144 | { 145 | webView.DocumentTitleChanged += WebView_DocumentTitleChanged; 146 | webView.Settings.IsPinchZoomEnabled = false; 147 | webView.Settings.IsSwipeNavigationEnabled = false; 148 | webView.AddWebResourceRequestedFilter("*", CoreWebView2WebResourceContext.All); 149 | resourceHandler = new ResourceHandler(webView.Environment); 150 | webView.WebResourceRequested += WebView_WebResourceRequested; 151 | webView.FrameNavigationStarting += WebView_FrameNavigationStarting; 152 | webView.ContextMenuRequested += WebView_ContextMenuRequested; 153 | webView.NewWindowRequested += WebView_NewWindowRequested; 154 | } 155 | 156 | private void WebView_NewWindowRequested(object sender, CoreWebView2NewWindowRequestedEventArgs e) 157 | { 158 | if (e.Uri.StartsWith(urlbase)) 159 | { 160 | e.Handled = true; 161 | new Form1(e.Uri).Show(); 162 | } 163 | } 164 | 165 | private void WebView_ContextMenuRequested(object sender, CoreWebView2ContextMenuRequestedEventArgs e) 166 | { 167 | if(e.ContextMenuTarget.Kind == CoreWebView2ContextMenuTargetKind.Image) 168 | { 169 | string imageUrl = e.ContextMenuTarget.SourceUri != null ? e.ContextMenuTarget.SourceUri.ToString() : null; 170 | if(imageUrl != null) 171 | { 172 | CoreWebView2ContextMenuItem showBigImage = webView.Environment.CreateContextMenuItem("查看大图", null, CoreWebView2ContextMenuItemKind.Command); 173 | showBigImage.CustomItemSelected += delegate 174 | { 175 | webViewControl.ExecuteScriptAsync("window.open('" + imageUrl + "')"); 176 | }; 177 | e.MenuItems.Add(showBigImage); 178 | } 179 | } 180 | CoreWebView2ContextMenuItem changeSkin = webView.Environment.CreateContextMenuItem("更换主题包", null, CoreWebView2ContextMenuItemKind.Command); 181 | changeSkin.CustomItemSelected += onChangeSkinClicked; 182 | e.MenuItems.Add(changeSkin); 183 | } 184 | 185 | private void onChangeSkinClicked(object sender, object e) 186 | { 187 | new FrmChangeResource().ShowDialog(this); 188 | } 189 | 190 | private void WebView_FrameNavigationStarting(object sender, CoreWebView2NavigationStartingEventArgs e) 191 | { 192 | if (!e.Uri.StartsWith(urlbase)) 193 | { 194 | e.Cancel = true; 195 | } 196 | } 197 | 198 | const string urlbase = "http://epub.zyf-internal.com"; 199 | private void WebView_WebResourceRequested(object sender, CoreWebView2WebResourceRequestedEventArgs e) 200 | { 201 | e.Response = handleRequest(e.Request); 202 | e.GetDeferral().Complete(); 203 | } 204 | 205 | public CoreWebView2WebResourceResponse handleRequest(CoreWebView2WebResourceRequest request) 206 | { 207 | if (request.Uri.StartsWith(urlbase)) 208 | { 209 | string path = request.Uri.Substring(urlbase.Length, request.Uri.Length - urlbase.Length); 210 | if (path.StartsWith("/")) 211 | { 212 | path = path.Substring(1); 213 | } 214 | if (path == "" || path.EndsWith("/")) 215 | { 216 | path += "index.html"; 217 | } 218 | string mimetype = "text/html"; 219 | if (path.Contains(".")) 220 | { 221 | string ext = path.Substring(path.LastIndexOf(".")).Replace(".", ""); 222 | mimetype = System.Web.MimeMapping.GetMimeMapping(path); 223 | } 224 | if (path.StartsWith("api/") || path.StartsWith("read/")) 225 | { 226 | ApiResponse resp = Program.ApiModel.callApi(path); 227 | if (resp.type == ApiResponseType.ErrorInternalError) { return resourceHandler.ForErrorMessage(resp.msg, System.Net.HttpStatusCode.InternalServerError); } 228 | if (resp.type == ApiResponseType.ErrorNotFound) { return resourceHandler.ForErrorMessage(resp.msg, System.Net.HttpStatusCode.NotFound); } 229 | if (resp.type == ApiResponseType.Stream) 230 | { 231 | return resourceHandler.FromStream(resp.stream, resp.msg, true); 232 | } 233 | if (resp.type == ApiResponseType.File) 234 | { 235 | return resourceHandler.FromFilePath(resp.msg, System.Web.MimeMapping.GetMimeMapping(resp.msg), true); 236 | } 237 | if (resp.type == ApiResponseType.String) 238 | { 239 | return resourceHandler.FromString(resp.msg, Encoding.UTF8, "text/html"); 240 | } 241 | if(resp.type == ApiResponseType.Event) 242 | { 243 | handleEvent(resp.msg); 244 | return resourceHandler.FromString("OK",Encoding.UTF8, "text/html"); 245 | } 246 | } 247 | Stream s = Program.HtDocs.OpenRead(path); 248 | if (s != null) 249 | { 250 | return resourceHandler.FromStream(s, mimetype, autoDisposeStream: true); 251 | } 252 | } 253 | 254 | return webView.Environment.CreateWebResourceResponse(null, 403, "Forbidden", ""); 255 | 256 | } 257 | 258 | ResourceHandler resourceHandler; 259 | } 260 | 261 | internal class ResourceHandler 262 | { 263 | private CoreWebView2Environment env; 264 | 265 | public ResourceHandler(CoreWebView2Environment env) 266 | { 267 | this.env = env; 268 | } 269 | 270 | internal CoreWebView2WebResourceResponse ForErrorMessage(string errMsg, HttpStatusCode errCode) 271 | { 272 | return env.CreateWebResourceResponse(null, (int)errCode, errMsg, ""); 273 | } 274 | 275 | internal CoreWebView2WebResourceResponse FromFilePath(string path, string mimeType, bool autoClose) 276 | { 277 | FileStream fileStream = File.OpenRead(path); 278 | return env.CreateWebResourceResponse(fileStream, 200, "OK", "Content-Type: " + mimeType); 279 | } 280 | 281 | internal CoreWebView2WebResourceResponse FromStream(Stream s, string mimetype, bool autoDisposeStream) 282 | { 283 | return env.CreateWebResourceResponse(s, 200, "OK", "Content-Type: " + mimetype); 284 | } 285 | 286 | internal CoreWebView2WebResourceResponse FromString(string msg, Encoding encoding, string contentType) 287 | { 288 | MemoryStream ms = new MemoryStream(encoding.GetBytes(msg)); 289 | return env.CreateWebResourceResponse(ms, 200, "OK", "Content-Type: " + contentType+", charset="+encoding.EncodingName); 290 | } 291 | } 292 | } 293 | -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/common/style.css: -------------------------------------------------------------------------------- 1 | *{ 2 | margin: 0; 3 | padding: 0; 4 | list-style: none; 5 | --primary-color: #0055f7; 6 | --accent-color: #ff55f7; 7 | } 8 | 9 | body{ 10 | width: 100vw; 11 | height: 100vh; 12 | overflow: hidden; 13 | } 14 | 15 | .head{ 16 | height: 50px; 17 | background-color: var(--primary-color); 18 | box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.432); 19 | display: flex; 20 | flex-direction: row; 21 | align-items: center; 22 | padding-left: 10px; 23 | padding-right: 10px; 24 | z-index: 20; 25 | position: absolute; 26 | top: 0px; 27 | left: 0px; 28 | width: 100vw; 29 | box-sizing: border-box; 30 | } 31 | 32 | .title{ 33 | 34 | padding-left: 10px; 35 | color: white; 36 | font-weight: normal; 37 | font-size: 18px; 38 | overflow:hidden; 39 | white-space: nowrap; 40 | } 41 | 42 | .flexspace{ 43 | flex-grow: 1; 44 | } 45 | 46 | .menutextbox{ 47 | background: transparent; 48 | background-color: transparent; 49 | border: none; 50 | height: 30px; 51 | line-height: 30px; 52 | font-size: 20px; 53 | color: white; 54 | width: 8em; 55 | flex-grow: 0; 56 | border-bottom: solid var(--accent-color) 2px; 57 | } 58 | 59 | .menubtn{ 60 | border-radius: 20px; 61 | width: 40px; 62 | height: 40px; 63 | color: white; 64 | background-color: transparent; 65 | border: none; 66 | transition-duration: 200ms; 67 | background-position: center; 68 | background-repeat: no-repeat; 69 | background-size: 24px; 70 | flex-shrink: 0; 71 | } 72 | 73 | .menubtn:hover{ 74 | transition-duration: 200ms; 75 | background-color: rgba(255, 255, 255, 0.349); 76 | 77 | } 78 | 79 | .leftmenu{ 80 | width: 100%; 81 | background-color: white; 82 | height: 100%; 83 | box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.432); 84 | display: flex; 85 | flex-direction: column; 86 | overflow-y:scroll; 87 | overflow-x: hidden; 88 | position: absolute; 89 | top: 0px; 90 | left: 0px; 91 | box-sizing: border-box; 92 | } 93 | .leftmenu>*{ 94 | flex-shrink: 0; 95 | } 96 | .drawer-head{ 97 | background-image: url('img/bg_drawer_head.png'); 98 | width: 100%; 99 | height: 140px; 100 | background-size: cover; 101 | } 102 | 103 | .uppermenu{ 104 | color: gray; 105 | height: 40px; 106 | line-height: 40px; 107 | padding-left: 10px; 108 | } 109 | 110 | .line{ 111 | height: 1px; 112 | background-color: gray; 113 | } 114 | 115 | .drawermenuitems{ 116 | margin-bottom: 10px; 117 | margin-top: 10px; 118 | } 119 | 120 | .drawermenuitems>*{ 121 | padding-left: 60px; 122 | background-repeat: no-repeat; 123 | background-size: 32px 32px; 124 | background-position-y: center; 125 | background-position-x: 16px; 126 | } 127 | 128 | .bookimgbg{ 129 | background-image: url('img/ic_menu_bookmark.png'); 130 | } 131 | .menuitem{ 132 | height: 50px; 133 | width: 100%; 134 | background-size: 24px; 135 | line-height: 50px; 136 | flex-shrink: 0; 137 | } 138 | 139 | 140 | .booklist{ 141 | width: 100%; 142 | height: 100%; 143 | overflow-x: hidden; 144 | overflow-y: scroll; 145 | display: grid; 146 | padding: 8px; 147 | position: absolute; 148 | top: 0px; 149 | left: 0px; 150 | box-sizing: border-box; 151 | justify-content: space-around; 152 | grid-template-columns: repeat(auto-fill, 120px); 153 | scroll-margin-bottom: 20px; 154 | align-content: start; 155 | } 156 | 157 | .bookitem{ 158 | width: 120px; 159 | height: 200px; 160 | box-shadow: 0px 3px 3px 1px rgba(0, 0, 0, 0.432); 161 | background-color: white; 162 | border-radius: 8px; 163 | margin: 5px; 164 | } 165 | 166 | .bookitem:link{ 167 | text-decoration: none; 168 | } 169 | 170 | .bookcover{ 171 | width: 100px; 172 | height: 150px; 173 | margin-left: 10px; 174 | margin-right: 10px; 175 | margin-top: 10px; 176 | } 177 | 178 | .bookname{ 179 | height: 30px; 180 | line-height: 15px; 181 | font-size: 12px; 182 | color: gray; 183 | margin-left: 10px; 184 | margin-right: 10px; 185 | overflow: hidden; 186 | } 187 | 188 | .container{ 189 | width: 100vw; 190 | height: calc(100vh - 50px); 191 | position: absolute; 192 | top: 50px; 193 | left: 0px; 194 | z-index: 0; 195 | } 196 | 197 | .drawerhide{ 198 | transform: translateX(-300px); 199 | transition-duration: 300ms; 200 | } 201 | 202 | 203 | .fadeout{ 204 | opacity: 0%; 205 | transition-duration: 300ms; 206 | } 207 | 208 | .drawerslider{ 209 | position: absolute; 210 | width: 100%; 211 | height: 100%; 212 | left: 0px; 213 | top: 0px; 214 | z-index: 200; 215 | } 216 | 217 | .drawerbg{ 218 | background-color: rgba(0,0,0,0.5); 219 | z-index: 150; 220 | width: 100%; 221 | height: 100%; 222 | left: 0px; 223 | top: 0px; 224 | position: absolute; 225 | transition-duration: 300ms; 226 | } 227 | 228 | .drawerfg{ 229 | background-color: white; 230 | z-index: 200; 231 | position: absolute; 232 | width: 300px; 233 | height: 100%; 234 | left: 0px; 235 | transition-duration: 300ms; 236 | top: 0px; 237 | } 238 | 239 | 240 | .optionmenufg{ 241 | background-color: white; 242 | z-index: 200; 243 | position: absolute; 244 | width: 160px; 245 | right: 5px; 246 | transition-duration: 300ms; 247 | top: 5px; 248 | box-shadow: 0px 2px 5px 1px rgba(0, 0, 0, 0.432); 249 | border-radius: 4px; 250 | display: flex; 251 | flex-direction: column; 252 | } 253 | 254 | 255 | .menuhide{ 256 | transform: translateX(40%) translateY(-100%); 257 | transition-duration: 220ms; 258 | } 259 | .optionmenuitem{ 260 | height: 40px; 261 | width: 100%; 262 | background-size: 24px; 263 | background-position-x: 8px; 264 | background-position-y: center; 265 | padding-left: 40px; 266 | font-size: 18px; 267 | line-height: 40px; 268 | box-sizing: border-box; 269 | transition-duration: 300ms; 270 | background-repeat: no-repeat; 271 | } 272 | 273 | .darkhover{ 274 | transition-duration: 300ms; 275 | } 276 | .darkhover:hover{ 277 | background-color: lightgray; 278 | transition-duration: 300ms; 279 | } 280 | 281 | .bookmarkoff{ 282 | background-image: url('/common/img/ic_menu_bookmark_unlock.png'); 283 | } 284 | 285 | .bookmarkon{ 286 | background-image: url('/common/img/ic_menu_bookmark_lock.png'); 287 | } 288 | 289 | 290 | .tabcontainer{ 291 | width: 100%; 292 | height: 100%; 293 | } 294 | 295 | .tabheaders{ 296 | width: 100%; 297 | height: 70px; 298 | position: absolute; 299 | top: 0px; 300 | left: 0px; 301 | overflow: hidden; 302 | display: flex; 303 | flex-direction: row; 304 | } 305 | 306 | .tabheader{ 307 | height: 100%; 308 | flex-grow: 2; 309 | text-align: center; 310 | box-sizing: border-box; 311 | padding-top: 40px; 312 | background-repeat: no-repeat; 313 | background-size: 24px; 314 | background-position: center 12px; 315 | } 316 | 317 | .tab1{ 318 | background-image: url("/common/img/ic_menu_chapters.png"); 319 | } 320 | .tab2{ 321 | background-image: url("/common/img/ic_menu_bookmark.png"); 322 | } 323 | .tabselected{ 324 | border-bottom: solid var(--accent-color) 2px; 325 | } 326 | 327 | .tabpages{ 328 | position: absolute; 329 | top: 70px; 330 | left: 0px; 331 | width: 100%; 332 | height: calc(100% - 70px); 333 | } 334 | 335 | .tabpage{ 336 | overflow: scroll; 337 | width: 100%; 338 | height: 100%; 339 | } 340 | 341 | .tableofcontent{ 342 | height: 40px; 343 | width: 100%; 344 | background-position-y: center; 345 | background-position-x: calc(100% - 4px); 346 | background-size: 24px; 347 | padding-left: 8px; 348 | background-repeat: no-repeat; 349 | overflow: hidden; 350 | line-height: 40px; 351 | font-size: 13px; 352 | white-space: pre; 353 | box-sizing: border-box; 354 | position: relative; 355 | } 356 | 357 | .btngo{ 358 | padding: 6px; 359 | box-sizing: border-box; 360 | position: absolute; 361 | top: 0px; 362 | right: 0px; 363 | background-color: white; 364 | } 365 | 366 | .savecard{ 367 | width: calc(100% - 20px); 368 | height: 100px; 369 | box-shadow: 0px 2px 5px 1px rgba(0, 0, 0, 0.432); 370 | border-radius: 8px; 371 | margin: 10px; 372 | position: relative; 373 | 374 | } 375 | 376 | .savetime{ 377 | font-weight: bold; 378 | font-size: 12px; 379 | font-style: italic; 380 | line-height: 24px; 381 | height: 24px; 382 | width: auto; 383 | position: absolute; 384 | left: 0px; 385 | top: 0px; 386 | padding-left: 10px; 387 | color: white; 388 | padding-right: 30px; 389 | background-image: url("/common/img/bm_bg.png"); 390 | background-repeat: no-repeat; 391 | background-size: 100%,100%; 392 | border-radius: 8px 0px 0px 0px; 393 | } 394 | 395 | .savedesc{ 396 | top: 26px; 397 | position: absolute; 398 | left: 0px; 399 | width: 100%; 400 | height:74px; 401 | } 402 | 403 | .savetitle{ 404 | line-height: 17px; 405 | font-size: 14px; 406 | box-sizing: border-box; 407 | width: calc(100% - 80px); 408 | height: 74%; 409 | padding-left: 10px; 410 | position: absolute; 411 | left: 0px; 412 | top: 0px; 413 | padding-top: 20px; 414 | white-space: pre; 415 | overflow: hidden; 416 | } 417 | 418 | .savebtns{ 419 | height: 100%; 420 | position: absolute; 421 | left: calc(100% - 80px);; 422 | width: 80px; 423 | top: 0px; 424 | } 425 | 426 | .savebtn{ 427 | color: var(--accent-color); 428 | text-align: center; 429 | line-height: 37px; 430 | height: 50%; 431 | width: 100%; 432 | } 433 | 434 | .progressbar{ 435 | height: 2px; 436 | width: 100%; 437 | position: absolute; 438 | animation: lr; 439 | animation-duration: 1000ms; 440 | animation-iteration-count: infinite; 441 | margin-top: 4px; 442 | background-color: var(--accent-color); 443 | } 444 | 445 | @keyframes lr { 446 | 0%{ 447 | transform: translateX(-100%); 448 | } 449 | 50%{ 450 | transform: translateX(0%); 451 | } 452 | 100%{ 453 | transform: translateX(100%); 454 | } 455 | } 456 | 457 | .snackbar{ 458 | position: absolute; 459 | height: 40px; 460 | width: 100%; 461 | left: 0px; 462 | bottom: -40px; 463 | box-sizing: border-box; 464 | line-height: 40px; 465 | font-size: 20px; 466 | padding-left: 30px; 467 | padding-right: 30px; 468 | color: white; 469 | z-index: 200; 470 | background-color: #333; 471 | box-shadow: 0px 0px 3px 0px gray; 472 | } 473 | @keyframes toast { 474 | 0%{ 475 | bottom: -40px; 476 | } 477 | 25%{ 478 | bottom: 0px; 479 | } 480 | 75%{ 481 | bottom: 0px; 482 | } 483 | 100%{ 484 | bottom: -40px; 485 | } 486 | } 487 | .snackbar-anim{ 488 | animation: toast; 489 | animation-duration: 1000ms; 490 | } 491 | 492 | 493 | ::-webkit-scrollbar { /* 滚动条整体样式 */ 494 | width: 5px; /*高宽分别对应横竖滚动条的尺寸*/ 495 | height: 5px; 496 | } 497 | 498 | ::-webkit-scrollbar-thumb { /* 滚动条里面小方块 */ 499 | border-radius: 5px; 500 | background: #90909060; 501 | } 502 | 503 | ::-webkit-scrollbar-track { /* 滚动条里面轨道 */ 504 | border-radius: 5px; 505 | background: #60606020; 506 | } 507 | 508 | .auto-scroll { 509 | 510 | } 511 | /* 需要滚动的地方加上这个class */ 512 | .auto-scroll ::-webkit-scrollbar { /* 组件内滚动条不显示 */ 513 | display: none; 514 | } 515 | 516 | .auto-scroll:hover ::-webkit-scrollbar { /* 悬停时滚动条才显示 */ 517 | display: block; 518 | } 519 | 520 | 521 | .blockloading{ 522 | position: absolute; 523 | background-color: rgba(24, 24, 24, 0.336); 524 | z-index: 50001; 525 | } 526 | 527 | .blockloadingfg{ 528 | background-color: rgba(0, 0, 0, 0.72); 529 | width: 150px; 530 | height: 150px; 531 | box-sizing: border-box; 532 | border-radius: 25px; 533 | } 534 | .blockloadingwhite{ 535 | opacity: 0; 536 | width: 15px; 537 | height: 15px; 538 | background-color: white; 539 | flex-grow: 0; 540 | flex-shrink: 0; 541 | animation-duration: 1800ms; 542 | animation-iteration-count: infinite; 543 | animation-timing-function: linear; 544 | animation-name: blink2; 545 | } 546 | .progressloading{ 547 | background-color: #0b1100; 548 | z-index: 10002; 549 | } 550 | 551 | 552 | 553 | @keyframes blink2{ 554 | 0% { 555 | opacity: 0; 556 | } 557 | 10% { 558 | opacity: 1; 559 | } 560 | 50% { 561 | opacity: 1; 562 | } 563 | 60%{ 564 | opacity: 0; 565 | } 566 | 100%{ 567 | opacity: 0; 568 | } 569 | } 570 | 571 | 572 | .centerscreen{ 573 | position: absolute; left:50%; top:50%; transform:translate(-50%,-50%); 574 | } 575 | 576 | 577 | 578 | 579 | .mainsizing{ 580 | width: 100vw; 581 | height: 100vh; 582 | margin: 0px; 583 | padding: 0px; 584 | } -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/epubjs/read.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 阅读 9 | 10 | 11 | 12 | 13 | 49 | 50 | 51 | 52 |
53 | 54 |
55 |

 

56 |

 

57 |
58 |
59 | 60 | 61 | 62 |
63 |
64 |
65 |
66 | 67 | 68 | 69 |
70 | 71 | 85 | 86 | 121 |
122 | 123 |
124 | 125 | 196 | 197 | 198 | 426 | 427 | -------------------------------------------------------------------------------- /EPUBium Desktop/htdocs/common/lib/vue-lazyload.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Vue-Lazyload.js v1.3.3 3 | * (c) 2019 Awe 4 | * Released under the MIT License. 5 | */ 6 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.VueLazyload=t()}(this,function(){"use strict";function e(e){return e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function t(e){e=e||{};var t=arguments.length,i=0;if(1===t)return e;for(;++i-1?e.splice(n,1):void 0}}function a(e,t){for(var n=!1,r=0,i=e.length;rt[0])return-1;if(e[0]===t[0]){if(-1!==t[1].indexOf(".webp",t[1].length-5))return 1;if(-1!==e[1].indexOf(".webp",e[1].length-5))return-1}return 0});for(var d="",l=void 0,c=0;c=t?s():n=setTimeout(s,t)}}}function c(e){return null!==e&&"object"===(void 0===e?"undefined":p(e))}function h(e){if(!(e instanceof Object))return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}function f(e){for(var t=e.length,n=[],r=0;r0}}),!0)}(),A={event:"event",observer:"observer"},j=function(){function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}if(E)return"function"==typeof window.CustomEvent?window.CustomEvent:(e.prototype=window.Event.prototype,e)}(),z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return E?window.devicePixelRatio||e:e},I=function(){if(E){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t)}catch(e){}return e}}(),O={on:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];I?e.addEventListener(t,n,{capture:r,passive:!0}):e.addEventListener(t,n,r)},off:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e.removeEventListener(t,n,r)}},T=function(e,t,n){var r=new Image;if(!e||!e.src){var i=new Error("image src is required");return n(i)}r.src=e.src,r.onload=function(){t({naturalHeight:r.naturalHeight,naturalWidth:r.naturalWidth,src:r.src})},r.onerror=function(e){n(e)}},S=function(e,t){return"undefined"!=typeof getComputedStyle?getComputedStyle(e,null).getPropertyValue(t):e.style[t]},x=function(e){return S(e,"overflow")+S(e,"overflow-y")+S(e,"overflow-x")},$=function(e){if(E){if(!(e instanceof HTMLElement))return window;for(var t=e;t&&t!==document.body&&t!==document.documentElement&&t.parentNode;){if(/(scroll|auto)/.test(x(t)))return t;t=t.parentNode}return window}},C=function(){function e(t){var n=t.max;y(this,e),this.options={max:n||100},this._caches=[]}return b(e,[{key:"has",value:function(e){return this._caches.indexOf(e)>-1}},{key:"add",value:function(e){this.has(e)||(this._caches.push(e),this._caches.length>this.options.max&&this.free())}},{key:"free",value:function(){this._caches.shift()}}]),e}(),H=function(){function e(t){var n=t.el,r=t.src,i=t.error,o=t.loading,a=t.bindType,s=t.$parent,u=t.options,d=t.elRenderer,l=t.imageCache;y(this,e),this.el=n,this.src=r,this.error=i,this.loading=o,this.bindType=a,this.attempt=0,this.naturalHeight=0,this.naturalWidth=0,this.options=u,this.rect=null,this.$parent=s,this.elRenderer=d,this._imageCache=l,this.performanceData={init:Date.now(),loadStart:0,loadEnd:0},this.filter(),this.initState(),this.render("loading",!1)}return b(e,[{key:"initState",value:function(){"dataset"in this.el?this.el.dataset.src=this.src:this.el.setAttribute("data-src",this.src),this.state={loading:!1,error:!1,loaded:!1,rendered:!1}}},{key:"record",value:function(e){this.performanceData[e]=Date.now()}},{key:"update",value:function(e){var t=e.src,n=e.loading,r=e.error,i=this.src;this.src=t,this.loading=n,this.error=r,this.filter(),i!==this.src&&(this.attempt=0,this.initState())}},{key:"getRect",value:function(){this.rect=this.el.getBoundingClientRect()}},{key:"checkInView",value:function(){return this.getRect(),this.rect.topthis.options.preLoadTop&&this.rect.left0}},{key:"filter",value:function(){var e=this;h(this.options.filter).map(function(t){e.options.filter[t](e,e.options)})}},{key:"renderLoading",value:function(e){var t=this;this.state.loading=!0,T({src:this.loading},function(n){t.render("loading",!1),t.state.loading=!1,e()},function(){e(),t.state.loading=!1,t.options.silent||console.warn("VueLazyload log: load failed with loading image("+t.loading+")")})}},{key:"load",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v;return this.attempt>this.options.attempt-1&&this.state.error?(this.options.silent||console.log("VueLazyload log: "+this.src+" tried too more than "+this.options.attempt+" times"),void t()):this.state.rendered&&this.state.loaded?void 0:this._imageCache.has(this.src)?(this.state.loaded=!0,this.render("loaded",!0),this.state.rendered=!0,t()):void this.renderLoading(function(){e.attempt++,e.options.adapter.beforeLoad&&e.options.adapter.beforeLoad(e,e.options),e.record("loadStart"),T({src:e.src},function(n){e.naturalHeight=n.naturalHeight,e.naturalWidth=n.naturalWidth,e.state.loaded=!0,e.state.error=!1,e.record("loadEnd"),e.render("loaded",!1),e.state.rendered=!0,e._imageCache.add(e.src),t()},function(t){!e.options.silent&&console.error(t),e.state.error=!0,e.state.loaded=!1,e.render("error",!1)})})}},{key:"render",value:function(e,t){this.elRenderer(this,e,t)}},{key:"performance",value:function(){var e="loading",t=0;return this.state.loaded&&(e="loaded",t=(this.performanceData.loadEnd-this.performanceData.loadStart)/1e3),this.state.error&&(e="error"),{src:this.src,state:e,time:t}}},{key:"$destroy",value:function(){this.el=null,this.src=null,this.error=null,this.loading=null,this.bindType=null,this.attempt=0}}]),e}(),Q="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",R=["scroll","wheel","mousewheel","resize","animationend","transitionend","touchmove"],W={rootMargin:"0px",threshold:0},B=function(e){return function(){function t(e){var n=e.preLoad,r=e.error,i=e.throttleWait,o=e.preLoadTop,a=e.dispatchEvent,s=e.loading,u=e.attempt,c=e.silent,h=void 0===c||c,f=e.scale,v=e.listenEvents,p=(e.hasbind,e.filter),b=e.adapter,g=e.observer,m=e.observerOptions;y(this,t),this.version="1.3.3",this.mode=A.event,this.ListenerQueue=[],this.TargetIndex=0,this.TargetQueue=[],this.options={silent:h,dispatchEvent:!!a,throttleWait:i||200,preLoad:n||1.3,preLoadTop:o||0,error:r||Q,loading:s||Q,attempt:u||3,scale:f||z(f),ListenEvents:v||R,hasbind:!1,supportWebp:d(),filter:p||{},adapter:b||{},observer:!!g,observerOptions:m||W},this._initEvent(),this._imageCache=new C({max:200}),this.lazyLoadHandler=l(this._lazyLoadHandler.bind(this),this.options.throttleWait),this.setMode(this.options.observer?A.observer:A.event)}return b(t,[{key:"config",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_(this.options,e)}},{key:"performance",value:function(){var e=[];return this.ListenerQueue.map(function(t){e.push(t.performance())}),e}},{key:"addLazyBox",value:function(e){this.ListenerQueue.push(e),E&&(this._addListenerTarget(window),this._observer&&this._observer.observe(e.el),e.$el&&e.$el.parentNode&&this._addListenerTarget(e.$el.parentNode))}},{key:"add",value:function(t,n,r){var i=this;if(a(this.ListenerQueue,function(e){return e.el===t}))return this.update(t,n),e.nextTick(this.lazyLoadHandler);var o=this._valueFormatter(n.value),u=o.src,d=o.loading,l=o.error;e.nextTick(function(){u=s(t,i.options.scale)||u,i._observer&&i._observer.observe(t);var o=Object.keys(n.modifiers)[0],a=void 0;o&&(a=r.context.$refs[o],a=a?a.$el||a:document.getElementById(o)),a||(a=$(t));var c=new H({bindType:n.arg,$parent:a,el:t,loading:d,error:l,src:u,elRenderer:i._elRenderer.bind(i),options:i.options,imageCache:i._imageCache});i.ListenerQueue.push(c),E&&(i._addListenerTarget(window),i._addListenerTarget(a)),i.lazyLoadHandler(),e.nextTick(function(){return i.lazyLoadHandler()})})}},{key:"update",value:function(t,n,r){var i=this,o=this._valueFormatter(n.value),a=o.src,d=o.loading,l=o.error;a=s(t,this.options.scale)||a;var c=u(this.ListenerQueue,function(e){return e.el===t});c?c.update({src:a,loading:d,error:l}):this.add(t,n,r),this._observer&&(this._observer.unobserve(t),this._observer.observe(t)),this.lazyLoadHandler(),e.nextTick(function(){return i.lazyLoadHandler()})}},{key:"remove",value:function(e){if(e){this._observer&&this._observer.unobserve(e);var t=u(this.ListenerQueue,function(t){return t.el===e});t&&(this._removeListenerTarget(t.$parent),this._removeListenerTarget(window),o(this.ListenerQueue,t),t.$destroy())}}},{key:"removeComponent",value:function(e){e&&(o(this.ListenerQueue,e),this._observer&&this._observer.unobserve(e.el),e.$parent&&e.$el.parentNode&&this._removeListenerTarget(e.$el.parentNode),this._removeListenerTarget(window))}},{key:"setMode",value:function(e){var t=this;k||e!==A.observer||(e=A.event),this.mode=e,e===A.event?(this._observer&&(this.ListenerQueue.forEach(function(e){t._observer.unobserve(e.el)}),this._observer=null),this.TargetQueue.forEach(function(e){t._initListen(e.el,!0)})):(this.TargetQueue.forEach(function(e){t._initListen(e.el,!1)}),this._initIntersectionObserver())}},{key:"_addListenerTarget",value:function(e){if(e){var t=u(this.TargetQueue,function(t){return t.el===e});return t?t.childrenCount++:(t={el:e,id:++this.TargetIndex,childrenCount:1,listened:!0},this.mode===A.event&&this._initListen(t.el,!0),this.TargetQueue.push(t)),this.TargetIndex}}},{key:"_removeListenerTarget",value:function(e){var t=this;this.TargetQueue.forEach(function(n,r){n.el===e&&(--n.childrenCount||(t._initListen(n.el,!1),t.TargetQueue.splice(r,1),n=null))})}},{key:"_initListen",value:function(e,t){var n=this;this.options.ListenEvents.forEach(function(r){return O[t?"on":"off"](e,r,n.lazyLoadHandler)})}},{key:"_initEvent",value:function(){var e=this;this.Event={listeners:{loading:[],loaded:[],error:[]}},this.$on=function(t,n){e.Event.listeners[t]||(e.Event.listeners[t]=[]),e.Event.listeners[t].push(n)},this.$once=function(t,n){function r(){i.$off(t,r),n.apply(i,arguments)}var i=e;e.$on(t,r)},this.$off=function(t,n){if(!n){if(!e.Event.listeners[t])return;return void(e.Event.listeners[t].length=0)}o(e.Event.listeners[t],n)},this.$emit=function(t,n,r){e.Event.listeners[t]&&e.Event.listeners[t].forEach(function(e){return e(n,r)})}}},{key:"_lazyLoadHandler",value:function(){var e=this,t=[];this.ListenerQueue.forEach(function(e,n){e.el&&e.el.parentNode||t.push(e),e.checkInView()&&e.load()}),t.forEach(function(t){o(e.ListenerQueue,t),t.$destroy()})}},{key:"_initIntersectionObserver",value:function(){var e=this;k&&(this._observer=new IntersectionObserver(this._observerHandler.bind(this),this.options.observerOptions),this.ListenerQueue.length&&this.ListenerQueue.forEach(function(t){e._observer.observe(t.el)}))}},{key:"_observerHandler",value:function(e,t){var n=this;e.forEach(function(e){e.isIntersecting&&n.ListenerQueue.forEach(function(t){if(t.el===e.target){if(t.state.loaded)return n._observer.unobserve(t.el);t.load()}})})}},{key:"_elRenderer",value:function(e,t,n){if(e.el){var r=e.el,i=e.bindType,o=void 0;switch(t){case"loading":o=e.loading;break;case"error":o=e.error;break;default:o=e.src}if(i?r.style[i]='url("'+o+'")':r.getAttribute("src")!==o&&r.setAttribute("src",o),r.setAttribute("lazy",t),this.$emit(t,e,n),this.options.adapter[t]&&this.options.adapter[t](e,this.options),this.options.dispatchEvent){var a=new j(t,{detail:e});r.dispatchEvent(a)}}}},{key:"_valueFormatter",value:function(e){var t=e,n=this.options.loading,r=this.options.error;return c(e)&&(e.src||this.options.silent||console.error("Vue Lazyload warning: miss src with "+e),t=e.src,n=e.loading||this.options.loading,r=e.error||this.options.error),{src:t,loading:n,error:r}}}]),t}()},D=function(e){return{props:{tag:{type:String,default:"div"}},render:function(e){return!1===this.show?e(this.tag):e(this.tag,null,this.$slots.default)},data:function(){return{el:null,state:{loaded:!1},rect:{},show:!1}},mounted:function(){this.el=this.$el,e.addLazyBox(this),e.lazyLoadHandler()},beforeDestroy:function(){e.removeComponent(this)},methods:{getRect:function(){this.rect=this.$el.getBoundingClientRect()},checkInView:function(){return this.getRect(),E&&this.rect.top0&&this.rect.left0},load:function(){this.show=!0,this.state.loaded=!0,this.$emit("show",this)},destroy:function(){return this.$destroy}}}},V=function(){function e(t){var n=t.lazy;y(this,e),this.lazy=n,n.lazyContainerMananger=this,this._queue=[]}return b(e,[{key:"bind",value:function(e,t,n){var r=new P({el:e,binding:t,vnode:n,lazy:this.lazy});this._queue.push(r)}},{key:"update",value:function(e,t,n){var r=u(this._queue,function(t){return t.el===e});r&&r.update({el:e,binding:t,vnode:n})}},{key:"unbind",value:function(e,t,n){var r=u(this._queue,function(t){return t.el===e});r&&(r.clear(),o(this._queue,r))}}]),e}(),N={selector:"img"},P=function(){function e(t){var n=t.el,r=t.binding,i=t.vnode,o=t.lazy;y(this,e),this.el=null,this.vnode=i,this.binding=r,this.options={},this.lazy=o,this._queue=[],this.update({el:n,binding:r})}return b(e,[{key:"update",value:function(e){var t=this,n=e.el,r=e.binding;this.el=n,this.options=_({},N,r.value),this.getImgs().forEach(function(e){t.lazy.add(e,_({},t.binding,{value:{src:"dataset"in e?e.dataset.src:e.getAttribute("data-src"),error:("dataset"in e?e.dataset.error:e.getAttribute("data-error"))||t.options.error,loading:("dataset"in e?e.dataset.loading:e.getAttribute("data-loading"))||t.options.loading}}),t.vnode)})}},{key:"getImgs",value:function(){return f(this.el.querySelectorAll(this.options.selector))}},{key:"clear",value:function(){var e=this;this.getImgs().forEach(function(t){return e.lazy.remove(t)}),this.vnode=null,this.binding=null,this.lazy=null}}]),e}(),M=function(e){return{props:{src:[String,Object],tag:{type:String,default:"img"}},render:function(e){return e(this.tag,{attrs:{src:this.renderSrc}},this.$slots.default)},data:function(){return{el:null,options:{src:"",error:"",loading:"",attempt:e.options.attempt},state:{loaded:!1,error:!1,attempt:0},rect:{},renderSrc:""}},watch:{src:function(){this.init(),e.addLazyBox(this),e.lazyLoadHandler()}},created:function(){this.init(),this.renderSrc=this.options.loading},mounted:function(){this.el=this.$el,e.addLazyBox(this),e.lazyLoadHandler()},beforeDestroy:function(){e.removeComponent(this)},methods:{init:function(){var t=e._valueFormatter(this.src),n=t.src,r=t.loading,i=t.error;this.state.loaded=!1,this.options.src=n,this.options.error=i,this.options.loading=r,this.renderSrc=this.options.loading},getRect:function(){this.rect=this.$el.getBoundingClientRect()},checkInView:function(){return this.getRect(),E&&this.rect.top0&&this.rect.left0},load:function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v;if(this.state.attempt>this.options.attempt-1&&this.state.error)return e.options.silent||console.log("VueLazyload log: "+this.options.src+" tried too more than "+this.options.attempt+" times"),void n();var r=this.options.src;T({src:r},function(e){var n=e.src;t.renderSrc=n,t.state.loaded=!0},function(e){t.state.attempt++,t.renderSrc=t.options.error,t.state.error=!0})}}}};return{install:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=B(e),r=new n(t),i=new V({lazy:r}),o="2"===e.version.split(".")[0];e.prototype.$Lazyload=r,t.lazyComponent&&e.component("lazy-component",D(r)),t.lazyImage&&e.component("lazy-image",M(r)),o?(e.directive("lazy",{bind:r.add.bind(r),update:r.update.bind(r),componentUpdated:r.lazyLoadHandler.bind(r),unbind:r.remove.bind(r)}),e.directive("lazy-container",{bind:i.bind.bind(i),componentUpdated:i.update.bind(i),unbind:i.unbind.bind(i)})):(e.directive("lazy",{bind:r.lazyLoadHandler.bind(r),update:function(e,t){_(this.vm.$refs,this.vm.$els),r.add(this.el,{modifiers:this.modifiers||{},arg:this.arg,value:e,oldValue:t},{context:this.vm})},unbind:function(){r.remove(this.el)}}),e.directive("lazy-container",{update:function(e,t){i.update(this.el,{modifiers:this.modifiers||{},arg:this.arg,value:e,oldValue:t},{context:this.vm})},unbind:function(){i.unbind(this.el)}}))}}}); 7 | -------------------------------------------------------------------------------- /EPUBium Desktop/FrmChangeResource.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace EPUBium_Desktop 2 | { 3 | partial class FrmChangeResource 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.components = new System.ComponentModel.Container(); 32 | System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); 33 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmChangeResource)); 34 | System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); 35 | System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); 36 | this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); 37 | this.label2 = new System.Windows.Forms.Label(); 38 | this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); 39 | this.btnDefault = new System.Windows.Forms.Button(); 40 | this.btnUse = new System.Windows.Forms.Button(); 41 | this.btnOpenDir = new System.Windows.Forms.Button(); 42 | this.btnThemeDev = new System.Windows.Forms.Button(); 43 | this.label1 = new System.Windows.Forms.Label(); 44 | this.tblItems = new System.Windows.Forms.DataGridView(); 45 | this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn(); 46 | this.Column1 = new System.Windows.Forms.DataGridViewImageColumn(); 47 | this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); 48 | this.Column3 = new System.Windows.Forms.DataGridViewLinkColumn(); 49 | this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); 50 | this.mnuDevMode = new System.Windows.Forms.ContextMenuStrip(this.components); 51 | this.mnuThemeDevUseDir = new System.Windows.Forms.ToolStripMenuItem(); 52 | this.mnuThemeDevUseUrl = new System.Windows.Forms.ToolStripMenuItem(); 53 | this.tableLayoutPanel1.SuspendLayout(); 54 | this.tableLayoutPanel2.SuspendLayout(); 55 | ((System.ComponentModel.ISupportInitialize)(this.tblItems)).BeginInit(); 56 | this.mnuDevMode.SuspendLayout(); 57 | this.SuspendLayout(); 58 | // 59 | // tableLayoutPanel1 60 | // 61 | this.tableLayoutPanel1.AutoSize = true; 62 | this.tableLayoutPanel1.ColumnCount = 1; 63 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); 64 | this.tableLayoutPanel1.Controls.Add(this.label2, 0, 2); 65 | this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 0, 3); 66 | this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0); 67 | this.tableLayoutPanel1.Controls.Add(this.tblItems, 0, 1); 68 | this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; 69 | this.tableLayoutPanel1.Location = new System.Drawing.Point(20, 20); 70 | this.tableLayoutPanel1.Name = "tableLayoutPanel1"; 71 | this.tableLayoutPanel1.RowCount = 4; 72 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); 73 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); 74 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); 75 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 126F)); 76 | this.tableLayoutPanel1.Size = new System.Drawing.Size(786, 916); 77 | this.tableLayoutPanel1.TabIndex = 0; 78 | // 79 | // label2 80 | // 81 | this.label2.AutoSize = true; 82 | this.label2.Location = new System.Drawing.Point(3, 742); 83 | this.label2.Name = "label2"; 84 | this.label2.Size = new System.Drawing.Size(778, 48); 85 | this.label2.TabIndex = 3; 86 | this.label2.Text = "若主题包没有提供更换主题包的入口,您可以移动或删除正在使用的主题包来恢复到默认主题包"; 87 | // 88 | // tableLayoutPanel2 89 | // 90 | this.tableLayoutPanel2.ColumnCount = 2; 91 | this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); 92 | this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); 93 | this.tableLayoutPanel2.Controls.Add(this.btnDefault, 0, 0); 94 | this.tableLayoutPanel2.Controls.Add(this.btnUse, 1, 0); 95 | this.tableLayoutPanel2.Controls.Add(this.btnOpenDir, 0, 1); 96 | this.tableLayoutPanel2.Controls.Add(this.btnThemeDev, 1, 1); 97 | this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; 98 | this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 793); 99 | this.tableLayoutPanel2.Name = "tableLayoutPanel2"; 100 | this.tableLayoutPanel2.RowCount = 2; 101 | this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); 102 | this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); 103 | this.tableLayoutPanel2.Size = new System.Drawing.Size(780, 120); 104 | this.tableLayoutPanel2.TabIndex = 2; 105 | // 106 | // btnDefault 107 | // 108 | this.btnDefault.Dock = System.Windows.Forms.DockStyle.Fill; 109 | this.btnDefault.FlatStyle = System.Windows.Forms.FlatStyle.System; 110 | this.btnDefault.Location = new System.Drawing.Point(3, 3); 111 | this.btnDefault.Name = "btnDefault"; 112 | this.btnDefault.Size = new System.Drawing.Size(384, 54); 113 | this.btnDefault.TabIndex = 0; 114 | this.btnDefault.Text = "恢复默认"; 115 | this.btnDefault.UseVisualStyleBackColor = true; 116 | this.btnDefault.Click += new System.EventHandler(this.btnDefault_Click); 117 | // 118 | // btnUse 119 | // 120 | this.btnUse.Dock = System.Windows.Forms.DockStyle.Fill; 121 | this.btnUse.FlatStyle = System.Windows.Forms.FlatStyle.System; 122 | this.btnUse.Location = new System.Drawing.Point(393, 3); 123 | this.btnUse.Name = "btnUse"; 124 | this.btnUse.Size = new System.Drawing.Size(384, 54); 125 | this.btnUse.TabIndex = 0; 126 | this.btnUse.Text = "使用选中的主题包"; 127 | this.btnUse.UseVisualStyleBackColor = true; 128 | this.btnUse.Click += new System.EventHandler(this.btnUse_Click); 129 | // 130 | // btnOpenDir 131 | // 132 | this.btnOpenDir.Dock = System.Windows.Forms.DockStyle.Fill; 133 | this.btnOpenDir.FlatStyle = System.Windows.Forms.FlatStyle.System; 134 | this.btnOpenDir.Location = new System.Drawing.Point(3, 63); 135 | this.btnOpenDir.Name = "btnOpenDir"; 136 | this.btnOpenDir.Size = new System.Drawing.Size(384, 54); 137 | this.btnOpenDir.TabIndex = 1; 138 | this.btnOpenDir.Text = "打开主题包目录"; 139 | this.btnOpenDir.UseVisualStyleBackColor = true; 140 | this.btnOpenDir.Click += new System.EventHandler(this.btnOpenDir_Click); 141 | // 142 | // btnThemeDev 143 | // 144 | this.btnThemeDev.Dock = System.Windows.Forms.DockStyle.Fill; 145 | this.btnThemeDev.FlatStyle = System.Windows.Forms.FlatStyle.System; 146 | this.btnThemeDev.Location = new System.Drawing.Point(393, 63); 147 | this.btnThemeDev.Name = "btnThemeDev"; 148 | this.btnThemeDev.Size = new System.Drawing.Size(384, 54); 149 | this.btnThemeDev.TabIndex = 1; 150 | this.btnThemeDev.Text = "主题包开发模式"; 151 | this.btnThemeDev.UseVisualStyleBackColor = true; 152 | this.btnThemeDev.Click += new System.EventHandler(this.btnThemeDev_Click); 153 | // 154 | // label1 155 | // 156 | this.label1.AutoSize = true; 157 | this.label1.Location = new System.Drawing.Point(3, 0); 158 | this.label1.Name = "label1"; 159 | this.label1.Size = new System.Drawing.Size(778, 144); 160 | this.label1.TabIndex = 1; 161 | this.label1.Text = "\r\n通过使用主题包,您可以更改软件的外观,添加新的功能等。\r\n注意:主题包可以完全控制软件显示的内容和行为。因此请确认主题包的来源可信\r\n\r\n可用的主题包列表:"; 162 | this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 163 | // 164 | // tblItems 165 | // 166 | this.tblItems.AllowUserToAddRows = false; 167 | this.tblItems.AllowUserToDeleteRows = false; 168 | this.tblItems.AllowUserToResizeColumns = false; 169 | this.tblItems.AllowUserToResizeRows = false; 170 | this.tblItems.BackgroundColor = System.Drawing.Color.White; 171 | this.tblItems.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; 172 | this.tblItems.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; 173 | this.tblItems.ColumnHeadersVisible = false; 174 | this.tblItems.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { 175 | this.Column4, 176 | this.Column1, 177 | this.Column2, 178 | this.Column3}); 179 | this.tblItems.Dock = System.Windows.Forms.DockStyle.Fill; 180 | this.tblItems.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; 181 | this.tblItems.GridColor = System.Drawing.Color.White; 182 | this.tblItems.Location = new System.Drawing.Point(3, 147); 183 | this.tblItems.MultiSelect = false; 184 | this.tblItems.Name = "tblItems"; 185 | this.tblItems.ReadOnly = true; 186 | this.tblItems.RowHeadersVisible = false; 187 | this.tblItems.RowHeadersWidth = 82; 188 | this.tblItems.RowTemplate.Height = 192; 189 | this.tblItems.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; 190 | this.tblItems.Size = new System.Drawing.Size(780, 592); 191 | this.tblItems.TabIndex = 4; 192 | this.tblItems.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.tblItems_CellClick); 193 | this.tblItems.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.tblItems_CellContentClick); 194 | // 195 | // Column4 196 | // 197 | this.Column4.HeaderText = "Column4"; 198 | this.Column4.MinimumWidth = 10; 199 | this.Column4.Name = "Column4"; 200 | this.Column4.ReadOnly = true; 201 | this.Column4.Visible = false; 202 | this.Column4.Width = 200; 203 | // 204 | // Column1 205 | // 206 | dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; 207 | dataGridViewCellStyle4.BackColor = System.Drawing.Color.White; 208 | dataGridViewCellStyle4.ForeColor = System.Drawing.Color.Black; 209 | dataGridViewCellStyle4.NullValue = ((object)(resources.GetObject("dataGridViewCellStyle4.NullValue"))); 210 | dataGridViewCellStyle4.Padding = new System.Windows.Forms.Padding(32); 211 | dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); 212 | dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.Black; 213 | this.Column1.DefaultCellStyle = dataGridViewCellStyle4; 214 | this.Column1.HeaderText = "Column1"; 215 | this.Column1.Image = global::EPUBium_Desktop.Properties.Resources._default; 216 | this.Column1.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom; 217 | this.Column1.MinimumWidth = 10; 218 | this.Column1.Name = "Column1"; 219 | this.Column1.ReadOnly = true; 220 | this.Column1.Resizable = System.Windows.Forms.DataGridViewTriState.False; 221 | this.Column1.Width = 192; 222 | // 223 | // Column2 224 | // 225 | this.Column2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; 226 | dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; 227 | dataGridViewCellStyle5.BackColor = System.Drawing.Color.White; 228 | dataGridViewCellStyle5.ForeColor = System.Drawing.Color.Black; 229 | dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); 230 | dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.Black; 231 | dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; 232 | this.Column2.DefaultCellStyle = dataGridViewCellStyle5; 233 | this.Column2.HeaderText = "Column2"; 234 | this.Column2.MinimumWidth = 10; 235 | this.Column2.Name = "Column2"; 236 | this.Column2.ReadOnly = true; 237 | this.Column2.Resizable = System.Windows.Forms.DataGridViewTriState.False; 238 | // 239 | // Column3 240 | // 241 | dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.BottomRight; 242 | dataGridViewCellStyle6.BackColor = System.Drawing.Color.White; 243 | dataGridViewCellStyle6.ForeColor = System.Drawing.Color.Black; 244 | dataGridViewCellStyle6.Padding = new System.Windows.Forms.Padding(0, 0, 20, 20); 245 | dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); 246 | dataGridViewCellStyle6.SelectionForeColor = System.Drawing.Color.Black; 247 | this.Column3.DefaultCellStyle = dataGridViewCellStyle6; 248 | this.Column3.HeaderText = "Column3"; 249 | this.Column3.MinimumWidth = 10; 250 | this.Column3.Name = "Column3"; 251 | this.Column3.ReadOnly = true; 252 | this.Column3.Resizable = System.Windows.Forms.DataGridViewTriState.False; 253 | this.Column3.Width = 120; 254 | // 255 | // openFileDialog1 256 | // 257 | this.openFileDialog1.Filter = "资源包描述文件|meta.json|资源包图标|pack.png"; 258 | this.openFileDialog1.Title = "选择资源包的文件"; 259 | // 260 | // mnuDevMode 261 | // 262 | this.mnuDevMode.ImageScalingSize = new System.Drawing.Size(32, 32); 263 | this.mnuDevMode.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 264 | this.mnuThemeDevUseDir, 265 | this.mnuThemeDevUseUrl}); 266 | this.mnuDevMode.Name = "mnuDevMode"; 267 | this.mnuDevMode.Size = new System.Drawing.Size(301, 124); 268 | // 269 | // mnuThemeDevUseDir 270 | // 271 | this.mnuThemeDevUseDir.Name = "mnuThemeDevUseDir"; 272 | this.mnuThemeDevUseDir.Size = new System.Drawing.Size(300, 38); 273 | this.mnuThemeDevUseDir.Text = "使用本地文件夹"; 274 | this.mnuThemeDevUseDir.Click += new System.EventHandler(this.mnuThemeDevUseDir_Click); 275 | // 276 | // mnuThemeDevUseUrl 277 | // 278 | this.mnuThemeDevUseUrl.Name = "mnuThemeDevUseUrl"; 279 | this.mnuThemeDevUseUrl.Size = new System.Drawing.Size(300, 38); 280 | this.mnuThemeDevUseUrl.Text = "使用http路径"; 281 | this.mnuThemeDevUseUrl.Click += new System.EventHandler(this.mnuThemeDevUseUrl_Click); 282 | // 283 | // FrmChangeResource 284 | // 285 | this.AutoScaleDimensions = new System.Drawing.SizeF(192F, 192F); 286 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; 287 | this.ClientSize = new System.Drawing.Size(826, 956); 288 | this.Controls.Add(this.tableLayoutPanel1); 289 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow; 290 | this.MaximumSize = new System.Drawing.Size(852, 1027); 291 | this.MinimumSize = new System.Drawing.Size(852, 1027); 292 | this.Name = "FrmChangeResource"; 293 | this.Padding = new System.Windows.Forms.Padding(20); 294 | this.ShowInTaskbar = false; 295 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 296 | this.Text = "更换主题包"; 297 | this.Load += new System.EventHandler(this.FrmChangeResource_Load); 298 | this.tableLayoutPanel1.ResumeLayout(false); 299 | this.tableLayoutPanel1.PerformLayout(); 300 | this.tableLayoutPanel2.ResumeLayout(false); 301 | ((System.ComponentModel.ISupportInitialize)(this.tblItems)).EndInit(); 302 | this.mnuDevMode.ResumeLayout(false); 303 | this.ResumeLayout(false); 304 | this.PerformLayout(); 305 | 306 | } 307 | 308 | #endregion 309 | 310 | private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; 311 | private System.Windows.Forms.Label label1; 312 | private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; 313 | private System.Windows.Forms.Button btnDefault; 314 | private System.Windows.Forms.Button btnUse; 315 | private System.Windows.Forms.Label label2; 316 | private System.Windows.Forms.Button btnOpenDir; 317 | private System.Windows.Forms.Button btnThemeDev; 318 | private System.Windows.Forms.DataGridView tblItems; 319 | private System.Windows.Forms.DataGridViewTextBoxColumn Column4; 320 | private System.Windows.Forms.DataGridViewImageColumn Column1; 321 | private System.Windows.Forms.DataGridViewTextBoxColumn Column2; 322 | private System.Windows.Forms.DataGridViewLinkColumn Column3; 323 | private System.Windows.Forms.OpenFileDialog openFileDialog1; 324 | private System.Windows.Forms.ContextMenuStrip mnuDevMode; 325 | private System.Windows.Forms.ToolStripMenuItem mnuThemeDevUseDir; 326 | private System.Windows.Forms.ToolStripMenuItem mnuThemeDevUseUrl; 327 | } 328 | } --------------------------------------------------------------------------------