├── .gitattributes ├── .gitignore ├── CHANGELOG.md ├── IMAGES.md ├── LICENSE ├── MoonSub.sln ├── MoonSub ├── AboutForm.Designer.cs ├── AboutForm.cs ├── AboutForm.resx ├── App.config ├── Classes.cs ├── CookComputing.XmlRpcV2.dll ├── EmbeddedAssembly.cs ├── Enums.cs ├── MainForm.Designer.cs ├── MainForm.cs ├── MainForm.resx ├── MoonSub.csproj ├── Newtonsoft.Json.dll ├── Options.cs ├── OptionsForm.cs ├── OptionsForm.designer.cs ├── OptionsForm.resx ├── Program.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── Utilities.cs ├── moonsub.ico └── packages.config ├── README.md ├── images └── 1.PNG └── version.txt /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | bld/ 21 | [Bb]in/ 22 | [Oo]bj/ 23 | [Ll]og/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | # Uncomment if you have tasks that create the project's static files in wwwroot 28 | #wwwroot/ 29 | 30 | # MSTest test Results 31 | [Tt]est[Rr]esult*/ 32 | [Bb]uild[Ll]og.* 33 | 34 | # NUNIT 35 | *.VisualState.xml 36 | TestResult.xml 37 | 38 | # Build Results of an ATL Project 39 | [Dd]ebugPS/ 40 | [Rr]eleasePS/ 41 | dlldata.c 42 | 43 | # DNX 44 | project.lock.json 45 | project.fragment.lock.json 46 | artifacts/ 47 | 48 | *_i.c 49 | *_p.c 50 | *_i.h 51 | *.ilk 52 | *.meta 53 | *.obj 54 | *.pch 55 | *.pdb 56 | *.pgc 57 | *.pgd 58 | *.rsp 59 | *.sbr 60 | *.tlb 61 | *.tli 62 | *.tlh 63 | *.tmp 64 | *.tmp_proj 65 | *.log 66 | *.vspscc 67 | *.vssscc 68 | .builds 69 | *.pidb 70 | *.svclog 71 | *.scc 72 | 73 | # Chutzpah Test files 74 | _Chutzpah* 75 | 76 | # Visual C++ cache files 77 | ipch/ 78 | *.aps 79 | *.ncb 80 | *.opendb 81 | *.opensdf 82 | *.sdf 83 | *.cachefile 84 | *.VC.db 85 | *.VC.VC.opendb 86 | 87 | # Visual Studio profiler 88 | *.psess 89 | *.vsp 90 | *.vspx 91 | *.sap 92 | 93 | # TFS 2012 Local Workspace 94 | $tf/ 95 | 96 | # Guidance Automation Toolkit 97 | *.gpState 98 | 99 | # ReSharper is a .NET coding add-in 100 | _ReSharper*/ 101 | *.[Rr]e[Ss]harper 102 | *.DotSettings.user 103 | 104 | # JustCode is a .NET coding add-in 105 | .JustCode 106 | 107 | # TeamCity is a build add-in 108 | _TeamCity* 109 | 110 | # DotCover is a Code Coverage Tool 111 | *.dotCover 112 | 113 | # NCrunch 114 | _NCrunch_* 115 | .*crunch*.local.xml 116 | nCrunchTemp_* 117 | 118 | # MightyMoose 119 | *.mm.* 120 | AutoTest.Net/ 121 | 122 | # Web workbench (sass) 123 | .sass-cache/ 124 | 125 | # Installshield output folder 126 | [Ee]xpress/ 127 | 128 | # DocProject is a documentation generator add-in 129 | DocProject/buildhelp/ 130 | DocProject/Help/*.HxT 131 | DocProject/Help/*.HxC 132 | DocProject/Help/*.hhc 133 | DocProject/Help/*.hhk 134 | DocProject/Help/*.hhp 135 | DocProject/Help/Html2 136 | DocProject/Help/html 137 | 138 | # Click-Once directory 139 | publish/ 140 | 141 | # Publish Web Output 142 | *.[Pp]ublish.xml 143 | *.azurePubxml 144 | # TODO: Comment the next line if you want to checkin your web deploy settings 145 | # but database connection strings (with potential passwords) will be unencrypted 146 | #*.pubxml 147 | *.publishproj 148 | 149 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 150 | # checkin your Azure Web App publish settings, but sensitive information contained 151 | # in these scripts will be unencrypted 152 | PublishScripts/ 153 | 154 | # NuGet Packages 155 | *.nupkg 156 | # The packages folder can be ignored because of Package Restore 157 | **/packages/* 158 | # except build/, which is used as an MSBuild target. 159 | !**/packages/build/ 160 | # Uncomment if necessary however generally it will be regenerated when needed 161 | #!**/packages/repositories.config 162 | # NuGet v3's project.json files produces more ignoreable files 163 | *.nuget.props 164 | *.nuget.targets 165 | 166 | # Microsoft Azure Build Output 167 | csx/ 168 | *.build.csdef 169 | 170 | # Microsoft Azure Emulator 171 | ecf/ 172 | rcf/ 173 | 174 | # Windows Store app package directories and files 175 | AppPackages/ 176 | BundleArtifacts/ 177 | Package.StoreAssociation.xml 178 | _pkginfo.txt 179 | 180 | # Visual Studio cache files 181 | # files ending in .cache can be ignored 182 | *.[Cc]ache 183 | # but keep track of directories ending in .cache 184 | !*.[Cc]ache/ 185 | 186 | # Others 187 | ClientBin/ 188 | ~$* 189 | *~ 190 | *.dbmdl 191 | *.dbproj.schemaview 192 | *.jfm 193 | *.pfx 194 | *.publishsettings 195 | node_modules/ 196 | orleans.codegen.cs 197 | 198 | # Since there are multiple workflows, uncomment next line to ignore bower_components 199 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 200 | #bower_components/ 201 | 202 | # RIA/Silverlight projects 203 | Generated_Code/ 204 | 205 | # Backup & report files from converting an old project file 206 | # to a newer Visual Studio version. Backup files are not needed, 207 | # because we have git ;-) 208 | _UpgradeReport_Files/ 209 | Backup*/ 210 | UpgradeLog*.XML 211 | UpgradeLog*.htm 212 | 213 | # SQL Server files 214 | *.mdf 215 | *.ldf 216 | 217 | # Business Intelligence projects 218 | *.rdl.data 219 | *.bim.layout 220 | *.bim_*.settings 221 | 222 | # Microsoft Fakes 223 | FakesAssemblies/ 224 | 225 | # GhostDoc plugin setting file 226 | *.GhostDoc.xml 227 | 228 | # Node.js Tools for Visual Studio 229 | .ntvs_analysis.dat 230 | 231 | # Visual Studio 6 build log 232 | *.plg 233 | 234 | # Visual Studio 6 workspace options file 235 | *.opt 236 | 237 | # Visual Studio LightSwitch build output 238 | **/*.HTMLClient/GeneratedArtifacts 239 | **/*.DesktopClient/GeneratedArtifacts 240 | **/*.DesktopClient/ModelManifest.xml 241 | **/*.Server/GeneratedArtifacts 242 | **/*.Server/ModelManifest.xml 243 | _Pvt_Extensions 244 | 245 | # Paket dependency manager 246 | .paket/paket.exe 247 | paket-files/ 248 | 249 | # FAKE - F# Make 250 | .fake/ 251 | 252 | # JetBrains Rider 253 | .idea/ 254 | *.sln.iml 255 | 256 | # CodeRush 257 | .cr/ 258 | 259 | # Python Tools for Visual Studio (PTVS) 260 | __pycache__/ 261 | *.pyc -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # MoonSub Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [1.2] - 2017-10-22 6 | - Various bug fixes and improvements 7 | 8 | ## [1.1] - 2017-02-17 9 | - Minor bug fixes 10 | 11 | ## [1.0] - 2017-01-23 12 | - Initial release -------------------------------------------------------------------------------- /IMAGES.md: -------------------------------------------------------------------------------- 1 | ![alt](https://raw.githubusercontent.com/hellzerg/moonsub/master/images/1.PNG) -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | {one line to give the program's name and a brief idea of what it does.} 635 | Copyright (C) {year} {name of author} 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | {project} Copyright (C) {year} {fullname} 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /MoonSub.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MoonSub", "MoonSub\MoonSub.csproj", "{22202436-6A58-4461-B10A-0348BA6FCAD5}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {22202436-6A58-4461-B10A-0348BA6FCAD5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {22202436-6A58-4461-B10A-0348BA6FCAD5}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {22202436-6A58-4461-B10A-0348BA6FCAD5}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {22202436-6A58-4461-B10A-0348BA6FCAD5}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /MoonSub/AboutForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MoonSub 2 | { 3 | partial class AboutForm 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.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutForm)); 33 | this.l2 = new System.Windows.Forms.LinkLabel(); 34 | this.l1 = new System.Windows.Forms.Label(); 35 | this.button7 = new System.Windows.Forms.Button(); 36 | this.pictureBox1 = new System.Windows.Forms.PictureBox(); 37 | this.t1 = new System.Windows.Forms.Timer(this.components); 38 | this.t2 = new System.Windows.Forms.Timer(this.components); 39 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); 40 | this.SuspendLayout(); 41 | // 42 | // l2 43 | // 44 | this.l2.ActiveLinkColor = System.Drawing.Color.RoyalBlue; 45 | this.l2.AutoSize = true; 46 | this.l2.Font = new System.Drawing.Font("Segoe UI Semibold", 13.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 47 | this.l2.LinkColor = System.Drawing.Color.DodgerBlue; 48 | this.l2.Location = new System.Drawing.Point(128, 91); 49 | this.l2.Name = "l2"; 50 | this.l2.Size = new System.Drawing.Size(0, 32); 51 | this.l2.TabIndex = 64; 52 | this.l2.Tag = "themeable"; 53 | this.l2.VisitedLinkColor = System.Drawing.Color.DodgerBlue; 54 | this.l2.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.l2_LinkClicked); 55 | // 56 | // l1 57 | // 58 | this.l1.AutoSize = true; 59 | this.l1.Font = new System.Drawing.Font("Segoe UI Semibold", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 60 | this.l1.ForeColor = System.Drawing.Color.White; 61 | this.l1.Location = new System.Drawing.Point(128, 12); 62 | this.l1.Name = "l1"; 63 | this.l1.Size = new System.Drawing.Size(0, 32); 64 | this.l1.TabIndex = 63; 65 | // 66 | // button7 67 | // 68 | this.button7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 69 | this.button7.BackColor = System.Drawing.Color.DodgerBlue; 70 | this.button7.DialogResult = System.Windows.Forms.DialogResult.Cancel; 71 | this.button7.FlatAppearance.BorderColor = System.Drawing.Color.DodgerBlue; 72 | this.button7.FlatAppearance.MouseDownBackColor = System.Drawing.Color.RoyalBlue; 73 | this.button7.FlatAppearance.MouseOverBackColor = System.Drawing.Color.RoyalBlue; 74 | this.button7.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 75 | this.button7.ForeColor = System.Drawing.Color.White; 76 | this.button7.Location = new System.Drawing.Point(383, 15); 77 | this.button7.Name = "button7"; 78 | this.button7.Size = new System.Drawing.Size(89, 39); 79 | this.button7.TabIndex = 62; 80 | this.button7.Tag = "themeable"; 81 | this.button7.Text = "OK"; 82 | this.button7.UseVisualStyleBackColor = false; 83 | this.button7.Click += new System.EventHandler(this.button7_Click); 84 | // 85 | // pictureBox1 86 | // 87 | this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); 88 | this.pictureBox1.Location = new System.Drawing.Point(12, 15); 89 | this.pictureBox1.Name = "pictureBox1"; 90 | this.pictureBox1.Size = new System.Drawing.Size(110, 108); 91 | this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; 92 | this.pictureBox1.TabIndex = 61; 93 | this.pictureBox1.TabStop = false; 94 | // 95 | // t1 96 | // 97 | this.t1.Interval = 350; 98 | this.t1.Tick += new System.EventHandler(this.t1_Tick); 99 | // 100 | // t2 101 | // 102 | this.t2.Interval = 350; 103 | this.t2.Tick += new System.EventHandler(this.t2_Tick); 104 | // 105 | // AboutForm 106 | // 107 | this.AcceptButton = this.button7; 108 | this.AutoScaleDimensions = new System.Drawing.SizeF(120F, 120F); 109 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; 110 | this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); 111 | this.CancelButton = this.button7; 112 | this.ClientSize = new System.Drawing.Size(484, 135); 113 | this.Controls.Add(this.l2); 114 | this.Controls.Add(this.l1); 115 | this.Controls.Add(this.button7); 116 | this.Controls.Add(this.pictureBox1); 117 | this.Font = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 118 | this.ForeColor = System.Drawing.Color.White; 119 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; 120 | this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); 121 | this.MaximizeBox = false; 122 | this.MinimizeBox = false; 123 | this.Name = "AboutForm"; 124 | this.ShowIcon = false; 125 | this.ShowInTaskbar = false; 126 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 127 | this.Text = "About"; 128 | this.Load += new System.EventHandler(this.AboutForm_Load); 129 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); 130 | this.ResumeLayout(false); 131 | this.PerformLayout(); 132 | 133 | } 134 | 135 | #endregion 136 | 137 | private System.Windows.Forms.LinkLabel l2; 138 | private System.Windows.Forms.Label l1; 139 | private System.Windows.Forms.Button button7; 140 | private System.Windows.Forms.PictureBox pictureBox1; 141 | private System.Windows.Forms.Timer t1; 142 | private System.Windows.Forms.Timer t2; 143 | } 144 | } -------------------------------------------------------------------------------- /MoonSub/AboutForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Diagnostics; 6 | using System.Drawing; 7 | using System.Linq; 8 | using System.Text; 9 | using System.Threading.Tasks; 10 | using System.Windows.Forms; 11 | 12 | namespace MoonSub 13 | { 14 | public partial class AboutForm : Form 15 | { 16 | public AboutForm() 17 | { 18 | InitializeComponent(); 19 | Options.ApplyTheme(this); 20 | CheckForIllegalCrossThreadCalls = false; 21 | } 22 | 23 | private void AboutForm_Load(object sender, EventArgs e) 24 | { 25 | t1.Interval = 50; 26 | t2.Interval = 50; 27 | 28 | t1.Start(); 29 | } 30 | 31 | private void button7_Click(object sender, EventArgs e) 32 | { 33 | this.Close(); 34 | } 35 | 36 | private void t2_Tick(object sender, EventArgs e) 37 | { 38 | string s0 = ""; 39 | string s1 = "d"; 40 | string s2 = "de"; 41 | string s3 = "dea"; 42 | string s4 = "dead"; 43 | string s5 = "deadm"; 44 | string s6 = "deadmo"; 45 | string s7 = "deadmoo"; 46 | string s8 = "deadmoon"; 47 | string s9 = "deadmoon © "; 48 | string s10 = "deadmoon © 2"; 49 | string s11 = "deadmoon © 20"; 50 | string s12 = "deadmoon © 201"; 51 | string s13 = "deadmoon © 2017"; 52 | 53 | switch (l2.Text) 54 | { 55 | case "": 56 | l2.Text = s1; 57 | break; 58 | case "d": 59 | l2.Text = s2; 60 | break; 61 | case "de": 62 | l2.Text = s3; 63 | break; 64 | case "dea": 65 | l2.Text = s4; 66 | break; 67 | case "dead": 68 | l2.Text = s5; 69 | break; 70 | case "deadm": 71 | l2.Text = s6; 72 | break; 73 | case "deadmo": 74 | l2.Text = s7; 75 | break; 76 | case "deadmoo": 77 | l2.Text = s8; 78 | break; 79 | case "deadmoon": 80 | l2.Text = s9; 81 | break; 82 | case "deadmoon © ": 83 | l2.Text = s10; 84 | break; 85 | case "deadmoon © 2": 86 | l2.Text = s11; 87 | break; 88 | case "deadmoon © 20": 89 | l2.Text = s12; 90 | break; 91 | case "deadmoon © 201": 92 | l2.Text = s13; 93 | t2.Stop(); 94 | //t1.Start(); 95 | break; 96 | case "deadmoon © 2017": 97 | l2.Text = s0; 98 | break; 99 | } 100 | } 101 | 102 | private void l2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) 103 | { 104 | Process.Start("http://5.249.159.211/deadmoon"); 105 | } 106 | 107 | private void t1_Tick(object sender, EventArgs e) 108 | { 109 | const string s0 = ""; 110 | const string s1 = "M"; 111 | const string s2 = "Mo"; 112 | const string s3 = "Moo"; 113 | const string s4 = "Moon"; 114 | const string s5 = "MoonS"; 115 | const string s6 = "MoonSu"; 116 | const string s7 = "MoonSub"; 117 | 118 | switch (l1.Text) 119 | { 120 | case s0: 121 | l1.Text = s1; 122 | break; 123 | case s1: 124 | l1.Text = s2; 125 | break; 126 | case s2: 127 | l1.Text = s3; 128 | break; 129 | case s3: 130 | l1.Text = s4; 131 | break; 132 | case s4: 133 | l1.Text = s5; 134 | break; 135 | case s5: 136 | l1.Text = s6; 137 | break; 138 | case s6: 139 | l1.Text = s7; 140 | t1.Stop(); 141 | t2.Start(); 142 | break; 143 | case s7: 144 | l1.Text = s0; 145 | break; 146 | } 147 | } 148 | } 149 | } 150 | -------------------------------------------------------------------------------- /MoonSub/AboutForm.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 | 123 | iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 124 | YQUAAAAJcEhZcwAACxIAAAsSAdLdfvwAAASgSURBVHhe7ZFRDt02DARzyV621+iBWiDZAEU7tmSbIil7 125 | B5iv97wilz+MMcYYY4wxxhhjTA/+/OOvv6+oz8yu0FHvqDizC3TEJy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npoOLte1V8PDWfXq/rroeHselV/D2hAu07V3gca0q5T 139 | tfeBhrTrVO29oEE7egb9v6OqvBc0aCevQN93UXX3g4bt4F0oq4Oquyc0cLVPoLxKVXNfaOhKn0KZlarm 140 | 3tDgFUZB2RWq3v7Q8BVGQdkVqt49oAUyjYbeyFS17gMtkWk09EamqnUvaJEso6E3slSde0ILZRgNvZGl 141 | qtwTWijDaOiNDFXj3tBiGUZC+atVfe+AFlxtFJS9WtX2LmjR1UZAuatVZe+CFl3tUyhztarrndDCq70L 142 | Za1WNb0bWny1V6GM1aqeb0AFZDgDfbda1fItqIgs/wv9J0vV8U2okC+pGgyV83a1uvkNlfRGta4hqLA3 143 | qTXNCCpvd7WamYVK3FGtY+5Cpe6gxjdRUMkd1bhmFVR6BzWeyYQOka1GMdXQcVao50x36Hh3VJwxxhhj 144 | jDHGGGPMS/nx4x+n11vVKW8o7wAAAABJRU5ErkJggg== 145 | 146 | 147 | 148 | 608, 17 149 | 150 | 151 | 678, 17 152 | 153 | -------------------------------------------------------------------------------- /MoonSub/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /MoonSub/Classes.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.ComponentModel; 3 | using CookComputing.XmlRpc; 4 | using System.IO; 5 | using System; 6 | using System.Windows.Forms; 7 | 8 | namespace MoonSub 9 | { 10 | public class imdbdata 11 | { 12 | [XmlRpcMissingMapping(MappingAction.Ignore)] 13 | public string year { get; set; } 14 | [XmlRpcMissingMapping(MappingAction.Ignore)] 15 | public string id { get; set; } 16 | [XmlRpcMissingMapping(MappingAction.Ignore)] 17 | public string duration { get; set; } 18 | [XmlRpcMissingMapping(MappingAction.Ignore)] 19 | public string[] certification { get; set; } 20 | [XmlRpcMissingMapping(MappingAction.Ignore)] 21 | public string cover { get; set; } 22 | [XmlRpcMissingMapping(MappingAction.Ignore)] 23 | public XmlRpcStruct cast { get; set; } 24 | [XmlRpcMissingMapping(MappingAction.Ignore)] 25 | public string[] genres { get; set; } 26 | [XmlRpcMissingMapping(MappingAction.Ignore)] 27 | public string[] aka { get; set; } 28 | [XmlRpcMissingMapping(MappingAction.Ignore)] 29 | public string plot { get; set; } 30 | [XmlRpcMissingMapping(MappingAction.Ignore)] 31 | public string title { get; set; } 32 | [XmlRpcMissingMapping(MappingAction.Ignore)] 33 | public string trivia { get; set; } 34 | [XmlRpcMissingMapping(MappingAction.Ignore)] 35 | public string rating { get; set; } 36 | [XmlRpcMissingMapping(MappingAction.Ignore)] 37 | public XmlRpcStruct directors { get; set; } 38 | [XmlRpcMissingMapping(MappingAction.Ignore)] 39 | public string tagline { get; set; } 40 | [XmlRpcMissingMapping(MappingAction.Ignore)] 41 | public string votes { get; set; } 42 | [XmlRpcMissingMapping(MappingAction.Ignore)] 43 | public string[] country { get; set; } 44 | [XmlRpcMissingMapping(MappingAction.Ignore)] 45 | public string goofs { get; set; } 46 | [XmlRpcMissingMapping(MappingAction.Ignore)] 47 | public string[] language { get; set; } 48 | [XmlRpcMissingMapping(MappingAction.Ignore)] 49 | public XmlRpcStruct writers { get; set; } 50 | } 51 | 52 | 53 | public class subRes 54 | { 55 | public string IDSubtitle { get; set; } 56 | public string IDSubtitleFile { get; set; } 57 | public string SubAuthorComment { get; set; } 58 | public string LanguageName { get; set; } 59 | public string UserID { get; set; } 60 | public string MovieNameEng { get; set; } 61 | public string MovieByteSize { get; set; } 62 | public string IDMovie { get; set; } 63 | public string MovieYear { get; set; } 64 | public string SubHash { get; set; } 65 | public string MovieHash { get; set; } 66 | public string SubFormat { get; set; } 67 | public string SubBad { get; set; } 68 | public string SubDownloadsCnt { get; set; } 69 | public string SubLanguageID { get; set; } 70 | public string IDMovieImdb { get; set; } 71 | public string MovieTimeMS { get; set; } 72 | public string SubActualCD { get; set; } 73 | public string MovieReleaseName { get; set; } 74 | public string SubRating { get; set; } 75 | public string SubDownloadLink { get; set; } 76 | public string ZipDownloadLink { get; set; } 77 | public string IDSubMovieFile { get; set; } 78 | public string ISO639 { get; set; } 79 | public string SubSumCD { get; set; } 80 | public string SubSize { get; set; } 81 | public string UserNickName { get; set; } 82 | public string SubAddDate { get; set; } 83 | public string MovieName { get; set; } 84 | public string MovieImdbRating { get; set; } 85 | public string SubFileName { get; set; } 86 | } 87 | 88 | public class subrt 89 | { 90 | public subRes[] data { get; set; } 91 | public double seconds { get; set; } 92 | } 93 | 94 | public class subInfo 95 | { 96 | [XmlRpcMissingMapping(MappingAction.Ignore)] 97 | public string sublanguageid { get; set; } 98 | public string moviehash { get; set; } 99 | public string moviebytesize { get; set; } 100 | [XmlRpcMissingMapping(MappingAction.Ignore)] 101 | public string imdbid { get; set; } 102 | } 103 | 104 | public class imdbheader 105 | { 106 | [XmlRpcMissingMapping(MappingAction.Ignore)] 107 | public double seconds { get; set; } 108 | [XmlRpcMissingMapping(MappingAction.Ignore)] 109 | public imdbdata data; 110 | } 111 | 112 | public class subdata 113 | { 114 | public string status { get; set; } 115 | [XmlRpcMissingMapping(MappingAction.Ignore)] 116 | public subtitle[] data; 117 | public double seconds { get; set; } 118 | } 119 | 120 | public class subtitle 121 | { 122 | public string idsubtitlefile { get; set; } 123 | public string data { get; set; } 124 | } 125 | 126 | public class MovieFile 127 | { 128 | public byte[] cover { get; set; } 129 | public string hash { get; set; } 130 | public string filename { get; set; } 131 | public string originalfilename { get; set; } 132 | public string originalfolder { get; set; } 133 | public subRes subRes { get; set; } 134 | public byte[] subtitle { get; set; } 135 | public string subtitleId { get; set; } 136 | public string oldSubtitle { get; set; } 137 | public imdbdata imdbinfo { get; set; } 138 | public string oldSubtitleLang { get; set; } 139 | public string GetSubtitleFileName() 140 | { 141 | return Path.GetDirectoryName(filename) + "\\" + Path.GetFileNameWithoutExtension(filename) + "." + subRes.ISO639 + "." + subRes.SubFormat; 142 | } 143 | 144 | public string GetName() 145 | { 146 | return Path.GetFileNameWithoutExtension(filename); 147 | } 148 | 149 | public void saveSubtitle(bool overwrite) 150 | { 151 | string filenameToWrite = GetSubtitleFileName(); 152 | if (File.Exists(filenameToWrite)) 153 | { 154 | if (overwrite) 155 | { 156 | File.Delete(filenameToWrite); 157 | } 158 | else 159 | { 160 | return; 161 | } 162 | } 163 | FileStream fStream = new FileStream(GetSubtitleFileName(), FileMode.CreateNew); 164 | 165 | BinaryWriter bw = new BinaryWriter(fStream); 166 | 167 | bw.Write(subtitle); 168 | 169 | bw.Close(); 170 | 171 | fStream.Close(); 172 | } 173 | 174 | public void getOldSubtitle(List subtitleFormats, List theLangMap, string langSeq) 175 | { 176 | List langSeqSplit = new List(langSeq.Split(',')); 177 | FileInfo myf = new FileInfo(filename); 178 | string[] theFiles = Directory.GetFiles(myf.DirectoryName, Path.GetFileNameWithoutExtension(filename) + ".*"); 179 | 180 | string bestOldSubFile = ""; 181 | string bestOldSubFileLang = ""; 182 | 183 | foreach (string file in theFiles) 184 | { 185 | if (file == filename) { continue; } 186 | string ext = Path.GetExtension(file); 187 | if (subtitleFormats.Contains(ext.Replace(".", ""))) 188 | { 189 | if ((langSeqSplit.Count == 1) || (langSeqSplit.Contains("el") && (langSeqSplit.Count == 2))) 190 | { 191 | if (file.Contains(langSeqSplit[0])) 192 | { 193 | bestOldSubFile = file; 194 | } 195 | } 196 | else 197 | { 198 | string l = Utilities.parseLangCodeFromFile(file, theLangMap); 199 | if (bestOldSubFile == "") 200 | { 201 | bestOldSubFile = file; 202 | if (l != "") { bestOldSubFileLang = l; } 203 | continue; 204 | } 205 | if ((l != "") && (langSeqSplit.IndexOf(l) != -1)) 206 | { 207 | if (bestOldSubFileLang == "") 208 | { 209 | bestOldSubFileLang = l; 210 | bestOldSubFile = file; 211 | continue; 212 | } 213 | if (langSeqSplit.IndexOf(l) < langSeqSplit.IndexOf(bestOldSubFileLang)) 214 | { 215 | bestOldSubFile = file; 216 | bestOldSubFileLang = l; 217 | } 218 | } 219 | } 220 | } 221 | } 222 | oldSubtitle = bestOldSubFile; 223 | oldSubtitleLang = bestOldSubFileLang; 224 | 225 | if ((langSeqSplit.Count == 1) || (langSeqSplit.Contains("el") && (langSeqSplit.Count == 2))) 226 | { 227 | if (!oldSubtitle.Contains(langSeqSplit[0])) 228 | { 229 | oldSubtitle = ""; 230 | oldSubtitleLang = ""; 231 | } 232 | } 233 | } 234 | 235 | public bool SelectBestSubtitle(BindingList subs, List ls) 236 | { 237 | subRes best = null; 238 | foreach (subRes tr in subs) 239 | { 240 | if (hash == tr.MovieHash) 241 | { 242 | if (best == null) { best = tr; continue; } 243 | if (ls.IndexOf(tr.SubLanguageID) < ls.IndexOf(best.SubLanguageID)) 244 | { 245 | best = tr; 246 | } 247 | } 248 | } 249 | if (best != null) 250 | { 251 | foreach (subRes tr in subs) 252 | { 253 | if (hash == tr.MovieHash) 254 | { 255 | if (best.SubLanguageID == tr.SubLanguageID) 256 | { 257 | try 258 | { 259 | if (float.Parse(tr.SubRating) > float.Parse(best.SubRating)) 260 | { 261 | best = tr; 262 | } 263 | } 264 | catch (Exception ex) 265 | { 266 | 267 | } 268 | } 269 | } 270 | } 271 | } 272 | if (best != null) 273 | { 274 | subtitleId = best.IDSubtitleFile; 275 | subRes = best; 276 | return true; 277 | } 278 | return false; 279 | } 280 | 281 | public void rename(string FileFormat, string CDFormat) 282 | { 283 | if (subRes != null) 284 | { 285 | string cdStr = ""; 286 | if (subRes.SubActualCD == "1") 287 | { 288 | if (subRes.SubSumCD != "1") 289 | { 290 | cdStr = CDFormat.Replace("%C", "1"); 291 | } 292 | } 293 | else if (subRes.SubActualCD != "") 294 | { 295 | cdStr = CDFormat.Replace("%C", subRes.SubActualCD); 296 | } 297 | 298 | if (subRes.MovieName != "") 299 | { 300 | string newName = Path.GetDirectoryName(filename) + "\\" + FileFormat + Path.GetExtension(filename); 301 | newName = newName.Replace("%M", Utilities.FilenameFromTitle(subRes.MovieName)); 302 | newName = newName.Replace("%Y", subRes.MovieYear); 303 | newName = newName.Replace("%C", cdStr); 304 | 305 | if (!File.Exists(newName)) 306 | { 307 | try 308 | { 309 | File.Move(filename, newName); 310 | originalfilename = Path.GetFileName(filename); 311 | filename = newName; 312 | } 313 | catch (Exception ex) 314 | { 315 | Console.WriteLine("Error renaming movie: " + filename + "\n" + ex.Message); 316 | } 317 | } 318 | } 319 | } 320 | } 321 | 322 | public void newFolder(string rootFolder, string FolderFormat) 323 | { 324 | if (subRes != null) 325 | { 326 | if (subRes.MovieName != "") 327 | { 328 | string newName = rootFolder + "\\" + FolderFormat; 329 | newName = newName.Replace("%M", Utilities.FilenameFromTitle(subRes.MovieName)); 330 | newName = newName.Replace("%Y", subRes.MovieYear); 331 | if (!Directory.Exists(newName)) 332 | { 333 | try 334 | { 335 | Directory.CreateDirectory(newName); 336 | } 337 | catch (Exception ex) 338 | { 339 | Console.WriteLine("Could not create directory: " + filename + "\n" + ex.Message); 340 | } 341 | } 342 | if (Path.GetDirectoryName(filename) != newName) 343 | { 344 | try 345 | { 346 | originalfolder = Path.GetDirectoryName(filename); 347 | File.Move(filename, newName + "\\" + Path.GetFileName(filename)); 348 | filename = newName + "\\" + Path.GetFileName(filename); 349 | 350 | if (File.Exists(rootFolder + "\\" + Path.GetFileNameWithoutExtension(filename) + ".jpg")) 351 | { 352 | File.Move(rootFolder + "\\" + Path.GetFileNameWithoutExtension(filename) + ".jpg", newName + "\\" + Path.GetFileNameWithoutExtension(filename) + ".jpg"); 353 | } 354 | if (File.Exists(rootFolder + "\\" + "folder.jpg")) 355 | { 356 | File.Move(rootFolder + "\\" + "folder.jpg", newName + "\\folder.jpg"); 357 | } 358 | } 359 | catch (Exception ex) 360 | { 361 | Console.WriteLine("Could not move file to new directory: " + filename + "\n" + ex.Message); 362 | } 363 | } 364 | 365 | } 366 | } 367 | } 368 | 369 | public void saveNfo() 370 | { 371 | try 372 | { 373 | if (subRes != null) 374 | { 375 | List lstNfo = new List(); 376 | lstNfo.Add("Name: " + subRes.MovieName); 377 | lstNfo.Add("Year: " + subRes.MovieYear); 378 | lstNfo.Add("URL: " + "http://www.imdb.com/title/tt0" + subRes.IDMovieImdb); 379 | lstNfo.Add("Rating: " + subRes.MovieImdbRating); 380 | 381 | if (imdbinfo != null) 382 | { 383 | addCSV("Directors", imdbinfo.directors.Values, lstNfo); 384 | addCSV("Cast", imdbinfo.cast.Values, lstNfo); 385 | addCSV("Genres", imdbinfo.genres, lstNfo); 386 | addString("Duration", imdbinfo.duration, lstNfo); 387 | addString("Plot", imdbinfo.plot, lstNfo); 388 | addCSV("Languages", imdbinfo.language, lstNfo); 389 | addCSV("Countries", imdbinfo.country, lstNfo); 390 | addCSV("Aka", imdbinfo.aka, lstNfo); 391 | 392 | // null reference exception 393 | // addCSV("Writers", imdbinfo.writers.Values, lstNfo); 394 | 395 | addString("Tagline", imdbinfo.tagline, lstNfo); 396 | addString("Goofs", imdbinfo.goofs, lstNfo); 397 | addString("Trivia", imdbinfo.trivia, lstNfo); 398 | addCSV("Certification", imdbinfo.certification, lstNfo); 399 | } 400 | 401 | if ((originalfilename != null) && (originalfilename != filename)) 402 | { 403 | lstNfo.Add("Original File: " + originalfilename); 404 | } 405 | 406 | if ((originalfolder != null) && (originalfolder != Path.GetDirectoryName(filename))) 407 | { 408 | lstNfo.Add("Original Folder: " + originalfolder); 409 | } 410 | 411 | lstNfo.Add("IMDB ID: " + subRes.IDMovieImdb); 412 | lstNfo.Add("Hash: " + subRes.MovieHash); 413 | lstNfo.Add("Release: " + subRes.MovieReleaseName); 414 | lstNfo.Add("CD: " + subRes.SubActualCD + "/" + subRes.SubSumCD); 415 | lstNfo.Add("Subtitle Used: " + subRes.ZipDownloadLink); 416 | lstNfo.Add("Subtitle Hash: " + subRes.SubHash); 417 | string nfoFileName = Path.GetDirectoryName(filename) + "\\" + Path.GetFileNameWithoutExtension(filename) + ".txt"; 418 | 419 | if (File.Exists(nfoFileName)) { File.Delete(nfoFileName); } 420 | using (StreamWriter writer = File.AppendText(nfoFileName)) 421 | { 422 | foreach (string line in lstNfo) 423 | { 424 | writer.WriteLine(line); 425 | } 426 | } 427 | } 428 | } 429 | catch (Exception ex) 430 | { 431 | Console.WriteLine("Error writing NFO file: " + filename + " ERROR: " + ex.Message); 432 | } 433 | } 434 | 435 | private void addString(string Title, string Value, List lstNfo) 436 | { 437 | if ((Value != null) && (Value != "")) 438 | { 439 | lstNfo.Add(Title + ": " + Value); 440 | } 441 | } 442 | 443 | private string addCSV(string title, System.Collections.ICollection array, List lstNfo) 444 | { 445 | string s = ""; 446 | if ((array != null) && (array.Count > 0)) 447 | { 448 | foreach (string a in array) 449 | { 450 | if (!string.IsNullOrEmpty(a)) 451 | { 452 | s = s + ", " + a; 453 | } 454 | } 455 | s = s.Substring(1); 456 | lstNfo.Add(title + ": " + s); 457 | } 458 | return s; 459 | } 460 | 461 | private string addCSV(string title, string[] array, List lstNfo) 462 | { 463 | string s = ""; 464 | if (array != null) 465 | { 466 | foreach (string a in array) 467 | { 468 | s = s + "," + a; 469 | } 470 | s = s.Substring(1); 471 | lstNfo.Add(title + ": " + s); 472 | } 473 | return s; 474 | } 475 | } 476 | 477 | public interface IOSDb : IXmlRpcProxy 478 | { 479 | [XmlRpcMethod("ServerInfo")] 480 | XmlRpcStruct ServerInfo(); 481 | 482 | [XmlRpcMethod("LogIn")] 483 | XmlRpcStruct LogIn(string username, string password, string language, string useragent); 484 | 485 | [XmlRpcMethod("LogOut")] 486 | XmlRpcStruct LogOut(string token); 487 | 488 | [XmlRpcMethod("SearchSubtitles")] 489 | subrt SearchSubtitles(string token, subInfo[] subs); 490 | 491 | [XmlRpcMethod("DownloadSubtitles")] 492 | subdata DownloadSubtitles(string token, string[] subs); 493 | 494 | [XmlRpcMethod("GetIMDBMovieDetails")] 495 | imdbheader GetIMDBMovieDetails(string token, string imdbid); 496 | } 497 | 498 | public class langMap 499 | { 500 | public string two { get; set; } 501 | public string three { get; set; } 502 | public string desc { get; set; } 503 | 504 | public langMap(string ttwo, string tthree, string tdesc) 505 | { 506 | two = ttwo; 507 | three = tthree; 508 | desc = tdesc; 509 | } 510 | } 511 | } 512 | -------------------------------------------------------------------------------- /MoonSub/CookComputing.XmlRpcV2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hellzerg/moonsub/6f2d0b12b96efe550bcb01dcd92959bff6327b01/MoonSub/CookComputing.XmlRpcV2.dll -------------------------------------------------------------------------------- /MoonSub/EmbeddedAssembly.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Reflection; 7 | using System.IO; 8 | using System.Security.Cryptography; 9 | 10 | namespace MoonSub 11 | { 12 | public class EmbeddedAssembly 13 | { 14 | private static Dictionary dic; 15 | 16 | public static void Load(string embeddedResource, string fileName) 17 | { 18 | if (dic == null) 19 | dic = new Dictionary(); 20 | 21 | byte[] ba = null; 22 | Assembly asm = null; 23 | var curAsm = Assembly.GetExecutingAssembly(); 24 | 25 | using (var stm = curAsm.GetManifestResourceStream(embeddedResource)) 26 | { 27 | if (stm == null) 28 | throw new Exception(embeddedResource + " is not found in Embedded Resources."); 29 | 30 | ba = new byte[(int)stm.Length]; 31 | stm.Read(ba, 0, (int)stm.Length); 32 | try 33 | { 34 | asm = Assembly.Load(ba); 35 | 36 | dic.Add(asm.FullName, asm); 37 | return; 38 | } 39 | catch { } 40 | } 41 | 42 | var fileOk = false; 43 | var tempFile = ""; 44 | 45 | using (var sha1 = new SHA1CryptoServiceProvider()) 46 | { 47 | var fileHash = BitConverter.ToString(sha1.ComputeHash(ba)).Replace("-", string.Empty); 48 | ; 49 | 50 | tempFile = Path.GetTempPath() + fileName; 51 | 52 | if (File.Exists(tempFile)) 53 | { 54 | var bb = File.ReadAllBytes(tempFile); 55 | var fileHash2 = BitConverter.ToString(sha1.ComputeHash(bb)).Replace("-", string.Empty); 56 | 57 | if (fileHash == fileHash2) 58 | { 59 | fileOk = true; 60 | } 61 | } 62 | else 63 | { 64 | fileOk = false; 65 | } 66 | } 67 | 68 | if (!fileOk) 69 | { 70 | File.WriteAllBytes(tempFile, ba); 71 | } 72 | 73 | asm = Assembly.LoadFile(tempFile); 74 | 75 | dic.Add(asm.FullName, asm); 76 | } 77 | 78 | public static Assembly Get(string assemblyFullName) 79 | { 80 | if (dic == null || dic.Count == 0) 81 | return null; 82 | 83 | if (dic.ContainsKey(assemblyFullName)) 84 | return dic[assemblyFullName]; 85 | 86 | return null; 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /MoonSub/Enums.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MoonSub 8 | { 9 | public enum Theme 10 | { 11 | Zerg, 12 | Ocean, 13 | Caramel, 14 | Magma, 15 | Lime, 16 | Minimal 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /MoonSub/MainForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MoonSub 2 | { 3 | partial class MainForm 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 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); 32 | this.topPanel = new System.Windows.Forms.Panel(); 33 | this.bittxt = new System.Windows.Forms.Label(); 34 | this.ostxt = new System.Windows.Forms.Label(); 35 | this.pictureBox1 = new System.Windows.Forms.PictureBox(); 36 | this.lblversion = new System.Windows.Forms.Label(); 37 | this.label2 = new System.Windows.Forms.Label(); 38 | this.botPanel = new System.Windows.Forms.Panel(); 39 | this.label3 = new System.Windows.Forms.Label(); 40 | this.label1 = new System.Windows.Forms.Label(); 41 | this.button4 = new System.Windows.Forms.Button(); 42 | this.checkOrganize = new System.Windows.Forms.CheckBox(); 43 | this.checkData = new System.Windows.Forms.CheckBox(); 44 | this.button3 = new System.Windows.Forms.Button(); 45 | this.checkNew = new System.Windows.Forms.CheckBox(); 46 | this.checkRename = new System.Windows.Forms.CheckBox(); 47 | this.panel2 = new System.Windows.Forms.Panel(); 48 | this.infoBox = new System.Windows.Forms.ListBox(); 49 | this.button2 = new System.Windows.Forms.Button(); 50 | this.txtInput = new System.Windows.Forms.TextBox(); 51 | this.button1 = new System.Windows.Forms.Button(); 52 | this.lblPriority = new System.Windows.Forms.Label(); 53 | this.panel1 = new System.Windows.Forms.Panel(); 54 | this.languageList = new System.Windows.Forms.CheckedListBox(); 55 | this.topPanel.SuspendLayout(); 56 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); 57 | this.botPanel.SuspendLayout(); 58 | this.panel2.SuspendLayout(); 59 | this.panel1.SuspendLayout(); 60 | this.SuspendLayout(); 61 | // 62 | // topPanel 63 | // 64 | this.topPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 65 | this.topPanel.Controls.Add(this.bittxt); 66 | this.topPanel.Controls.Add(this.ostxt); 67 | this.topPanel.Controls.Add(this.pictureBox1); 68 | this.topPanel.Controls.Add(this.lblversion); 69 | this.topPanel.Controls.Add(this.label2); 70 | this.topPanel.Dock = System.Windows.Forms.DockStyle.Top; 71 | this.topPanel.Location = new System.Drawing.Point(0, 0); 72 | this.topPanel.Margin = new System.Windows.Forms.Padding(2); 73 | this.topPanel.Name = "topPanel"; 74 | this.topPanel.Size = new System.Drawing.Size(964, 77); 75 | this.topPanel.TabIndex = 8; 76 | // 77 | // bittxt 78 | // 79 | this.bittxt.AutoSize = true; 80 | this.bittxt.ForeColor = System.Drawing.Color.Silver; 81 | this.bittxt.Location = new System.Drawing.Point(224, 46); 82 | this.bittxt.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); 83 | this.bittxt.Name = "bittxt"; 84 | this.bittxt.Size = new System.Drawing.Size(56, 20); 85 | this.bittxt.TabIndex = 6; 86 | this.bittxt.Text = "bitness"; 87 | // 88 | // ostxt 89 | // 90 | this.ostxt.AutoSize = true; 91 | this.ostxt.ForeColor = System.Drawing.Color.Silver; 92 | this.ostxt.Location = new System.Drawing.Point(224, 26); 93 | this.ostxt.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); 94 | this.ostxt.Name = "ostxt"; 95 | this.ostxt.Size = new System.Drawing.Size(24, 20); 96 | this.ostxt.TabIndex = 5; 97 | this.ostxt.Text = "os"; 98 | // 99 | // pictureBox1 100 | // 101 | this.pictureBox1.Cursor = System.Windows.Forms.Cursors.Hand; 102 | this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); 103 | this.pictureBox1.Location = new System.Drawing.Point(12, 12); 104 | this.pictureBox1.Margin = new System.Windows.Forms.Padding(2); 105 | this.pictureBox1.Name = "pictureBox1"; 106 | this.pictureBox1.Size = new System.Drawing.Size(55, 54); 107 | this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; 108 | this.pictureBox1.TabIndex = 2; 109 | this.pictureBox1.TabStop = false; 110 | this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click); 111 | // 112 | // lblversion 113 | // 114 | this.lblversion.AutoSize = true; 115 | this.lblversion.ForeColor = System.Drawing.Color.Silver; 116 | this.lblversion.Location = new System.Drawing.Point(90, 46); 117 | this.lblversion.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); 118 | this.lblversion.Name = "lblversion"; 119 | this.lblversion.Size = new System.Drawing.Size(64, 20); 120 | this.lblversion.TabIndex = 4; 121 | this.lblversion.Text = "Version:"; 122 | // 123 | // label2 124 | // 125 | this.label2.AutoSize = true; 126 | this.label2.Font = new System.Drawing.Font("Segoe UI Semibold", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 127 | this.label2.ForeColor = System.Drawing.Color.White; 128 | this.label2.Location = new System.Drawing.Point(88, 9); 129 | this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); 130 | this.label2.Name = "label2"; 131 | this.label2.Size = new System.Drawing.Size(120, 32); 132 | this.label2.TabIndex = 3; 133 | this.label2.Text = "MoonSub"; 134 | // 135 | // botPanel 136 | // 137 | this.botPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 138 | this.botPanel.Controls.Add(this.label3); 139 | this.botPanel.Controls.Add(this.label1); 140 | this.botPanel.Controls.Add(this.button4); 141 | this.botPanel.Controls.Add(this.checkOrganize); 142 | this.botPanel.Controls.Add(this.checkData); 143 | this.botPanel.Controls.Add(this.button3); 144 | this.botPanel.Controls.Add(this.checkNew); 145 | this.botPanel.Controls.Add(this.checkRename); 146 | this.botPanel.Controls.Add(this.panel2); 147 | this.botPanel.Controls.Add(this.button2); 148 | this.botPanel.Controls.Add(this.txtInput); 149 | this.botPanel.Controls.Add(this.button1); 150 | this.botPanel.Controls.Add(this.lblPriority); 151 | this.botPanel.Controls.Add(this.panel1); 152 | this.botPanel.Dock = System.Windows.Forms.DockStyle.Fill; 153 | this.botPanel.Location = new System.Drawing.Point(0, 77); 154 | this.botPanel.Margin = new System.Windows.Forms.Padding(2); 155 | this.botPanel.Name = "botPanel"; 156 | this.botPanel.Size = new System.Drawing.Size(964, 571); 157 | this.botPanel.TabIndex = 9; 158 | // 159 | // label3 160 | // 161 | this.label3.AutoSize = true; 162 | this.label3.Font = new System.Drawing.Font("Segoe UI Semibold", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 163 | this.label3.ForeColor = System.Drawing.Color.DodgerBlue; 164 | this.label3.Location = new System.Drawing.Point(194, 14); 165 | this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); 166 | this.label3.Name = "label3"; 167 | this.label3.Size = new System.Drawing.Size(134, 28); 168 | this.label3.TabIndex = 87; 169 | this.label3.Tag = "themeable"; 170 | this.label3.Text = "File or folder:"; 171 | // 172 | // label1 173 | // 174 | this.label1.AutoSize = true; 175 | this.label1.Font = new System.Drawing.Font("Segoe UI Semibold", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 176 | this.label1.ForeColor = System.Drawing.Color.DodgerBlue; 177 | this.label1.Location = new System.Drawing.Point(195, 174); 178 | this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); 179 | this.label1.Name = "label1"; 180 | this.label1.Size = new System.Drawing.Size(125, 28); 181 | this.label1.TabIndex = 86; 182 | this.label1.Tag = "themeable"; 183 | this.label1.Text = "Information:"; 184 | // 185 | // button4 186 | // 187 | this.button4.BackColor = System.Drawing.Color.DodgerBlue; 188 | this.button4.DialogResult = System.Windows.Forms.DialogResult.Cancel; 189 | this.button4.FlatAppearance.BorderColor = System.Drawing.Color.DodgerBlue; 190 | this.button4.FlatAppearance.MouseDownBackColor = System.Drawing.Color.RoyalBlue; 191 | this.button4.FlatAppearance.MouseOverBackColor = System.Drawing.Color.RoyalBlue; 192 | this.button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 193 | this.button4.ForeColor = System.Drawing.Color.White; 194 | this.button4.Location = new System.Drawing.Point(568, 79); 195 | this.button4.Margin = new System.Windows.Forms.Padding(2); 196 | this.button4.Name = "button4"; 197 | this.button4.Size = new System.Drawing.Size(118, 38); 198 | this.button4.TabIndex = 85; 199 | this.button4.Tag = "themeable"; 200 | this.button4.Text = "Options"; 201 | this.button4.UseVisualStyleBackColor = false; 202 | this.button4.Click += new System.EventHandler(this.button4_Click); 203 | // 204 | // checkOrganize 205 | // 206 | this.checkOrganize.AutoSize = true; 207 | this.checkOrganize.Location = new System.Drawing.Point(465, 148); 208 | this.checkOrganize.Margin = new System.Windows.Forms.Padding(2); 209 | this.checkOrganize.Name = "checkOrganize"; 210 | this.checkOrganize.Size = new System.Drawing.Size(161, 24); 211 | this.checkOrganize.TabIndex = 82; 212 | this.checkOrganize.Text = "Organize in folders"; 213 | this.checkOrganize.UseVisualStyleBackColor = true; 214 | this.checkOrganize.CheckedChanged += new System.EventHandler(this.checkOrganize_CheckedChanged); 215 | // 216 | // checkData 217 | // 218 | this.checkData.AutoSize = true; 219 | this.checkData.Location = new System.Drawing.Point(200, 148); 220 | this.checkData.Margin = new System.Windows.Forms.Padding(2); 221 | this.checkData.Name = "checkData"; 222 | this.checkData.Size = new System.Drawing.Size(233, 24); 223 | this.checkData.TabIndex = 80; 224 | this.checkData.Text = "Download movie data (IMDb)"; 225 | this.checkData.UseVisualStyleBackColor = true; 226 | this.checkData.CheckedChanged += new System.EventHandler(this.checkData_CheckedChanged); 227 | // 228 | // button3 229 | // 230 | this.button3.BackColor = System.Drawing.Color.DodgerBlue; 231 | this.button3.DialogResult = System.Windows.Forms.DialogResult.Cancel; 232 | this.button3.FlatAppearance.BorderColor = System.Drawing.Color.DodgerBlue; 233 | this.button3.FlatAppearance.MouseDownBackColor = System.Drawing.Color.RoyalBlue; 234 | this.button3.FlatAppearance.MouseOverBackColor = System.Drawing.Color.RoyalBlue; 235 | this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 236 | this.button3.ForeColor = System.Drawing.Color.White; 237 | this.button3.Location = new System.Drawing.Point(445, 79); 238 | this.button3.Margin = new System.Windows.Forms.Padding(2); 239 | this.button3.Name = "button3"; 240 | this.button3.Size = new System.Drawing.Size(118, 38); 241 | this.button3.TabIndex = 84; 242 | this.button3.Tag = "themeable"; 243 | this.button3.Text = "Search"; 244 | this.button3.UseVisualStyleBackColor = false; 245 | this.button3.Click += new System.EventHandler(this.button3_Click); 246 | // 247 | // checkNew 248 | // 249 | this.checkNew.AutoSize = true; 250 | this.checkNew.Location = new System.Drawing.Point(465, 122); 251 | this.checkNew.Margin = new System.Windows.Forms.Padding(2); 252 | this.checkNew.Name = "checkNew"; 253 | this.checkNew.Size = new System.Drawing.Size(221, 24); 254 | this.checkNew.TabIndex = 79; 255 | this.checkNew.Text = "Ignore movies with subtitles"; 256 | this.checkNew.UseVisualStyleBackColor = true; 257 | this.checkNew.CheckedChanged += new System.EventHandler(this.checkNew_CheckedChanged); 258 | // 259 | // checkRename 260 | // 261 | this.checkRename.AutoSize = true; 262 | this.checkRename.Location = new System.Drawing.Point(200, 122); 263 | this.checkRename.Margin = new System.Windows.Forms.Padding(2); 264 | this.checkRename.Name = "checkRename"; 265 | this.checkRename.Size = new System.Drawing.Size(163, 24); 266 | this.checkRename.TabIndex = 78; 267 | this.checkRename.Text = "Rename movie files"; 268 | this.checkRename.UseVisualStyleBackColor = true; 269 | this.checkRename.CheckedChanged += new System.EventHandler(this.checkRename_CheckedChanged); 270 | // 271 | // panel2 272 | // 273 | this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 274 | | System.Windows.Forms.AnchorStyles.Left) 275 | | System.Windows.Forms.AnchorStyles.Right))); 276 | this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 277 | this.panel2.Controls.Add(this.infoBox); 278 | this.panel2.Location = new System.Drawing.Point(199, 206); 279 | this.panel2.Margin = new System.Windows.Forms.Padding(2); 280 | this.panel2.Name = "panel2"; 281 | this.panel2.Size = new System.Drawing.Size(752, 305); 282 | this.panel2.TabIndex = 7; 283 | // 284 | // infoBox 285 | // 286 | this.infoBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); 287 | this.infoBox.BorderStyle = System.Windows.Forms.BorderStyle.None; 288 | this.infoBox.Dock = System.Windows.Forms.DockStyle.Fill; 289 | this.infoBox.ForeColor = System.Drawing.Color.White; 290 | this.infoBox.FormattingEnabled = true; 291 | this.infoBox.ItemHeight = 20; 292 | this.infoBox.Location = new System.Drawing.Point(0, 0); 293 | this.infoBox.Margin = new System.Windows.Forms.Padding(2); 294 | this.infoBox.Name = "infoBox"; 295 | this.infoBox.Size = new System.Drawing.Size(750, 303); 296 | this.infoBox.TabIndex = 6; 297 | // 298 | // button2 299 | // 300 | this.button2.BackColor = System.Drawing.Color.DodgerBlue; 301 | this.button2.DialogResult = System.Windows.Forms.DialogResult.Cancel; 302 | this.button2.FlatAppearance.BorderColor = System.Drawing.Color.DodgerBlue; 303 | this.button2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.RoyalBlue; 304 | this.button2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.RoyalBlue; 305 | this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 306 | this.button2.ForeColor = System.Drawing.Color.White; 307 | this.button2.Location = new System.Drawing.Point(322, 79); 308 | this.button2.Margin = new System.Windows.Forms.Padding(2); 309 | this.button2.Name = "button2"; 310 | this.button2.Size = new System.Drawing.Size(118, 38); 311 | this.button2.TabIndex = 75; 312 | this.button2.Tag = "themeable"; 313 | this.button2.Text = "Select file"; 314 | this.button2.UseVisualStyleBackColor = false; 315 | this.button2.Click += new System.EventHandler(this.button2_Click); 316 | // 317 | // txtInput 318 | // 319 | this.txtInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 320 | | System.Windows.Forms.AnchorStyles.Right))); 321 | this.txtInput.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); 322 | this.txtInput.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 323 | this.txtInput.ForeColor = System.Drawing.Color.Silver; 324 | this.txtInput.Location = new System.Drawing.Point(199, 46); 325 | this.txtInput.Margin = new System.Windows.Forms.Padding(2); 326 | this.txtInput.Name = "txtInput"; 327 | this.txtInput.ReadOnly = true; 328 | this.txtInput.Size = new System.Drawing.Size(751, 27); 329 | this.txtInput.TabIndex = 77; 330 | // 331 | // button1 332 | // 333 | this.button1.BackColor = System.Drawing.Color.DodgerBlue; 334 | this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel; 335 | this.button1.FlatAppearance.BorderColor = System.Drawing.Color.DodgerBlue; 336 | this.button1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.RoyalBlue; 337 | this.button1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.RoyalBlue; 338 | this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 339 | this.button1.ForeColor = System.Drawing.Color.White; 340 | this.button1.Location = new System.Drawing.Point(199, 79); 341 | this.button1.Margin = new System.Windows.Forms.Padding(2); 342 | this.button1.Name = "button1"; 343 | this.button1.Size = new System.Drawing.Size(118, 38); 344 | this.button1.TabIndex = 76; 345 | this.button1.Tag = "themeable"; 346 | this.button1.Text = "Select folder"; 347 | this.button1.UseVisualStyleBackColor = false; 348 | this.button1.Click += new System.EventHandler(this.button1_Click); 349 | // 350 | // lblPriority 351 | // 352 | this.lblPriority.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 353 | this.lblPriority.AutoSize = true; 354 | this.lblPriority.Font = new System.Drawing.Font("Segoe UI Semibold", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 355 | this.lblPriority.ForeColor = System.Drawing.Color.DodgerBlue; 356 | this.lblPriority.Location = new System.Drawing.Point(8, 530); 357 | this.lblPriority.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); 358 | this.lblPriority.Name = "lblPriority"; 359 | this.lblPriority.Size = new System.Drawing.Size(82, 28); 360 | this.lblPriority.TabIndex = 5; 361 | this.lblPriority.Tag = "themeable"; 362 | this.lblPriority.Text = "Priority:"; 363 | // 364 | // panel1 365 | // 366 | this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 367 | | System.Windows.Forms.AnchorStyles.Left))); 368 | this.panel1.Controls.Add(this.languageList); 369 | this.panel1.Location = new System.Drawing.Point(12, 15); 370 | this.panel1.Margin = new System.Windows.Forms.Padding(2); 371 | this.panel1.Name = "panel1"; 372 | this.panel1.Size = new System.Drawing.Size(171, 497); 373 | this.panel1.TabIndex = 1; 374 | // 375 | // languageList 376 | // 377 | this.languageList.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); 378 | this.languageList.BorderStyle = System.Windows.Forms.BorderStyle.None; 379 | this.languageList.CheckOnClick = true; 380 | this.languageList.Dock = System.Windows.Forms.DockStyle.Fill; 381 | this.languageList.ForeColor = System.Drawing.Color.White; 382 | this.languageList.FormattingEnabled = true; 383 | this.languageList.Items.AddRange(new object[] { 384 | "Arabic", 385 | "Bulgarian", 386 | "Chinese", 387 | "Croatian", 388 | "Czech", 389 | "Danish", 390 | "Dutch", 391 | "English", 392 | "Estonian", 393 | "FYROM", 394 | "Finnish", 395 | "French", 396 | "Galician", 397 | "German", 398 | "Greek", 399 | "Hebrew", 400 | "Hungarian", 401 | "Indonesian", 402 | "Italian", 403 | "Japanese", 404 | "Korean", 405 | "Norwegian", 406 | "Persian", 407 | "Polish", 408 | "Portuguese", 409 | "Romanian", 410 | "Russian", 411 | "Serbian", 412 | "Slovak", 413 | "Spanish", 414 | "Swedish", 415 | "Turkish", 416 | "Vietnamese"}); 417 | this.languageList.Location = new System.Drawing.Point(0, 0); 418 | this.languageList.Margin = new System.Windows.Forms.Padding(2); 419 | this.languageList.Name = "languageList"; 420 | this.languageList.Size = new System.Drawing.Size(171, 497); 421 | this.languageList.TabIndex = 0; 422 | this.languageList.SelectedIndexChanged += new System.EventHandler(this.languageList_SelectedIndexChanged); 423 | // 424 | // MainForm 425 | // 426 | this.AllowDrop = true; 427 | this.AutoScaleDimensions = new System.Drawing.SizeF(120F, 120F); 428 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; 429 | this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); 430 | this.ClientSize = new System.Drawing.Size(964, 648); 431 | this.Controls.Add(this.botPanel); 432 | this.Controls.Add(this.topPanel); 433 | this.Font = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 434 | this.ForeColor = System.Drawing.Color.White; 435 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 436 | this.Margin = new System.Windows.Forms.Padding(2); 437 | this.Name = "MainForm"; 438 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 439 | this.Text = "MoonSub"; 440 | this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing); 441 | this.Load += new System.EventHandler(this.MainForm_Load); 442 | this.DragDrop += new System.Windows.Forms.DragEventHandler(this.MainForm_DragDrop); 443 | this.DragEnter += new System.Windows.Forms.DragEventHandler(this.MainForm_DragEnter); 444 | this.topPanel.ResumeLayout(false); 445 | this.topPanel.PerformLayout(); 446 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); 447 | this.botPanel.ResumeLayout(false); 448 | this.botPanel.PerformLayout(); 449 | this.panel2.ResumeLayout(false); 450 | this.panel1.ResumeLayout(false); 451 | this.ResumeLayout(false); 452 | 453 | } 454 | 455 | #endregion 456 | 457 | private System.Windows.Forms.Panel topPanel; 458 | private System.Windows.Forms.PictureBox pictureBox1; 459 | private System.Windows.Forms.Label lblversion; 460 | private System.Windows.Forms.Label label2; 461 | private System.Windows.Forms.Panel botPanel; 462 | private System.Windows.Forms.Label bittxt; 463 | private System.Windows.Forms.Label ostxt; 464 | private System.Windows.Forms.Panel panel1; 465 | private System.Windows.Forms.CheckedListBox languageList; 466 | private System.Windows.Forms.Label lblPriority; 467 | private System.Windows.Forms.Panel panel2; 468 | private System.Windows.Forms.ListBox infoBox; 469 | private System.Windows.Forms.TextBox txtInput; 470 | private System.Windows.Forms.Button button1; 471 | private System.Windows.Forms.Button button2; 472 | private System.Windows.Forms.CheckBox checkOrganize; 473 | private System.Windows.Forms.CheckBox checkData; 474 | private System.Windows.Forms.CheckBox checkNew; 475 | private System.Windows.Forms.CheckBox checkRename; 476 | private System.Windows.Forms.Button button3; 477 | private System.Windows.Forms.Button button4; 478 | private System.Windows.Forms.Label label3; 479 | private System.Windows.Forms.Label label1; 480 | } 481 | } 482 | 483 | -------------------------------------------------------------------------------- /MoonSub/MainForm.cs: -------------------------------------------------------------------------------- 1 | using CookComputing.XmlRpc; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel; 5 | using System.Data; 6 | using System.Diagnostics; 7 | using System.Drawing; 8 | using System.IO; 9 | using System.Linq; 10 | using System.Net; 11 | using System.Text; 12 | using System.Threading.Tasks; 13 | using System.Windows.Forms; 14 | 15 | namespace MoonSub 16 | { 17 | public partial class MainForm : Form 18 | { 19 | IOSDb osdbProxy; 20 | string CDFormat = Options.CurrentOptions.CDFormat; 21 | string FileFormat = Options.CurrentOptions.FileFormat; 22 | string FolderFormat = Options.CurrentOptions.FolderFormat; 23 | string theToken; 24 | 25 | List movieFormats = Options.CurrentOptions.MovieFormats.Split(',').ToList(); 26 | List subtitleFormats = Options.CurrentOptions.SubtitleFormats.Split(',').ToList(); 27 | string[] langs; 28 | List theLangMap = Utilities.generateLangMap(); 29 | int dlCount = 0; 30 | List myFiles = new List(); 31 | 32 | string inputPath = string.Empty; 33 | string outputPath = string.Empty; 34 | string languagePriority = string.Empty; 35 | List languageSequence = new List(); 36 | 37 | string[] tmp; 38 | bool subtitleFound = false; 39 | 40 | public MainForm() 41 | { 42 | InitializeComponent(); 43 | Options.ApplyTheme(this); 44 | 45 | checkRename.Checked = Options.CurrentOptions.Rename; 46 | checkNew.Checked = Options.CurrentOptions.IgnoreSubtitles; 47 | checkOrganize.Checked = Options.CurrentOptions.OrganizeFolders; 48 | checkData.Checked = Options.CurrentOptions.DownloadData; 49 | 50 | lblversion.Text = "Version: " + Program.GetCurrentVersionToString(); 51 | ostxt.Text = Utilities.GetOS(); 52 | bittxt.Text = Utilities.GetBitness(); 53 | } 54 | 55 | private void EmptyLine() 56 | { 57 | infoBox.Items.Add(string.Empty); 58 | } 59 | 60 | private void MainForm_Load(object sender, EventArgs e) 61 | { 62 | CheckForIllegalCrossThreadCalls = false; 63 | } 64 | 65 | private void MainForm_FormClosing(object sender, FormClosingEventArgs e) 66 | { 67 | Options.SaveSettings(); 68 | } 69 | 70 | private void button1_Click(object sender, EventArgs e) 71 | { 72 | FolderBrowserDialog dialog = new FolderBrowserDialog(); 73 | dialog.Description = "Select the folder that has all your movies..."; 74 | dialog.RootFolder = Environment.SpecialFolder.Desktop; 75 | 76 | if (dialog.ShowDialog() == DialogResult.OK) 77 | { 78 | txtInput.Text = dialog.SelectedPath; 79 | inputPath = dialog.SelectedPath.ToLowerInvariant(); 80 | } 81 | } 82 | 83 | private void button2_Click(object sender, EventArgs e) 84 | { 85 | OpenFileDialog dialog = new OpenFileDialog(); 86 | dialog.Filter = "Common movie files|*.avi;*.mkv;*.mp4;*.m4v"; 87 | 88 | if (dialog.ShowDialog() == DialogResult.OK) 89 | { 90 | txtInput.Text = dialog.FileName; 91 | inputPath = dialog.FileName.ToLowerInvariant(); 92 | } 93 | } 94 | 95 | private void checkRename_CheckedChanged(object sender, EventArgs e) 96 | { 97 | Options.CurrentOptions.Rename = checkRename.Checked; 98 | } 99 | 100 | private void checkNew_CheckedChanged(object sender, EventArgs e) 101 | { 102 | Options.CurrentOptions.IgnoreSubtitles = checkNew.Checked; 103 | } 104 | 105 | private void checkData_CheckedChanged(object sender, EventArgs e) 106 | { 107 | Options.CurrentOptions.DownloadData = checkData.Checked; 108 | } 109 | 110 | private void checkOrganize_CheckedChanged(object sender, EventArgs e) 111 | { 112 | Options.CurrentOptions.OrganizeFolders = checkOrganize.Checked; 113 | } 114 | 115 | private void button3_Click(object sender, EventArgs e) 116 | { 117 | if (!string.IsNullOrEmpty(inputPath) && !string.IsNullOrEmpty(GenerateLanguageCodes())) 118 | { 119 | infoBox.Items.Clear(); 120 | 121 | Search(inputPath, outputPath, GenerateLanguageCodes(), false, Options.CurrentOptions.Rename, Options.CurrentOptions.IgnoreSubtitles, Options.CurrentOptions.DownloadData, Options.CurrentOptions.OrganizeFolders, Options.CurrentOptions.DownloadData); 122 | } 123 | else if (string.IsNullOrEmpty(inputPath) && !string.IsNullOrEmpty(GenerateLanguageCodes())) 124 | { 125 | infoBox.Items.Clear(); 126 | infoBox.Items.Add("Add a movie file or folder containing movies"); 127 | } 128 | else if (!string.IsNullOrEmpty(inputPath) && string.IsNullOrEmpty(GenerateLanguageCodes())) 129 | { 130 | infoBox.Items.Clear(); 131 | infoBox.Items.Add("Select at least one language"); 132 | } 133 | else 134 | { 135 | infoBox.Items.Clear(); 136 | infoBox.Items.Add("Add a movie file or folder containing movies"); 137 | infoBox.Items.Add("Select at least one language"); 138 | } 139 | } 140 | 141 | private string Get3CodeStr(string the2CodeStr) 142 | { 143 | string c3 = ""; 144 | foreach (string l2code in the2CodeStr.Split(',')) 145 | { 146 | foreach (langMap l in theLangMap) 147 | { 148 | if (l.two.Contains(l2code)) 149 | { 150 | if (!c3.Contains(l.three)) 151 | { 152 | c3 += "," + l.three; 153 | } 154 | } 155 | } 156 | } 157 | if (c3 != "") { c3 = c3.Substring(1); } 158 | return c3; 159 | } 160 | 161 | private string Get2CodeStr(string the2CodeStr) 162 | { 163 | string c3 = ""; 164 | foreach (string l2code in the2CodeStr.Split(',')) 165 | { 166 | foreach (langMap l in theLangMap) 167 | { 168 | if (l.two.Contains(l2code)) 169 | { 170 | if (!c3.Contains(l.two)) 171 | { 172 | c3 += "," + l.two; 173 | } 174 | } 175 | } 176 | } 177 | if (c3 != "") { c3 = c3.Substring(1); } 178 | return c3; 179 | } 180 | 181 | private List GenerateLanguageSequence() 182 | { 183 | if (languageList.GetItemChecked(languageList.SelectedIndex)) 184 | { 185 | if (!languageSequence.Contains(languageList.SelectedItem.ToString())) languageSequence.Add(languageList.SelectedItem.ToString()); 186 | } 187 | else 188 | { 189 | if (languageSequence.Contains(languageList.SelectedItem.ToString())) languageSequence.Remove(languageList.SelectedItem.ToString()); 190 | } 191 | 192 | return languageSequence; 193 | } 194 | 195 | private string GenerateLanguageCodes() 196 | { 197 | string result = string.Empty; 198 | 199 | foreach (string s in languageSequence) 200 | { 201 | int i = theLangMap.FindIndex(x => x.desc == s); 202 | 203 | if (i != -1) 204 | { 205 | result += theLangMap[i].two + ","; 206 | } 207 | } 208 | 209 | if (result.Length > 0) 210 | { 211 | result = result.Substring(0, result.Length - 1); 212 | } 213 | return result; 214 | } 215 | 216 | private void languageList_SelectedIndexChanged(object sender, EventArgs e) 217 | { 218 | languagePriority = string.Empty; 219 | 220 | foreach (string s in GenerateLanguageSequence()) 221 | { 222 | languagePriority += s + ","; 223 | } 224 | 225 | if (languagePriority.Length > 0) 226 | { 227 | languagePriority = languagePriority.Substring(0, languagePriority.Length - 1); 228 | } 229 | 230 | lblPriority.Text = "Priority: " + languagePriority.Replace(",", ", "); 231 | } 232 | 233 | private void Search(string FolderArg, string outputPath, string LangArg, bool overwrite, bool rename, bool newOnly, bool nfo, bool folders, bool imdb) 234 | { 235 | subtitleFound = false; 236 | 237 | try 238 | { 239 | infoBox.Items.Add("Searching for movie files..."); 240 | 241 | if (File.Exists(FolderArg)) 242 | { 243 | if (outputPath == "") 244 | { 245 | outputPath = Path.GetDirectoryName(FolderArg); 246 | } 247 | 248 | MovieFile theFile = new MovieFile(); 249 | theFile.filename = FolderArg; 250 | theFile.getOldSubtitle(subtitleFormats, theLangMap, LangArg); 251 | myFiles.Add(theFile); 252 | } 253 | else if (Directory.Exists(FolderArg)) 254 | { 255 | if (outputPath == "") 256 | { 257 | outputPath = FolderArg; 258 | } 259 | foreach (string extension in movieFormats) 260 | { 261 | foreach (string filename in Utilities.GetFilesByExtensions(FolderArg, "." + extension, SearchOption.AllDirectories)) 262 | { 263 | MovieFile theFile = new MovieFile(); 264 | theFile.filename = filename; 265 | theFile.getOldSubtitle(subtitleFormats, theLangMap, LangArg); 266 | if ((newOnly && (theFile.oldSubtitle == "")) || (!newOnly)) 267 | { 268 | myFiles.Add(theFile); 269 | } 270 | } 271 | } 272 | infoBox.Items.Add("Found " + myFiles.Count.ToString() + " movies"); 273 | } 274 | else 275 | { 276 | infoBox.Items.Add("The folder or file given does not exist"); 277 | } 278 | 279 | if (myFiles.Count != 0) 280 | { 281 | infoBox.Items.Add("Creating subtitle requests from movies..."); 282 | 283 | langs = Get3CodeStr(LangArg).Split(','); 284 | List l3 = new List(langs); 285 | List l2 = new List(LangArg.Split(',')); 286 | 287 | int i = 0; 288 | List> allSis = new List>(); 289 | List sis = new List(); 290 | foreach (MovieFile theFile in myFiles) 291 | { 292 | if ((newOnly && (theFile.oldSubtitle == "")) || (!newOnly)) 293 | { 294 | foreach (string lang in langs) 295 | { 296 | try 297 | { 298 | if (sis.Count >= 40) 299 | { 300 | allSis.Add(sis); 301 | sis = new List(); 302 | } 303 | subInfo si = new subInfo(); 304 | si.sublanguageid = lang; 305 | theFile.hash = Utilities.ToHexadecimal(Utilities.ComputeMovieHash(theFile.filename)); 306 | si.moviehash = theFile.hash; 307 | si.moviebytesize = new FileInfo(theFile.filename).Length.ToString(); 308 | sis.Add(si); 309 | i++; 310 | 311 | } 312 | catch (Exception ex) 313 | { 314 | infoBox.Items.Add("Error with file: " + theFile.filename); 315 | infoBox.Items.Add(ex.Message); 316 | } 317 | } 318 | } 319 | } 320 | if (sis.Count > 0) 321 | { 322 | allSis.Add(sis); 323 | } 324 | 325 | infoBox.Items.Add("Connecting..."); 326 | 327 | osdbProxy = XmlRpcProxyGen.Create(); 328 | osdbProxy.Url = "http://api.opensubtitles.org/xml-rpc"; 329 | osdbProxy.KeepAlive = false; 330 | if (myFiles.Count == 0) { infoBox.Items.Add("No movies found"); } 331 | XmlRpcStruct Login = osdbProxy.LogIn("", "", "en", "vroksub"); 332 | theToken = Login["token"].ToString(); 333 | 334 | infoBox.Items.Add("Searching for subtitles..."); 335 | 336 | subrt SubResults = new subrt(); 337 | List lstSubResults = new List(); 338 | try 339 | { 340 | foreach (List theSis in allSis) 341 | { 342 | subrt tempSubResults = osdbProxy.SearchSubtitles(theToken, theSis.ToArray()); 343 | lstSubResults.AddRange(tempSubResults.data); 344 | SubResults.seconds += tempSubResults.seconds; 345 | } 346 | SubResults.data = lstSubResults.ToArray(); 347 | } 348 | catch (Exception e) 349 | { 350 | 351 | } 352 | 353 | if (SubResults != null) 354 | { 355 | BindingList g = new BindingList(SubResults.data); 356 | dlCount = 0; 357 | foreach (MovieFile mf in myFiles) 358 | { 359 | try 360 | { 361 | if ((newOnly && (mf.oldSubtitle == "")) || (!newOnly)) 362 | { 363 | if (mf.SelectBestSubtitle(g, l3)) 364 | { 365 | subtitleFound = true; 366 | infoBox.Items.Add("Subtitles found"); 367 | infoBox.Items.Add(mf.subRes.MovieName + " - " + mf.subRes.LanguageName); 368 | dlCount++; 369 | } 370 | } 371 | } 372 | catch (Exception ex) 373 | { 374 | infoBox.Items.Add("Couldn't choose subtitle for: " + mf.filename); 375 | infoBox.Items.Add(ex.Message); 376 | } 377 | } 378 | 379 | if (subtitleFound) 380 | { 381 | infoBox.Items.Add("Downloading subtitles..."); 382 | } 383 | else 384 | { 385 | infoBox.Items.Add("No subtitles found"); 386 | } 387 | 388 | string[] ids = new string[dlCount]; 389 | List lstids = new List(); 390 | List> allids = new List>(); 391 | int k = 0; 392 | foreach (MovieFile myf in myFiles) 393 | { 394 | if (lstids.Count >= 40) 395 | { 396 | allids.Add(lstids); 397 | lstids = new List(); 398 | } 399 | if (myf.subtitleId != null) 400 | { 401 | lstids.Add(myf.subtitleId); 402 | k++; 403 | } 404 | } 405 | if (lstids.Count > 0) 406 | { 407 | allids.Add(lstids); 408 | } 409 | subdata files = new subdata(); 410 | List thesubs = new List(); 411 | foreach (List theList in allids) 412 | { 413 | subdata tempfiles = osdbProxy.DownloadSubtitles(theToken, lstids.ToArray()); 414 | thesubs.AddRange(tempfiles.data); 415 | files.seconds += tempfiles.seconds; 416 | } 417 | files.data = thesubs.ToArray(); 418 | 419 | 420 | if (imdb) 421 | { 422 | infoBox.Items.Add("Fetching IMDb details..."); 423 | 424 | foreach (MovieFile myf in myFiles) 425 | { 426 | if (myf.subRes != null) 427 | { 428 | try 429 | { 430 | myf.imdbinfo = osdbProxy.GetIMDBMovieDetails(theToken, "0" + myf.subRes.IDMovieImdb).data; 431 | } 432 | catch //(Exception ex) 433 | { 434 | //infoBox.Items.Add("Error fetching IMDb data for: " + myf.filename + " ERROR: " + ex.Message); 435 | } 436 | } 437 | } 438 | 439 | infoBox.Items.Add("Downloading covers..."); 440 | 441 | WebClient Client = new WebClient(); 442 | Client.Encoding = Encoding.UTF8; 443 | 444 | foreach (MovieFile myf in myFiles) 445 | { 446 | if (myf.imdbinfo != null) 447 | { 448 | if ((myf.imdbinfo.cover != null) && (myf.imdbinfo.cover != "")) 449 | { 450 | try 451 | { 452 | Stream strm = Client.OpenRead(myf.imdbinfo.cover); 453 | FileStream writecover = new FileStream(Path.GetDirectoryName(myf.filename) + "\\" + Path.GetFileNameWithoutExtension(myf.filename) + ".jpg", FileMode.Create); 454 | int a; 455 | do 456 | { 457 | a = strm.ReadByte(); 458 | writecover.WriteByte((byte)a); 459 | } 460 | while (a != -1); 461 | writecover.Position = 0; 462 | File.Copy(Path.GetDirectoryName(myf.filename) + "\\" + Path.GetFileNameWithoutExtension(myf.filename) + ".jpg", Path.GetDirectoryName(myf.filename) + "\\" + Path.GetFileName(myf.filename) + ".jpg"); 463 | if (folders) 464 | { 465 | File.Copy(Path.GetDirectoryName(myf.filename) + "\\" + Path.GetFileNameWithoutExtension(myf.filename) + ".jpg", Path.GetDirectoryName(myf.filename) + "\\folder.jpg"); 466 | } 467 | strm.Close(); 468 | writecover.Close(); 469 | } 470 | catch (Exception ex) 471 | { 472 | infoBox.Items.Add("Error saving cover for: " + myf.filename); 473 | infoBox.Items.Add(ex.Message); 474 | } 475 | } 476 | } 477 | } 478 | } 479 | 480 | if (subtitleFound) 481 | { 482 | infoBox.Items.Add("Saving subtitles..."); 483 | } 484 | 485 | foreach (subtitle s in files.data) 486 | { 487 | foreach (MovieFile m in myFiles) 488 | { 489 | try 490 | { 491 | if (m.subtitleId == s.idsubtitlefile) 492 | { 493 | m.subtitle = Utilities.DecodeAndDecompress(s.data); 494 | if (outputPath != FolderArg) 495 | { 496 | if (!Directory.Exists(outputPath)) 497 | { 498 | Directory.CreateDirectory(outputPath); 499 | } 500 | if (!File.Exists(outputPath + "\\" + Path.GetFileName(m.filename))) 501 | { 502 | try 503 | { 504 | File.Move(m.filename, outputPath + "\\" + Path.GetFileName(m.filename)); 505 | m.originalfilename = Path.GetFileName(m.filename); 506 | m.filename = outputPath + "\\" + Path.GetFileName(m.filename); 507 | } 508 | catch //(Exception ex) 509 | { 510 | //infoBox.Items.Add("Error moving movie: " + m.filename + " ERROR: " + ex.Message); 511 | } 512 | } 513 | } 514 | if (folders) 515 | { 516 | m.newFolder(outputPath, FolderFormat); 517 | } 518 | if (rename) 519 | { 520 | m.rename(FileFormat, CDFormat); 521 | } 522 | if (nfo) 523 | { 524 | m.saveNfo(); 525 | } 526 | m.saveSubtitle(overwrite); 527 | continue; 528 | } 529 | } 530 | catch (Exception ex) 531 | { 532 | infoBox.Items.Add("Error saving subtitle for: " + m.filename); 533 | infoBox.Items.Add(ex.Message); 534 | } 535 | } 536 | } 537 | } 538 | 539 | infoBox.Items.Add("Disconnecting..."); 540 | 541 | osdbProxy.LogOut(theToken); 542 | } 543 | } 544 | catch (Exception ex) 545 | { 546 | infoBox.Items.Add("Generic error:"); 547 | infoBox.Items.Add(ex.Message); 548 | } 549 | } 550 | 551 | private void pictureBox1_Click(object sender, EventArgs e) 552 | { 553 | AboutForm f = new AboutForm(); 554 | f.ShowDialog(this); 555 | } 556 | 557 | private void button4_Click(object sender, EventArgs e) 558 | { 559 | OptionsForm f = new OptionsForm(this); 560 | f.ShowDialog(this); 561 | } 562 | 563 | private void MainForm_DragDrop(object sender, DragEventArgs e) 564 | { 565 | myFiles.Clear(); 566 | 567 | tmp = (string[])e.Data.GetData(DataFormats.FileDrop, false); 568 | 569 | try 570 | { 571 | txtInput.Text = tmp[0]; 572 | inputPath = tmp[0]; 573 | } 574 | catch { } 575 | } 576 | 577 | private void MainForm_DragEnter(object sender, DragEventArgs e) 578 | { 579 | if (e.Data.GetDataPresent(DataFormats.FileDrop)) 580 | { 581 | e.Effect = DragDropEffects.Link; 582 | return; 583 | } 584 | 585 | e.Effect = DragDropEffects.None; 586 | } 587 | } 588 | } 589 | -------------------------------------------------------------------------------- /MoonSub/MainForm.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 | 123 | iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 124 | YQUAAAAJcEhZcwAACxIAAAsSAdLdfvwAAASgSURBVHhe7ZFRDt02DARzyV621+iBWiDZAEU7tmSbIil7 125 | B5iv97wilz+MMcYYY4wxxhhjTA/+/OOvv6+oz8yu0FHvqDizC3TEJyrWdIYOF6meMR2hg0Wrp0wn6FCr 126 | 1JOmC3Sklep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iIiIiIiIiIiIiIiIiIi 181 | IiIiIiIiIAAAAAAAAAAAAAAAAAAAARERERERERERERAAAAAAAAAAAAAAAAAAAAIiIiIiIiIiIiIiIiIi 182 | IiIiIiIiIiIiIiAAAAAAAAAAAAAAAAAAAAEREREREREREREQAAAAAAAAAAAAAAAAAAAAIiIiIiIiIiIi 183 | IiIiIiIiIiIiIiIiIiIAAAAAAAAAAAAAAAAAAAABEREREREREREREAAAAAAAAAAAAAAAAAAAACIiIiIi 184 | IiIiIiIiIiIiIiIiIiIiIiIgAAAAAAAAAAAAAAAAAAAAARERERERERERERAAAAAAAAAAAAAAAAAAAAAC 185 | IiIiIiIiIiIiIiIiIiIiIiIiIiIiIAAAAAAAAAAAAAAAAAAAAAEREREREREREREQAAAAAAAAAAAAAAAA 186 | AAAAAiIiIiIiIiIiIiIiIiIiIiIiIiIiIgAAAAAAAAAAAAAAAAAAAAAAERERERERERERAAAAAAAAAAAA 187 | AAAAAAAAAAAiIiIiIiIiIiIiIiIiIiIiIiIiIiIAAAAAAAAAAAAAAAAAAAAAABEREREREREREQAAAAAA 188 | AAAAAAAAAAAAAAAAIiIiIiIiIiIiIiIiIiIiIiIiIiIgAAAAAAAAAAAAAAAAAAAAAAABERERERERERAA 189 | AAAAAAAAAAAAAAAAAAAAAAIiIiIiIiIiIiIiIiIiIiIiIiIiIAAAAAAAAAAAAAAAAAAAAAAAABERERER 190 | EREQAAAAAAAAAAAAAAAAAAAAAAACIiIiIiIiIiIiIiIiIiIiIiIiIgAAAAAAAAAAAAAAAAAAAAAAAAAR 191 | ERERERERAAAAAAAAAAAAAAAAAAAAAAAAACIiIiIiIiIiIiIiIiIiIiIiIiIAAAAAAAAAAAAAAAAAAAAA 192 | AAAAABEREREREAAAAAAAAAAAAAAAAAAAAAAAAAAiIiIiIiIiIiIiIiIiIiIiIiIiAAAAAAAAAAAAAAAA 193 | AAAAAAAAAAAAEREREAAAAAAAAAAAAAAAAAAAAAAAAAAAAiIiIiIiIiIiIiIiI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iIiIgAAAAAAAAEREREREREREREAAAAAAA 207 | ARERERAAAAAAAAEREREREREREREAAAAAAAACIiIiIiIiIiIiIiIiIiIiIAAAAAAAABERERERERERERAA 208 | AAAAAAERERERAAAAAAABERERERERERERAAAAAAAAAiIiIiIiIiIiIiIiIiIiIiAAAAAAAAARERERERER 209 | EREQAAAAAAAREREREQAAAAAAARERERERERERERAAAAAAAAIiIiIiIiIiIiIiIiIiIiIgAAAAAAAAERER 210 | EREREREREQAAAAAAEREREREAAAAAAAEREREREREREREQAAAAAAACIiIiIiIiIiIiIiIiIiIiIAAAAAAA 211 | ABERERERERERERAAAAAAABERERERAAAAAAABEREREREREREREAAAAAAAAiIiIiIiIiIiIiIiIiIiIiAA 212 | AAAAAAAREREREREREREQAAAAAAAREREREQAAAAAAARERERERERERERAAAAAAAAIiIiIiIiIiIiIiIiIi 213 | IiIgAAAAAAAAEREREREREREREAAAAAAAAREREREAAAAAAAEREREREREREREAAAAAAAACIiIiIiIiIiIi 214 | IiIiIiIiIAAAAAAAABERERERERERERAAAAAAAAEREREQAAAAAAAAERERERERERERAAAAAAAAAiIiIiIi 215 | IiIiIiIiIiIiIiAAAAAAAAABEREREREREREAAAAAAAAAARERAAAAAAAAABEREREREREREAAAAAAAAAIi 216 | IiIiIiIiIiIiIiIiIiIgAAAAAAAAABERERERERERAAAAAAAAAAAAAAAAAAAAAAABERERERERERAAAAAA 217 | AAACIiIiIiIiIiIiIiIiIiIiIAAAAAAAAAAREREREREREAAAAAAAAAAAAAAAAAAAAAAAAREREREREREA 218 | AAAAAAAAAiIiIiIiIiIiIiIiIiIiIiIAAAAAAAAAAREREREREQAAAAAAAAAAAAAAAAAAAAAAAAABERER 219 | EREQAAAAAAAAAAIiIiIiIiIiIiIiIiIiIiIiAAAAAAAAAAABEREREQAAAAAAAAAAAAAAAAAAAAAAAAAA 220 | ABEREREQAAAAAAAAAAAiIiIiIiIiIiIiIiIiIiIiIgAAAAAAAAAAAAEREQAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAREREREREREREAAAAAAAAAAAAAAAAA 234 | AAAAACIiIiIiIiIiIiIiIiIiIiIiIiIiIgAAAAAAAAAAAAAAAAAAAAAAEREREREREREREAAAAAAAAAAA 235 | AAAAAAAAAAAiIiIiIiIiIiIiIiIiIiIiIiIiIiIgAAAAAAAAAAAAAAAAAAAAARERERERERERERAAAAAA 236 | AAAAAAAAAAAAAAAAIiIiIiIiIiIiIiIiIiIiIiIiIiIiIgAAAAAAAAAAAAAAAAAAAAEREREREREREREQ 237 | AAAAAAAAAAAAAAAAAAAAAiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIAAAAAAAAAAAAAAAAAAAABERERERER 238 | EREREAAAAAAAAAAAAAAAAAAAACIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIAAAAAAAAAAAAAAAAAAAARER 239 | ERERERERERAAAAAAAAAAAAAAAAAAAAAiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIAAAAAAAAAAAAAAAAA 240 | AAEREREREREREREQAAAAAAAAAAAAAAAAAAACIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiAAAAAAAAAAAA 241 | AAAAAAAAEREREREREREREAAAAAAAAAAAAAAAAAAAAiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiAAAAAA 242 | AAAAAAAAAAAAABEREREREREREQAAAAAAAAAAAAAAAAAAACIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIi 243 | AAAAAAAAAAAAAAAAAAABEREREREREREAAAAAAAAAAAAAAAAAAAAiIiIiIiIiIiIiIiIiIiIiIiIiIiIi 244 | IiIiIiAAAAAAAAAAAAAAAAAAAREREREREREQAAAAAAAAAAAAAAAAAAACIiIiIiIiIiIiIiIiIiIiIiIi 245 | IiIiIiIiIiIgAAAAAAAAAAAAAAAAAAARERERERERAAAAAAAAAAAAAAAAAAAAAiIiIiIiIiIiIiIiIiIi 246 | IiIiIiIiIiIiIiIiIgAAAAAAAAAAAAAAAAAAARERERE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iIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIi 284 | IiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIi 285 | IiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIi 286 | IiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIi 287 | IiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiL///////////////////////////// 288 | //////////////////////////////////////////////////////////////////////////////// 289 | /////////////////////////////////////////////////////////////////////wAAP/////// 290 | //////////AAAAP///////////////+AAAAAP//////////////8AAAAAA//////////////8AAAAAAD 291 | /////////////8AAAAAAAP////////////8AAAAAAAA////////////+AAAAAAAAD///////////+AAA 292 | AAAAAAf///////////AAAAAAAAAD///////////gAAAAAAAAAP//////////gAAAAAAAAAB///////// 293 | /wAAAAAAAAAAP/////////4AAAAAAAAAAB/////////8AAAAAAAAAAAP////////+AAAAAAAAAAAB/// 294 | //////AAAAAAAAAAAAP////////wAAAAAAAAAAAB////////4AAAAAAAAAAAAf///////8AAAAAAAAAA 295 | AAD///////+AAAAAAAAAAAAAf///////gAAAAAAAAAAAAD///////wAAAAAAAAAAAAA///////4AAAAA 296 | AAAAAAAAH//////+AAAAAAAAAAAAAB///////AAAAAAAAAAAAAAP//////wAAAAAAAAAAAAAD//////4 297 | AAAAAAAAAAAAAAf/////+AAAAAAAAAAAAAAH//////AAAAAAAAAAAAAAA//////wAAAAAAAAAAAAAAP/ 298 | ////8AAAAAAAAAAAAAAB/////+AAAAAAAAAAAAAAAf/////gAAAAAAAAAAAAAAH/////4AAAAAAAAAAA 299 | AAAB/////8AAAAAAAAAAAAAAAP/////AAAAAAAAAAAAAAAD/////wAAAAAAAAAAAAAAA/////8AAAAAA 300 | AAAAAAAAAP/////AAAAAAAAAAAAAAAB/////gAAAAAAAAAAAAAAAf////4AAAAAAAAAAAAAAAH////+A 301 | AAAAAAAAAAAAAAB/////gAAAAAAAAAAAAAAAf////4AAAAAAAAAAAAAAAH////+AAAAAAAAAAAAAAAB/ 302 | ////gAAAAAAAAAAAAAAAf////4AAAAAAAAAAAAAAAH////+AAAAAAAAAAAAAAAB/////gAAAAAAAAAAA 303 | AAAAf////4AAAAAAAAAAAAAAAH////+AAAAAAAAAAAAAAAB/////gAAAAAAAAAAAAAAAf////4AAAAAA 304 | AAAAAAAAAH////+AAAAAAAAAAAAAAAB/////wAAAAAAAAAAAAAAAf////8AAAAAAAAAAAAAAAP/////A 305 | AAAAAAAAAAAAAAD/////wAAAAAAAAAAAAAAA/////8AAAAAAAAAAAAAAAP/////gAAAAAAAAAAAAAAD/ 306 | ////4AAAAAAAAAAAAAAB/////+AAAAAAAAAAAAAAAf/////gAAAAAAAAAAAAAAH/////8AAAAAAAAAAA 307 | AAAD//////AAAAAAAAAAAAAAA//////4AAAAAAAAAAAAAAP/////+AAAAAAAAAAAAAAH//////gAAAAA 308 | AAAAAAAAB//////8AAAAAAAAAAAAAA///////AAAAAAAAAAAAAAP//////4AAAAAAAAAAAAAD/////// 309 | AAAAAAAAAAAAAB///////wAAAAAAAAAAAAA///////+AAAAAAAAAAAAAP///////wAAAAAAAAAAAAH// 310 | /////8AAAAAAAAAAAAB////////gAAAAAAAAAAAA////////8AAAAAAAAAAAAP////////gAAAAAAAAA 311 | AAH////////4AAAAAAAAAAAB/////////AAAAAAAAAAAAf////////4AAAAAAAAAAAH/////////AAAA 312 | AAAAAAAB/////////8AAAAAAAAAAAf/////////gAAAAAAAAAAH/////////8AAAAAAAAAAB//////// 313 | //wAAAAAAAAAAf/////////+AAAAAAAAAAD//////////4AAAAAAAAAA///////////AAAAAAABAAH// 314 | ////////8AAAAAABwAB///////////4AAAAAB+AAP///////////gAAAAD/gAB////////////gAAAH/ 315 | 4AAP////////////wAB///AAB//////////////////wAAP/////////////////+AAA//////////// 316 | //////gAAD/////////////////8AAAD/////////////////gAAAA////////////////4AAAAD//// 317 | ////////////AAAAA////////////////4AAAAH////////////////AAAAB////////////////4AAA 318 | Af////////////////AAAAH////////////////8AAAB/////////////////gAAAf////////////// 319 | ///AAAP/////////////////8AAD//////////////////8AD/////////////////////////////// 320 | //////////////////////////////////////////////////////////////////////////////// 321 | /////////////////////////////////////////////////////////////w== 322 | 323 | 324 | -------------------------------------------------------------------------------- /MoonSub/MoonSub.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {22202436-6A58-4461-B10A-0348BA6FCAD5} 8 | WinExe 9 | Properties 10 | MoonSub 11 | MoonSub 12 | v4.5.2 13 | 512 14 | true 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | false 26 | 27 | 28 | AnyCPU 29 | pdbonly 30 | true 31 | bin\Release\ 32 | TRACE 33 | prompt 34 | 4 35 | false 36 | 37 | 38 | MoonSub.ico 39 | 40 | 41 | 42 | ..\packages\xmlrpcnet.3.0.0.266\lib\net20\CookComputing.XmlRpcV2.dll 43 | True 44 | 45 | 46 | ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll 47 | True 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | Form 64 | 65 | 66 | AboutForm.cs 67 | 68 | 69 | 70 | 71 | 72 | Form 73 | 74 | 75 | MainForm.cs 76 | 77 | 78 | 79 | Form 80 | 81 | 82 | OptionsForm.cs 83 | 84 | 85 | 86 | 87 | 88 | AboutForm.cs 89 | 90 | 91 | MainForm.cs 92 | 93 | 94 | OptionsForm.cs 95 | 96 | 97 | ResXFileCodeGenerator 98 | Resources.Designer.cs 99 | Designer 100 | 101 | 102 | True 103 | Resources.resx 104 | 105 | 106 | 107 | SettingsSingleFileGenerator 108 | Settings.Designer.cs 109 | 110 | 111 | True 112 | Settings.settings 113 | True 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 134 | -------------------------------------------------------------------------------- /MoonSub/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hellzerg/moonsub/6f2d0b12b96efe550bcb01dcd92959bff6327b01/MoonSub/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /MoonSub/Options.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Newtonsoft.Json; 7 | using System.Windows.Forms; 8 | using System.Drawing; 9 | using System.IO; 10 | 11 | namespace MoonSub 12 | { 13 | public class SettingsJson 14 | { 15 | public Theme Color { get; set; } 16 | public string CDFormat { get; set; } 17 | public string FileFormat { get; set; } 18 | public string FolderFormat { get; set; } 19 | public string SubtitleFormats { get; set; } 20 | public string MovieFormats { get; set; } 21 | public bool Rename { get; set; } 22 | public bool IgnoreSubtitles { get; set; } 23 | public bool DownloadData { get; set; } 24 | public bool OrganizeFolders { get; set; } 25 | } 26 | 27 | public static class Options 28 | { 29 | internal static Color ForegroundColor = Color.MediumOrchid; 30 | internal static Color BackgroundColor = Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); 31 | 32 | internal readonly static string ThemeFlag = "themeable"; 33 | readonly static string SettingsFile = Application.StartupPath + "\\MoonSub.json"; 34 | 35 | internal static SettingsJson CurrentOptions = new SettingsJson(); 36 | 37 | internal static IEnumerable GetSelfAndChildrenRecursive(Control parent) 38 | { 39 | List controls = new List(); 40 | 41 | foreach (Control child in parent.Controls) 42 | { 43 | controls.AddRange(GetSelfAndChildrenRecursive(child)); 44 | } 45 | 46 | controls.Add(parent); 47 | return controls; 48 | } 49 | 50 | internal static void ApplyTheme(Form f) 51 | { 52 | switch (CurrentOptions.Color) 53 | { 54 | case Theme.Caramel: 55 | SetTheme(f, Color.DarkOrange, Color.Chocolate); 56 | break; 57 | case Theme.Lime: 58 | SetTheme(f, Color.LimeGreen, Color.ForestGreen); 59 | break; 60 | case Theme.Magma: 61 | SetTheme(f, Color.Tomato, Color.Red); 62 | break; 63 | case Theme.Minimal: 64 | SetTheme(f, Color.Gray, Color.DimGray); 65 | break; 66 | case Theme.Ocean: 67 | SetTheme(f, Color.DodgerBlue, Color.RoyalBlue); 68 | break; 69 | case Theme.Zerg: 70 | SetTheme(f, Color.MediumOrchid, Color.DarkOrchid); 71 | break; 72 | } 73 | } 74 | 75 | private static void SetTheme(Form f, Color c1, Color c2) 76 | { 77 | ForegroundColor = c1; 78 | 79 | GetSelfAndChildrenRecursive(f).OfType