├── .gitattributes ├── .gitignore ├── BuildProject.bat ├── LICENSE ├── Launcher ├── Launcher.sln ├── Launcher │ ├── App.config │ ├── CopyBinary.bat │ ├── Forms │ │ ├── Extras.Designer.vb │ │ ├── Extras.resx │ │ ├── Extras.vb │ │ ├── FirstRunDialog.Designer.vb │ │ ├── FirstRunDialog.resx │ │ ├── FirstRunDialog.vb │ │ ├── Options.Designer.vb │ │ ├── Options.resx │ │ └── Options.vb │ ├── GameConfig.vb │ ├── Launcher.Designer.vb │ ├── Launcher.resx │ ├── Launcher.vb │ ├── Launcher.vbproj │ ├── Launcher_TemporaryKey.pfx │ ├── My Project │ │ ├── Application.Designer.vb │ │ ├── Application.myapp │ │ ├── AssemblyInfo.vb │ │ ├── Resources.Designer.vb │ │ ├── Resources.de-DE.resx │ │ ├── Resources.nl.resx │ │ ├── Resources.resx │ │ ├── Settings.Designer.vb │ │ └── Settings.settings │ ├── OpenRCTdotNet │ │ ├── OpenRCTdotNetConfigure.Designer.vb │ │ ├── OpenRCTdotNetConfigure.resx │ │ ├── OpenRCTdotNetConfigure.vb │ │ ├── OpenRCTdotNetLogin.Designer.vb │ │ ├── OpenRCTdotNetLogin.resx │ │ ├── OpenRCTdotNetLogin.vb │ │ ├── OpenRCTdotNetStoreBrowser.Designer.vb │ │ ├── OpenRCTdotNetStoreBrowser.resx │ │ ├── OpenRCTdotNetStoreBrowser.vb │ │ ├── OpenRCTdotNetSyncSaves.Designer.vb │ │ ├── OpenRCTdotNetSyncSaves.resx │ │ ├── OpenRCTdotNetSyncSaves.vb │ │ ├── OpenRCTdotNetUser.vb │ │ └── OpenRCTdotNetWebActions.vb │ ├── Resources │ │ ├── Icon(64).png │ │ ├── Logo.png │ │ ├── OpenRCTIcon.ico │ │ ├── btn_donateCC_LG.gif │ │ ├── btn_donate_LG.gif │ │ ├── index_openrct2_logo.png │ │ ├── login_screen.png │ │ └── offline.png │ └── packages.config ├── LauncherWFP │ ├── App.config │ ├── App.xaml │ ├── App.xaml.cs │ ├── Data │ │ ├── Context │ │ │ ├── MainWindowContext.cs │ │ │ └── WelcomeDataContext.cs │ │ ├── Extensions.cs │ │ └── Option.cs │ ├── FodyWeavers.xml │ ├── LauncherWPF.csproj │ ├── MainWindow.xaml │ ├── MainWindow.xaml.cs │ ├── Management │ │ ├── OpenRctBuildCollection.cs │ │ ├── OpenRctBuildInformation.cs │ │ ├── OpenRctBuildManager.cs │ │ ├── OpenRctIniManager.cs │ │ ├── OpenRctNetApiWrapper.cs │ │ └── RctLocator.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── Resources │ │ ├── Icon(64).png │ │ ├── Logo.png │ │ ├── Text │ │ │ ├── Errors.Designer.cs │ │ │ ├── Errors.resx │ │ │ ├── Strings.Designer.cs │ │ │ └── Strings.resx │ │ ├── btn_donateCC_LG.gif │ │ ├── btn_donate_LG.gif │ │ ├── index_openrct2_logo.png │ │ ├── login_screen.png │ │ ├── offline.png │ │ └── openrcticon.ico │ ├── UI │ │ ├── RelayCommand.cs │ │ └── Windows │ │ │ ├── Welcome.xaml │ │ │ └── Welcome.xaml.cs │ └── packages.config ├── ORCT2ModPacker │ ├── ORCT2ModPacker.sln │ └── ORCT2ModPacker │ │ ├── Class1.vb │ │ ├── My Project │ │ ├── Application.Designer.vb │ │ ├── Application.myapp │ │ ├── AssemblyInfo.vb │ │ ├── Resources.Designer.vb │ │ ├── Resources.resx │ │ ├── Settings.Designer.vb │ │ └── Settings.settings │ │ └── ORCT2ModPacker.vbproj ├── ReparsePointLibrary │ ├── Classes │ │ ├── Funcs.cs │ │ └── OpenRCT2Config.cs │ ├── HelperLibrary.csproj │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ └── Utils │ │ ├── CommandLineArgs.cs │ │ ├── FileActions.cs │ │ ├── IniConfiguration.cs │ │ ├── ReparsePoint.cs │ │ └── TextReaderExtensions.cs └── Tests │ ├── Properties │ └── AssemblyInfo.cs │ ├── ReparsePointTests.cs │ └── Tests.csproj ├── README.md ├── appveyor.yml └── nuget-restore.bat /.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 | # Created by https://www.gitignore.io 2 | 3 | ### VisualStudio ### 4 | ## Ignore Visual Studio temporary files, build results, and 5 | ## files generated by popular Visual Studio add-ons. 6 | 7 | # User-specific files 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Build results 17 | [Dd]ebug/ 18 | [Dd]ebugPublic/ 19 | [Rr]elease/ 20 | [Rr]eleases/ 21 | x64/ 22 | x86/ 23 | build/ 24 | bld/ 25 | [Bb]in/ 26 | [Oo]bj/ 27 | 28 | # Roslyn cache directories 29 | *.ide/ 30 | 31 | # MSTest test Results 32 | [Tt]est[Rr]esult*/ 33 | [Bb]uild[Ll]og.* 34 | 35 | #NUNIT 36 | *.VisualState.xml 37 | TestResult.xml 38 | 39 | # Build Results of an ATL Project 40 | [Dd]ebugPS/ 41 | [Rr]eleasePS/ 42 | dlldata.c 43 | 44 | *_i.c 45 | *_p.c 46 | *_i.h 47 | *.ilk 48 | *.meta 49 | *.obj 50 | *.pch 51 | *.pdb 52 | *.pgc 53 | *.pgd 54 | *.rsp 55 | *.sbr 56 | *.tlb 57 | *.tli 58 | *.tlh 59 | *.tmp 60 | *.tmp_proj 61 | *.log 62 | *.vspscc 63 | *.vssscc 64 | .builds 65 | *.pidb 66 | *.svclog 67 | *.scc 68 | 69 | # Chutzpah Test files 70 | _Chutzpah* 71 | 72 | # Visual C++ cache files 73 | ipch/ 74 | *.aps 75 | *.ncb 76 | *.opensdf 77 | *.sdf 78 | *.cachefile 79 | 80 | # Visual Studio profiler 81 | *.psess 82 | *.vsp 83 | *.vspx 84 | 85 | # TFS 2012 Local Workspace 86 | $tf/ 87 | 88 | # Guidance Automation Toolkit 89 | *.gpState 90 | 91 | # ReSharper is a .NET coding add-in 92 | _ReSharper*/ 93 | *.[Rr]e[Ss]harper 94 | *.DotSettings.user 95 | 96 | # JustCode is a .NET coding addin-in 97 | .JustCode 98 | 99 | # TeamCity is a build add-in 100 | _TeamCity* 101 | 102 | # DotCover is a Code Coverage Tool 103 | *.dotCover 104 | 105 | # NCrunch 106 | _NCrunch_* 107 | .*crunch*.local.xml 108 | 109 | # MightyMoose 110 | *.mm.* 111 | AutoTest.Net/ 112 | 113 | # Web workbench (sass) 114 | .sass-cache/ 115 | 116 | # Installshield output folder 117 | [Ee]xpress/ 118 | 119 | # DocProject is a documentation generator add-in 120 | DocProject/buildhelp/ 121 | DocProject/Help/*.HxT 122 | DocProject/Help/*.HxC 123 | DocProject/Help/*.hhc 124 | DocProject/Help/*.hhk 125 | DocProject/Help/*.hhp 126 | DocProject/Help/Html2 127 | DocProject/Help/html 128 | 129 | # Click-Once directory 130 | publish/ 131 | 132 | # Publish Web Output 133 | *.[Pp]ublish.xml 134 | *.azurePubxml 135 | # TODO: Comment the next line if you want to checkin your web deploy settings 136 | # but database connection strings (with potential passwords) will be unencrypted 137 | *.pubxml 138 | *.publishproj 139 | 140 | # NuGet Packages 141 | *.nupkg 142 | # The packages folder can be ignored because of Package Restore 143 | **/packages/* 144 | # except build/, which is used as an MSBuild target. 145 | !**/packages/build/ 146 | # Uncomment if necessary however generally it will be regenerated when needed 147 | #!**/packages/repositories.config 148 | 149 | # Windows Azure Build Output 150 | csx/ 151 | *.build.csdef 152 | 153 | # Windows Store app package directory 154 | AppPackages/ 155 | 156 | # Others 157 | *.[Cc]ache 158 | ClientBin/ 159 | [Ss]tyle[Cc]op.* 160 | ~$* 161 | *~ 162 | *.dbmdl 163 | *.dbproj.schemaview 164 | *.pfx 165 | *.publishsettings 166 | node_modules/ 167 | bower_components/ 168 | 169 | # RIA/Silverlight projects 170 | Generated_Code/ 171 | 172 | # Backup & report files from converting an old project file 173 | # to a newer Visual Studio version. Backup files are not needed, 174 | # because we have git ;-) 175 | _UpgradeReport_Files/ 176 | Backup*/ 177 | UpgradeLog*.XML 178 | UpgradeLog*.htm 179 | 180 | # SQL Server files 181 | *.mdf 182 | *.ldf 183 | 184 | # Business Intelligence projects 185 | *.rdl.data 186 | *.bim.layout 187 | *.bim_*.settings 188 | 189 | # Microsoft Fakes 190 | FakesAssemblies/ 191 | 192 | # Node.js Tools for Visual Studio 193 | .ntvs_analysis.dat 194 | 195 | # Visual Studio 6 build log 196 | *.plg 197 | 198 | # Visual Studio 6 workspace options file 199 | *.opt 200 | 201 | 202 | ### Windows ### 203 | # Windows image file caches 204 | Thumbs.db 205 | ehthumbs.db 206 | 207 | # Folder config file 208 | Desktop.ini 209 | 210 | # Recycle Bin used on file shares 211 | $RECYCLE.BIN/ 212 | 213 | # Windows Installer files 214 | *.cab 215 | *.msi 216 | *.msm 217 | *.msp 218 | 219 | # Windows shortcuts 220 | *.lnk 221 | 222 | -------------------------------------------------------------------------------- /BuildProject.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | title Building Launcher... 3 | C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe /verbosity:n /p:Configuration=Release %CD%\Launcher\Launcher.sln 4 | MD LauncherBin 5 | MD LauncherBin\de-DE 6 | xcopy "%CD%\Launcher\Launcher\bin\Release\*.dll" "%CD%\LauncherBin" /y 7 | xcopy "%CD%\Launcher\Launcher\bin\Release\*.exe" "%CD%\LauncherBin" /y 8 | xcopy "%CD%\Launcher\Launcher\bin\Release\de-DE\OpenRCT2 Launcher.resources.dll" "%CD%\LauncherBin\de-DE" /y 9 | start explorer.exe "%CD%\LauncherBin" 10 | pause 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 PFCKrutonium 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /Launcher/Launcher.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.23107.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Launcher", "Launcher\Launcher.vbproj", "{7647631A-C900-4106-B132-189D087A166D}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelperLibrary", "ReparsePointLibrary\HelperLibrary.csproj", "{E84D866B-4176-4444-A2AB-CE820001AE4A}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{E1725E87-E4A6-4DDD-B832-B8F103395138}" 11 | EndProject 12 | Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ORCT2ModPacker", "ORCT2ModPacker\ORCT2ModPacker\ORCT2ModPacker.vbproj", "{720C4B60-DFF5-4B08-BAD1-3A88D4D0E04E}" 13 | EndProject 14 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LauncherWPF", "LauncherWFP\LauncherWPF.csproj", "{221F3C36-C985-4146-ABE2-5A7738A7EE01}" 15 | EndProject 16 | Global 17 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 18 | Debug|Any CPU = Debug|Any CPU 19 | Release|Any CPU = Release|Any CPU 20 | EndGlobalSection 21 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 22 | {7647631A-C900-4106-B132-189D087A166D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 23 | {7647631A-C900-4106-B132-189D087A166D}.Debug|Any CPU.Build.0 = Debug|Any CPU 24 | {7647631A-C900-4106-B132-189D087A166D}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {7647631A-C900-4106-B132-189D087A166D}.Release|Any CPU.Build.0 = Release|Any CPU 26 | {E84D866B-4176-4444-A2AB-CE820001AE4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 27 | {E84D866B-4176-4444-A2AB-CE820001AE4A}.Debug|Any CPU.Build.0 = Debug|Any CPU 28 | {E84D866B-4176-4444-A2AB-CE820001AE4A}.Release|Any CPU.ActiveCfg = Release|Any CPU 29 | {E84D866B-4176-4444-A2AB-CE820001AE4A}.Release|Any CPU.Build.0 = Release|Any CPU 30 | {E1725E87-E4A6-4DDD-B832-B8F103395138}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 31 | {E1725E87-E4A6-4DDD-B832-B8F103395138}.Debug|Any CPU.Build.0 = Debug|Any CPU 32 | {E1725E87-E4A6-4DDD-B832-B8F103395138}.Release|Any CPU.ActiveCfg = Release|Any CPU 33 | {E1725E87-E4A6-4DDD-B832-B8F103395138}.Release|Any CPU.Build.0 = Release|Any CPU 34 | {720C4B60-DFF5-4B08-BAD1-3A88D4D0E04E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 35 | {720C4B60-DFF5-4B08-BAD1-3A88D4D0E04E}.Debug|Any CPU.Build.0 = Debug|Any CPU 36 | {720C4B60-DFF5-4B08-BAD1-3A88D4D0E04E}.Release|Any CPU.ActiveCfg = Release|Any CPU 37 | {720C4B60-DFF5-4B08-BAD1-3A88D4D0E04E}.Release|Any CPU.Build.0 = Release|Any CPU 38 | {221F3C36-C985-4146-ABE2-5A7738A7EE01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 39 | {221F3C36-C985-4146-ABE2-5A7738A7EE01}.Debug|Any CPU.Build.0 = Debug|Any CPU 40 | {221F3C36-C985-4146-ABE2-5A7738A7EE01}.Release|Any CPU.ActiveCfg = Release|Any CPU 41 | {221F3C36-C985-4146-ABE2-5A7738A7EE01}.Release|Any CPU.Build.0 = Release|Any CPU 42 | EndGlobalSection 43 | GlobalSection(SolutionProperties) = preSolution 44 | HideSolutionNode = FALSE 45 | EndGlobalSection 46 | EndGlobal 47 | -------------------------------------------------------------------------------- /Launcher/Launcher/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | False 21 | 22 | 23 | 24 | 25 | 26 | False 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | False 39 | 40 | 41 | False 42 | 43 | 44 | 45 | 46 | 47 | False 48 | 49 | 50 | False 51 | 52 | 53 | True 54 | 55 | 56 | True 57 | 58 | 59 | True 60 | 61 | 62 | False 63 | 64 | 65 | 0 66 | 67 | 68 | True 69 | 70 | 71 | True 72 | 73 | 74 | 75 | 76 | 77 | 78 | NXgFj50WlithAa5sK9Z3WGAGnboyJTrwRHcaNd78vAq6LvywEyzAfahDlFb5zCCqjOB62JfxkGE5bcCQLbr0mIDHoPMYropLd0Sg 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /Launcher/Launcher/CopyBinary.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | del %CD%\..\..\..\..\Binaries\*.exe 3 | robocopy *.exe %CD% %CD%\..\..\..\..\Binaries\ /XF *vshost* 4 | pause 5 | exit -------------------------------------------------------------------------------- /Launcher/Launcher/Forms/Extras.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 | 17, 17 122 | 123 | 124 | 99, 17 125 | 126 | -------------------------------------------------------------------------------- /Launcher/Launcher/Forms/FirstRunDialog.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 | -------------------------------------------------------------------------------- /Launcher/Launcher/Forms/FirstRunDialog.vb: -------------------------------------------------------------------------------- 1 | Imports System.Windows.Forms 2 | Imports Launcher.My 3 | 4 | Public Class FirstRunDialog 5 | 6 | Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StableButton.Click 7 | Me.DialogResult = System.Windows.Forms.DialogResult.OK 8 | My.Settings.DownloadDevelop = False 9 | Settings.FirstRun = False 10 | My.Settings.Save() 11 | Me.Close() 12 | End Sub 13 | 14 | Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DevelopmentButton.Click 15 | Me.DialogResult = System.Windows.Forms.DialogResult.Cancel 16 | My.Settings.DownloadDevelop = True 17 | Settings.FirstRun = False 18 | My.Settings.Save() 19 | Me.Close() 20 | End Sub 21 | 22 | End Class 23 | -------------------------------------------------------------------------------- /Launcher/Launcher/Forms/Options.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 | 17, 17 122 | 123 | 124 | 90, 17 125 | 126 | -------------------------------------------------------------------------------- /Launcher/Launcher/Launcher.Designer.vb: -------------------------------------------------------------------------------- 1 | Imports Launcher.My.Resources 2 | 3 | _ 4 | Partial Class frmLauncher 5 | Inherits System.Windows.Forms.Form 6 | 7 | 'Form overrides dispose to clean up the component list. 8 | _ 9 | Protected Overrides Sub Dispose(ByVal disposing As Boolean) 10 | Try 11 | If disposing AndAlso components IsNot Nothing Then 12 | components.Dispose() 13 | End If 14 | Finally 15 | MyBase.Dispose(disposing) 16 | End Try 17 | End Sub 18 | 19 | 'Required by the Windows Form Designer 20 | Private components As System.ComponentModel.IContainer 21 | 22 | 'NOTE: The following procedure is required by the Windows Form Designer 23 | 'It can be modified using the Windows Form Designer. 24 | 'Do not modify it using the code editor. 25 | _ 26 | Private Sub InitializeComponent() 27 | Me.cmdLaunchGame = New System.Windows.Forms.Button() 28 | Me.cmdUpdate = New System.Windows.Forms.Button() 29 | Me.cmdOptions = New System.Windows.Forms.Button() 30 | Me.cmdExtras = New System.Windows.Forms.Button() 31 | Me.wbSlideshow = New System.Windows.Forms.WebBrowser() 32 | Me.PictureBox1 = New System.Windows.Forms.PictureBox() 33 | CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() 34 | Me.SuspendLayout() 35 | ' 36 | 'cmdLaunchGame 37 | ' 38 | Me.cmdLaunchGame.Enabled = False 39 | Me.cmdLaunchGame.Location = New System.Drawing.Point(12, 258) 40 | Me.cmdLaunchGame.Name = "cmdLaunchGame" 41 | Me.cmdLaunchGame.Size = New System.Drawing.Size(155, 37) 42 | Me.cmdLaunchGame.TabIndex = 0 43 | Me.cmdLaunchGame.Text = Global.Launcher.My.Resources.Resources.frmLauncher_launchGameButton_text 44 | Me.cmdLaunchGame.UseVisualStyleBackColor = True 45 | ' 46 | 'cmdUpdate 47 | ' 48 | Me.cmdUpdate.Location = New System.Drawing.Point(173, 258) 49 | Me.cmdUpdate.Name = "cmdUpdate" 50 | Me.cmdUpdate.Size = New System.Drawing.Size(87, 37) 51 | Me.cmdUpdate.TabIndex = 1 52 | Me.cmdUpdate.Text = Global.Launcher.My.Resources.Resources.frmLauncher_updateButton_text 53 | Me.cmdUpdate.UseVisualStyleBackColor = True 54 | ' 55 | 'cmdOptions 56 | ' 57 | Me.cmdOptions.Location = New System.Drawing.Point(266, 258) 58 | Me.cmdOptions.Name = "cmdOptions" 59 | Me.cmdOptions.Size = New System.Drawing.Size(87, 37) 60 | Me.cmdOptions.TabIndex = 2 61 | Me.cmdOptions.Text = Global.Launcher.My.Resources.Resources.frmLauncher_optionsButton_title 62 | Me.cmdOptions.UseVisualStyleBackColor = True 63 | ' 64 | 'cmdExtras 65 | ' 66 | Me.cmdExtras.Location = New System.Drawing.Point(359, 258) 67 | Me.cmdExtras.Name = "cmdExtras" 68 | Me.cmdExtras.Size = New System.Drawing.Size(87, 37) 69 | Me.cmdExtras.TabIndex = 3 70 | Me.cmdExtras.Text = Global.Launcher.My.Resources.Resources.frmLauncher_extrasButton_text 71 | Me.cmdExtras.UseVisualStyleBackColor = True 72 | ' 73 | 'wbSlideshow 74 | ' 75 | Me.wbSlideshow.AllowWebBrowserDrop = False 76 | Me.wbSlideshow.IsWebBrowserContextMenuEnabled = False 77 | Me.wbSlideshow.Location = New System.Drawing.Point(0, 0) 78 | Me.wbSlideshow.MinimumSize = New System.Drawing.Size(20, 20) 79 | Me.wbSlideshow.Name = "wbSlideshow" 80 | Me.wbSlideshow.ScriptErrorsSuppressed = True 81 | Me.wbSlideshow.ScrollBarsEnabled = False 82 | Me.wbSlideshow.Size = New System.Drawing.Size(458, 240) 83 | Me.wbSlideshow.TabIndex = 5 84 | Me.wbSlideshow.TabStop = False 85 | Me.wbSlideshow.Url = New System.Uri("https://openrct.net/inLauncher/launcher.html", System.UriKind.Absolute) 86 | Me.wbSlideshow.WebBrowserShortcutsEnabled = False 87 | ' 88 | 'PictureBox1 89 | ' 90 | Me.PictureBox1.Image = Global.Launcher.My.Resources.Resources.offline 91 | Me.PictureBox1.Location = New System.Drawing.Point(0, 0) 92 | Me.PictureBox1.Name = "PictureBox1" 93 | Me.PictureBox1.Size = New System.Drawing.Size(458, 240) 94 | Me.PictureBox1.TabIndex = 6 95 | Me.PictureBox1.TabStop = False 96 | ' 97 | 'frmLauncher 98 | ' 99 | Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) 100 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font 101 | Me.ClientSize = New System.Drawing.Size(458, 307) 102 | Me.Controls.Add(Me.cmdExtras) 103 | Me.Controls.Add(Me.cmdOptions) 104 | Me.Controls.Add(Me.cmdUpdate) 105 | Me.Controls.Add(Me.cmdLaunchGame) 106 | Me.Controls.Add(Me.PictureBox1) 107 | Me.Controls.Add(Me.wbSlideshow) 108 | Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D 109 | Me.KeyPreview = True 110 | Me.MaximizeBox = False 111 | Me.Name = "frmLauncher" 112 | Me.Text = "OpenRCT2 Launcher" 113 | CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit() 114 | Me.ResumeLayout(False) 115 | 116 | End Sub 117 | Friend WithEvents cmdLaunchGame As System.Windows.Forms.Button 118 | Friend WithEvents cmdUpdate As System.Windows.Forms.Button 119 | Friend WithEvents cmdOptions As System.Windows.Forms.Button 120 | Friend WithEvents cmdExtras As System.Windows.Forms.Button 121 | Friend WithEvents wbSlideshow As System.Windows.Forms.WebBrowser 122 | Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox 123 | 124 | End Class 125 | -------------------------------------------------------------------------------- /Launcher/Launcher/Launcher.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 | -------------------------------------------------------------------------------- /Launcher/Launcher/Launcher_TemporaryKey.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Krutonium/OpenRCT2Launcher/67527903a8c3b98320d03cfc3c9a6b4679975684/Launcher/Launcher/Launcher_TemporaryKey.pfx -------------------------------------------------------------------------------- /Launcher/Launcher/My Project/Application.Designer.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated by a tool. 4 | ' Runtime Version:4.0.30319.34014 5 | ' 6 | ' Changes to this file may cause incorrect behavior and will be lost if 7 | ' the code is regenerated. 8 | ' 9 | '------------------------------------------------------------------------------ 10 | 11 | Option Strict On 12 | Option Explicit On 13 | 14 | 15 | Namespace My 16 | 17 | 'NOTE: This file is auto-generated; do not modify it directly. To make changes, 18 | ' or if you encounter build errors in this file, go to the Project Designer 19 | ' (go to Project Properties or double-click the My Project node in 20 | ' Solution Explorer), and make changes on the Application tab. 21 | ' 22 | Partial Friend Class MyApplication 23 | 24 | _ 25 | Public Sub New() 26 | MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) 27 | Me.IsSingleInstance = false 28 | Me.EnableVisualStyles = true 29 | Me.SaveMySettingsOnExit = true 30 | Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses 31 | End Sub 32 | 33 | _ 34 | Protected Overrides Sub OnCreateMainForm() 35 | Me.MainForm = Global.Launcher.FrmLauncher 36 | End Sub 37 | End Class 38 | End Namespace 39 | -------------------------------------------------------------------------------- /Launcher/Launcher/My Project/Application.myapp: -------------------------------------------------------------------------------- 1 |  2 | 3 | true 4 | FrmLauncher 5 | false 6 | 0 7 | true 8 | 0 9 | true 10 | -------------------------------------------------------------------------------- /Launcher/Launcher/My Project/AssemblyInfo.vb: -------------------------------------------------------------------------------- 1 | Imports System 2 | Imports System.Reflection 3 | Imports System.Runtime.InteropServices 4 | 5 | ' General Information about an assembly is controlled through the following 6 | ' set of attributes. Change these attribute values to modify the information 7 | ' associated with an assembly. 8 | 9 | ' Review the values of the assembly attributes 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 'The following GUID is for the ID of the typelib if this project is exposed to COM 21 | 22 | 23 | ' Version information for an assembly consists of the following four values: 24 | ' 25 | ' Major Version 26 | ' Minor Version 27 | ' Build Number 28 | ' Revision 29 | ' 30 | ' You can specify all the values or you can default the Build and Revision Numbers 31 | ' by using the '*' as shown below: 32 | ' 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /Launcher/Launcher/My Project/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | False 10 | 11 | 12 | 13 | 14 | 15 | False 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | False 28 | 29 | 30 | False 31 | 32 | 33 | 34 | 35 | 36 | NXgFj50WlithAa5sK9Z3WGAGnboyJTrwRHcaNd78vAq6LvywEyzAfahDlFb5zCCqjOB62JfxkGE5bcCQLbr0mIDHoPMYropLd0Sg 37 | 38 | 39 | False 40 | 41 | 42 | False 43 | 44 | 45 | True 46 | 47 | 48 | True 49 | 50 | 51 | True 52 | 53 | 54 | False 55 | 56 | 57 | 0 58 | 59 | 60 | True 61 | 62 | 63 | True 64 | 65 | 66 | -------------------------------------------------------------------------------- /Launcher/Launcher/OpenRCTdotNet/OpenRCTdotNetConfigure.Designer.vb: -------------------------------------------------------------------------------- 1 | Imports Launcher.My.Resources 2 | 3 | Namespace OpenRCTdotNet 4 | 5 | _ 6 | Partial Class OpenRCTdotNetConfigure 7 | Inherits System.Windows.Forms.Form 8 | 9 | 'Form overrides dispose to clean up the component list. 10 | _ 11 | Protected Overrides Sub Dispose(ByVal disposing As Boolean) 12 | Try 13 | If disposing AndAlso components IsNot Nothing Then 14 | components.Dispose() 15 | End If 16 | Finally 17 | MyBase.Dispose(disposing) 18 | End Try 19 | End Sub 20 | 21 | 'Required by the Windows Form Designer 22 | Private components As System.ComponentModel.IContainer 23 | 24 | 'NOTE: The following procedure is required by the Windows Form Designer 25 | 'It can be modified using the Windows Form Designer. 26 | 'Do not modify it using the code editor. 27 | _ 28 | Private Sub InitializeComponent() 29 | Me.ChkUploadTime = New System.Windows.Forms.CheckBox() 30 | Me.chkUploadSaves = New System.Windows.Forms.CheckBox() 31 | Me.lblUsername = New System.Windows.Forms.Label() 32 | Me.lblWarning = New System.Windows.Forms.Label() 33 | Me.LogoPictureBox = New System.Windows.Forms.PictureBox() 34 | CType(Me.LogoPictureBox, System.ComponentModel.ISupportInitialize).BeginInit() 35 | Me.SuspendLayout() 36 | ' 37 | 'ChkUploadTime 38 | ' 39 | Me.ChkUploadTime.AutoSize = True 40 | Me.ChkUploadTime.Location = New System.Drawing.Point(155, 36) 41 | Me.ChkUploadTime.Name = "ChkUploadTime" 42 | Me.ChkUploadTime.Size = New System.Drawing.Size(150, 17) 43 | Me.ChkUploadTime.TabIndex = 0 44 | Me.ChkUploadTime.Text = Global.Launcher.My.Resources.Resources.OpenRCTdotNetConfigure_uploadPlayTime_label 45 | Me.ChkUploadTime.UseVisualStyleBackColor = True 46 | ' 47 | 'chkUploadSaves 48 | ' 49 | Me.chkUploadSaves.AutoSize = True 50 | Me.chkUploadSaves.Location = New System.Drawing.Point(155, 59) 51 | Me.chkUploadSaves.Name = "chkUploadSaves" 52 | Me.chkUploadSaves.Size = New System.Drawing.Size(139, 17) 53 | Me.chkUploadSaves.TabIndex = 1 54 | Me.chkUploadSaves.Text = Global.Launcher.My.Resources.Resources.OpenRCTdotNetConfigure_uploadSaves_label 55 | Me.chkUploadSaves.UseVisualStyleBackColor = True 56 | ' 57 | 'lblUsername 58 | ' 59 | Me.lblUsername.AutoSize = True 60 | Me.lblUsername.Location = New System.Drawing.Point(155, 17) 61 | Me.lblUsername.Name = "lblUsername" 62 | Me.lblUsername.Size = New System.Drawing.Size(0, 13) 63 | Me.lblUsername.TabIndex = 2 64 | ' 65 | 'lblWarning 66 | ' 67 | Me.lblWarning.AutoSize = True 68 | Me.lblWarning.Location = New System.Drawing.Point(155, 79) 69 | Me.lblWarning.Name = "lblWarning" 70 | Me.lblWarning.Size = New System.Drawing.Size(0, 13) 71 | Me.lblWarning.TabIndex = 3 72 | ' 73 | 'LogoPictureBox 74 | ' 75 | Me.LogoPictureBox.Image = Global.Launcher.My.Resources.Resources.logo_icon 76 | Me.LogoPictureBox.Location = New System.Drawing.Point(12, 12) 77 | Me.LogoPictureBox.Name = "LogoPictureBox" 78 | Me.LogoPictureBox.Size = New System.Drawing.Size(128, 128) 79 | Me.LogoPictureBox.TabIndex = 4 80 | Me.LogoPictureBox.TabStop = False 81 | ' 82 | 'OpenRCTdotNetConfigure 83 | ' 84 | Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) 85 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font 86 | Me.ClientSize = New System.Drawing.Size(438, 154) 87 | Me.Controls.Add(Me.LogoPictureBox) 88 | Me.Controls.Add(Me.lblWarning) 89 | Me.Controls.Add(Me.lblUsername) 90 | Me.Controls.Add(Me.chkUploadSaves) 91 | Me.Controls.Add(Me.ChkUploadTime) 92 | Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D 93 | Me.Name = "OpenRCTdotNetConfigure" 94 | Me.ShowInTaskbar = False 95 | Me.Text = Global.Launcher.My.Resources.Resources.OpenRCTdotNetConfigure_configuration 96 | CType(Me.LogoPictureBox, System.ComponentModel.ISupportInitialize).EndInit() 97 | Me.ResumeLayout(False) 98 | Me.PerformLayout() 99 | 100 | End Sub 101 | Friend WithEvents ChkUploadTime As System.Windows.Forms.CheckBox 102 | Friend WithEvents chkUploadSaves As System.Windows.Forms.CheckBox 103 | Friend WithEvents lblUsername As System.Windows.Forms.Label 104 | Friend WithEvents lblWarning As System.Windows.Forms.Label 105 | Friend WithEvents LogoPictureBox As System.Windows.Forms.PictureBox 106 | End Class 107 | End Namespace -------------------------------------------------------------------------------- /Launcher/Launcher/OpenRCTdotNet/OpenRCTdotNetConfigure.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 | -------------------------------------------------------------------------------- /Launcher/Launcher/OpenRCTdotNet/OpenRCTdotNetConfigure.vb: -------------------------------------------------------------------------------- 1 | Imports Launcher.My 2 | Imports Launcher.My.Resources 3 | 4 | Namespace OpenRCTdotNet 5 | Public Class OpenRCTdotNetConfigure 6 | 7 | Private Sub OpenRCTdotNetConfigure_Load(sender As Object, e As EventArgs) Handles MyBase.Load 8 | Icon = OpenRCTIcon 9 | FormBorderStyle = FormBorderStyle.Fixed3D 10 | WindowState = FormWindowState.Normal 11 | MaximizeBox = False 12 | ChkUploadTime.Checked = Settings.OpenRCTdotNetUploadTime 13 | chkUploadSaves.Checked = Settings.OpenRCTdotNetSaveGames 14 | If chkUploadSaves.Checked = True Then 15 | lblWarning.Text = "Warning" + vbNewLine + OpenRCTdotNetConfigureSlowDownWarn 16 | End If 17 | 18 | lblUsername.Text = OpenRCTdotNetConfigure_loggedInAs & Settings.OpenRCTdotNetUsername 19 | End Sub 20 | 21 | Private Sub ChkUploadTime_CheckedChanged(sender As Object, e As EventArgs) Handles ChkUploadTime.CheckedChanged 22 | Settings.OpenRCTdotNetUploadTime = ChkUploadTime.Checked 23 | Settings.HasChanged = True 24 | Settings.Save() 25 | End Sub 26 | 27 | Private Sub chkUploadSaves_CheckedChanged(sender As Object, e As EventArgs) Handles chkUploadSaves.CheckedChanged 28 | Settings.OpenRCTdotNetSaveGames = chkUploadSaves.Checked 29 | Settings.HasChanged = True 30 | Settings.Save() 31 | If chkUploadSaves.Checked Then 32 | lblWarning.Text = "Warning" + vbNewLine + OpenRCTdotNetConfigureSlowDownWarn 33 | Else 34 | lblWarning.Text = "" 35 | End If 36 | End Sub 37 | End Class 38 | End Namespace -------------------------------------------------------------------------------- /Launcher/Launcher/OpenRCTdotNet/OpenRCTdotNetLogin.vb: -------------------------------------------------------------------------------- 1 | Imports Launcher.My.Resources 2 | Imports Launcher.Forms 3 | Imports Launcher.My 4 | 5 | Namespace OpenRCTdotNet 6 | 7 | Public Class OpenRCTdotNetLogin 8 | ' TODO: Insert code to perform custom authentication using the provided OpenRCTdotNetUsername and password 9 | ' (See http://go.microsoft.com/fwlink/?LinkId=35339). 10 | ' The custom principal can then be attached to the current thread's principal as follows: 11 | ' My.User.CurrentPrincipal = CustomPrincipal 12 | ' where CustomPrincipal is the IPrincipal implementation used to perform authentication. 13 | ' Subsequently, My.User will return identity information encapsulated in the CustomPrincipal object 14 | ' such as the OpenRCTdotNetUsername, display name, etc. 15 | 16 | Private Async Sub OK_Click(ByVal sender As System.Object, ByVal e As EventArgs) Handles OK.Click 17 | Dim username As String = UsernameTextBox.Text 18 | Dim password As String = PasswordTextBox.Text 19 | 20 | Try 21 | Dim user As OpenRCTdotNetUser = Await OpenRCTdotNetWebActions.Login(username, password, True) 22 | 'MsgBox("Welcome, " & user.Username) 23 | Extras.cmdOpenRCTNetFeatures.Enabled = True 24 | Extras.cmdSyncSaves.Enabled = True 25 | Dim UploadT = MsgBox(OpenRCTdotNetLogin_welcome & user.Username & "!" & vbNewLine & OpenRCTdotNetLogin_uploadPlayTime_text, MsgBoxStyle.YesNo, OpenRCTdotNetLogin_uploadPlayTime_title) 26 | If UploadT = MsgBoxResult.Yes Then 27 | My.Settings.OpenRCTdotNetUploadTime = True 28 | My.Settings.HasChanged = True 29 | My.Settings.Save() 30 | End If 31 | Close() 32 | Catch ex As Exception 33 | If TypeOf ex Is OpenRCTdotNetWebActionException Then 34 | MsgBox(ex.Message) 35 | End If 36 | End Try 37 | End Sub 38 | 39 | Private Sub Cancel_Click(ByVal sender As System.Object, ByVal e As EventArgs) Handles Cancel.Click 40 | Close() 41 | End Sub 42 | 43 | Private Sub LoginForm1_Load(sender As Object, e As EventArgs) Handles MyBase.Load 44 | Icon = OpenRCTIcon 45 | FormBorderStyle = FormBorderStyle.Fixed3D 46 | WindowState = FormWindowState.Normal 47 | MaximizeBox = False 48 | LogoPictureBox.SizeMode = PictureBoxSizeMode.Zoom 49 | LogoPictureBox.Image = login_screen 50 | End Sub 51 | 52 | Private Sub LinkLabel1_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked 53 | Process.Start("http://openrct.net/") 54 | End Sub 55 | 56 | Private Sub LogoPictureBox_Click(sender As Object, e As EventArgs) Handles LogoPictureBox.Click 57 | Dim clear As Boolean = False 58 | If clear = True Then 59 | My.Settings.OpenRCTdotNetUserAuthCode = Nothing 60 | My.Settings.OpenRCTdotNetUserID = Nothing 61 | My.Settings.OpenRCTdotNetUsername = Nothing 62 | My.Settings.HasChanged = True 63 | My.Settings.Save() 64 | End If 65 | End Sub 66 | End Class 67 | End Namespace -------------------------------------------------------------------------------- /Launcher/Launcher/OpenRCTdotNet/OpenRCTdotNetStoreBrowser.Designer.vb: -------------------------------------------------------------------------------- 1 |  _ 2 | Partial Class OpenRCTdotNetStoreBrowser 3 | Inherits System.Windows.Forms.Form 4 | 5 | 'Form overrides dispose to clean up the component list. 6 | _ 7 | Protected Overrides Sub Dispose(ByVal disposing As Boolean) 8 | Try 9 | If disposing AndAlso components IsNot Nothing Then 10 | components.Dispose() 11 | End If 12 | Finally 13 | MyBase.Dispose(disposing) 14 | End Try 15 | End Sub 16 | 17 | 'Required by the Windows Form Designer 18 | Private components As System.ComponentModel.IContainer 19 | 20 | 'NOTE: The following procedure is required by the Windows Form Designer 21 | 'It can be modified using the Windows Form Designer. 22 | 'Do not modify it using the code editor. 23 | _ 24 | Private Sub InitializeComponent() 25 | Me.components = New System.ComponentModel.Container() 26 | Me.WebBrowser1 = New System.Windows.Forms.WebBrowser() 27 | Me.StatusStrip1 = New System.Windows.Forms.StatusStrip() 28 | Me.tsslStatus = New System.Windows.Forms.ToolStripStatusLabel() 29 | Me.resettext = New System.Windows.Forms.Timer(Me.components) 30 | Me.StatusStrip1.SuspendLayout() 31 | Me.SuspendLayout() 32 | ' 33 | 'WebBrowser1 34 | ' 35 | Me.WebBrowser1.Dock = System.Windows.Forms.DockStyle.Fill 36 | Me.WebBrowser1.Location = New System.Drawing.Point(0, 0) 37 | Me.WebBrowser1.MinimumSize = New System.Drawing.Size(20, 20) 38 | Me.WebBrowser1.Name = "WebBrowser1" 39 | Me.WebBrowser1.Size = New System.Drawing.Size(1009, 559) 40 | Me.WebBrowser1.TabIndex = 0 41 | Me.WebBrowser1.Url = New System.Uri("https://openrct.net/store.php", System.UriKind.Absolute) 42 | ' 43 | 'StatusStrip1 44 | ' 45 | Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tsslStatus}) 46 | Me.StatusStrip1.Location = New System.Drawing.Point(0, 537) 47 | Me.StatusStrip1.Name = "StatusStrip1" 48 | Me.StatusStrip1.Size = New System.Drawing.Size(1009, 22) 49 | Me.StatusStrip1.TabIndex = 1 50 | Me.StatusStrip1.Text = "StatusStrip1" 51 | ' 52 | 'tsslStatus 53 | ' 54 | Me.tsslStatus.Name = "tsslStatus" 55 | Me.tsslStatus.Size = New System.Drawing.Size(34, 17) 56 | Me.tsslStatus.Text = "Shop" 57 | ' 58 | 'resettext 59 | ' 60 | Me.resettext.Interval = 5000 61 | ' 62 | 'OpenRCTdotNetStoreBrowser 63 | ' 64 | Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) 65 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font 66 | Me.ClientSize = New System.Drawing.Size(1009, 559) 67 | Me.Controls.Add(Me.StatusStrip1) 68 | Me.Controls.Add(Me.WebBrowser1) 69 | Me.Name = "OpenRCTdotNetStoreBrowser" 70 | Me.Text = "OpenRCTdotNetStoreBrowser" 71 | Me.StatusStrip1.ResumeLayout(False) 72 | Me.StatusStrip1.PerformLayout() 73 | Me.ResumeLayout(False) 74 | Me.PerformLayout() 75 | 76 | End Sub 77 | Friend WithEvents WebBrowser1 As System.Windows.Forms.WebBrowser 78 | Friend WithEvents StatusStrip1 As System.Windows.Forms.StatusStrip 79 | Friend WithEvents tsslStatus As System.Windows.Forms.ToolStripStatusLabel 80 | Friend WithEvents resettext As System.Windows.Forms.Timer 81 | End Class 82 | -------------------------------------------------------------------------------- /Launcher/Launcher/OpenRCTdotNet/OpenRCTdotNetStoreBrowser.vb: -------------------------------------------------------------------------------- 1 | Imports Launcher.My.Resources 2 | Imports Launcher.My 3 | Imports Launcher.OpenRCTdotNet 4 | Imports System.Net 5 | Imports System.IO 6 | Imports System.IO.Compression 7 | Imports ORCT2ModPacker 8 | Imports Newtonsoft.Json 9 | Imports Newtonsoft.Json.Linq 10 | Imports System.Runtime.InteropServices 11 | 12 | Public Class OpenRCTdotNetStoreBrowser 13 | 14 | Dim ModName As String 15 | Dim description As String 16 | Dim Author As String 17 | Dim DownloadLink As String 18 | Dim WS As New WebClient 19 | 20 | 21 | Private Sub OpenRCTdotNetStoreBrowser_Load(sender As Object, e As EventArgs) Handles MyBase.Load 22 | Me.Left = (Screen.PrimaryScreen.WorkingArea.Width - Me.Width) / 2 23 | Me.Top = (Screen.PrimaryScreen.WorkingArea.Height - Me.Height) / 2 24 | 25 | Me.Icon = OpenRCTIcon 26 | Me.Text = "OpenRCT.net Store" 27 | 28 | If Settings.OpenRCTdotNetUserID <> Nothing Then 29 | 'Changing the User Agent ;) 30 | ChangeUserAgent("OpenRCT2LauncherStoreBrowser") 31 | 32 | WebBrowser1.Url = New Uri("https://openrct.net/content") 33 | End If 34 | 35 | End Sub 36 | 37 | 38 | Private Sub WebBrowser_Navigating(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserNavigatingEventArgs) Handles WebBrowser1.Navigating 39 | Dim uu As String = e.Url.ToString.ToUpper 40 | Dim url As String = Path.GetExtension(uu) 41 | If Path.GetExtension(url) = ".RCT2MOD" Then 42 | e.Cancel = True 43 | DownloadFileAndInstall(e.Url.ToString) 44 | End If 45 | 46 | End Sub 47 | 48 | 49 | 50 | 51 | Private Sub DownloadFileAndInstall(ByVal URL As String) 52 | Dim Saves = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) & "/OpenRCT2/save/" 53 | Dim TempF = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) & "/OpenRCT2/temp/" 54 | If Directory.Exists(TempF) = False Then 55 | Directory.CreateDirectory(TempF) 56 | End If 57 | Dim RCT2LocReg = My.Computer.Registry.LocalMachine.OpenSubKey("Software\Infogrames\rollercoaster tycoon 2 setup") 58 | Dim RCT2Loc = RCT2LocReg.GetValue("Path") 59 | 60 | 'New Code, Should hopefully solve the issue with Download Prompts 61 | 62 | Path.GetFileName(URL) 63 | Dim serverResponse As String = WS.DownloadString("https://openrct.net/api/?a=get_store_file&file=" & Path.GetFileName(URL) & "&secret=" & Settings.OpenRCTdotNetAPISecret) 64 | Dim jsonResult = JObject.Parse(serverResponse) 65 | ModName = jsonResult.SelectToken("name") 66 | description = jsonResult.SelectToken("description") 67 | Author = jsonResult.SelectToken("author") 68 | DownloadLink = jsonResult.SelectToken("download") 69 | Dim Result = MsgBox("Install " & ModName & " from " & Author & "?" & vbNewLine & vbNewLine & "Description: " & description, MsgBoxStyle.OkCancel, "Install " & ModName & "?") 70 | If Result = MsgBoxResult.Ok Then 71 | Try 72 | tsslStatus.Text = ("Please Wait, Installing " & ModName & "...") 73 | AddHandler WS.DownloadProgressChanged, AddressOf Progress 74 | AddHandler WS.DownloadFileCompleted, AddressOf InstallMod 75 | WS.DownloadFileAsync(New Uri(DownloadLink), TempF & "/pack.RCT2MOD") 76 | Catch ex As Exception 77 | tsslStatus.Text = "An error occured." 78 | End Try 79 | End If 80 | End Sub 81 | Private Sub Progress(ByVal sender As Object, ByVal e As DownloadProgressChangedEventArgs) 82 | tsslStatus.Text = ("Please Wait, Downloading " & ModName & " - " & e.ProgressPercentage & "% Downloaded.") 83 | End Sub 84 | Private Sub InstallMod() 85 | tsslStatus.Text = "Please Wait, Installing " & ModName & "..." 86 | Dim TempF = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) & "/OpenRCT2/temp/" 87 | Dim RCT2LocReg = My.Computer.Registry.LocalMachine.OpenSubKey("Software\Infogrames\rollercoaster tycoon 2 setup") 88 | Dim RCT2Loc = RCT2LocReg.GetValue("Path") 89 | Dim Installer As New UnPackMod 90 | Installer.UnPackMod(TempF & "/pack.RCT2MOD", RCT2Loc) 91 | tsslStatus.Text = (ModName & " installed successfully!") 92 | resettext.Enabled = True 93 | End Sub 94 | 95 | Private Sub resettext_Tick(sender As Object, e As EventArgs) Handles resettext.Tick 96 | tsslStatus.Text = "Shop" 97 | resettext.Enabled = False 98 | End Sub 99 | 100 | _ 101 | Private Shared Function UrlMkSetSessionOption(ByVal dwOption As Integer, ByVal pBuffer As String, ByVal dwBufferLength As Integer, ByVal dwReserved As Integer) As Integer 102 | End Function 103 | Const URLMON_OPTION_USERAGENT As Integer = &H10000001 104 | Public Function ChangeUserAgent(ByVal Agent As String) 105 | UrlMkSetSessionOption(URLMON_OPTION_USERAGENT, Agent, Agent.Length, 0) 106 | End Function 107 | 108 | Private Sub WebBrowser1_NewWindow(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles WebBrowser1.NewWindow 109 | e.Cancel = True 110 | ' open default browser (e.g. Chrome) if you open a link with target _blank 111 | Process.Start(WebBrowser1.StatusText) 112 | End Sub 113 | End Class -------------------------------------------------------------------------------- /Launcher/Launcher/OpenRCTdotNet/OpenRCTdotNetSyncSaves.Designer.vb: -------------------------------------------------------------------------------- 1 |  _ 2 | Partial Class OpenRCTdotNetSyncSaves 3 | Inherits System.Windows.Forms.Form 4 | 5 | 'Form overrides dispose to clean up the component list. 6 | _ 7 | Protected Overrides Sub Dispose(ByVal disposing As Boolean) 8 | Try 9 | If disposing AndAlso components IsNot Nothing Then 10 | components.Dispose() 11 | End If 12 | Finally 13 | MyBase.Dispose(disposing) 14 | End Try 15 | End Sub 16 | 17 | 'Required by the Windows Form Designer 18 | Private components As System.ComponentModel.IContainer 19 | 20 | 'NOTE: The following procedure is required by the Windows Form Designer 21 | 'It can be modified using the Windows Form Designer. 22 | 'Do not modify it using the code editor. 23 | _ 24 | Private Sub InitializeComponent() 25 | Me.cmdSync = New System.Windows.Forms.Button() 26 | Me.lblStatus = New System.Windows.Forms.Label() 27 | Me.PictureBox1 = New System.Windows.Forms.PictureBox() 28 | CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() 29 | Me.SuspendLayout() 30 | ' 31 | 'cmdSync 32 | ' 33 | Me.cmdSync.Location = New System.Drawing.Point(94, 44) 34 | Me.cmdSync.Name = "cmdSync" 35 | Me.cmdSync.Size = New System.Drawing.Size(292, 27) 36 | Me.cmdSync.TabIndex = 0 37 | Me.cmdSync.Text = Global.Launcher.My.Resources.Resources.OpenRCTdotNetSyncSaves_sync 38 | Me.cmdSync.UseVisualStyleBackColor = True 39 | ' 40 | 'lblStatus 41 | ' 42 | Me.lblStatus.AutoSize = True 43 | Me.lblStatus.Location = New System.Drawing.Point(91, 9) 44 | Me.lblStatus.Name = "lblStatus" 45 | Me.lblStatus.Size = New System.Drawing.Size(39, 13) 46 | Me.lblStatus.TabIndex = 1 47 | Me.lblStatus.Text = "Label1" 48 | ' 49 | 'PictureBox1 50 | ' 51 | Me.PictureBox1.BackgroundImage = Global.Launcher.My.Resources.Resources.logo_icon 52 | Me.PictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom 53 | Me.PictureBox1.Location = New System.Drawing.Point(13, 9) 54 | Me.PictureBox1.Name = "PictureBox1" 55 | Me.PictureBox1.Size = New System.Drawing.Size(62, 62) 56 | Me.PictureBox1.TabIndex = 2 57 | Me.PictureBox1.TabStop = False 58 | ' 59 | 'OpenRCTdotNetSyncSaves 60 | ' 61 | Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) 62 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font 63 | Me.ClientSize = New System.Drawing.Size(398, 83) 64 | Me.Controls.Add(Me.PictureBox1) 65 | Me.Controls.Add(Me.lblStatus) 66 | Me.Controls.Add(Me.cmdSync) 67 | Me.Name = "OpenRCTdotNetSyncSaves" 68 | Me.ShowInTaskbar = False 69 | Me.Text = Global.Launcher.My.Resources.Resources.OpenRCTdotNetSyncSaves_saveSync 70 | CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit() 71 | Me.ResumeLayout(False) 72 | Me.PerformLayout() 73 | 74 | End Sub 75 | Friend WithEvents cmdSync As System.Windows.Forms.Button 76 | Friend WithEvents lblStatus As System.Windows.Forms.Label 77 | Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox 78 | End Class -------------------------------------------------------------------------------- /Launcher/Launcher/OpenRCTdotNet/OpenRCTdotNetSyncSaves.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 | -------------------------------------------------------------------------------- /Launcher/Launcher/OpenRCTdotNet/OpenRCTdotNetSyncSaves.vb: -------------------------------------------------------------------------------- 1 | Imports Launcher.My.Resources 2 | Imports Launcher.My 3 | Imports Launcher.OpenRCTdotNet 4 | 5 | Public Class OpenRCTdotNetSyncSaves 6 | 7 | Private Sub OpenRCTdotNetSyncSaves_Load(sender As Object, e As EventArgs) Handles MyBase.Load 8 | Me.Icon = OpenRCTIcon 9 | FormBorderStyle = FormBorderStyle.Fixed3D 10 | WindowState = FormWindowState.Normal 11 | MaximizeBox = False 12 | lblStatus.Text = OpenRCTdotNetSaveSyncIdle 13 | Me.FormBorderStyle = Windows.Forms.FormBorderStyle.Fixed3D 14 | End Sub 15 | 16 | Private Async Sub cmdSync_Click(sender As Object, e As EventArgs) Handles cmdSync.Click 17 | cmdSync.Enabled = False 18 | Await OpenRCTdotNetWebActions.UploadSaves(True) 19 | Await OpenRCTdotNetWebActions.DownloadSaves(True) 20 | lblStatus.Text = OpenRCTdotNetSaveSyncIdle 21 | cmdSync.Enabled = True 22 | End Sub 23 | End Class -------------------------------------------------------------------------------- /Launcher/Launcher/OpenRCTdotNet/OpenRCTdotNetUser.vb: -------------------------------------------------------------------------------- 1 | Namespace OpenRCTdotNet 2 | Public Class OpenRCTdotNetUser 3 | Public Username As String 4 | Public UserID As String 5 | Public AuthCode As String 6 | 7 | Public Sub New(Username As String, UserID As String, AuthCode As String) 8 | Me.Username = Username 9 | Me.UserID = UserID 10 | Me.AuthCode = AuthCode 11 | End Sub 12 | End Class 13 | End Namespace -------------------------------------------------------------------------------- /Launcher/Launcher/Resources/Icon(64).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Krutonium/OpenRCT2Launcher/67527903a8c3b98320d03cfc3c9a6b4679975684/Launcher/Launcher/Resources/Icon(64).png -------------------------------------------------------------------------------- /Launcher/Launcher/Resources/Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Krutonium/OpenRCT2Launcher/67527903a8c3b98320d03cfc3c9a6b4679975684/Launcher/Launcher/Resources/Logo.png -------------------------------------------------------------------------------- /Launcher/Launcher/Resources/OpenRCTIcon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Krutonium/OpenRCT2Launcher/67527903a8c3b98320d03cfc3c9a6b4679975684/Launcher/Launcher/Resources/OpenRCTIcon.ico -------------------------------------------------------------------------------- /Launcher/Launcher/Resources/btn_donateCC_LG.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Krutonium/OpenRCT2Launcher/67527903a8c3b98320d03cfc3c9a6b4679975684/Launcher/Launcher/Resources/btn_donateCC_LG.gif -------------------------------------------------------------------------------- /Launcher/Launcher/Resources/btn_donate_LG.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Krutonium/OpenRCT2Launcher/67527903a8c3b98320d03cfc3c9a6b4679975684/Launcher/Launcher/Resources/btn_donate_LG.gif -------------------------------------------------------------------------------- /Launcher/Launcher/Resources/index_openrct2_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Krutonium/OpenRCT2Launcher/67527903a8c3b98320d03cfc3c9a6b4679975684/Launcher/Launcher/Resources/index_openrct2_logo.png -------------------------------------------------------------------------------- /Launcher/Launcher/Resources/login_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Krutonium/OpenRCT2Launcher/67527903a8c3b98320d03cfc3c9a6b4679975684/Launcher/Launcher/Resources/login_screen.png -------------------------------------------------------------------------------- /Launcher/Launcher/Resources/offline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Krutonium/OpenRCT2Launcher/67527903a8c3b98320d03cfc3c9a6b4679975684/Launcher/Launcher/Resources/offline.png -------------------------------------------------------------------------------- /Launcher/Launcher/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Launcher/LauncherWFP/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 | 7 | 8 |
9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | True 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | False 31 | 32 | 33 | False 34 | 35 | 36 | stable.json 37 | 38 | 39 | develop.json 40 | 41 | 42 | 43 | 44 | 45 | 46 | NXgFj50WlithAa5sK9Z3WGAGnboyJTrwRHcaNd78vAq6LvywEyzAfahDlFb5zCCqjOB62JfxkGE5bcCQLbr0mIDHoPMYropLd0Sg 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /Launcher/LauncherWFP/App.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Launcher/LauncherWFP/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace LauncherWPF 10 | { 11 | /// 12 | /// Interaction logic for App.xaml 13 | /// 14 | public partial class App : Application 15 | { 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Launcher/LauncherWFP/Data/Context/WelcomeDataContext.cs: -------------------------------------------------------------------------------- 1 | using LauncherWPF.UI; 2 | using Microsoft.WindowsAPICodePack.Dialogs; 3 | using PropertyChanged; 4 | using System.Threading.Tasks; 5 | using System.Windows.Input; 6 | 7 | namespace LauncherWPF.Data.Context 8 | { 9 | 10 | [ImplementPropertyChanged] 11 | public sealed class WelcomeDataContext 12 | { 13 | 14 | private bool DisableRctBrowseButton { get; set; } 15 | 16 | public ICommand LoadedCommand { get; } 17 | 18 | public ICommand OKCommand { get; } 19 | 20 | public ICommand BrowseDownloadPathCommand { get; } 21 | 22 | public ICommand BrowseExtractPathCommand { get; } 23 | 24 | public ICommand BrowseRctPathCommand { get; } 25 | 26 | public string BaseDownloadPath { get; set; } 27 | 28 | public string BaseInstallPath { get; set; } 29 | 30 | public string Rct2InstallPath { get; set; } 31 | 32 | public bool AutoUpdateOpenRct2 { get; set; } 33 | 34 | public bool UseDevBranch { get; set; } 35 | 36 | public WelcomeDataContext() 37 | { 38 | DisableRctBrowseButton = true; 39 | BaseDownloadPath = System.Environment.ExpandEnvironmentVariables("%appdata%\\ORCT2\\Downloads"); 40 | BaseInstallPath = System.Environment.ExpandEnvironmentVariables("%appdata%\\ORCT2\\Builds"); 41 | AutoUpdateOpenRct2 = true; 42 | UseDevBranch = false; 43 | BrowseDownloadPathCommand = new RelayCommand(BrowseDownloadPathCommandImpl, null); 44 | BrowseExtractPathCommand = new RelayCommand(BrowseExtractPathCommandImpl, null); 45 | BrowseRctPathCommand = new RelayCommand(BrowseRctPathCommandImpl, (o) => !DisableRctBrowseButton); 46 | OKCommand = new RelayCommand(OkCommandImpl, CanOkCommandRunImpl); 47 | 48 | // Async to not block. Mean things done here to ensure we don't block in case detecting the install is slow. 49 | LoadedCommand = new RelayCommand(async (o) => 50 | { 51 | Rct2InstallPath = "Detecting..."; 52 | Rct2InstallPath = (await Task.Factory.StartNew(() => 53 | { 54 | var rctPath = Management.RctLocator.DiscoverRct2InstallationDirectory() ?? string.Empty; 55 | DisableRctBrowseButton = false; 56 | return rctPath; 57 | })); 58 | CommandManager.InvalidateRequerySuggested(); 59 | }); 60 | } 61 | 62 | 63 | #region Download Path Command Implementation 64 | private void BrowseDownloadPathCommandImpl(object param) 65 | { 66 | using (var cofd = new CommonOpenFileDialog { IsFolderPicker = true }) 67 | { 68 | switch(cofd.ShowDialog()) 69 | { 70 | case CommonFileDialogResult.Ok: 71 | BaseDownloadPath = cofd.FileName; 72 | break; 73 | } 74 | 75 | } 76 | } 77 | #endregion 78 | 79 | #region Extract Path Command Implementation 80 | private void BrowseExtractPathCommandImpl(object param) 81 | { 82 | using (var cofd = new CommonOpenFileDialog { IsFolderPicker = true }) 83 | { 84 | switch (cofd.ShowDialog()) 85 | { 86 | case CommonFileDialogResult.Ok: 87 | BaseInstallPath = cofd.FileName; 88 | break; 89 | } 90 | 91 | } 92 | } 93 | #endregion 94 | 95 | #region RCT2 Path Command Implementation 96 | private void BrowseRctPathCommandImpl(object param) 97 | { 98 | using (var cofd = new CommonOpenFileDialog { IsFolderPicker = true }) 99 | { 100 | switch (cofd.ShowDialog()) 101 | { 102 | case CommonFileDialogResult.Ok: 103 | Rct2InstallPath = cofd.FileName; 104 | break; 105 | } 106 | 107 | } 108 | } 109 | #endregion 110 | 111 | #region OK Command Implementation 112 | private void OkCommandImpl(object param) 113 | { 114 | var window = (param as UI.Windows.Welcome); 115 | Properties.Settings.Default.OpenRctDownloadDir = BaseDownloadPath; 116 | Properties.Settings.Default.OpenRctExtractDir = BaseInstallPath; 117 | Properties.Settings.Default.RctInstallDir = Rct2InstallPath; 118 | Properties.Settings.Default.AutoUpdateToLatest = AutoUpdateOpenRct2; 119 | Properties.Settings.Default.IsOnDevelopBranch = UseDevBranch; 120 | Properties.Settings.Default.IsFirstRun = false; 121 | Properties.Settings.Default.Save(); 122 | window.DialogResult = true; 123 | window.Close(); 124 | } 125 | private bool CanOkCommandRunImpl(object param) 126 | { 127 | return !string.IsNullOrWhiteSpace(BaseDownloadPath) && 128 | !string.IsNullOrWhiteSpace(BaseInstallPath) && 129 | !string.IsNullOrWhiteSpace(Rct2InstallPath) && !DisableRctBrowseButton; 130 | } 131 | #endregion 132 | 133 | } 134 | 135 | } -------------------------------------------------------------------------------- /Launcher/LauncherWFP/Data/Extensions.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.IO; 3 | 4 | namespace LauncherWPF.Data 5 | { 6 | 7 | /// 8 | /// Some useful extensions for various objects. 9 | /// 10 | public static class Extensions 11 | { 12 | 13 | /// 14 | /// Iterates across each individual line in the . 15 | /// 16 | /// The to iterate over. 17 | /// 18 | public static IEnumerable Lines(this StreamReader reader) 19 | { 20 | string s; 21 | while ((s = reader.ReadLine()) != null) yield return s; 22 | } 23 | 24 | } 25 | 26 | } -------------------------------------------------------------------------------- /Launcher/LauncherWFP/Data/Option.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace LauncherWPF.Data 4 | { 5 | 6 | /// 7 | /// Represents something that may or may not have a value. 8 | /// 9 | /// Any type. 10 | /// 11 | /// Consider the following (mediocre) class: 12 | /// 13 | /// 21 | /// Assuming that the implementor of the RedisQueue{T} class did everything properly, this is how you'd consume it: 22 | /// 32 | /// 33 | /// 34 | public struct Option 35 | { 36 | private readonly T _value; 37 | 38 | /// 39 | /// Gets whether this has a . 40 | /// 41 | public bool HasValue { get; } 42 | 43 | /// 44 | /// Gets the Value () of this 45 | /// 46 | /// 47 | public T Value 48 | { 49 | get 50 | { 51 | if (!HasValue) throw new InvalidOperationException("There is no value. Please check for a value first."); 52 | return _value; 53 | } 54 | } 55 | 56 | /// 57 | /// Gets an empty . 58 | /// 59 | public static Option Empty { get; } = new Option(default(T), false); 60 | 61 | /// 62 | /// The parameterless constructor has been hidden. I do not want an instance of to be created normally. 63 | /// 64 | /// The initial value to populate with 65 | /// Indicates whether or not has a value that can be returned 66 | private Option(T value, bool hasValue) 67 | { 68 | _value = value; 69 | HasValue = hasValue; 70 | } 71 | 72 | /// 73 | /// Creates a new instance of with a value. 74 | /// 75 | public Option(T value) : this(value, true) { } 76 | 77 | /// 78 | /// Converts an instance of to its actual value. 79 | /// 80 | /// If is false 81 | public static implicit operator T(Option option) 82 | { 83 | return option.Value; 84 | } 85 | 86 | /// 87 | /// Creates a new instance of with a value. 88 | /// 89 | public static implicit operator Option(T value) 90 | { 91 | return new Option(value); 92 | } 93 | 94 | /// 95 | /// Implicitly converts the non-generic to 96 | /// 97 | public static implicit operator Option(Option option) 98 | { 99 | return Empty; 100 | } 101 | } 102 | 103 | /// 104 | /// Non-generic class for interacting with . 105 | /// 106 | /// 107 | /// can be null, so, be careful. 108 | /// 109 | public sealed class Option 110 | { 111 | 112 | /// 113 | /// Represents any empty 114 | /// 115 | public static Option Empty { get; } = new Option(); 116 | 117 | /// 118 | /// The parameterless constructor has been hidden. I do not want an instance of to be created normally. 119 | /// 120 | private Option() { } 121 | 122 | /// 123 | /// Creates a new with a value. 124 | /// 125 | /// Value to be passed in. 126 | /// 127 | public static Option Create(T value) 128 | { 129 | return new Option(value); 130 | } 131 | 132 | } 133 | 134 | } -------------------------------------------------------------------------------- /Launcher/LauncherWFP/FodyWeavers.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Launcher/LauncherWFP/MainWindow.xaml: -------------------------------------------------------------------------------- 1 |  16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 30 | 31 |