├── .gitattributes ├── .gitignore ├── LICENSE ├── README.md ├── cast-xmr-lib ├── AppState.cs ├── CliParser.cs ├── GpuSample.cs ├── GpuState.cs ├── JsonParser.cs ├── Properties │ └── AssemblyInfo.cs ├── cast-xmr-lib.csproj └── packages.config ├── cast-xmr-test ├── AppStateTest.cs ├── CliParserTests.cs ├── GpuStateTest.cs ├── JsonParserTests.cs ├── Properties │ └── AssemblyInfo.cs ├── cast-xmr-test.csproj ├── packages.config └── test1.json ├── cast-xmr-ui.sln └── cast-xmr-ui ├── App.config ├── Form1.Designer.cs ├── Form1.cs ├── Form1.resx ├── Program.cs ├── Properties ├── AssemblyInfo.cs ├── DataSources │ ├── CastXmrLib.AppState.datasource │ └── CastXmrLib.GpuState.datasource ├── Resources.Designer.cs ├── Resources.resx ├── Settings.Designer.cs └── Settings.settings └── cast-xmr-ui.csproj /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.suo 8 | *.user 9 | *.userosscache 10 | *.sln.docstates 11 | 12 | # User-specific files (MonoDevelop/Xamarin Studio) 13 | *.userprefs 14 | 15 | # Build results 16 | [Dd]ebug/ 17 | [Dd]ebugPublic/ 18 | [Rr]elease/ 19 | [Rr]eleases/ 20 | x64/ 21 | x86/ 22 | bld/ 23 | [Bb]in/ 24 | [Oo]bj/ 25 | [Ll]og/ 26 | 27 | # Visual Studio 2015 cache/options directory 28 | .vs/ 29 | # Uncomment if you have tasks that create the project's static files in wwwroot 30 | #wwwroot/ 31 | 32 | # MSTest test Results 33 | [Tt]est[Rr]esult*/ 34 | [Bb]uild[Ll]og.* 35 | 36 | # NUNIT 37 | *.VisualState.xml 38 | TestResult.xml 39 | 40 | # Build Results of an ATL Project 41 | [Dd]ebugPS/ 42 | [Rr]eleasePS/ 43 | dlldata.c 44 | 45 | # Benchmark Results 46 | BenchmarkDotNet.Artifacts/ 47 | 48 | # .NET Core 49 | project.lock.json 50 | project.fragment.lock.json 51 | artifacts/ 52 | **/Properties/launchSettings.json 53 | 54 | *_i.c 55 | *_p.c 56 | *_i.h 57 | *.ilk 58 | *.meta 59 | *.obj 60 | *.pch 61 | *.pdb 62 | *.pgc 63 | *.pgd 64 | *.rsp 65 | *.sbr 66 | *.tlb 67 | *.tli 68 | *.tlh 69 | *.tmp 70 | *.tmp_proj 71 | *.log 72 | *.vspscc 73 | *.vssscc 74 | .builds 75 | *.pidb 76 | *.svclog 77 | *.scc 78 | 79 | # Chutzpah Test files 80 | _Chutzpah* 81 | 82 | # Visual C++ cache files 83 | ipch/ 84 | *.aps 85 | *.ncb 86 | *.opendb 87 | *.opensdf 88 | *.sdf 89 | *.cachefile 90 | *.VC.db 91 | *.VC.VC.opendb 92 | 93 | # Visual Studio profiler 94 | *.psess 95 | *.vsp 96 | *.vspx 97 | *.sap 98 | 99 | # TFS 2012 Local Workspace 100 | $tf/ 101 | 102 | # Guidance Automation Toolkit 103 | *.gpState 104 | 105 | # ReSharper is a .NET coding add-in 106 | _ReSharper*/ 107 | *.[Rr]e[Ss]harper 108 | *.DotSettings.user 109 | 110 | # JustCode is a .NET coding add-in 111 | .JustCode 112 | 113 | # TeamCity is a build add-in 114 | _TeamCity* 115 | 116 | # DotCover is a Code Coverage Tool 117 | *.dotCover 118 | 119 | # AxoCover is a Code Coverage Tool 120 | .axoCover/* 121 | !.axoCover/settings.json 122 | 123 | # Visual Studio code coverage results 124 | *.coverage 125 | *.coveragexml 126 | 127 | # NCrunch 128 | _NCrunch_* 129 | .*crunch*.local.xml 130 | nCrunchTemp_* 131 | 132 | # MightyMoose 133 | *.mm.* 134 | AutoTest.Net/ 135 | 136 | # Web workbench (sass) 137 | .sass-cache/ 138 | 139 | # Installshield output folder 140 | [Ee]xpress/ 141 | 142 | # DocProject is a documentation generator add-in 143 | DocProject/buildhelp/ 144 | DocProject/Help/*.HxT 145 | DocProject/Help/*.HxC 146 | DocProject/Help/*.hhc 147 | DocProject/Help/*.hhk 148 | DocProject/Help/*.hhp 149 | DocProject/Help/Html2 150 | DocProject/Help/html 151 | 152 | # Click-Once directory 153 | publish/ 154 | 155 | # Publish Web Output 156 | *.[Pp]ublish.xml 157 | *.azurePubxml 158 | # Note: Comment the next line if you want to checkin your web deploy settings, 159 | # but database connection strings (with potential passwords) will be unencrypted 160 | *.pubxml 161 | *.publishproj 162 | 163 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 164 | # checkin your Azure Web App publish settings, but sensitive information contained 165 | # in these scripts will be unencrypted 166 | PublishScripts/ 167 | 168 | # NuGet Packages 169 | *.nupkg 170 | # The packages folder can be ignored because of Package Restore 171 | **/packages/* 172 | # except build/, which is used as an MSBuild target. 173 | !**/packages/build/ 174 | # Uncomment if necessary however generally it will be regenerated when needed 175 | #!**/packages/repositories.config 176 | # NuGet v3's project.json files produces more ignorable files 177 | *.nuget.props 178 | *.nuget.targets 179 | 180 | # Microsoft Azure Build Output 181 | csx/ 182 | *.build.csdef 183 | 184 | # Microsoft Azure Emulator 185 | ecf/ 186 | rcf/ 187 | 188 | # Windows Store app package directories and files 189 | AppPackages/ 190 | BundleArtifacts/ 191 | Package.StoreAssociation.xml 192 | _pkginfo.txt 193 | *.appx 194 | 195 | # Visual Studio cache files 196 | # files ending in .cache can be ignored 197 | *.[Cc]ache 198 | # but keep track of directories ending in .cache 199 | !*.[Cc]ache/ 200 | 201 | # Others 202 | ClientBin/ 203 | ~$* 204 | *~ 205 | *.dbmdl 206 | *.dbproj.schemaview 207 | *.jfm 208 | *.pfx 209 | *.publishsettings 210 | orleans.codegen.cs 211 | 212 | # Since there are multiple workflows, uncomment next line to ignore bower_components 213 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 214 | #bower_components/ 215 | 216 | # RIA/Silverlight projects 217 | Generated_Code/ 218 | 219 | # Backup & report files from converting an old project file 220 | # to a newer Visual Studio version. Backup files are not needed, 221 | # because we have git ;-) 222 | _UpgradeReport_Files/ 223 | Backup*/ 224 | UpgradeLog*.XML 225 | UpgradeLog*.htm 226 | 227 | # SQL Server files 228 | *.mdf 229 | *.ldf 230 | *.ndf 231 | 232 | # Business Intelligence projects 233 | *.rdl.data 234 | *.bim.layout 235 | *.bim_*.settings 236 | 237 | # Microsoft Fakes 238 | FakesAssemblies/ 239 | 240 | # GhostDoc plugin setting file 241 | *.GhostDoc.xml 242 | 243 | # Node.js Tools for Visual Studio 244 | .ntvs_analysis.dat 245 | node_modules/ 246 | 247 | # Typescript v1 declaration files 248 | typings/ 249 | 250 | # Visual Studio 6 build log 251 | *.plg 252 | 253 | # Visual Studio 6 workspace options file 254 | *.opt 255 | 256 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 257 | *.vbw 258 | 259 | # Visual Studio LightSwitch build output 260 | **/*.HTMLClient/GeneratedArtifacts 261 | **/*.DesktopClient/GeneratedArtifacts 262 | **/*.DesktopClient/ModelManifest.xml 263 | **/*.Server/GeneratedArtifacts 264 | **/*.Server/ModelManifest.xml 265 | _Pvt_Extensions 266 | 267 | # Paket dependency manager 268 | .paket/paket.exe 269 | paket-files/ 270 | 271 | # FAKE - F# Make 272 | .fake/ 273 | 274 | # JetBrains Rider 275 | .idea/ 276 | *.sln.iml 277 | 278 | # CodeRush 279 | .cr/ 280 | 281 | # Python Tools for Visual Studio (PTVS) 282 | __pycache__/ 283 | *.pyc 284 | 285 | # Cake - Uncomment if you are using it 286 | # tools/** 287 | # !tools/packages.config 288 | 289 | # Tabs Studio 290 | *.tss 291 | 292 | # Telerik's JustMock configuration file 293 | *.jmconfig 294 | 295 | # BizTalk build output 296 | *.btp.cs 297 | *.btm.cs 298 | *.odx.cs 299 | *.xsd.cs 300 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # cast-xmr-ui 2 | This application is a simple UI wrapper around gandalph3000's cast-xmr CryptoNight miner. It prompts for the common parameters and has an option to restart the miner if the hashrate drops below a specified rate (as can happen when monitors disconnect or GUI dialogs appear). 3 | 4 | Download Gandalph3000's miner here: http://www.gandalph3000.com/ 5 | 6 | Donations gladly accepted 7 | 8 | BTC: 1Jpa5vXshvEaQKFjenma8qarFofkEJzrPK 9 | 10 | XMR: 4CzRGda75dUchZgB3BbVJWdV2tpzEwoecKpDzmc2ae4L1wwFg7cQbmPcMwSyh1Ns93fLXnrcTXxPndcqbMf5oWvVfkL6DfDUVSD3i4DtDJ 11 | -------------------------------------------------------------------------------- /cast-xmr-lib/AppState.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 CastXmrLib 8 | { 9 | public class AppState 10 | { 11 | public double CurrentGlobalRate { get; private set; } 12 | public double FiveMinGlobalRate { get; private set; } 13 | public double OneHourGlobalRate { get; private set; } 14 | 15 | // stats 16 | public int SharesAccepted { get; set; } 17 | public int SharesRejected { get; set; } 18 | public int SharesInvalid { get; set; } 19 | public int SharesNetworkError { get; set; } 20 | public int SharesOutdated { get; set; } 21 | public int TotalShares { get; set; } 22 | 23 | public DateTime StartTime { get; set; } 24 | 25 | 26 | public Dictionary GpuStates { get; private set; } 27 | 28 | public AppState() 29 | { 30 | GpuStates = new Dictionary(); 31 | } 32 | 33 | public GpuState GetGpu(int index) 34 | { 35 | if(!GpuStates.ContainsKey(index)) 36 | { 37 | GpuState s = new GpuState(); 38 | GpuStates[index] = s; 39 | s.Name = "GPU" + index; 40 | } 41 | return GpuStates[index]; 42 | } 43 | 44 | public void UpdateGlobalRates() 45 | { 46 | double currentRate = 0.0; 47 | double fiveRate = 0.0; 48 | double hourRate = 0.0; 49 | 50 | if(GpuStates.Count == 0) 51 | { 52 | CurrentGlobalRate = 0.0; 53 | FiveMinGlobalRate = 0.0; 54 | OneHourGlobalRate = 0.0; 55 | } else 56 | { 57 | foreach (var gpu in GpuStates.Values) 58 | { 59 | currentRate += gpu.CurrentHashRate; 60 | fiveRate += gpu.FiveMinHashAvg; 61 | hourRate += gpu.OneHourHashAvg; 62 | } 63 | CurrentGlobalRate = currentRate; 64 | FiveMinGlobalRate = fiveRate; 65 | OneHourGlobalRate = hourRate; 66 | } 67 | 68 | } 69 | 70 | public void Reset() 71 | { 72 | CurrentGlobalRate = 0.0; 73 | FiveMinGlobalRate = 0.0; 74 | OneHourGlobalRate = 0.0; 75 | SharesAccepted = 0; 76 | SharesInvalid = 0; 77 | SharesNetworkError = 0; 78 | SharesOutdated = 0; 79 | SharesRejected = 0; 80 | TotalShares = 0; 81 | GpuStates.Clear(); 82 | } 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /cast-xmr-lib/CliParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Text.RegularExpressions; 7 | using System.Threading.Tasks; 8 | 9 | namespace CastXmrLib 10 | { 11 | public class CliParser 12 | { 13 | public AppState App { get; private set; } 14 | 15 | // status line: [07:46:03] GPU0 | 66.C | Fan 3280 RPM | 2044.1 H/s 16 | private Regex StatusLine = new Regex(@"^\[(.*)\] GPU([0-9]+) \| ([0-9]+).C \| Fan ([0-9]+) RPM \| ([0-9\.]+) H\/s"); 17 | 18 | // Statistics: 692 ( 97%) Accepted 19 | private Regex StatisticLine = new Regex(@"^[\s]*([0-9]+) \([\s]*([0-9]+)%\) (.*)"); 20 | 21 | private const string ACCEPTED = "Accepted"; 22 | private const string REJECTED = "Rejected by pool"; 23 | private const string INVALID = "Invalid result computation failed"; 24 | private const string NETWORK = "Could not be submit because of network error"; 25 | private const string OUTDATED = "Outdated because of job change"; 26 | 27 | public CliParser(AppState app) 28 | { 29 | App = app; 30 | } 31 | 32 | public void ParseLine(string line) 33 | { 34 | Match m = null; 35 | if ((m = StatusLine.Match(line)).Success) 36 | { 37 | try 38 | { 39 | string timestamp = m.Groups[1].Captures[0].Value; 40 | int gpuIndex = int.Parse(m.Groups[2].Captures[0].Value); 41 | int gpuTemp = int.Parse(m.Groups[3].Captures[0].Value); 42 | int gpuRpm = int.Parse(m.Groups[4].Captures[0].Value); 43 | double gpuHashrate = double.Parse(m.Groups[5].Captures[0].Value); 44 | 45 | GpuSample samp = new GpuSample(DateTime.Now, (long)gpuHashrate, gpuRpm, gpuTemp); 46 | 47 | // Get GPU. 48 | GpuState gpu = App.GetGpu(gpuIndex); 49 | 50 | gpu.AddSample(samp); 51 | } catch(FormatException e) 52 | { 53 | Debug.WriteLine("Could not parse line: " + line + ": " + e); 54 | } 55 | } 56 | else if ((m = StatisticLine.Match(line)).Success) 57 | { 58 | try 59 | { 60 | int stat = int.Parse(m.Groups[1].Captures[0].Value); 61 | string msg = m.Groups[3].Captures[0].Value; 62 | 63 | if(ACCEPTED.Equals(msg)) 64 | { 65 | App.SharesAccepted = stat; 66 | } 67 | else if (REJECTED.Equals(msg)) 68 | { 69 | App.SharesRejected = stat; 70 | } 71 | else if (INVALID.Equals(msg)) 72 | { 73 | App.SharesInvalid = stat; 74 | } 75 | else if (NETWORK.Equals(msg)) 76 | { 77 | App.SharesNetworkError = stat; 78 | } 79 | else if (OUTDATED.Equals(msg)) 80 | { 81 | App.SharesOutdated = stat; 82 | } 83 | 84 | App.TotalShares = App.SharesAccepted + App.SharesInvalid + App.SharesNetworkError + App.SharesOutdated + App.SharesRejected; 85 | } 86 | catch (FormatException e) 87 | { 88 | Debug.WriteLine("Could not parse line: " + line + ": " + e); 89 | } 90 | } 91 | } 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /cast-xmr-lib/GpuSample.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 CastXmrLib 8 | { 9 | public class GpuSample 10 | { 11 | public long HashRate { get; private set; } 12 | public int FanSpeed { get; private set; } 13 | public int GpuTemp { get; private set; } 14 | public DateTime Timestamp { get; private set; } 15 | 16 | /// 17 | /// A Timestamped sample of GPU information. 18 | /// 19 | public GpuSample(DateTime timestamp, long hashRate, int fanSpeed, int gpuTemp) 20 | { 21 | Timestamp = timestamp; 22 | HashRate = hashRate; 23 | FanSpeed = fanSpeed; 24 | GpuTemp = gpuTemp; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /cast-xmr-lib/GpuState.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 CastXmrLib 8 | { 9 | /// 10 | /// Holds the state for a particular GPU 11 | /// 12 | public class GpuState 13 | { 14 | public string Name { get; set; } 15 | public long CurrentHashRate { get; private set; } 16 | public int CurrentFanSpeed { get; private set; } 17 | public int CurrentGpuTemp { get; private set; } 18 | 19 | public double FiveMinHashAvg { get; private set; } 20 | 21 | public double OneHourHashAvg { get; private set; } 22 | 23 | public List Samples { get; private set; } 24 | 25 | public GpuState() 26 | { 27 | Samples = new List(); 28 | } 29 | 30 | public void AddSample(GpuSample sample) 31 | { 32 | Samples.Add(sample); 33 | CurrentHashRate = sample.HashRate; 34 | CurrentGpuTemp = sample.GpuTemp; 35 | CurrentFanSpeed = sample.FanSpeed; 36 | } 37 | 38 | public void PruneSamplesOlderThan(TimeSpan maxAge) 39 | { 40 | Samples.RemoveAll(x => DateTime.Now - x.Timestamp > maxAge); 41 | } 42 | 43 | public void UpdateAverages() 44 | { 45 | FiveMinHashAvg = GetAverage(Samples.FindAll(x => DateTime.Now - x.Timestamp < TimeSpan.FromMinutes(5))); 46 | OneHourHashAvg = GetAverage(Samples.FindAll(x => DateTime.Now - x.Timestamp < TimeSpan.FromMinutes(60))); 47 | } 48 | 49 | public void Clear() 50 | { 51 | Samples.Clear(); 52 | CurrentFanSpeed = 0; 53 | CurrentGpuTemp = 0; 54 | CurrentHashRate = 0; 55 | FiveMinHashAvg = 0.0; 56 | OneHourHashAvg = 0.0; 57 | } 58 | 59 | private double GetAverage(List list) 60 | { 61 | double sum = 0; 62 | foreach (var item in list) 63 | { 64 | sum += item.HashRate; 65 | } 66 | 67 | return sum / list.Count; 68 | } 69 | 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /cast-xmr-lib/JsonParser.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json.Linq; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace CastXmrLib 9 | { 10 | /// 11 | /// Parses JSON data from the web service 12 | /// 13 | /// 14 | /// 15 | /// 16 | public class JsonParser 17 | { 18 | 19 | // Sample: 20 | // { 21 | // "total_hash_rate": 1857957, 22 | // "total_hash_rate_avg": 1812193, 23 | // "pool": { 24 | // "server": "pool.supportxmr.com:7777", 25 | // "status": "connected", 26 | // "online": 15, 27 | // "offline": 0, 28 | // "reconnects": 0, 29 | // "time_connected": "2017-12-13 16:23:40", 30 | // "time_disconnected": "2017-12-13 16:23:40" 31 | // }, 32 | // "job": { 33 | // "job_number": 3, 34 | // "difficulty": 25000, 35 | // "running": 11, 36 | // "job_time_avg": 1.50 37 | // }, 38 | // "shares": { 39 | // "num_accepted": 2, 40 | // "num_rejected": 0, 41 | // "num_invalid": 0, 42 | // "num_network_fail": 0, 43 | // "num_outdated": 0, 44 | // "search_time_avg": 5.00 45 | // }, 46 | // "devices": [ 47 | // { 48 | // "device": "GPU0", 49 | // "device_id": 0, 50 | // "hash_rate": 1857957, 51 | // "hash_rate_avg": 1812193, 52 | // "gpu_temperature": 41, 53 | // "gpu_fan_rpm": 3690 54 | 55 | // } 56 | // ] 57 | //} 58 | 59 | public static void Parse(string json, AppState state) 60 | { 61 | JObject data = JObject.Parse(json); 62 | 63 | // Update shares 64 | state.SharesAccepted = (int)data["shares"]["num_accepted"]; 65 | state.SharesRejected = (int)data["shares"]["num_rejected"]; 66 | state.SharesInvalid = (int)data["shares"]["num_invalid"]; 67 | state.SharesOutdated = (int)data["shares"]["num_outdated"]; 68 | state.SharesNetworkError = (int)data["shares"]["num_network_fail"]; 69 | state.TotalShares = state.SharesAccepted + state.SharesInvalid + state.SharesNetworkError + state.SharesOutdated + state.SharesRejected; 70 | 71 | 72 | // Update devices. 73 | foreach (JToken device in data["devices"]) 74 | { 75 | int index = (int)device["device_id"]; 76 | GpuSample sample = new GpuSample(DateTime.Now, (long)device["hash_rate"]/1000, (int)device["gpu_fan_rpm"], (int)device["gpu_temperature"]); 77 | GpuState gpu = state.GetGpu(index); 78 | gpu.AddSample(sample); 79 | gpu.UpdateAverages(); 80 | gpu.PruneSamplesOlderThan(TimeSpan.FromHours(1)); 81 | } 82 | state.UpdateGlobalRates(); 83 | 84 | } 85 | 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /cast-xmr-lib/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using 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 | [assembly: AssemblyTitle("cast-xml-lib")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("cast-xml-lib")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("f50a2425-495d-494c-8aa7-76f992bd003c")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /cast-xmr-lib/cast-xmr-lib.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {F50A2425-495D-494C-8AA7-76F992BD003C} 8 | Library 9 | Properties 10 | CastXmrLib 11 | cast-xmr-lib 12 | v4.6.1 13 | 512 14 | 15 | 16 | true 17 | full 18 | false 19 | bin\Debug\ 20 | DEBUG;TRACE 21 | prompt 22 | 4 23 | 24 | 25 | pdbonly 26 | true 27 | bin\Release\ 28 | TRACE 29 | prompt 30 | 4 31 | 32 | 33 | 34 | ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /cast-xmr-lib/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /cast-xmr-test/AppStateTest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using CastXmrLib; 7 | using Microsoft.VisualStudio.TestTools.UnitTesting; 8 | 9 | namespace CastXmrLibTest 10 | { 11 | [TestClass] 12 | public class AppStateTest 13 | { 14 | [TestMethod] 15 | public void TestZeroGPUs() 16 | { 17 | // Guard against divide by zero 18 | AppState app = new AppState(); 19 | 20 | app.UpdateGlobalRates(); 21 | 22 | Assert.AreEqual(0.0, app.CurrentGlobalRate); 23 | Assert.AreEqual(0.0, app.FiveMinGlobalRate); 24 | Assert.AreEqual(0.0, app.OneHourGlobalRate); 25 | Assert.AreEqual(0, app.GpuStates.Count()); 26 | Assert.AreEqual(DateTime.MinValue, app.StartTime); 27 | } 28 | 29 | [TestMethod] 30 | public void TestOneGPU() 31 | { 32 | AppState app = new AppState(); 33 | 34 | app.GpuStates[0] = CreateGpuState(); 35 | 36 | app.UpdateGlobalRates(); 37 | 38 | Assert.AreEqual(2000.0, app.CurrentGlobalRate); 39 | Assert.AreEqual(2000.0, app.FiveMinGlobalRate); 40 | Assert.AreEqual(1250.0, app.OneHourGlobalRate); 41 | Assert.AreEqual(1, app.GpuStates.Count()); 42 | } 43 | 44 | private GpuState CreateGpuState() 45 | { 46 | GpuState state = new GpuState(); 47 | 48 | state.AddSample(new GpuSample(DateTime.Now - TimeSpan.FromMinutes(65), 1000, 3000, 50)); 49 | state.AddSample(new GpuSample(DateTime.Now - TimeSpan.FromMinutes(60), 1000, 3000, 50)); 50 | state.AddSample(new GpuSample(DateTime.Now - TimeSpan.FromMinutes(59), 1000, 3000, 50)); 51 | state.AddSample(new GpuSample(DateTime.Now - TimeSpan.FromMinutes(31), 1000, 3000, 50)); 52 | state.AddSample(new GpuSample(DateTime.Now - TimeSpan.FromMinutes(30), 1000, 3000, 50)); 53 | state.AddSample(new GpuSample(DateTime.Now - TimeSpan.FromMinutes(29), 1000, 3000, 50)); 54 | state.AddSample(new GpuSample(DateTime.Now - TimeSpan.FromMinutes(6), 1000, 3000, 50)); 55 | state.AddSample(new GpuSample(DateTime.Now - TimeSpan.FromMinutes(5), 1000, 3000, 50)); 56 | state.AddSample(new GpuSample(DateTime.Now - TimeSpan.FromMinutes(1), 2000, 3000, 50)); 57 | state.AddSample(new GpuSample(DateTime.Now - TimeSpan.FromMinutes(0), 2000, 3000, 50)); 58 | state.UpdateAverages(); 59 | 60 | return state; 61 | } 62 | } 63 | 64 | 65 | } 66 | -------------------------------------------------------------------------------- /cast-xmr-test/CliParserTests.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using CastXmrLib; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace CastXmrLib.Tests 10 | { 11 | [TestClass()] 12 | public class CliParserTests 13 | { 14 | [TestMethod()] 15 | public void TestParseGPU() 16 | { 17 | CliParser clp = new CliParser(new AppState()); 18 | 19 | clp.ParseLine("[07:46:03] GPU0 | 66°C | Fan 3280 RPM | 2044.1 H/s"); 20 | Assert.AreEqual(66, clp.App.GpuStates[0].CurrentGpuTemp); 21 | Assert.AreEqual(3280, clp.App.GpuStates[0].CurrentFanSpeed); 22 | Assert.AreEqual(2044, clp.App.GpuStates[0].CurrentHashRate); 23 | 24 | clp.ParseLine("[07:46:08] GPU1 | 68°C | Fan 3286 RPM | 2035.2 H/s"); 25 | Assert.AreEqual(68, clp.App.GpuStates[1].CurrentGpuTemp); 26 | Assert.AreEqual(3286, clp.App.GpuStates[1].CurrentFanSpeed); 27 | Assert.AreEqual(2035, clp.App.GpuStates[1].CurrentHashRate); 28 | 29 | } 30 | 31 | [TestMethod] 32 | public void TestParseStatus() 33 | { 34 | 35 | CliParser clp = new CliParser(new AppState()); 36 | clp.ParseLine("[Hash Rate Avg: 2018.8 H/s]"); 37 | clp.ParseLine("[Shares Found: 720 | Avg Search Time: 60.1 sec]"); 38 | clp.ParseLine("692 ( 97%) Accepted"); 39 | clp.ParseLine(" 1 ( 0%) Rejected by pool"); 40 | clp.ParseLine(" 2 ( 0%) Invalid result computation failed"); 41 | clp.ParseLine(" 3 ( 0%) Could not be submit because of network error"); 42 | clp.ParseLine(" 22 ( 3%) Outdated because of job change"); 43 | 44 | Assert.AreEqual(720, clp.App.TotalShares); 45 | Assert.AreEqual(692, clp.App.SharesAccepted); 46 | Assert.AreEqual(1, clp.App.SharesRejected); 47 | Assert.AreEqual(2, clp.App.SharesInvalid); 48 | Assert.AreEqual(3, clp.App.SharesNetworkError); 49 | Assert.AreEqual(22, clp.App.SharesOutdated); 50 | 51 | } 52 | } 53 | } -------------------------------------------------------------------------------- /cast-xmr-test/GpuStateTest.cs: -------------------------------------------------------------------------------- 1 |  2 | using System; 3 | using Microsoft.VisualStudio.TestTools.UnitTesting; 4 | using CastXmrLib; 5 | 6 | namespace CastXmrLibTest 7 | { 8 | [TestClass] 9 | public class GpuStateTest 10 | { 11 | [TestMethod] 12 | public void TestDefault() 13 | { 14 | GpuState state = new GpuState(); 15 | Assert.AreEqual(0, state.CurrentFanSpeed); 16 | Assert.AreEqual(0, state.CurrentGpuTemp); 17 | Assert.AreEqual(0, state.CurrentHashRate); 18 | Assert.AreEqual(0.0, state.FiveMinHashAvg); 19 | Assert.AreEqual(0.0, state.OneHourHashAvg); 20 | Assert.IsNotNull(state.Samples); 21 | Assert.AreEqual(0, state.Samples.Count); 22 | } 23 | 24 | [TestMethod] 25 | public void TestCurrent() 26 | { 27 | GpuState state = CreateGpuState(); 28 | 29 | Assert.AreEqual(2000, state.CurrentHashRate); 30 | Assert.AreEqual(50, state.CurrentGpuTemp); 31 | Assert.AreEqual(3000, state.CurrentFanSpeed); 32 | } 33 | 34 | [TestMethod] 35 | public void TestFiveMinAvg() 36 | { 37 | GpuState state = CreateGpuState(); 38 | 39 | state.UpdateAverages(); 40 | Assert.AreEqual(2000.0, state.FiveMinHashAvg); 41 | } 42 | 43 | [TestMethod] 44 | public void TestOneHourAvg() 45 | { 46 | GpuState state = CreateGpuState(); 47 | 48 | state.UpdateAverages(); 49 | Assert.AreEqual(1250.0, state.OneHourHashAvg); 50 | } 51 | 52 | [TestMethod] 53 | public void TestPrune() 54 | { 55 | GpuState state = CreateGpuState(); 56 | 57 | Assert.AreEqual(10, state.Samples.Count); 58 | 59 | // Since this test can run fast, need to do one second less. 60 | state.PruneSamplesOlderThan(TimeSpan.FromSeconds(3599)); 61 | 62 | Assert.AreEqual(8, state.Samples.Count); 63 | } 64 | 65 | [TestMethod] 66 | public void TestClear() 67 | { 68 | GpuState state = CreateGpuState(); 69 | 70 | Assert.AreEqual(10, state.Samples.Count); 71 | 72 | state.Clear(); 73 | 74 | Assert.AreEqual(0, state.Samples.Count); 75 | 76 | } 77 | 78 | /// 79 | /// Create a mock object with some samples. 80 | /// 81 | /// 82 | private GpuState CreateGpuState() 83 | { 84 | GpuState state = new GpuState(); 85 | 86 | state.AddSample(new GpuSample(DateTime.Now - TimeSpan.FromMinutes(65), 1000, 3009, 59)); 87 | state.AddSample(new GpuSample(DateTime.Now - TimeSpan.FromMinutes(60), 1000, 3008, 58)); 88 | state.AddSample(new GpuSample(DateTime.Now - TimeSpan.FromMinutes(59), 1000, 3007, 57)); 89 | state.AddSample(new GpuSample(DateTime.Now - TimeSpan.FromMinutes(31), 1000, 3006, 56)); 90 | state.AddSample(new GpuSample(DateTime.Now - TimeSpan.FromMinutes(30), 1000, 3005, 55)); 91 | state.AddSample(new GpuSample(DateTime.Now - TimeSpan.FromMinutes(29), 1000, 3004, 54)); 92 | state.AddSample(new GpuSample(DateTime.Now - TimeSpan.FromMinutes(6), 1000, 3003, 53)); 93 | state.AddSample(new GpuSample(DateTime.Now - TimeSpan.FromMinutes(5), 1000, 3002, 52)); 94 | state.AddSample(new GpuSample(DateTime.Now - TimeSpan.FromMinutes(1), 2000, 3001, 51)); 95 | state.AddSample(new GpuSample(DateTime.Now - TimeSpan.FromMinutes(0), 2000, 3000, 50)); 96 | 97 | return state; 98 | } 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /cast-xmr-test/JsonParserTests.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using CastXmrLib; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using System.IO; 9 | 10 | namespace CastXmrLib.Tests 11 | { 12 | [TestClass()] 13 | public class JsonParserTests 14 | { 15 | 16 | [TestMethod()] 17 | public void ParseTest() 18 | { 19 | AppState state = new AppState(); 20 | 21 | string json = File.ReadAllText("test1.json"); 22 | JsonParser.Parse(json, state); 23 | 24 | Assert.AreEqual(38, state.SharesAccepted); 25 | Assert.AreEqual(1, state.SharesRejected); 26 | Assert.AreEqual(2, state.SharesInvalid); 27 | Assert.AreEqual(3, state.SharesNetworkError); 28 | Assert.AreEqual(4, state.SharesOutdated); 29 | Assert.AreEqual(48, state.TotalShares); 30 | 31 | Assert.AreEqual(2, state.GpuStates.Count); 32 | 33 | GpuState gpu0 = state.GetGpu(0); 34 | Assert.AreEqual(2030, gpu0.CurrentHashRate); 35 | Assert.AreEqual(51, gpu0.CurrentGpuTemp); 36 | Assert.AreEqual(3810, gpu0.CurrentFanSpeed); 37 | 38 | GpuState gpu1 = state.GetGpu(1); 39 | Assert.AreEqual(2023, gpu1.CurrentHashRate); 40 | Assert.AreEqual(53, gpu1.CurrentGpuTemp); 41 | Assert.AreEqual(3846, gpu1.CurrentFanSpeed); 42 | 43 | Assert.AreEqual(4053, state.CurrentGlobalRate); 44 | } 45 | 46 | } 47 | } -------------------------------------------------------------------------------- /cast-xmr-test/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | [assembly: AssemblyTitle("cast-xmr-test")] 6 | [assembly: AssemblyDescription("")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("")] 9 | [assembly: AssemblyProduct("cast-xmr-test")] 10 | [assembly: AssemblyCopyright("Copyright © 2017")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | 14 | [assembly: ComVisible(false)] 15 | 16 | [assembly: Guid("43e3413d-ef68-41f0-87aa-9aec3f8b84ba")] 17 | 18 | // [assembly: AssemblyVersion("1.0.*")] 19 | [assembly: AssemblyVersion("1.0.0.0")] 20 | [assembly: AssemblyFileVersion("1.0.0.0")] 21 | -------------------------------------------------------------------------------- /cast-xmr-test/cast-xmr-test.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {43E3413D-EF68-41F0-87AA-9AEC3F8B84BA} 8 | Library 9 | Properties 10 | cast_xmr_test 11 | cast-xmr-test 12 | v4.6.1 13 | 512 14 | {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 15 | 15.0 16 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 17 | $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages 18 | False 19 | UnitTest 20 | 21 | 22 | 23 | 24 | true 25 | full 26 | false 27 | bin\Debug\ 28 | DEBUG;TRACE 29 | prompt 30 | 4 31 | 32 | 33 | pdbonly 34 | true 35 | bin\Release\ 36 | TRACE 37 | prompt 38 | 4 39 | 40 | 41 | 42 | ..\packages\MSTest.TestFramework.1.1.18\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll 43 | 44 | 45 | ..\packages\MSTest.TestFramework.1.1.18\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | Always 61 | 62 | 63 | 64 | 65 | {f50a2425-495d-494c-8aa7-76f992bd003c} 66 | cast-xmr-lib 67 | 68 | 69 | 70 | 71 | 72 | 73 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. 74 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /cast-xmr-test/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /cast-xmr-test/test1.json: -------------------------------------------------------------------------------- 1 | { 2 | "total_hash_rate": 4053928, 3 | "total_hash_rate_avg": 3992984, 4 | "pool": { 5 | "server": "pool.supportxmr.com:7777", 6 | "status": "connected", 7 | "online": 828, 8 | "offline": 0, 9 | "reconnects": 0, 10 | "time_connected": "2017-12-20 21:34:28", 11 | "time_disconnected": "2017-12-20 21:34:28" 12 | }, 13 | "job": { 14 | "job_number": 21, 15 | "difficulty": 152255, 16 | "running": 16, 17 | "job_time_avg": 40.60 18 | }, 19 | "shares": { 20 | "num_accepted": 38, 21 | "num_rejected": 1, 22 | "num_invalid": 2, 23 | "num_network_fail": 3, 24 | "num_outdated": 4, 25 | "search_time_avg": 20.76 26 | }, 27 | "devices": [ 28 | { 29 | "device": "GPU0", 30 | "device_id": 0, 31 | "hash_rate": 2030594, 32 | "hash_rate_avg": 1997620, 33 | "gpu_temperature": 51, 34 | "gpu_fan_rpm": 3810 35 | }, 36 | { 37 | "device": "GPU1", 38 | "device_id": 1, 39 | "hash_rate": 2023334, 40 | "hash_rate_avg": 1995364, 41 | "gpu_temperature": 53, 42 | "gpu_fan_rpm": 3846 43 | } 44 | ] 45 | } -------------------------------------------------------------------------------- /cast-xmr-ui.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27004.2009 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cast-xmr-lib", "cast-xmr-lib\cast-xmr-lib.csproj", "{F50A2425-495D-494C-8AA7-76F992BD003C}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cast-xmr-test", "cast-xmr-test\cast-xmr-test.csproj", "{43E3413D-EF68-41F0-87AA-9AEC3F8B84BA}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cast-xmr-ui", "cast-xmr-ui\cast-xmr-ui.csproj", "{A04AF1DA-CFAB-4EEC-B23E-CF424A2558A5}" 11 | EndProject 12 | Global 13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 14 | Debug|Any CPU = Debug|Any CPU 15 | Debug|ARM = Debug|ARM 16 | Debug|x64 = Debug|x64 17 | Debug|x86 = Debug|x86 18 | Release|Any CPU = Release|Any CPU 19 | Release|ARM = Release|ARM 20 | Release|x64 = Release|x64 21 | Release|x86 = Release|x86 22 | EndGlobalSection 23 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 24 | {F50A2425-495D-494C-8AA7-76F992BD003C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 25 | {F50A2425-495D-494C-8AA7-76F992BD003C}.Debug|Any CPU.Build.0 = Debug|Any CPU 26 | {F50A2425-495D-494C-8AA7-76F992BD003C}.Debug|ARM.ActiveCfg = Debug|Any CPU 27 | {F50A2425-495D-494C-8AA7-76F992BD003C}.Debug|ARM.Build.0 = Debug|Any CPU 28 | {F50A2425-495D-494C-8AA7-76F992BD003C}.Debug|x64.ActiveCfg = Debug|Any CPU 29 | {F50A2425-495D-494C-8AA7-76F992BD003C}.Debug|x64.Build.0 = Debug|Any CPU 30 | {F50A2425-495D-494C-8AA7-76F992BD003C}.Debug|x86.ActiveCfg = Debug|Any CPU 31 | {F50A2425-495D-494C-8AA7-76F992BD003C}.Debug|x86.Build.0 = Debug|Any CPU 32 | {F50A2425-495D-494C-8AA7-76F992BD003C}.Release|Any CPU.ActiveCfg = Release|Any CPU 33 | {F50A2425-495D-494C-8AA7-76F992BD003C}.Release|Any CPU.Build.0 = Release|Any CPU 34 | {F50A2425-495D-494C-8AA7-76F992BD003C}.Release|ARM.ActiveCfg = Release|Any CPU 35 | {F50A2425-495D-494C-8AA7-76F992BD003C}.Release|ARM.Build.0 = Release|Any CPU 36 | {F50A2425-495D-494C-8AA7-76F992BD003C}.Release|x64.ActiveCfg = Release|Any CPU 37 | {F50A2425-495D-494C-8AA7-76F992BD003C}.Release|x64.Build.0 = Release|Any CPU 38 | {F50A2425-495D-494C-8AA7-76F992BD003C}.Release|x86.ActiveCfg = Release|Any CPU 39 | {F50A2425-495D-494C-8AA7-76F992BD003C}.Release|x86.Build.0 = Release|Any CPU 40 | {43E3413D-EF68-41F0-87AA-9AEC3F8B84BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 41 | {43E3413D-EF68-41F0-87AA-9AEC3F8B84BA}.Debug|Any CPU.Build.0 = Debug|Any CPU 42 | {43E3413D-EF68-41F0-87AA-9AEC3F8B84BA}.Debug|ARM.ActiveCfg = Debug|Any CPU 43 | {43E3413D-EF68-41F0-87AA-9AEC3F8B84BA}.Debug|ARM.Build.0 = Debug|Any CPU 44 | {43E3413D-EF68-41F0-87AA-9AEC3F8B84BA}.Debug|x64.ActiveCfg = Debug|Any CPU 45 | {43E3413D-EF68-41F0-87AA-9AEC3F8B84BA}.Debug|x64.Build.0 = Debug|Any CPU 46 | {43E3413D-EF68-41F0-87AA-9AEC3F8B84BA}.Debug|x86.ActiveCfg = Debug|Any CPU 47 | {43E3413D-EF68-41F0-87AA-9AEC3F8B84BA}.Debug|x86.Build.0 = Debug|Any CPU 48 | {43E3413D-EF68-41F0-87AA-9AEC3F8B84BA}.Release|Any CPU.ActiveCfg = Release|Any CPU 49 | {43E3413D-EF68-41F0-87AA-9AEC3F8B84BA}.Release|Any CPU.Build.0 = Release|Any CPU 50 | {43E3413D-EF68-41F0-87AA-9AEC3F8B84BA}.Release|ARM.ActiveCfg = Release|Any CPU 51 | {43E3413D-EF68-41F0-87AA-9AEC3F8B84BA}.Release|ARM.Build.0 = Release|Any CPU 52 | {43E3413D-EF68-41F0-87AA-9AEC3F8B84BA}.Release|x64.ActiveCfg = Release|Any CPU 53 | {43E3413D-EF68-41F0-87AA-9AEC3F8B84BA}.Release|x64.Build.0 = Release|Any CPU 54 | {43E3413D-EF68-41F0-87AA-9AEC3F8B84BA}.Release|x86.ActiveCfg = Release|Any CPU 55 | {43E3413D-EF68-41F0-87AA-9AEC3F8B84BA}.Release|x86.Build.0 = Release|Any CPU 56 | {A04AF1DA-CFAB-4EEC-B23E-CF424A2558A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 57 | {A04AF1DA-CFAB-4EEC-B23E-CF424A2558A5}.Debug|Any CPU.Build.0 = Debug|Any CPU 58 | {A04AF1DA-CFAB-4EEC-B23E-CF424A2558A5}.Debug|ARM.ActiveCfg = Debug|Any CPU 59 | {A04AF1DA-CFAB-4EEC-B23E-CF424A2558A5}.Debug|ARM.Build.0 = Debug|Any CPU 60 | {A04AF1DA-CFAB-4EEC-B23E-CF424A2558A5}.Debug|x64.ActiveCfg = Debug|Any CPU 61 | {A04AF1DA-CFAB-4EEC-B23E-CF424A2558A5}.Debug|x64.Build.0 = Debug|Any CPU 62 | {A04AF1DA-CFAB-4EEC-B23E-CF424A2558A5}.Debug|x86.ActiveCfg = Debug|Any CPU 63 | {A04AF1DA-CFAB-4EEC-B23E-CF424A2558A5}.Debug|x86.Build.0 = Debug|Any CPU 64 | {A04AF1DA-CFAB-4EEC-B23E-CF424A2558A5}.Release|Any CPU.ActiveCfg = Release|Any CPU 65 | {A04AF1DA-CFAB-4EEC-B23E-CF424A2558A5}.Release|Any CPU.Build.0 = Release|Any CPU 66 | {A04AF1DA-CFAB-4EEC-B23E-CF424A2558A5}.Release|ARM.ActiveCfg = Release|Any CPU 67 | {A04AF1DA-CFAB-4EEC-B23E-CF424A2558A5}.Release|ARM.Build.0 = Release|Any CPU 68 | {A04AF1DA-CFAB-4EEC-B23E-CF424A2558A5}.Release|x64.ActiveCfg = Release|Any CPU 69 | {A04AF1DA-CFAB-4EEC-B23E-CF424A2558A5}.Release|x64.Build.0 = Release|Any CPU 70 | {A04AF1DA-CFAB-4EEC-B23E-CF424A2558A5}.Release|x86.ActiveCfg = Release|Any CPU 71 | {A04AF1DA-CFAB-4EEC-B23E-CF424A2558A5}.Release|x86.Build.0 = Release|Any CPU 72 | EndGlobalSection 73 | GlobalSection(SolutionProperties) = preSolution 74 | HideSolutionNode = FALSE 75 | EndGlobalSection 76 | GlobalSection(ExtensibilityGlobals) = postSolution 77 | SolutionGuid = {C1343CE8-7FE7-42B0-979E-E2D1904015F8} 78 | EndGlobalSection 79 | EndGlobal 80 | -------------------------------------------------------------------------------- /cast-xmr-ui/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 1Jpa5vXshvEaQKFjenma8qarFofkEJzrPK 15 | 16 | 17 | cryptonight.usa.nicehash.com:3355 18 | 19 | 20 | x 21 | 22 | 23 | 5 24 | 25 | 26 | 0,1 27 | 28 | 29 | True 30 | 31 | 32 | True 33 | 34 | 35 | True 36 | 37 | 38 | 1900 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /cast-xmr-ui/Form1.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace cast_xmr_ui 2 | { 3 | partial class Form1 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 | this.label1 = new System.Windows.Forms.Label(); 33 | this.label2 = new System.Windows.Forms.Label(); 34 | this.label3 = new System.Windows.Forms.Label(); 35 | this.label4 = new System.Windows.Forms.Label(); 36 | this.useNicehash = new System.Windows.Forms.CheckBox(); 37 | this.intensity = new System.Windows.Forms.NumericUpDown(); 38 | this.startButton = new System.Windows.Forms.Button(); 39 | this.stopButton = new System.Windows.Forms.Button(); 40 | this.consoleLog = new System.Windows.Forms.TextBox(); 41 | this.label5 = new System.Windows.Forms.Label(); 42 | this.button1 = new System.Windows.Forms.Button(); 43 | this.processRunner = new System.Diagnostics.Process(); 44 | this.statusTimer = new System.Windows.Forms.Timer(this.components); 45 | this.fastJobCheck = new System.Windows.Forms.CheckBox(); 46 | this.label6 = new System.Windows.Forms.Label(); 47 | this.gpuText = new System.Windows.Forms.TextBox(); 48 | this.autoRestartCheck = new System.Windows.Forms.CheckBox(); 49 | this.hashRestart = new System.Windows.Forms.TextBox(); 50 | this.label7 = new System.Windows.Forms.Label(); 51 | this.exePath = new System.Windows.Forms.TextBox(); 52 | this.workerPassword = new System.Windows.Forms.TextBox(); 53 | this.walletAddress = new System.Windows.Forms.TextBox(); 54 | this.poolAddress = new System.Windows.Forms.TextBox(); 55 | this.chooseMinerDialog = new System.Windows.Forms.OpenFileDialog(); 56 | this.label8 = new System.Windows.Forms.Label(); 57 | this.restartLabel = new System.Windows.Forms.Label(); 58 | this.gpuDataGrid = new System.Windows.Forms.DataGridView(); 59 | this.NameColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); 60 | this.groupBox1 = new System.Windows.Forms.GroupBox(); 61 | this.label9 = new System.Windows.Forms.Label(); 62 | this.label10 = new System.Windows.Forms.Label(); 63 | this.label11 = new System.Windows.Forms.Label(); 64 | this.globalCurrent = new System.Windows.Forms.Label(); 65 | this.global5m = new System.Windows.Forms.Label(); 66 | this.global1h = new System.Windows.Forms.Label(); 67 | this.appStateBindingSource = new System.Windows.Forms.BindingSource(this.components); 68 | this.currentHashRateDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); 69 | this.fiveMinHashAvgDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); 70 | this.oneHourHashAvgDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); 71 | this.currentFanSpeedDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); 72 | this.currentGpuTempDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); 73 | this.gpuStateBindingSource = new System.Windows.Forms.BindingSource(this.components); 74 | this.label12 = new System.Windows.Forms.Label(); 75 | this.label13 = new System.Windows.Forms.Label(); 76 | this.label14 = new System.Windows.Forms.Label(); 77 | this.label15 = new System.Windows.Forms.Label(); 78 | this.label16 = new System.Windows.Forms.Label(); 79 | this.label17 = new System.Windows.Forms.Label(); 80 | this.totalShares = new System.Windows.Forms.Label(); 81 | this.acceptedShares = new System.Windows.Forms.Label(); 82 | this.rejectedShares = new System.Windows.Forms.Label(); 83 | this.invalidShares = new System.Windows.Forms.Label(); 84 | this.outdatedShares = new System.Windows.Forms.Label(); 85 | this.netErrShares = new System.Windows.Forms.Label(); 86 | this.label18 = new System.Windows.Forms.Label(); 87 | ((System.ComponentModel.ISupportInitialize)(this.intensity)).BeginInit(); 88 | ((System.ComponentModel.ISupportInitialize)(this.gpuDataGrid)).BeginInit(); 89 | this.groupBox1.SuspendLayout(); 90 | ((System.ComponentModel.ISupportInitialize)(this.appStateBindingSource)).BeginInit(); 91 | ((System.ComponentModel.ISupportInitialize)(this.gpuStateBindingSource)).BeginInit(); 92 | this.SuspendLayout(); 93 | // 94 | // label1 95 | // 96 | this.label1.AutoSize = true; 97 | this.label1.Location = new System.Drawing.Point(9, 41); 98 | this.label1.Name = "label1"; 99 | this.label1.Size = new System.Drawing.Size(69, 13); 100 | this.label1.TabIndex = 1; 101 | this.label1.Text = "Pool Address"; 102 | // 103 | // label2 104 | // 105 | this.label2.AutoSize = true; 106 | this.label2.Location = new System.Drawing.Point(9, 67); 107 | this.label2.Name = "label2"; 108 | this.label2.Size = new System.Drawing.Size(78, 13); 109 | this.label2.TabIndex = 2; 110 | this.label2.Text = "Wallet Address"; 111 | // 112 | // label3 113 | // 114 | this.label3.AutoSize = true; 115 | this.label3.Location = new System.Drawing.Point(9, 93); 116 | this.label3.Name = "label3"; 117 | this.label3.Size = new System.Drawing.Size(91, 13); 118 | this.label3.TabIndex = 3; 119 | this.label3.Text = "Worker Password"; 120 | // 121 | // label4 122 | // 123 | this.label4.AutoSize = true; 124 | this.label4.Location = new System.Drawing.Point(9, 117); 125 | this.label4.Name = "label4"; 126 | this.label4.Size = new System.Drawing.Size(46, 13); 127 | this.label4.TabIndex = 4; 128 | this.label4.Text = "Intensity"; 129 | // 130 | // useNicehash 131 | // 132 | this.useNicehash.AutoSize = true; 133 | this.useNicehash.Checked = global::cast_xmr_ui.Properties.Settings.Default.UseNicehash; 134 | this.useNicehash.CheckState = System.Windows.Forms.CheckState.Checked; 135 | this.useNicehash.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::cast_xmr_ui.Properties.Settings.Default, "UseNicehash", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); 136 | this.useNicehash.Location = new System.Drawing.Point(116, 141); 137 | this.useNicehash.Name = "useNicehash"; 138 | this.useNicehash.Size = new System.Drawing.Size(130, 17); 139 | this.useNicehash.TabIndex = 5; 140 | this.useNicehash.Text = "Use NiceHash Nonce"; 141 | this.useNicehash.UseVisualStyleBackColor = true; 142 | // 143 | // intensity 144 | // 145 | this.intensity.DataBindings.Add(new System.Windows.Forms.Binding("Value", global::cast_xmr_ui.Properties.Settings.Default, "Intensity", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); 146 | this.intensity.Location = new System.Drawing.Point(116, 115); 147 | this.intensity.Maximum = new decimal(new int[] { 148 | 9, 149 | 0, 150 | 0, 151 | 0}); 152 | this.intensity.Name = "intensity"; 153 | this.intensity.Size = new System.Drawing.Size(37, 20); 154 | this.intensity.TabIndex = 8; 155 | this.intensity.Value = global::cast_xmr_ui.Properties.Settings.Default.Intensity; 156 | // 157 | // startButton 158 | // 159 | this.startButton.Location = new System.Drawing.Point(12, 269); 160 | this.startButton.Name = "startButton"; 161 | this.startButton.Size = new System.Drawing.Size(75, 23); 162 | this.startButton.TabIndex = 9; 163 | this.startButton.Text = "Start"; 164 | this.startButton.UseVisualStyleBackColor = true; 165 | this.startButton.Click += new System.EventHandler(this.startButton_Click); 166 | // 167 | // stopButton 168 | // 169 | this.stopButton.Location = new System.Drawing.Point(116, 269); 170 | this.stopButton.Name = "stopButton"; 171 | this.stopButton.Size = new System.Drawing.Size(75, 23); 172 | this.stopButton.TabIndex = 10; 173 | this.stopButton.Text = "Stop"; 174 | this.stopButton.UseVisualStyleBackColor = true; 175 | this.stopButton.Click += new System.EventHandler(this.stopButton_Click); 176 | // 177 | // consoleLog 178 | // 179 | this.consoleLog.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 180 | | System.Windows.Forms.AnchorStyles.Left) 181 | | System.Windows.Forms.AnchorStyles.Right))); 182 | this.consoleLog.Location = new System.Drawing.Point(12, 301); 183 | this.consoleLog.Multiline = true; 184 | this.consoleLog.Name = "consoleLog"; 185 | this.consoleLog.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; 186 | this.consoleLog.Size = new System.Drawing.Size(699, 163); 187 | this.consoleLog.TabIndex = 11; 188 | // 189 | // label5 190 | // 191 | this.label5.AutoSize = true; 192 | this.label5.Location = new System.Drawing.Point(9, 15); 193 | this.label5.Name = "label5"; 194 | this.label5.Size = new System.Drawing.Size(29, 13); 195 | this.label5.TabIndex = 13; 196 | this.label5.Text = "Path"; 197 | // 198 | // button1 199 | // 200 | this.button1.Location = new System.Drawing.Point(353, 10); 201 | this.button1.Name = "button1"; 202 | this.button1.Size = new System.Drawing.Size(75, 23); 203 | this.button1.TabIndex = 14; 204 | this.button1.Text = "Select..."; 205 | this.button1.UseVisualStyleBackColor = true; 206 | this.button1.Click += new System.EventHandler(this.button1_Click); 207 | // 208 | // processRunner 209 | // 210 | this.processRunner.EnableRaisingEvents = true; 211 | this.processRunner.StartInfo.Domain = ""; 212 | this.processRunner.StartInfo.LoadUserProfile = false; 213 | this.processRunner.StartInfo.Password = null; 214 | this.processRunner.StartInfo.StandardErrorEncoding = null; 215 | this.processRunner.StartInfo.StandardOutputEncoding = null; 216 | this.processRunner.StartInfo.UserName = ""; 217 | this.processRunner.SynchronizingObject = this; 218 | this.processRunner.OutputDataReceived += new System.Diagnostics.DataReceivedEventHandler(this.processRunner_OutputDataReceived); 219 | this.processRunner.ErrorDataReceived += new System.Diagnostics.DataReceivedEventHandler(this.processRunner_ErrorDataReceived); 220 | this.processRunner.Exited += new System.EventHandler(this.processRunner_Exited); 221 | // 222 | // statusTimer 223 | // 224 | this.statusTimer.Interval = 3000; 225 | this.statusTimer.Tick += new System.EventHandler(this.statusTimer_Tick); 226 | // 227 | // fastJobCheck 228 | // 229 | this.fastJobCheck.AutoSize = true; 230 | this.fastJobCheck.Checked = global::cast_xmr_ui.Properties.Settings.Default.FastJobSwitching; 231 | this.fastJobCheck.CheckState = System.Windows.Forms.CheckState.Checked; 232 | this.fastJobCheck.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::cast_xmr_ui.Properties.Settings.Default, "FastJobSwitching", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); 233 | this.fastJobCheck.Location = new System.Drawing.Point(267, 141); 234 | this.fastJobCheck.Margin = new System.Windows.Forms.Padding(1); 235 | this.fastJobCheck.Name = "fastJobCheck"; 236 | this.fastJobCheck.Size = new System.Drawing.Size(115, 17); 237 | this.fastJobCheck.TabIndex = 15; 238 | this.fastJobCheck.Text = "Fast Job Switching"; 239 | this.fastJobCheck.UseVisualStyleBackColor = true; 240 | // 241 | // label6 242 | // 243 | this.label6.AutoSize = true; 244 | this.label6.Location = new System.Drawing.Point(167, 117); 245 | this.label6.Name = "label6"; 246 | this.label6.Size = new System.Drawing.Size(35, 13); 247 | this.label6.TabIndex = 16; 248 | this.label6.Text = "GPUs"; 249 | // 250 | // gpuText 251 | // 252 | this.gpuText.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::cast_xmr_ui.Properties.Settings.Default, "GPU", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); 253 | this.gpuText.Location = new System.Drawing.Point(204, 116); 254 | this.gpuText.Margin = new System.Windows.Forms.Padding(1); 255 | this.gpuText.Name = "gpuText"; 256 | this.gpuText.Size = new System.Drawing.Size(40, 20); 257 | this.gpuText.TabIndex = 17; 258 | this.gpuText.Text = global::cast_xmr_ui.Properties.Settings.Default.GPU; 259 | // 260 | // autoRestartCheck 261 | // 262 | this.autoRestartCheck.AutoSize = true; 263 | this.autoRestartCheck.Checked = global::cast_xmr_ui.Properties.Settings.Default.AutoRestart; 264 | this.autoRestartCheck.CheckState = System.Windows.Forms.CheckState.Checked; 265 | this.autoRestartCheck.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::cast_xmr_ui.Properties.Settings.Default, "AutoRestart", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); 266 | this.autoRestartCheck.Location = new System.Drawing.Point(116, 166); 267 | this.autoRestartCheck.Name = "autoRestartCheck"; 268 | this.autoRestartCheck.Size = new System.Drawing.Size(207, 17); 269 | this.autoRestartCheck.TabIndex = 18; 270 | this.autoRestartCheck.Text = "Auto Restart if 5min Rate Drops Below"; 271 | this.autoRestartCheck.UseVisualStyleBackColor = true; 272 | // 273 | // hashRestart 274 | // 275 | this.hashRestart.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::cast_xmr_ui.Properties.Settings.Default, "AutoRestartRate", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); 276 | this.hashRestart.Location = new System.Drawing.Point(116, 189); 277 | this.hashRestart.Name = "hashRestart"; 278 | this.hashRestart.Size = new System.Drawing.Size(100, 20); 279 | this.hashRestart.TabIndex = 19; 280 | this.hashRestart.Text = global::cast_xmr_ui.Properties.Settings.Default.AutoRestartRate; 281 | // 282 | // label7 283 | // 284 | this.label7.AutoSize = true; 285 | this.label7.Location = new System.Drawing.Point(222, 192); 286 | this.label7.Name = "label7"; 287 | this.label7.Size = new System.Drawing.Size(73, 13); 288 | this.label7.TabIndex = 20; 289 | this.label7.Text = "H/s (per card)"; 290 | // 291 | // exePath 292 | // 293 | this.exePath.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::cast_xmr_ui.Properties.Settings.Default, "MinerPath", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); 294 | this.exePath.Location = new System.Drawing.Point(116, 12); 295 | this.exePath.Name = "exePath"; 296 | this.exePath.Size = new System.Drawing.Size(231, 20); 297 | this.exePath.TabIndex = 12; 298 | this.exePath.Text = global::cast_xmr_ui.Properties.Settings.Default.MinerPath; 299 | // 300 | // workerPassword 301 | // 302 | this.workerPassword.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::cast_xmr_ui.Properties.Settings.Default, "WorkerPassword", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); 303 | this.workerPassword.Location = new System.Drawing.Point(116, 90); 304 | this.workerPassword.Name = "workerPassword"; 305 | this.workerPassword.Size = new System.Drawing.Size(312, 20); 306 | this.workerPassword.TabIndex = 7; 307 | this.workerPassword.Text = global::cast_xmr_ui.Properties.Settings.Default.WorkerPassword; 308 | // 309 | // walletAddress 310 | // 311 | this.walletAddress.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::cast_xmr_ui.Properties.Settings.Default, "WalletAddress", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); 312 | this.walletAddress.Location = new System.Drawing.Point(116, 64); 313 | this.walletAddress.Name = "walletAddress"; 314 | this.walletAddress.Size = new System.Drawing.Size(312, 20); 315 | this.walletAddress.TabIndex = 6; 316 | this.walletAddress.Text = global::cast_xmr_ui.Properties.Settings.Default.WalletAddress; 317 | // 318 | // poolAddress 319 | // 320 | this.poolAddress.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::cast_xmr_ui.Properties.Settings.Default, "PoolAddress", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); 321 | this.poolAddress.Location = new System.Drawing.Point(116, 38); 322 | this.poolAddress.Name = "poolAddress"; 323 | this.poolAddress.Size = new System.Drawing.Size(312, 20); 324 | this.poolAddress.TabIndex = 0; 325 | this.poolAddress.Text = global::cast_xmr_ui.Properties.Settings.Default.PoolAddress; 326 | // 327 | // chooseMinerDialog 328 | // 329 | this.chooseMinerDialog.Filter = "Executable Files|*.exe"; 330 | this.chooseMinerDialog.Title = "Locate Cast-XMR Miner Executable"; 331 | // 332 | // label8 333 | // 334 | this.label8.AutoSize = true; 335 | this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 336 | this.label8.ForeColor = System.Drawing.SystemColors.MenuHighlight; 337 | this.label8.Location = new System.Drawing.Point(197, 274); 338 | this.label8.Name = "label8"; 339 | this.label8.Size = new System.Drawing.Size(218, 13); 340 | this.label8.TabIndex = 21; 341 | this.label8.Text = "Note: Settings are saved on successful start."; 342 | // 343 | // restartLabel 344 | // 345 | this.restartLabel.AutoSize = true; 346 | this.restartLabel.Location = new System.Drawing.Point(102, 92); 347 | this.restartLabel.Name = "restartLabel"; 348 | this.restartLabel.Size = new System.Drawing.Size(13, 13); 349 | this.restartLabel.TabIndex = 22; 350 | this.restartLabel.Text = "0"; 351 | // 352 | // gpuDataGrid 353 | // 354 | this.gpuDataGrid.AllowUserToAddRows = false; 355 | this.gpuDataGrid.AllowUserToDeleteRows = false; 356 | this.gpuDataGrid.AllowUserToResizeRows = false; 357 | this.gpuDataGrid.AutoGenerateColumns = false; 358 | this.gpuDataGrid.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; 359 | this.gpuDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; 360 | this.gpuDataGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { 361 | this.NameColumn, 362 | this.currentHashRateDataGridViewTextBoxColumn, 363 | this.fiveMinHashAvgDataGridViewTextBoxColumn, 364 | this.oneHourHashAvgDataGridViewTextBoxColumn, 365 | this.currentFanSpeedDataGridViewTextBoxColumn, 366 | this.currentGpuTempDataGridViewTextBoxColumn}); 367 | this.gpuDataGrid.DataSource = this.gpuStateBindingSource; 368 | this.gpuDataGrid.Location = new System.Drawing.Point(434, 153); 369 | this.gpuDataGrid.Name = "gpuDataGrid"; 370 | this.gpuDataGrid.ReadOnly = true; 371 | this.gpuDataGrid.RowHeadersVisible = false; 372 | this.gpuDataGrid.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; 373 | this.gpuDataGrid.Size = new System.Drawing.Size(277, 138); 374 | this.gpuDataGrid.TabIndex = 24; 375 | // 376 | // NameColumn 377 | // 378 | this.NameColumn.DataPropertyName = "Name"; 379 | this.NameColumn.HeaderText = "Name"; 380 | this.NameColumn.Name = "NameColumn"; 381 | this.NameColumn.ReadOnly = true; 382 | // 383 | // groupBox1 384 | // 385 | this.groupBox1.Controls.Add(this.label18); 386 | this.groupBox1.Controls.Add(this.netErrShares); 387 | this.groupBox1.Controls.Add(this.outdatedShares); 388 | this.groupBox1.Controls.Add(this.restartLabel); 389 | this.groupBox1.Controls.Add(this.invalidShares); 390 | this.groupBox1.Controls.Add(this.rejectedShares); 391 | this.groupBox1.Controls.Add(this.acceptedShares); 392 | this.groupBox1.Controls.Add(this.totalShares); 393 | this.groupBox1.Controls.Add(this.label17); 394 | this.groupBox1.Controls.Add(this.label16); 395 | this.groupBox1.Controls.Add(this.label15); 396 | this.groupBox1.Controls.Add(this.label14); 397 | this.groupBox1.Controls.Add(this.label13); 398 | this.groupBox1.Controls.Add(this.label12); 399 | this.groupBox1.Controls.Add(this.global1h); 400 | this.groupBox1.Controls.Add(this.global5m); 401 | this.groupBox1.Controls.Add(this.globalCurrent); 402 | this.groupBox1.Controls.Add(this.label11); 403 | this.groupBox1.Controls.Add(this.label10); 404 | this.groupBox1.Controls.Add(this.label9); 405 | this.groupBox1.Location = new System.Drawing.Point(434, 10); 406 | this.groupBox1.Name = "groupBox1"; 407 | this.groupBox1.Size = new System.Drawing.Size(277, 137); 408 | this.groupBox1.TabIndex = 25; 409 | this.groupBox1.TabStop = false; 410 | this.groupBox1.Text = "Global"; 411 | // 412 | // label9 413 | // 414 | this.label9.AutoSize = true; 415 | this.label9.Location = new System.Drawing.Point(7, 20); 416 | this.label9.Name = "label9"; 417 | this.label9.Size = new System.Drawing.Size(98, 13); 418 | this.label9.TabIndex = 0; 419 | this.label9.Text = "Current Hash Rate:"; 420 | // 421 | // label10 422 | // 423 | this.label10.AutoSize = true; 424 | this.label10.Location = new System.Drawing.Point(55, 38); 425 | this.label10.Name = "label10"; 426 | this.label10.Size = new System.Drawing.Size(50, 13); 427 | this.label10.TabIndex = 1; 428 | this.label10.Text = "5 minute:"; 429 | // 430 | // label11 431 | // 432 | this.label11.AutoSize = true; 433 | this.label11.Location = new System.Drawing.Point(65, 56); 434 | this.label11.Name = "label11"; 435 | this.label11.Size = new System.Drawing.Size(40, 13); 436 | this.label11.TabIndex = 2; 437 | this.label11.Text = "1 hour:"; 438 | // 439 | // globalCurrent 440 | // 441 | this.globalCurrent.AutoSize = true; 442 | this.globalCurrent.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.appStateBindingSource, "CurrentGlobalRate", true, System.Windows.Forms.DataSourceUpdateMode.OnValidation, "0", "N2")); 443 | this.globalCurrent.Location = new System.Drawing.Point(102, 20); 444 | this.globalCurrent.Name = "globalCurrent"; 445 | this.globalCurrent.Size = new System.Drawing.Size(13, 13); 446 | this.globalCurrent.TabIndex = 3; 447 | this.globalCurrent.Text = "0"; 448 | // 449 | // global5m 450 | // 451 | this.global5m.AutoSize = true; 452 | this.global5m.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.appStateBindingSource, "FiveMinGlobalRate", true, System.Windows.Forms.DataSourceUpdateMode.OnValidation, "0", "N2")); 453 | this.global5m.Location = new System.Drawing.Point(102, 38); 454 | this.global5m.Name = "global5m"; 455 | this.global5m.Size = new System.Drawing.Size(13, 13); 456 | this.global5m.TabIndex = 4; 457 | this.global5m.Text = "0"; 458 | // 459 | // global1h 460 | // 461 | this.global1h.AutoSize = true; 462 | this.global1h.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.appStateBindingSource, "OneHourGlobalRate", true, System.Windows.Forms.DataSourceUpdateMode.OnValidation, null, "N2")); 463 | this.global1h.Location = new System.Drawing.Point(102, 56); 464 | this.global1h.Name = "global1h"; 465 | this.global1h.Size = new System.Drawing.Size(13, 13); 466 | this.global1h.TabIndex = 5; 467 | this.global1h.Text = "0"; 468 | // 469 | // appStateBindingSource 470 | // 471 | this.appStateBindingSource.DataSource = typeof(CastXmrLib.AppState); 472 | // 473 | // currentHashRateDataGridViewTextBoxColumn 474 | // 475 | this.currentHashRateDataGridViewTextBoxColumn.DataPropertyName = "CurrentHashRate"; 476 | this.currentHashRateDataGridViewTextBoxColumn.HeaderText = "Curr"; 477 | this.currentHashRateDataGridViewTextBoxColumn.Name = "currentHashRateDataGridViewTextBoxColumn"; 478 | this.currentHashRateDataGridViewTextBoxColumn.ReadOnly = true; 479 | // 480 | // fiveMinHashAvgDataGridViewTextBoxColumn 481 | // 482 | this.fiveMinHashAvgDataGridViewTextBoxColumn.DataPropertyName = "FiveMinHashAvg"; 483 | this.fiveMinHashAvgDataGridViewTextBoxColumn.HeaderText = "5m"; 484 | this.fiveMinHashAvgDataGridViewTextBoxColumn.Name = "fiveMinHashAvgDataGridViewTextBoxColumn"; 485 | this.fiveMinHashAvgDataGridViewTextBoxColumn.ReadOnly = true; 486 | // 487 | // oneHourHashAvgDataGridViewTextBoxColumn 488 | // 489 | this.oneHourHashAvgDataGridViewTextBoxColumn.DataPropertyName = "OneHourHashAvg"; 490 | this.oneHourHashAvgDataGridViewTextBoxColumn.HeaderText = "1h"; 491 | this.oneHourHashAvgDataGridViewTextBoxColumn.Name = "oneHourHashAvgDataGridViewTextBoxColumn"; 492 | this.oneHourHashAvgDataGridViewTextBoxColumn.ReadOnly = true; 493 | // 494 | // currentFanSpeedDataGridViewTextBoxColumn 495 | // 496 | this.currentFanSpeedDataGridViewTextBoxColumn.DataPropertyName = "CurrentFanSpeed"; 497 | this.currentFanSpeedDataGridViewTextBoxColumn.HeaderText = "RPM"; 498 | this.currentFanSpeedDataGridViewTextBoxColumn.Name = "currentFanSpeedDataGridViewTextBoxColumn"; 499 | this.currentFanSpeedDataGridViewTextBoxColumn.ReadOnly = true; 500 | // 501 | // currentGpuTempDataGridViewTextBoxColumn 502 | // 503 | this.currentGpuTempDataGridViewTextBoxColumn.DataPropertyName = "CurrentGpuTemp"; 504 | this.currentGpuTempDataGridViewTextBoxColumn.HeaderText = "Temp"; 505 | this.currentGpuTempDataGridViewTextBoxColumn.Name = "currentGpuTempDataGridViewTextBoxColumn"; 506 | this.currentGpuTempDataGridViewTextBoxColumn.ReadOnly = true; 507 | // 508 | // gpuStateBindingSource 509 | // 510 | this.gpuStateBindingSource.DataSource = typeof(CastXmrLib.GpuState); 511 | // 512 | // label12 513 | // 514 | this.label12.AutoSize = true; 515 | this.label12.Location = new System.Drawing.Point(159, 20); 516 | this.label12.Name = "label12"; 517 | this.label12.Size = new System.Drawing.Size(70, 13); 518 | this.label12.TabIndex = 6; 519 | this.label12.Text = "Total Shares:"; 520 | // 521 | // label13 522 | // 523 | this.label13.AutoSize = true; 524 | this.label13.Location = new System.Drawing.Point(173, 38); 525 | this.label13.Name = "label13"; 526 | this.label13.Size = new System.Drawing.Size(56, 13); 527 | this.label13.TabIndex = 7; 528 | this.label13.Text = "Accepted:"; 529 | // 530 | // label14 531 | // 532 | this.label14.AutoSize = true; 533 | this.label14.Location = new System.Drawing.Point(176, 56); 534 | this.label14.Name = "label14"; 535 | this.label14.Size = new System.Drawing.Size(53, 13); 536 | this.label14.TabIndex = 8; 537 | this.label14.Text = "Rejected:"; 538 | // 539 | // label15 540 | // 541 | this.label15.AutoSize = true; 542 | this.label15.Location = new System.Drawing.Point(188, 74); 543 | this.label15.Name = "label15"; 544 | this.label15.Size = new System.Drawing.Size(41, 13); 545 | this.label15.TabIndex = 9; 546 | this.label15.Text = "Invalid:"; 547 | // 548 | // label16 549 | // 550 | this.label16.AutoSize = true; 551 | this.label16.Location = new System.Drawing.Point(175, 92); 552 | this.label16.Name = "label16"; 553 | this.label16.Size = new System.Drawing.Size(54, 13); 554 | this.label16.TabIndex = 10; 555 | this.label16.Text = "Outdated:"; 556 | // 557 | // label17 558 | // 559 | this.label17.AutoSize = true; 560 | this.label17.Location = new System.Drawing.Point(186, 110); 561 | this.label17.Name = "label17"; 562 | this.label17.Size = new System.Drawing.Size(43, 13); 563 | this.label17.TabIndex = 11; 564 | this.label17.Text = "Net Err:"; 565 | // 566 | // totalShares 567 | // 568 | this.totalShares.AutoSize = true; 569 | this.totalShares.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.appStateBindingSource, "TotalShares", true, System.Windows.Forms.DataSourceUpdateMode.OnValidation, "0", "N0")); 570 | this.totalShares.Location = new System.Drawing.Point(226, 20); 571 | this.totalShares.Name = "totalShares"; 572 | this.totalShares.Size = new System.Drawing.Size(13, 13); 573 | this.totalShares.TabIndex = 12; 574 | this.totalShares.Text = "0"; 575 | // 576 | // acceptedShares 577 | // 578 | this.acceptedShares.AutoSize = true; 579 | this.acceptedShares.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.appStateBindingSource, "SharesAccepted", true, System.Windows.Forms.DataSourceUpdateMode.OnValidation, "0", "N0")); 580 | this.acceptedShares.Location = new System.Drawing.Point(226, 38); 581 | this.acceptedShares.Name = "acceptedShares"; 582 | this.acceptedShares.Size = new System.Drawing.Size(13, 13); 583 | this.acceptedShares.TabIndex = 13; 584 | this.acceptedShares.Text = "0"; 585 | // 586 | // rejectedShares 587 | // 588 | this.rejectedShares.AutoSize = true; 589 | this.rejectedShares.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.appStateBindingSource, "SharesRejected", true, System.Windows.Forms.DataSourceUpdateMode.OnValidation, "0", "N0")); 590 | this.rejectedShares.Location = new System.Drawing.Point(226, 57); 591 | this.rejectedShares.Name = "rejectedShares"; 592 | this.rejectedShares.Size = new System.Drawing.Size(13, 13); 593 | this.rejectedShares.TabIndex = 14; 594 | this.rejectedShares.Text = "0"; 595 | // 596 | // invalidShares 597 | // 598 | this.invalidShares.AutoSize = true; 599 | this.invalidShares.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.appStateBindingSource, "SharesInvalid", true, System.Windows.Forms.DataSourceUpdateMode.OnValidation, "0", "N0")); 600 | this.invalidShares.Location = new System.Drawing.Point(226, 74); 601 | this.invalidShares.Name = "invalidShares"; 602 | this.invalidShares.Size = new System.Drawing.Size(13, 13); 603 | this.invalidShares.TabIndex = 15; 604 | this.invalidShares.Text = "0"; 605 | // 606 | // outdatedShares 607 | // 608 | this.outdatedShares.AutoSize = true; 609 | this.outdatedShares.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.appStateBindingSource, "SharesOutdated", true, System.Windows.Forms.DataSourceUpdateMode.OnValidation, "0", "N0")); 610 | this.outdatedShares.Location = new System.Drawing.Point(226, 92); 611 | this.outdatedShares.Name = "outdatedShares"; 612 | this.outdatedShares.Size = new System.Drawing.Size(13, 13); 613 | this.outdatedShares.TabIndex = 16; 614 | this.outdatedShares.Text = "0"; 615 | // 616 | // netErrShares 617 | // 618 | this.netErrShares.AutoSize = true; 619 | this.netErrShares.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.appStateBindingSource, "SharesNetworkError", true, System.Windows.Forms.DataSourceUpdateMode.OnValidation, "0", "N0")); 620 | this.netErrShares.Location = new System.Drawing.Point(226, 110); 621 | this.netErrShares.Name = "netErrShares"; 622 | this.netErrShares.Size = new System.Drawing.Size(13, 13); 623 | this.netErrShares.TabIndex = 17; 624 | this.netErrShares.Text = "0"; 625 | // 626 | // label18 627 | // 628 | this.label18.AutoSize = true; 629 | this.label18.Location = new System.Drawing.Point(27, 92); 630 | this.label18.Name = "label18"; 631 | this.label18.Size = new System.Drawing.Size(78, 13); 632 | this.label18.TabIndex = 23; 633 | this.label18.Text = "Miner Restarts:"; 634 | // 635 | // Form1 636 | // 637 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 638 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 639 | this.ClientSize = new System.Drawing.Size(723, 476); 640 | this.Controls.Add(this.groupBox1); 641 | this.Controls.Add(this.gpuDataGrid); 642 | this.Controls.Add(this.label8); 643 | this.Controls.Add(this.label7); 644 | this.Controls.Add(this.hashRestart); 645 | this.Controls.Add(this.autoRestartCheck); 646 | this.Controls.Add(this.gpuText); 647 | this.Controls.Add(this.label6); 648 | this.Controls.Add(this.fastJobCheck); 649 | this.Controls.Add(this.button1); 650 | this.Controls.Add(this.label5); 651 | this.Controls.Add(this.exePath); 652 | this.Controls.Add(this.consoleLog); 653 | this.Controls.Add(this.stopButton); 654 | this.Controls.Add(this.startButton); 655 | this.Controls.Add(this.intensity); 656 | this.Controls.Add(this.workerPassword); 657 | this.Controls.Add(this.walletAddress); 658 | this.Controls.Add(this.useNicehash); 659 | this.Controls.Add(this.label4); 660 | this.Controls.Add(this.label3); 661 | this.Controls.Add(this.label2); 662 | this.Controls.Add(this.label1); 663 | this.Controls.Add(this.poolAddress); 664 | this.Name = "Form1"; 665 | this.Text = "Cast XMR UI"; 666 | ((System.ComponentModel.ISupportInitialize)(this.intensity)).EndInit(); 667 | ((System.ComponentModel.ISupportInitialize)(this.gpuDataGrid)).EndInit(); 668 | this.groupBox1.ResumeLayout(false); 669 | this.groupBox1.PerformLayout(); 670 | ((System.ComponentModel.ISupportInitialize)(this.appStateBindingSource)).EndInit(); 671 | ((System.ComponentModel.ISupportInitialize)(this.gpuStateBindingSource)).EndInit(); 672 | this.ResumeLayout(false); 673 | this.PerformLayout(); 674 | 675 | } 676 | 677 | #endregion 678 | 679 | private System.Windows.Forms.TextBox poolAddress; 680 | private System.Windows.Forms.Label label1; 681 | private System.Windows.Forms.Label label2; 682 | private System.Windows.Forms.Label label3; 683 | private System.Windows.Forms.Label label4; 684 | private System.Windows.Forms.CheckBox useNicehash; 685 | private System.Windows.Forms.TextBox walletAddress; 686 | private System.Windows.Forms.TextBox workerPassword; 687 | private System.Windows.Forms.NumericUpDown intensity; 688 | private System.Windows.Forms.Button startButton; 689 | private System.Windows.Forms.Button stopButton; 690 | private System.Windows.Forms.TextBox consoleLog; 691 | private System.Windows.Forms.TextBox exePath; 692 | private System.Windows.Forms.Label label5; 693 | private System.Windows.Forms.Button button1; 694 | private System.Diagnostics.Process processRunner; 695 | private System.Windows.Forms.Timer statusTimer; 696 | private System.Windows.Forms.CheckBox fastJobCheck; 697 | private System.Windows.Forms.Label label6; 698 | private System.Windows.Forms.TextBox gpuText; 699 | private System.Windows.Forms.Label label7; 700 | private System.Windows.Forms.TextBox hashRestart; 701 | private System.Windows.Forms.CheckBox autoRestartCheck; 702 | private System.Windows.Forms.OpenFileDialog chooseMinerDialog; 703 | private System.Windows.Forms.Label label8; 704 | private System.Windows.Forms.Label restartLabel; 705 | private System.Windows.Forms.DataGridView gpuDataGrid; 706 | private System.Windows.Forms.BindingSource gpuStateBindingSource; 707 | private System.Windows.Forms.DataGridViewTextBoxColumn NameColumn; 708 | private System.Windows.Forms.DataGridViewTextBoxColumn currentHashRateDataGridViewTextBoxColumn; 709 | private System.Windows.Forms.DataGridViewTextBoxColumn fiveMinHashAvgDataGridViewTextBoxColumn; 710 | private System.Windows.Forms.DataGridViewTextBoxColumn oneHourHashAvgDataGridViewTextBoxColumn; 711 | private System.Windows.Forms.DataGridViewTextBoxColumn currentFanSpeedDataGridViewTextBoxColumn; 712 | private System.Windows.Forms.DataGridViewTextBoxColumn currentGpuTempDataGridViewTextBoxColumn; 713 | private System.Windows.Forms.GroupBox groupBox1; 714 | private System.Windows.Forms.Label global1h; 715 | private System.Windows.Forms.BindingSource appStateBindingSource; 716 | private System.Windows.Forms.Label global5m; 717 | private System.Windows.Forms.Label globalCurrent; 718 | private System.Windows.Forms.Label label11; 719 | private System.Windows.Forms.Label label10; 720 | private System.Windows.Forms.Label label9; 721 | private System.Windows.Forms.Label label15; 722 | private System.Windows.Forms.Label label14; 723 | private System.Windows.Forms.Label label13; 724 | private System.Windows.Forms.Label label12; 725 | private System.Windows.Forms.Label netErrShares; 726 | private System.Windows.Forms.Label outdatedShares; 727 | private System.Windows.Forms.Label invalidShares; 728 | private System.Windows.Forms.Label rejectedShares; 729 | private System.Windows.Forms.Label acceptedShares; 730 | private System.Windows.Forms.Label totalShares; 731 | private System.Windows.Forms.Label label17; 732 | private System.Windows.Forms.Label label16; 733 | private System.Windows.Forms.Label label18; 734 | } 735 | } 736 | 737 | -------------------------------------------------------------------------------- /cast-xmr-ui/Form1.cs: -------------------------------------------------------------------------------- 1 | using CastXmrLib; 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 cast_xmr_ui 16 | { 17 | public partial class Form1 : Form 18 | { 19 | private AppState app = new AppState(); 20 | DateTime minerStarted; 21 | private int restartCount = 0; 22 | 23 | public Form1() 24 | { 25 | InitializeComponent(); 26 | } 27 | 28 | private void processRunner_OutputDataReceived(object sender, System.Diagnostics.DataReceivedEventArgs e) 29 | { 30 | consoleLog.AppendText(e.Data + "\n"); 31 | Debug.WriteLine("STDOUT: " + e.Data); 32 | } 33 | 34 | private void startButton_Click(object sender, EventArgs e) 35 | { 36 | if(String.IsNullOrEmpty(exePath.Text)) 37 | { 38 | MessageBox.Show("Please specify a miner path"); 39 | return; 40 | } 41 | if(!File.Exists(exePath.Text)) 42 | { 43 | MessageBox.Show("Miner path does not exist"); 44 | return; 45 | } 46 | 47 | // Arg check 48 | if (poolAddress.Text.Count() < 1) 49 | { 50 | throw new ArgumentNullException("PoolAddress"); 51 | } 52 | if (walletAddress.Text.Count() < 1) 53 | { 54 | throw new ArgumentNullException("WalletAddress"); 55 | } 56 | 57 | startMiner(); 58 | 59 | startButton.Enabled = false; 60 | stopButton.Enabled = true; 61 | //processRunner.BeginErrorReadLine(); 62 | //processRunner.BeginOutputReadLine(); 63 | 64 | statusTimer.Start(); 65 | 66 | // Save the settings 67 | Properties.Settings.Default.Save(); 68 | } 69 | 70 | private void startMiner() 71 | { 72 | // Clear out any old stats 73 | app.Reset(); 74 | 75 | ProcessStartInfo info = new ProcessStartInfo(); 76 | //info.RedirectStandardError = true; 77 | //info.RedirectStandardInput = true; 78 | //info.RedirectStandardOutput = true; 79 | //info.CreateNoWindow = true; 80 | info.UseShellExecute = false; 81 | info.FileName = exePath.Text; 82 | info.ErrorDialog = true; 83 | StringBuilder args = new StringBuilder(); 84 | 85 | args.Append("--pool " + poolAddress.Text); 86 | args.Append(" --user " + walletAddress.Text); 87 | if (workerPassword.Text.Count() > 0) 88 | { 89 | args.Append(" --password " + workerPassword.Text); 90 | } 91 | args.Append(" --intensity " + intensity.Value); 92 | 93 | if (useNicehash.Checked) 94 | { 95 | args.Append(" --nicehash"); 96 | } 97 | 98 | if (fastJobCheck.Checked) 99 | { 100 | args.Append(" --fastjobswitch"); 101 | } 102 | 103 | args.Append(" -G " + gpuText.Text); 104 | args.Append(" --remoteaccess"); 105 | info.Arguments = args.ToString(); 106 | 107 | processRunner.StartInfo = info; 108 | 109 | Debug.WriteLine("Args: " + args); 110 | 111 | consoleLog.AppendText(DateTime.Now + ": STARTING: " + processRunner.StartInfo.FileName + " " + processRunner.StartInfo.Arguments + Environment.NewLine); 112 | try 113 | { 114 | processRunner.Start(); 115 | } catch(Exception e) 116 | { 117 | MessageBox.Show("Could not start miner: " + e.Message, "Error"); 118 | } 119 | minerStarted = DateTime.Now; 120 | } 121 | 122 | private void processRunner_Exited(object sender, EventArgs e) 123 | { 124 | startButton.Enabled = true; 125 | stopButton.Enabled = false; 126 | } 127 | 128 | private void processRunner_ErrorDataReceived(object sender, DataReceivedEventArgs e) 129 | { 130 | consoleLog.AppendText("STDERR: " + e.Data + "\n"); 131 | 132 | } 133 | 134 | private void statusTimer_Tick(object sender, EventArgs e) 135 | { 136 | //processRunner.StandardInput.Write('s'); 137 | //processRunner.StandardInput.Flush(); 138 | WebClient wc = new WebClient(); 139 | try { 140 | string response = wc.DownloadString("http://localhost:7777"); 141 | JsonParser.Parse(response, app); 142 | app.UpdateGlobalRates(); 143 | 144 | //printStatus(); 145 | appStateBindingSource.Clear(); 146 | appStateBindingSource.Add(app); 147 | 148 | // TODO: figure out how to make GpuState fire update events. 149 | gpuStateBindingSource.Clear(); 150 | foreach (int gpu in app.GpuStates.Keys) 151 | { 152 | gpuStateBindingSource.Add(app.GetGpu(gpu)); 153 | } 154 | 155 | 156 | int restartRate = int.Parse(hashRestart.Text); 157 | 158 | if (autoRestartCheck.Checked && (DateTime.Now - minerStarted > TimeSpan.FromMinutes(5))) 159 | { 160 | foreach (int gpu in app.GpuStates.Keys) 161 | { 162 | GpuState gs = app.GetGpu(gpu); 163 | if (gs.FiveMinHashAvg < restartRate) 164 | { 165 | consoleLog.AppendText(String.Format("{2}: RESTARTING MINER - rate {0:N0} < {1:N0}\n", gs.FiveMinHashAvg, restartRate, DateTime.Now)); 166 | statusTimer.Stop(); 167 | processRunner.Kill(); 168 | startMiner(); 169 | statusTimer.Start(); 170 | restartCount++; 171 | restartLabel.Text = ""+restartCount; 172 | break; 173 | } 174 | 175 | } 176 | } 177 | 178 | } 179 | catch (Exception ee) 180 | { 181 | consoleLog.AppendText("ERROR: could not query web service: " + ee.Message + "\n"); 182 | } 183 | } 184 | 185 | private void printStatus() 186 | { 187 | StringBuilder sb = new StringBuilder(); 188 | sb.AppendFormat("{0}: Rate: {1:N0}:5s {2:N0}:5m {3:N0}:1h - ", DateTime.Now.ToLongTimeString(), app.CurrentGlobalRate, app.FiveMinGlobalRate, app.OneHourGlobalRate); 189 | foreach(int gpu in app.GpuStates.Keys) 190 | { 191 | GpuState gs = app.GetGpu(gpu); 192 | sb.AppendFormat("GPU{0}: {1}H/s {2}C {3}RPM ", gpu, gs.CurrentHashRate, gs.CurrentGpuTemp, gs.CurrentFanSpeed); 193 | } 194 | sb.Append("\n"); 195 | consoleLog.AppendText(sb.ToString()); 196 | } 197 | 198 | private void stopButton_Click(object sender, EventArgs e) 199 | { 200 | statusTimer.Stop(); 201 | processRunner.Kill(); 202 | } 203 | 204 | private void button1_Click(object sender, EventArgs e) 205 | { 206 | if(chooseMinerDialog.ShowDialog() == DialogResult.OK) 207 | { 208 | exePath.Text = chooseMinerDialog.FileName; 209 | } 210 | } 211 | 212 | } 213 | } 214 | -------------------------------------------------------------------------------- /cast-xmr-ui/Form1.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 17, 17 122 | 123 | 124 | True 125 | 126 | 127 | 601, 17 128 | 129 | 130 | 149, 17 131 | 132 | 133 | 264, 17 134 | 135 | 136 | 17, 56 137 | 138 | 139 | 17, 56 140 | 141 | -------------------------------------------------------------------------------- /cast-xmr-ui/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace cast_xmr_ui 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// The main entry point for the application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new Form1()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /cast-xmr-ui/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using 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 | [assembly: AssemblyTitle("cast-xmr-ui")] 9 | [assembly: AssemblyDescription("UI to monitor and run Cast-XMR")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("cast-xmr-ui")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("a04af1da-cfab-4eec-b23e-cf424a2558a5")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("0.9.1.0")] 36 | [assembly: AssemblyFileVersion("0.9.1.0")] 37 | -------------------------------------------------------------------------------- /cast-xmr-ui/Properties/DataSources/CastXmrLib.AppState.datasource: -------------------------------------------------------------------------------- 1 |  2 | 8 | 9 | CastXmrLib.AppState, cast-xmr-lib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 10 | -------------------------------------------------------------------------------- /cast-xmr-ui/Properties/DataSources/CastXmrLib.GpuState.datasource: -------------------------------------------------------------------------------- 1 |  2 | 8 | 9 | CastXmrLib.GpuState, cast-xmr-lib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 10 | -------------------------------------------------------------------------------- /cast-xmr-ui/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace cast_xmr_ui.Properties 12 | { 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// Returns the cached ResourceManager instance used by this class. 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("cast_xmr_ui.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// Overrides the current thread's CurrentUICulture property for all 56 | /// resource lookups using this strongly typed resource class. 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /cast-xmr-ui/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /cast-xmr-ui/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace cast_xmr_ui.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.3.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | 26 | [global::System.Configuration.UserScopedSettingAttribute()] 27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 28 | [global::System.Configuration.DefaultSettingValueAttribute("1Jpa5vXshvEaQKFjenma8qarFofkEJzrPK")] 29 | public string WalletAddress { 30 | get { 31 | return ((string)(this["WalletAddress"])); 32 | } 33 | set { 34 | this["WalletAddress"] = value; 35 | } 36 | } 37 | 38 | [global::System.Configuration.UserScopedSettingAttribute()] 39 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 40 | [global::System.Configuration.DefaultSettingValueAttribute("cryptonight.usa.nicehash.com:3355")] 41 | public string PoolAddress { 42 | get { 43 | return ((string)(this["PoolAddress"])); 44 | } 45 | set { 46 | this["PoolAddress"] = value; 47 | } 48 | } 49 | 50 | [global::System.Configuration.UserScopedSettingAttribute()] 51 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 52 | [global::System.Configuration.DefaultSettingValueAttribute("x")] 53 | public string WorkerPassword { 54 | get { 55 | return ((string)(this["WorkerPassword"])); 56 | } 57 | set { 58 | this["WorkerPassword"] = value; 59 | } 60 | } 61 | 62 | [global::System.Configuration.UserScopedSettingAttribute()] 63 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 64 | [global::System.Configuration.DefaultSettingValueAttribute("5")] 65 | public decimal Intensity { 66 | get { 67 | return ((decimal)(this["Intensity"])); 68 | } 69 | set { 70 | this["Intensity"] = value; 71 | } 72 | } 73 | 74 | [global::System.Configuration.UserScopedSettingAttribute()] 75 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 76 | [global::System.Configuration.DefaultSettingValueAttribute("0,1")] 77 | public string GPU { 78 | get { 79 | return ((string)(this["GPU"])); 80 | } 81 | set { 82 | this["GPU"] = value; 83 | } 84 | } 85 | 86 | [global::System.Configuration.UserScopedSettingAttribute()] 87 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 88 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 89 | public bool UseNicehash { 90 | get { 91 | return ((bool)(this["UseNicehash"])); 92 | } 93 | set { 94 | this["UseNicehash"] = value; 95 | } 96 | } 97 | 98 | [global::System.Configuration.UserScopedSettingAttribute()] 99 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 100 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 101 | public bool FastJobSwitching { 102 | get { 103 | return ((bool)(this["FastJobSwitching"])); 104 | } 105 | set { 106 | this["FastJobSwitching"] = value; 107 | } 108 | } 109 | 110 | [global::System.Configuration.UserScopedSettingAttribute()] 111 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 112 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 113 | public bool AutoRestart { 114 | get { 115 | return ((bool)(this["AutoRestart"])); 116 | } 117 | set { 118 | this["AutoRestart"] = value; 119 | } 120 | } 121 | 122 | [global::System.Configuration.UserScopedSettingAttribute()] 123 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 124 | [global::System.Configuration.DefaultSettingValueAttribute("1900")] 125 | public string AutoRestartRate { 126 | get { 127 | return ((string)(this["AutoRestartRate"])); 128 | } 129 | set { 130 | this["AutoRestartRate"] = value; 131 | } 132 | } 133 | 134 | [global::System.Configuration.UserScopedSettingAttribute()] 135 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 136 | [global::System.Configuration.DefaultSettingValueAttribute("")] 137 | public string MinerPath { 138 | get { 139 | return ((string)(this["MinerPath"])); 140 | } 141 | set { 142 | this["MinerPath"] = value; 143 | } 144 | } 145 | } 146 | } 147 | -------------------------------------------------------------------------------- /cast-xmr-ui/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 1Jpa5vXshvEaQKFjenma8qarFofkEJzrPK 7 | 8 | 9 | cryptonight.usa.nicehash.com:3355 10 | 11 | 12 | x 13 | 14 | 15 | 5 16 | 17 | 18 | 0,1 19 | 20 | 21 | True 22 | 23 | 24 | True 25 | 26 | 27 | True 28 | 29 | 30 | 1900 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /cast-xmr-ui/cast-xmr-ui.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {A04AF1DA-CFAB-4EEC-B23E-CF424A2558A5} 8 | WinExe 9 | cast_xmr_ui 10 | cast-xmr-ui 11 | v4.6.1 12 | 512 13 | true 14 | false 15 | publish\ 16 | true 17 | Disk 18 | false 19 | Foreground 20 | 7 21 | Days 22 | false 23 | false 24 | true 25 | 0 26 | 0.9.1.%2a 27 | false 28 | true 29 | 30 | 31 | AnyCPU 32 | true 33 | full 34 | false 35 | bin\Debug\ 36 | DEBUG;TRACE 37 | prompt 38 | 4 39 | 40 | 41 | AnyCPU 42 | pdbonly 43 | true 44 | bin\Release\ 45 | TRACE 46 | prompt 47 | 4 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | Form 65 | 66 | 67 | Form1.cs 68 | 69 | 70 | 71 | 72 | Form1.cs 73 | 74 | 75 | ResXFileCodeGenerator 76 | Resources.Designer.cs 77 | Designer 78 | 79 | 80 | True 81 | Resources.resx 82 | 83 | 84 | 85 | 86 | SettingsSingleFileGenerator 87 | Settings.Designer.cs 88 | 89 | 90 | True 91 | Settings.settings 92 | True 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | {f50a2425-495d-494c-8aa7-76f992bd003c} 101 | cast-xmr-lib 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | False 110 | Microsoft .NET Framework 4.6.1 %28x86 and x64%29 111 | true 112 | 113 | 114 | False 115 | .NET Framework 3.5 SP1 116 | false 117 | 118 | 119 | 120 | --------------------------------------------------------------------------------