Init commit
This commit is contained in:
commit
0c711f7da6
543
.gitignore
vendored
Normal file
543
.gitignore
vendored
Normal file
@ -0,0 +1,543 @@
|
||||
|
||||
# Created by https://www.toptal.com/developers/gitignore/api/intellij,rider,visualstudio,dotnetcore,windows
|
||||
# Edit at https://www.toptal.com/developers/gitignore?templates=intellij,rider,visualstudio,dotnetcore,windows
|
||||
|
||||
### DotnetCore ###
|
||||
# .NET Core build folders
|
||||
bin/
|
||||
obj/
|
||||
|
||||
# Common node modules locations
|
||||
/node_modules
|
||||
/wwwroot/node_modules
|
||||
|
||||
### Intellij ###
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
|
||||
# User-specific stuff
|
||||
.idea/**/workspace.xml
|
||||
.idea/**/tasks.xml
|
||||
.idea/**/usage.statistics.xml
|
||||
.idea/**/dictionaries
|
||||
.idea/**/shelf
|
||||
|
||||
# Generated files
|
||||
.idea/**/contentModel.xml
|
||||
|
||||
# Sensitive or high-churn files
|
||||
.idea/**/dataSources/
|
||||
.idea/**/dataSources.ids
|
||||
.idea/**/dataSources.local.xml
|
||||
.idea/**/sqlDataSources.xml
|
||||
.idea/**/dynamic.xml
|
||||
.idea/**/uiDesigner.xml
|
||||
.idea/**/dbnavigator.xml
|
||||
|
||||
# Gradle
|
||||
.idea/**/gradle.xml
|
||||
.idea/**/libraries
|
||||
|
||||
# Gradle and Maven with auto-import
|
||||
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||
# since they will be recreated, and may cause churn. Uncomment if using
|
||||
# auto-import.
|
||||
# .idea/artifacts
|
||||
# .idea/compiler.xml
|
||||
# .idea/jarRepositories.xml
|
||||
# .idea/modules.xml
|
||||
# .idea/*.iml
|
||||
# .idea/modules
|
||||
# *.iml
|
||||
# *.ipr
|
||||
|
||||
# CMake
|
||||
cmake-build-*/
|
||||
|
||||
# Mongo Explorer plugin
|
||||
.idea/**/mongoSettings.xml
|
||||
|
||||
# File-based project format
|
||||
*.iws
|
||||
|
||||
# IntelliJ
|
||||
out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Cursive Clojure plugin
|
||||
.idea/replstate.xml
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
fabric.properties
|
||||
|
||||
# Editor-based Rest Client
|
||||
.idea/httpRequests
|
||||
|
||||
# Android studio 3.1+ serialized cache file
|
||||
.idea/caches/build_file_checksums.ser
|
||||
|
||||
### Intellij Patch ###
|
||||
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
|
||||
|
||||
# *.iml
|
||||
# modules.xml
|
||||
# .idea/misc.xml
|
||||
# *.ipr
|
||||
|
||||
# Sonarlint plugin
|
||||
# https://plugins.jetbrains.com/plugin/7973-sonarlint
|
||||
.idea/**/sonarlint/
|
||||
|
||||
# SonarQube Plugin
|
||||
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
|
||||
.idea/**/sonarIssues.xml
|
||||
|
||||
# Markdown Navigator plugin
|
||||
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
|
||||
.idea/**/markdown-navigator.xml
|
||||
.idea/**/markdown-navigator-enh.xml
|
||||
.idea/**/markdown-navigator/
|
||||
|
||||
# Cache file creation bugfix
|
||||
# See https://youtrack.jetbrains.com/issue/JBR-2257
|
||||
.idea/$CACHE_FILE$
|
||||
|
||||
# CodeStream plugin
|
||||
# https://plugins.jetbrains.com/plugin/12206-codestream
|
||||
.idea/codestream.xml
|
||||
|
||||
### Rider ###
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
|
||||
# User-specific stuff
|
||||
|
||||
# Generated files
|
||||
|
||||
# Sensitive or high-churn files
|
||||
|
||||
# Gradle
|
||||
|
||||
# Gradle and Maven with auto-import
|
||||
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||
# since they will be recreated, and may cause churn. Uncomment if using
|
||||
# auto-import.
|
||||
# .idea/artifacts
|
||||
# .idea/compiler.xml
|
||||
# .idea/jarRepositories.xml
|
||||
# .idea/modules.xml
|
||||
# .idea/*.iml
|
||||
# .idea/modules
|
||||
# *.iml
|
||||
# *.ipr
|
||||
|
||||
# CMake
|
||||
|
||||
# Mongo Explorer plugin
|
||||
|
||||
# File-based project format
|
||||
|
||||
# IntelliJ
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
|
||||
# JIRA plugin
|
||||
|
||||
# Cursive Clojure plugin
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
|
||||
# Editor-based Rest Client
|
||||
|
||||
# Android studio 3.1+ serialized cache file
|
||||
|
||||
### Windows ###
|
||||
# Windows thumbnail cache files
|
||||
Thumbs.db
|
||||
Thumbs.db:encryptable
|
||||
ehthumbs.db
|
||||
ehthumbs_vista.db
|
||||
|
||||
# Dump file
|
||||
*.stackdump
|
||||
|
||||
# Folder config file
|
||||
[Dd]esktop.ini
|
||||
|
||||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Windows Installer files
|
||||
*.cab
|
||||
*.msi
|
||||
*.msix
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
# Windows shortcuts
|
||||
*.lnk
|
||||
|
||||
### VisualStudio ###
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
##
|
||||
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
||||
|
||||
# User-specific files
|
||||
*.rsuser
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Mono auto generated files
|
||||
mono_crash.*
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
[Aa][Rr][Mm]/
|
||||
[Aa][Rr][Mm]64/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
[Ll]ogs/
|
||||
|
||||
# Visual Studio 2015/2017 cache/options directory
|
||||
.vs/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# Visual Studio 2017 auto generated files
|
||||
Generated\ Files/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUnit
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
nunit-*.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# Benchmark Results
|
||||
BenchmarkDotNet.Artifacts/
|
||||
|
||||
# .NET Core
|
||||
project.lock.json
|
||||
project.fragment.lock.json
|
||||
artifacts/
|
||||
|
||||
# StyleCop
|
||||
StyleCopReport.xml
|
||||
|
||||
# Files built by Visual Studio
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_h.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.iobj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.ipdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*_wpftmp.csproj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# Visual Studio Trace Files
|
||||
*.e2e
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# AxoCover is a Code Coverage Tool
|
||||
.axoCover/*
|
||||
!.axoCover/settings.json
|
||||
|
||||
# Coverlet is a free, cross platform Code Coverage Tool
|
||||
coverage*[.json, .xml, .info]
|
||||
|
||||
# Visual Studio code coverage results
|
||||
*.coverage
|
||||
*.coveragexml
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||
# in these scripts will be unencrypted
|
||||
PublishScripts/
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# NuGet Symbol Packages
|
||||
*.snupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/[Pp]ackages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/[Pp]ackages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/[Pp]ackages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignorable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
# Microsoft Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Microsoft Azure Emulator
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Windows Store app package directories and files
|
||||
AppPackages/
|
||||
BundleArtifacts/
|
||||
Package.StoreAssociation.xml
|
||||
_pkginfo.txt
|
||||
*.appx
|
||||
*.appxbundle
|
||||
*.appxupload
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!?*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.jfm
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
orleans.codegen.cs
|
||||
|
||||
# Including strong name files can present a security risk
|
||||
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||
#*.snk
|
||||
|
||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||
#bower_components/
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
ServiceFabricBackup/
|
||||
*.rptproj.bak
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
*.ndf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
*.rptproj.rsuser
|
||||
*- [Bb]ackup.rdl
|
||||
*- [Bb]ackup ([0-9]).rdl
|
||||
*- [Bb]ackup ([0-9][0-9]).rdl
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# GhostDoc plugin setting file
|
||||
*.GhostDoc.xml
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
node_modules/
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
|
||||
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||
*.vbw
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
|
||||
# Paket dependency manager
|
||||
.paket/paket.exe
|
||||
paket-files/
|
||||
|
||||
# FAKE - F# Make
|
||||
.fake/
|
||||
|
||||
# CodeRush personal settings
|
||||
.cr/personal
|
||||
|
||||
# Python Tools for Visual Studio (PTVS)
|
||||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
# Cake - Uncomment if you are using it
|
||||
# tools/**
|
||||
# !tools/packages.config
|
||||
|
||||
# Tabs Studio
|
||||
*.tss
|
||||
|
||||
# Telerik's JustMock configuration file
|
||||
*.jmconfig
|
||||
|
||||
# BizTalk build output
|
||||
*.btp.cs
|
||||
*.btm.cs
|
||||
*.odx.cs
|
||||
*.xsd.cs
|
||||
|
||||
# OpenCover UI analysis results
|
||||
OpenCover/
|
||||
|
||||
# Azure Stream Analytics local run output
|
||||
ASALocalRun/
|
||||
|
||||
# MSBuild Binary and Structured Log
|
||||
*.binlog
|
||||
|
||||
# NVidia Nsight GPU debugger configuration file
|
||||
*.nvuser
|
||||
|
||||
# MFractors (Xamarin productivity tool) working folder
|
||||
.mfractor/
|
||||
|
||||
# Local History for Visual Studio
|
||||
.localhistory/
|
||||
|
||||
# BeatPulse healthcheck temp database
|
||||
healthchecksdb
|
||||
|
||||
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||
MigrationBackup/
|
||||
|
||||
# Ionide (cross platform F# VS Code tools) working folder
|
||||
.ionide/
|
||||
|
||||
# End of https://www.toptal.com/developers/gitignore/api/intellij,rider,visualstudio,dotnetcore,windows
|
5
.idea/.idea.GoldbergGUI/.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
5
.idea/.idea.GoldbergGUI/.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
@ -0,0 +1,5 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<state>
|
||||
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
|
||||
</state>
|
||||
</component>
|
4
.idea/.idea.GoldbergGUI/.idea/encodings.xml
generated
Normal file
4
.idea/.idea.GoldbergGUI/.idea/encodings.xml
generated
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
|
||||
</project>
|
8
.idea/.idea.GoldbergGUI/.idea/indexLayout.xml
generated
Normal file
8
.idea/.idea.GoldbergGUI/.idea/indexLayout.xml
generated
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ContentModelUserStore">
|
||||
<attachedFolders />
|
||||
<explicitIncludes />
|
||||
<explicitExcludes />
|
||||
</component>
|
||||
</project>
|
8
.idea/.idea.GoldbergGUI/.idea/modules.xml
generated
Normal file
8
.idea/.idea.GoldbergGUI/.idea/modules.xml
generated
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/.idea.GoldbergGUI/riderModule.iml" filepath="$PROJECT_DIR$/.idea/.idea.GoldbergGUI/riderModule.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
6
.idea/.idea.GoldbergGUI/.idea/projectSettingsUpdater.xml
generated
Normal file
6
.idea/.idea.GoldbergGUI/.idea/projectSettingsUpdater.xml
generated
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RiderProjectSettingsUpdater">
|
||||
<option name="vcsConfiguration" value="2" />
|
||||
</component>
|
||||
</project>
|
6
.idea/.idea.GoldbergGUI/.idea/vcs.xml
generated
Normal file
6
.idea/.idea.GoldbergGUI/.idea/vcs.xml
generated
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
7
.idea/.idea.GoldbergGUI/riderModule.iml
generated
Normal file
7
.idea/.idea.GoldbergGUI/riderModule.iml
generated
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="RIDER_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$/../.." />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
20
GoldbergGUI.Core/App.cs
Normal file
20
GoldbergGUI.Core/App.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using GoldbergGUI.Core.Utils;
|
||||
using GoldbergGUI.Core.ViewModels;
|
||||
using MvvmCross.IoC;
|
||||
using MvvmCross.ViewModels;
|
||||
|
||||
namespace GoldbergGUI.Core
|
||||
{
|
||||
public class App : MvxApplication
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
CreatableTypes()
|
||||
.EndingWith("Service")
|
||||
.AsInterfaces()
|
||||
.RegisterAsLazySingleton();
|
||||
//RegisterAppStart<MainViewModel>();
|
||||
RegisterCustomAppStart<CustomMvxAppStart<MainViewModel>>();
|
||||
}
|
||||
}
|
||||
}
|
25
GoldbergGUI.Core/GoldbergGUI.Core.csproj
Normal file
25
GoldbergGUI.Core/GoldbergGUI.Core.csproj
Normal file
@ -0,0 +1,25 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Models\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AngleSharp" Version="0.14.0" />
|
||||
<PackageReference Include="MvvmCross" Version="7.1.2" />
|
||||
<PackageReference Include="NinjaNye.SearchExtensions" Version="3.0.1" />
|
||||
<PackageReference Include="SharpCompress" Version="0.26.0" />
|
||||
<PackageReference Include="SteamStorefrontAPI.NETStandard" Version="1.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
|
||||
<HintPath>..\..\..\..\..\..\Windows\Microsoft.NET\assembly\GAC_MSIL\PresentationFramework\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
61
GoldbergGUI.Core/Models/SteamAppModel.cs
Normal file
61
GoldbergGUI.Core/Models/SteamAppModel.cs
Normal file
@ -0,0 +1,61 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Text.RegularExpressions;
|
||||
using GoldbergGUI.Core.Utils;
|
||||
|
||||
// ReSharper disable UnusedMember.Global
|
||||
// ReSharper disable ClassNeverInstantiated.Global
|
||||
// ReSharper disable CollectionNeverUpdated.Global
|
||||
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||
// ReSharper disable StringLiteralTypo
|
||||
// ReSharper disable InconsistentNaming
|
||||
namespace GoldbergGUI.Core.Models
|
||||
{
|
||||
public class SteamApp
|
||||
{
|
||||
private string _name;
|
||||
private string _comparableName;
|
||||
[JsonPropertyName("appid")] public int AppId { get; set; }
|
||||
|
||||
[JsonPropertyName("name")]
|
||||
public string Name
|
||||
{
|
||||
get => _name;
|
||||
set
|
||||
{
|
||||
_name = value;
|
||||
_comparableName = Regex.Replace(value, Misc.SpecialCharsRegex, "").ToLower();
|
||||
}
|
||||
}
|
||||
|
||||
public bool CompareName(string value)
|
||||
{
|
||||
return _comparableName.Equals(value);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{AppId}={Name}";
|
||||
}
|
||||
}
|
||||
|
||||
public class AppList
|
||||
{
|
||||
[JsonPropertyName("apps")] public List<SteamApp> Apps { get; set; }
|
||||
}
|
||||
|
||||
public class SteamApps
|
||||
{
|
||||
[JsonPropertyName("applist")] public AppList AppList { get; set; }
|
||||
}
|
||||
public static class AppType
|
||||
{
|
||||
public const string Game = "game";
|
||||
public const string DLC = "dlc";
|
||||
public const string Music = "music";
|
||||
public const string Demo = "demo";
|
||||
public const string Ad = "advertising";
|
||||
public const string Mod = "mod";
|
||||
public const string Video = "video";
|
||||
}
|
||||
}
|
217
GoldbergGUI.Core/Services/GoldbergService.cs
Normal file
217
GoldbergGUI.Core/Services/GoldbergService.cs
Normal file
@ -0,0 +1,217 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using GoldbergGUI.Core.Models;
|
||||
using MvvmCross.Logging;
|
||||
|
||||
namespace GoldbergGUI.Core.Services
|
||||
{
|
||||
// downloads and updates goldberg emu
|
||||
// sets up config files
|
||||
// does file copy stuff
|
||||
public interface IGoldbergService
|
||||
{
|
||||
public Task<(string accountName, long userSteamId)> Initialize(IMvxLog log);
|
||||
public Task<(int appId, List<SteamApp> dlcList)> Read(string path);
|
||||
public Task Save(string path, int appId, List<SteamApp> dlcList);
|
||||
public bool GoldbergApplied(string path);
|
||||
public void Download();
|
||||
public void Extract(string archivePath);
|
||||
public Task GenerateInterfacesFile(string filePath);
|
||||
}
|
||||
|
||||
// ReSharper disable once UnusedType.Global
|
||||
public class GoldbergService : IGoldbergService
|
||||
{
|
||||
private IMvxLog _log;
|
||||
//private const string GoldbergUrl = "https://mr_goldberg.gitlab.io/goldberg_emulator/";
|
||||
private readonly string _goldbergPath = Path.Combine(Directory.GetCurrentDirectory(), "goldberg");
|
||||
private static readonly string GlobalSettingsPath =
|
||||
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
|
||||
"Goldberg SteamEmu Saves");
|
||||
private readonly string _accountNamePath = Path.Combine(GlobalSettingsPath, "settings/account_name.txt");
|
||||
private readonly string _userSteamIdPath = Path.Combine(GlobalSettingsPath, "settings/user_steam_id.txt");
|
||||
private readonly List<string> _interfaceNames = new List<string>
|
||||
{
|
||||
"SteamClient",
|
||||
"SteamGameServer",
|
||||
"SteamGameServerStats",
|
||||
"SteamUser",
|
||||
"SteamFriends",
|
||||
"SteamUtils",
|
||||
"SteamMatchMaking",
|
||||
"SteamMatchMakingServers",
|
||||
"STEAMUSERSTATS_INTERFACE_VERSION",
|
||||
"STEAMAPPS_INTERFACE_VERSION",
|
||||
"SteamNetworking",
|
||||
"STEAMREMOTESTORAGE_INTERFACE_VERSION",
|
||||
"STEAMSCREENSHOTS_INTERFACE_VERSION",
|
||||
"STEAMHTTP_INTERFACE_VERSION",
|
||||
"STEAMUNIFIEDMESSAGES_INTERFACE_VERSION",
|
||||
"STEAMUGC_INTERFACE_VERSION",
|
||||
"STEAMAPPLIST_INTERFACE_VERSION",
|
||||
"STEAMMUSIC_INTERFACE_VERSION",
|
||||
"STEAMMUSICREMOTE_INTERFACE_VERSION",
|
||||
"STEAMHTMLSURFACE_INTERFACE_VERSION_",
|
||||
"STEAMINVENTORY_INTERFACE_V",
|
||||
"SteamController",
|
||||
"SteamMasterServerUpdater",
|
||||
"STEAMVIDEO_INTERFACE_V"
|
||||
};
|
||||
|
||||
// Call Download
|
||||
// Get global settings
|
||||
public async Task<(string accountName, long userSteamId)> Initialize(IMvxLog log)
|
||||
{
|
||||
_log = log;
|
||||
var accountName = "Account name...";
|
||||
long steamId = -1;
|
||||
await Task.Run(() =>
|
||||
{
|
||||
if (File.Exists(_accountNamePath)) accountName = File.ReadLines(_accountNamePath).First().Trim();
|
||||
if (File.Exists(_userSteamIdPath) &&
|
||||
!long.TryParse(File.ReadLines(_userSteamIdPath).First().Trim(), out steamId))
|
||||
_log.Error("Invalid User Steam ID!");
|
||||
}).ConfigureAwait(false);
|
||||
|
||||
return (accountName, steamId);
|
||||
}
|
||||
|
||||
// If first time, call GenerateInterfaces
|
||||
// else try to read config
|
||||
public async Task<(int appId, List<SteamApp> dlcList)> Read(string path)
|
||||
{
|
||||
var appId = -1;
|
||||
var dlcList = new List<SteamApp>();
|
||||
var steamAppidTxt = Path.Combine(path, "steam_appid.txt");
|
||||
if (File.Exists(steamAppidTxt))
|
||||
{
|
||||
await Task.Run(() => int.TryParse(File.ReadLines(steamAppidTxt).First().Trim(), out appId))
|
||||
.ConfigureAwait(false);
|
||||
}
|
||||
var dlcTxt = Path.Combine(path, "steam_settings", "DLC.txt");
|
||||
if (File.Exists(dlcTxt))
|
||||
{
|
||||
var readAllLinesAsync = await File.ReadAllLinesAsync(dlcTxt).ConfigureAwait(false);
|
||||
var expression = new Regex(@"(?<id>.*) *= *(?<name>.*)");
|
||||
foreach (var line in readAllLinesAsync)
|
||||
{
|
||||
var match = expression.Match(line);
|
||||
if (match.Success)
|
||||
dlcList.Add(new SteamApp {AppId = Convert.ToInt32(match.Groups["id"].Value),
|
||||
Name = match.Groups["name"].Value});
|
||||
}
|
||||
}
|
||||
return (appId, dlcList);
|
||||
}
|
||||
|
||||
// If first time, rename original SteamAPI DLL to steam_api(64)_o.dll
|
||||
// If not, rename current SteamAPI DLL to steam_api(64).dll.backup
|
||||
// Copy Goldberg DLL to path
|
||||
// Save configuration files
|
||||
public async Task Save(string path, int appId, List<SteamApp> dlcList)
|
||||
{
|
||||
const string x86Name = "steam_api";
|
||||
const string x64Name = "steam_api64";
|
||||
if (File.Exists(Path.Combine(path, $"{x86Name}.dll")))
|
||||
{
|
||||
CopyDllFiles(path, x86Name);
|
||||
}
|
||||
|
||||
if (File.Exists(Path.Combine(path, $"{x64Name}.dll")))
|
||||
{
|
||||
CopyDllFiles(path, x64Name);
|
||||
}
|
||||
|
||||
if (!Directory.Exists(Path.Combine(path, "steam_settings")))
|
||||
{
|
||||
Directory.CreateDirectory(Path.Combine(path, "steam_settings"));
|
||||
}
|
||||
|
||||
await File.WriteAllTextAsync(Path.Combine(path, "steam_appid.txt"), appId.ToString()).ConfigureAwait(false);
|
||||
var dlcString = "";
|
||||
dlcList.ForEach(x => dlcString += $"{x}\n");
|
||||
await File.WriteAllTextAsync(Path.Combine(path, "steam_settings", "DLC.txt"), dlcString).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
private void CopyDllFiles(string path, string name)
|
||||
{
|
||||
var steamApiDll = Path.Combine(path, $"{name}.dll");
|
||||
var originalDll = Path.Combine(path, $"{name}_o.dll");
|
||||
var guiBackup = Path.Combine(path, $"{name}.dll.GOLDBERGGUIBACKUP");
|
||||
var goldbergDll = Path.Combine(_goldbergPath, $"{name}.dll");
|
||||
|
||||
if (!File.Exists(originalDll))
|
||||
File.Move(steamApiDll, originalDll);
|
||||
else
|
||||
{
|
||||
File.Move(steamApiDll, guiBackup, true);
|
||||
File.SetAttributes(guiBackup, FileAttributes.Hidden);
|
||||
}
|
||||
File.Copy(goldbergDll, steamApiDll);
|
||||
}
|
||||
|
||||
public bool GoldbergApplied(string path)
|
||||
{
|
||||
//throw new NotImplementedException();
|
||||
return true;
|
||||
}
|
||||
|
||||
// Get webpage
|
||||
// Get commit, compare with local if exists, save it if false or missing
|
||||
// Get latest archive if mismatch, call Extract
|
||||
public void Download()
|
||||
{
|
||||
//throw new NotImplementedException();
|
||||
}
|
||||
|
||||
// Empty subfolder ./goldberg/
|
||||
// Extract all from archive to subfolder ./goldberg/
|
||||
public void Extract(string archivePath)
|
||||
{
|
||||
//throw new NotImplementedException();
|
||||
}
|
||||
|
||||
// https://gitlab.com/Mr_Goldberg/goldberg_emulator/-/blob/master/generate_interfaces_file.cpp
|
||||
// (maybe) check DLL date first
|
||||
public async Task GenerateInterfacesFile(string filePath)
|
||||
{
|
||||
//throw new NotImplementedException();
|
||||
// Get DLL content
|
||||
var result = new HashSet<string>();
|
||||
var dllContent = await File.ReadAllTextAsync(filePath).ConfigureAwait(false);
|
||||
// find interfaces
|
||||
foreach (var name in _interfaceNames)
|
||||
{
|
||||
FindInterfaces(ref result, dllContent, new Regex($"{name}\\d{{3}}"));
|
||||
if (!FindInterfaces(ref result, dllContent, new Regex(@"STEAMCONTROLLER_INTERFACE_VERSION\d{3}")))
|
||||
{
|
||||
FindInterfaces(ref result, dllContent, new Regex("STEAMCONTROLLER_INTERFACE_VERSION"));
|
||||
}
|
||||
}
|
||||
var dirPath = Path.GetDirectoryName(filePath);
|
||||
if (dirPath == null) return;
|
||||
await using var destination = File.CreateText(dirPath + "/steam_interfaces.txt");
|
||||
foreach (var s in result)
|
||||
{
|
||||
await destination.WriteLineAsync(s).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
private static bool FindInterfaces(ref HashSet<string> result, string dllContent, Regex regex)
|
||||
{
|
||||
var success = false;
|
||||
var matches = regex.Matches(dllContent);
|
||||
foreach (Match match in matches)
|
||||
{
|
||||
success = true;
|
||||
//result += $@"{match.Value}\n";
|
||||
result.Add(match.Value);
|
||||
}
|
||||
return success;
|
||||
}
|
||||
}
|
||||
}
|
201
GoldbergGUI.Core/Services/SteamService.cs
Normal file
201
GoldbergGUI.Core/Services/SteamService.cs
Normal file
@ -0,0 +1,201 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using AngleSharp.Dom;
|
||||
using AngleSharp.Html.Parser;
|
||||
using GoldbergGUI.Core.Models;
|
||||
using GoldbergGUI.Core.Utils;
|
||||
using MvvmCross.Logging;
|
||||
using NinjaNye.SearchExtensions;
|
||||
using SteamStorefrontAPI;
|
||||
|
||||
namespace GoldbergGUI.Core.Services
|
||||
{
|
||||
// gets info from steam api
|
||||
public interface ISteamService
|
||||
{
|
||||
public Task Initialize(IMvxLog log);
|
||||
public IEnumerable<SteamApp> GetListOfAppsByName(string name);
|
||||
public SteamApp GetAppByName(string name);
|
||||
public SteamApp GetAppById(int appid);
|
||||
public Task<List<SteamApp>> GetListOfDlc(SteamApp steamApp, bool useSteamDb);
|
||||
}
|
||||
|
||||
// ReSharper disable once UnusedType.Global
|
||||
public class SteamService : ISteamService
|
||||
{
|
||||
private const string CachePath = "steamapps.json";
|
||||
private const string SteamUri = "https://api.steampowered.com/ISteamApps/GetAppList/v2/";
|
||||
|
||||
private const string UserAgent =
|
||||
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) " +
|
||||
"Chrome/87.0.4280.88 Safari/537.36";
|
||||
|
||||
private HashSet<SteamApp> _cache = new HashSet<SteamApp>();
|
||||
private IMvxLog _log;
|
||||
|
||||
public async Task Initialize(IMvxLog log)
|
||||
{
|
||||
_log = log;
|
||||
_log.Info("Updating cache...");
|
||||
var updateNeeded = DateTime.Now.Subtract(File.GetLastWriteTimeUtc(CachePath)).TotalDays >= 1;
|
||||
string cacheString;
|
||||
if (updateNeeded)
|
||||
{
|
||||
_log.Info("Getting content from API...");
|
||||
var client = new HttpClient();
|
||||
var httpCall = client.GetAsync(SteamUri);
|
||||
var response = await httpCall.ConfigureAwait(false);
|
||||
var readAsStringAsync = response.Content.ReadAsStringAsync();
|
||||
var responseBody = await readAsStringAsync.ConfigureAwait(false);
|
||||
_log.Info("Got content from API successfully. Writing to file...");
|
||||
|
||||
await File.WriteAllTextAsync(CachePath, responseBody, Encoding.UTF8).ConfigureAwait(false);
|
||||
cacheString = responseBody;
|
||||
_log.Info("Cache written to file successfully.");
|
||||
}
|
||||
else
|
||||
{
|
||||
_log.Info("Cache already up to date!");
|
||||
cacheString = await File.ReadAllTextAsync(CachePath).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
var steamApps = JsonSerializer.Deserialize<SteamApps>(cacheString);
|
||||
_cache = new HashSet<SteamApp>(steamApps.AppList.Apps);
|
||||
_log.Info("Loaded cache into memory!");
|
||||
}
|
||||
|
||||
public IEnumerable<SteamApp> GetListOfAppsByName(string name)
|
||||
{
|
||||
var listOfAppsByName = _cache.Search(x => x.Name)
|
||||
.SetCulture(StringComparison.OrdinalIgnoreCase)
|
||||
.ContainingAll(name.Split(' ')).ToHashSet();
|
||||
foreach (var steamApp in listOfAppsByName)
|
||||
{
|
||||
var sa = Task.Run(async () => await AppDetails.GetAsync(steamApp.AppId).ConfigureAwait(false)).Result;
|
||||
if (sa.Type != AppType.Game) listOfAppsByName.Remove(steamApp);
|
||||
}
|
||||
return listOfAppsByName;
|
||||
}
|
||||
|
||||
public SteamApp GetAppByName(string name)
|
||||
{
|
||||
_log.Info($"Trying to get app {name}");
|
||||
var comparableName = Regex.Replace(name, Misc.SpecialCharsRegex, "").ToLower();
|
||||
var app = _cache.FirstOrDefault(x => x.CompareName(comparableName));
|
||||
if (app != null) _log.Info($"Successfully got app {app}");
|
||||
return app;
|
||||
}
|
||||
|
||||
public SteamApp GetAppById(int appid)
|
||||
{
|
||||
_log.Info($"Trying to get app with ID {appid}");
|
||||
var app = _cache.FirstOrDefault(x => x.AppId.Equals(appid));
|
||||
if (app != null) _log.Info($"Successfully got app {app}");
|
||||
return app;
|
||||
}
|
||||
|
||||
public async Task<List<SteamApp>> GetListOfDlc(SteamApp steamApp, bool useSteamDb)
|
||||
{
|
||||
_log.Info("Get DLC");
|
||||
var dlcList = new List<SteamApp>();
|
||||
if (steamApp != null)
|
||||
{
|
||||
var task = AppDetails.GetAsync(steamApp.AppId);
|
||||
var steamAppDetails = await task.ConfigureAwait(true);
|
||||
if (steamAppDetails.Type == AppType.Game)
|
||||
{
|
||||
steamAppDetails.DLC.ForEach(x =>
|
||||
{
|
||||
var result = _cache.FirstOrDefault(y => y.AppId.Equals(x)) ??
|
||||
new SteamApp {AppId = x, Name = $"Unknown DLC {x}"};
|
||||
dlcList.Add(result);
|
||||
});
|
||||
|
||||
dlcList.ForEach(x => _log.Debug($"{x.AppId}={x.Name}"));
|
||||
_log.Info("Got DLC successfully...");
|
||||
|
||||
// Get DLC from SteamDB
|
||||
// Get Cloudflare cookie
|
||||
// Scrape and parse HTML page
|
||||
// Add missing to DLC list
|
||||
if (useSteamDb)
|
||||
{
|
||||
var steamDbUri = new Uri($"https://steamdb.info/app/{steamApp.AppId}/dlc/");
|
||||
|
||||
/* var handler = new ClearanceHandler();
|
||||
|
||||
var client = new HttpClient(handler);
|
||||
|
||||
var content = client.GetStringAsync(steamDbUri).Result;
|
||||
_log.Debug(content); */
|
||||
|
||||
var client = new HttpClient();
|
||||
client.DefaultRequestHeaders.UserAgent.ParseAdd(UserAgent);
|
||||
|
||||
_log.Info("Get SteamDB App");
|
||||
var httpCall = client.GetAsync(steamDbUri);
|
||||
var response = await httpCall.ConfigureAwait(false);
|
||||
_log.Debug(httpCall.Status.ToString());
|
||||
_log.Debug(response.EnsureSuccessStatusCode().ToString());
|
||||
|
||||
var readAsStringAsync = response.Content.ReadAsStringAsync();
|
||||
var responseBody = await readAsStringAsync.ConfigureAwait(false);
|
||||
_log.Debug(readAsStringAsync.Status.ToString());
|
||||
|
||||
var parser = new HtmlParser();
|
||||
var doc = parser.ParseDocument(responseBody);
|
||||
// Console.WriteLine(doc.DocumentElement.OuterHtml);
|
||||
|
||||
var query1 = doc.QuerySelector("#dlc");
|
||||
if (query1 != null)
|
||||
{
|
||||
var query2 = query1.QuerySelectorAll(".app");
|
||||
foreach (var element in query2)
|
||||
{
|
||||
var dlcId = element.GetAttribute("data-appid");
|
||||
var dlcName = $"Unknown DLC {dlcId}";
|
||||
var query3 = element.QuerySelectorAll("td");
|
||||
if (query3 != null) dlcName = query3[1].Text().Replace("\n", "").Trim();
|
||||
|
||||
var dlcApp = new SteamApp {AppId = Convert.ToInt32(dlcId), Name = dlcName};
|
||||
var i = dlcList.FindIndex(x => x.AppId.Equals(dlcApp.AppId));
|
||||
if (i > -1)
|
||||
{
|
||||
if (dlcList[i].Name.Contains("Unknown DLC")) dlcList[i] = dlcApp;
|
||||
}
|
||||
else
|
||||
{
|
||||
dlcList.Add(dlcApp);
|
||||
}
|
||||
}
|
||||
|
||||
dlcList.ForEach(x => _log.Debug($"{x.AppId}={x.Name}"));
|
||||
_log.Info("Got DLC from SteamDB successfully...");
|
||||
}
|
||||
else
|
||||
{
|
||||
_log.Error("Could not get DLC from SteamDB!");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_log.Error("Could not get DLC: Steam App is not of type \"game\"");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_log.Error("Could not get DLC: Invalid Steam App");
|
||||
}
|
||||
|
||||
return dlcList;
|
||||
}
|
||||
}
|
||||
}
|
29
GoldbergGUI.Core/Utils/CustomMvxAppStart.cs
Normal file
29
GoldbergGUI.Core/Utils/CustomMvxAppStart.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using MvvmCross.Exceptions;
|
||||
using MvvmCross.Navigation;
|
||||
using MvvmCross.ViewModels;
|
||||
|
||||
namespace GoldbergGUI.Core.Utils
|
||||
{
|
||||
// ReSharper disable once ClassNeverInstantiated.Global
|
||||
public class CustomMvxAppStart<TViewModel> : MvxAppStart<TViewModel> where TViewModel : IMvxViewModel
|
||||
{
|
||||
public CustomMvxAppStart(IMvxApplication application, IMvxNavigationService navigationService) : base(application, navigationService)
|
||||
{
|
||||
}
|
||||
|
||||
protected override async Task NavigateToFirstViewModel(object hint = null)
|
||||
{
|
||||
//return base.NavigateToFirstViewModel(hint);
|
||||
try
|
||||
{
|
||||
await NavigationService.Navigate<TViewModel>().ConfigureAwait(false);
|
||||
}
|
||||
catch (System.Exception exception)
|
||||
{
|
||||
throw exception.MvxWrap("Problem navigating to ViewModel {0}", typeof(TViewModel).Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
7
GoldbergGUI.Core/Utils/ISecrets.cs
Normal file
7
GoldbergGUI.Core/Utils/ISecrets.cs
Normal file
@ -0,0 +1,7 @@
|
||||
namespace GoldbergGUI.Core.Utils
|
||||
{
|
||||
public interface ISecrets
|
||||
{
|
||||
public string SteamWebApiKey();
|
||||
}
|
||||
}
|
42
GoldbergGUI.Core/Utils/Misc.cs
Normal file
42
GoldbergGUI.Core/Utils/Misc.cs
Normal file
@ -0,0 +1,42 @@
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
namespace GoldbergGUI.Core.Utils
|
||||
{
|
||||
public class Misc
|
||||
{
|
||||
public const string SpecialCharsRegex = "[^0-9a-zA-Z]+";
|
||||
public const string DefaultLanguageSelection = "english";
|
||||
public static readonly ObservableCollection<string> DefaultLanguages = new ObservableCollection<string>(new[]
|
||||
{
|
||||
"arabic",
|
||||
"bulgarian",
|
||||
"schinese",
|
||||
"tchinese",
|
||||
"czech",
|
||||
"danish",
|
||||
"dutch",
|
||||
"english",
|
||||
"finnish",
|
||||
"french",
|
||||
"german",
|
||||
"greek",
|
||||
"hungarian",
|
||||
"italian",
|
||||
"japanese",
|
||||
"koreana",
|
||||
"norwegian",
|
||||
"polish",
|
||||
"portuguese",
|
||||
"brazilian",
|
||||
"romanian",
|
||||
"russian",
|
||||
"spanish",
|
||||
"latam",
|
||||
"swedish",
|
||||
"thai",
|
||||
"turkish",
|
||||
"ukrainian",
|
||||
"vietnamese"
|
||||
});
|
||||
}
|
||||
}
|
328
GoldbergGUI.Core/ViewModels/MainViewModel.cs
Normal file
328
GoldbergGUI.Core/ViewModels/MainViewModel.cs
Normal file
@ -0,0 +1,328 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using GoldbergGUI.Core.Models;
|
||||
using GoldbergGUI.Core.Services;
|
||||
using Microsoft.Win32;
|
||||
using MvvmCross.Commands;
|
||||
using MvvmCross.Logging;
|
||||
using MvvmCross.ViewModels;
|
||||
|
||||
namespace GoldbergGUI.Core.ViewModels
|
||||
{
|
||||
// ReSharper disable once ClassNeverInstantiated.Global
|
||||
public class MainViewModel : MvxViewModel
|
||||
{
|
||||
private string _dllPath;
|
||||
private string _gameName;
|
||||
|
||||
private int _appId;
|
||||
|
||||
//private SteamApp _currentGame;
|
||||
private ObservableCollection<SteamApp> _dlcs;
|
||||
private string _accountName;
|
||||
private long _steamId;
|
||||
private bool _offline;
|
||||
private bool _disableNetworking;
|
||||
private bool _disableOverlay;
|
||||
|
||||
private readonly ISteamService _steam;
|
||||
private readonly IGoldbergService _goldberg;
|
||||
private readonly IMvxLog _log;
|
||||
private bool _mainWindowEnabled;
|
||||
|
||||
public MainViewModel(ISteamService steam, IGoldbergService goldberg, IMvxLog log)
|
||||
{
|
||||
_steam = steam;
|
||||
_goldberg = goldberg;
|
||||
_log = log;
|
||||
}
|
||||
|
||||
public override void Prepare()
|
||||
{
|
||||
base.Prepare();
|
||||
Task.Run(async () =>
|
||||
{
|
||||
MainWindowEnabled = false;
|
||||
ResetForm();
|
||||
await _steam.Initialize(_log).ConfigureAwait(false);
|
||||
var (accountName, userSteamId) = await _goldberg.Initialize(_log).ConfigureAwait(false);
|
||||
AccountName = accountName;
|
||||
SteamId = userSteamId;
|
||||
MainWindowEnabled = true;
|
||||
});
|
||||
}
|
||||
|
||||
public override async Task Initialize()
|
||||
{
|
||||
_log.Info("Init");
|
||||
await base.Initialize().ConfigureAwait(false);
|
||||
}
|
||||
|
||||
// PROPERTIES //
|
||||
|
||||
public string DllPath
|
||||
{
|
||||
get => _dllPath;
|
||||
private set
|
||||
{
|
||||
_dllPath = value;
|
||||
RaisePropertyChanged(() => DllPath);
|
||||
}
|
||||
}
|
||||
|
||||
public string GameName
|
||||
{
|
||||
get => _gameName;
|
||||
set
|
||||
{
|
||||
_gameName = value;
|
||||
RaisePropertyChanged(() => GameName);
|
||||
}
|
||||
}
|
||||
|
||||
public int AppId
|
||||
{
|
||||
get => _appId;
|
||||
set
|
||||
{
|
||||
_appId = value;
|
||||
RaisePropertyChanged(() => AppId);
|
||||
Task.Run(async () => await GetNameById().ConfigureAwait(false));
|
||||
}
|
||||
}
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public ObservableCollection<SteamApp> DLCs
|
||||
{
|
||||
get => _dlcs;
|
||||
private set
|
||||
{
|
||||
_dlcs = value;
|
||||
RaisePropertyChanged(() => DLCs);
|
||||
}
|
||||
}
|
||||
|
||||
public string AccountName
|
||||
{
|
||||
get => _accountName;
|
||||
set
|
||||
{
|
||||
_accountName = value;
|
||||
RaisePropertyChanged(() => AccountName);
|
||||
}
|
||||
}
|
||||
|
||||
public long SteamId
|
||||
{
|
||||
get => _steamId;
|
||||
set
|
||||
{
|
||||
_steamId = value;
|
||||
RaisePropertyChanged(() => SteamId);
|
||||
}
|
||||
}
|
||||
|
||||
public bool Offline
|
||||
{
|
||||
get => _offline;
|
||||
set
|
||||
{
|
||||
_offline = value;
|
||||
RaisePropertyChanged(() => Offline);
|
||||
}
|
||||
}
|
||||
|
||||
public bool DisableNetworking
|
||||
{
|
||||
get => _disableNetworking;
|
||||
set
|
||||
{
|
||||
_disableNetworking = value;
|
||||
RaisePropertyChanged(() => DisableNetworking);
|
||||
}
|
||||
}
|
||||
|
||||
public bool DisableOverlay
|
||||
{
|
||||
get => _disableOverlay;
|
||||
set
|
||||
{
|
||||
_disableOverlay = value;
|
||||
RaisePropertyChanged(() => DisableOverlay);
|
||||
}
|
||||
}
|
||||
|
||||
public bool MainWindowEnabled
|
||||
{
|
||||
get => _mainWindowEnabled;
|
||||
set
|
||||
{
|
||||
_mainWindowEnabled = value;
|
||||
RaisePropertyChanged(() => MainWindowEnabled);
|
||||
}
|
||||
}
|
||||
|
||||
// COMMANDS //
|
||||
|
||||
public IMvxCommand OpenFileCommand => new MvxAsyncCommand(OpenFile);
|
||||
|
||||
private async Task OpenFile()
|
||||
{
|
||||
var dialog = new OpenFileDialog
|
||||
{
|
||||
Filter = "SteamAPI DLL|steam_api.dll;steam_api64.dll|" +
|
||||
"All files (*.*)|*.*",
|
||||
Multiselect = false,
|
||||
Title = "Select SteamAPI DLL..."
|
||||
};
|
||||
if (dialog.ShowDialog() != true)
|
||||
{
|
||||
_log.Warn("File selection canceled.");
|
||||
return;
|
||||
}
|
||||
DllPath = dialog.FileName;
|
||||
//_goldberg.GenerateInterfacesFile(filePath);
|
||||
await ReadConfig().ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public IMvxCommand FindIdCommand => new MvxCommand(FindId);
|
||||
|
||||
private void FindId()
|
||||
{
|
||||
if (GameName.Contains("Game name..."))
|
||||
{
|
||||
_log.Error("No game name entered!");
|
||||
return;
|
||||
}
|
||||
var appByName = _steam.GetAppByName(_gameName);
|
||||
if (appByName != null)
|
||||
{
|
||||
GameName = appByName.Name;
|
||||
AppId = appByName.AppId;
|
||||
}
|
||||
else
|
||||
{
|
||||
_log.Warn("Steam app could not be found!");
|
||||
}
|
||||
}
|
||||
|
||||
//public IMvxCommand GetNameByIdCommand => new MvxAsyncCommand(GetNameById);
|
||||
|
||||
private async Task GetNameById()
|
||||
{
|
||||
if (AppId <= 0)
|
||||
{
|
||||
_log.Error("Invalid Steam App!");
|
||||
return;
|
||||
}
|
||||
var steamApp = await Task.Run(() => _steam.GetAppById(AppId)).ConfigureAwait(false);
|
||||
if (steamApp != null) GameName = steamApp.Name;
|
||||
}
|
||||
|
||||
public IMvxCommand GetListOfDlcCommand => new MvxAsyncCommand(GetListOfDlc);
|
||||
|
||||
private async Task GetListOfDlc()
|
||||
{
|
||||
if (AppId <= 0)
|
||||
{
|
||||
_log.Error("Invalid Steam App!");
|
||||
return;
|
||||
}
|
||||
MainWindowEnabled = false;
|
||||
var listOfDlc = await _steam.GetListOfDlc(new SteamApp {AppId = AppId, Name = GameName}, true).ConfigureAwait(false);
|
||||
DLCs = new MvxObservableCollection<SteamApp>(listOfDlc);
|
||||
MainWindowEnabled = true;
|
||||
}
|
||||
|
||||
public IMvxCommand SaveConfigCommand => new MvxAsyncCommand(SaveConfig);
|
||||
|
||||
private async Task SaveConfig()
|
||||
{
|
||||
if (DllPath.Contains("Path to game's steam_api(64).dll"))
|
||||
{
|
||||
_log.Error("No DLL selected!");
|
||||
return;
|
||||
}
|
||||
_log.Info("Saving...");
|
||||
if (!GetDllPathDir(out var dirPath)) return;
|
||||
MainWindowEnabled = false;
|
||||
await _goldberg.Save(dirPath, AppId, DLCs.ToList()).ConfigureAwait(false);
|
||||
MainWindowEnabled = true;
|
||||
}
|
||||
|
||||
public IMvxCommand ResetConfigCommand => new MvxAsyncCommand(ResetConfig);
|
||||
|
||||
private async Task ResetConfig()
|
||||
{
|
||||
if (DllPath.Contains("Path to game's steam_api(64).dll"))
|
||||
{
|
||||
_log.Error("No DLL selected!");
|
||||
return;
|
||||
}
|
||||
_log.Info("Reset form...");
|
||||
MainWindowEnabled = false;
|
||||
await ReadConfig().ConfigureAwait(false);
|
||||
MainWindowEnabled = true;
|
||||
}
|
||||
|
||||
public IMvxCommand GenerateSteamInterfacesCommand => new MvxAsyncCommand(GenerateSteamInterfaces);
|
||||
|
||||
private async Task GenerateSteamInterfaces()
|
||||
{
|
||||
if (DllPath.Contains("Path to game's steam_api(64).dll"))
|
||||
{
|
||||
_log.Error("No DLL selected!");
|
||||
return;
|
||||
}
|
||||
|
||||
_log.Info("Generate steam_interfaces.txt...");
|
||||
MainWindowEnabled = false;
|
||||
await _goldberg.GenerateInterfacesFile(DllPath).ConfigureAwait(false);
|
||||
MainWindowEnabled = true;
|
||||
}
|
||||
|
||||
// OTHER METHODS //
|
||||
|
||||
private void ResetForm()
|
||||
{
|
||||
DllPath = "Path to game's steam_api(64).dll...";
|
||||
GameName = "Game name...";
|
||||
AppId = -1;
|
||||
DLCs = new ObservableCollection<SteamApp>();
|
||||
AccountName = "Account name...";
|
||||
SteamId = -1;
|
||||
Offline = false;
|
||||
DisableNetworking = false;
|
||||
DisableOverlay = false;
|
||||
}
|
||||
|
||||
private async Task ReadConfig()
|
||||
{
|
||||
if (!GetDllPathDir(out var dirPath)) return;
|
||||
MainWindowEnabled = false;
|
||||
List<SteamApp> dlcList;
|
||||
(AppId, dlcList) = await _goldberg.Read(dirPath).ConfigureAwait(false);
|
||||
DLCs = new ObservableCollection<SteamApp>(dlcList);
|
||||
MainWindowEnabled = true;
|
||||
}
|
||||
|
||||
private bool GetDllPathDir(out string dirPath)
|
||||
{
|
||||
if (DllPath.Contains("Path to game's steam_api(64).dll"))
|
||||
{
|
||||
_log.Error("No DLL selected!");
|
||||
dirPath = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
dirPath = Path.GetDirectoryName(DllPath);
|
||||
if (dirPath != null) return true;
|
||||
|
||||
_log.Error($"Invalid directory for {DllPath}.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
9
GoldbergGUI.WPF/App.xaml
Normal file
9
GoldbergGUI.WPF/App.xaml
Normal file
@ -0,0 +1,9 @@
|
||||
<views:MvxApplication x:Class="GoldbergGUI.WPF.App"
|
||||
xmlns:views="clr-namespace:MvvmCross.Platforms.Wpf.Views;assembly=MvvmCross.Platforms.Wpf"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
|
||||
</Application.Resources>
|
||||
</views:MvxApplication>
|
17
GoldbergGUI.WPF/App.xaml.cs
Normal file
17
GoldbergGUI.WPF/App.xaml.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using MvvmCross.Core;
|
||||
using MvvmCross.Platforms.Wpf.Core;
|
||||
using MvvmCross.Platforms.Wpf.Views;
|
||||
|
||||
namespace GoldbergGUI.WPF
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for App.xaml
|
||||
/// </summary>
|
||||
public partial class App : MvxApplication
|
||||
{
|
||||
public App()
|
||||
{
|
||||
this.RegisterSetupType<MvxWpfSetup<Core.App>>();
|
||||
}
|
||||
}
|
||||
}
|
10
GoldbergGUI.WPF/AssemblyInfo.cs
Normal file
10
GoldbergGUI.WPF/AssemblyInfo.cs
Normal file
@ -0,0 +1,10 @@
|
||||
using System.Windows;
|
||||
|
||||
[assembly: ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
||||
//(used if a resource is not found in the page,
|
||||
// or application resource dictionaries)
|
||||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
||||
//(used if a resource is not found in the page,
|
||||
// app, or any theme specific resource dictionaries)
|
||||
)]
|
17
GoldbergGUI.WPF/GoldbergGUI.WPF.csproj
Normal file
17
GoldbergGUI.WPF/GoldbergGUI.WPF.csproj
Normal file
@ -0,0 +1,17 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<UseWPF>true</UseWPF>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MvvmCross.Platforms.Wpf" Version="7.1.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\GoldbergGUI.Core\GoldbergGUI.Core.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
10
GoldbergGUI.WPF/MainWindow.xaml
Normal file
10
GoldbergGUI.WPF/MainWindow.xaml
Normal file
@ -0,0 +1,10 @@
|
||||
<views:MvxWindow x:Class="GoldbergGUI.WPF.MainWindow"
|
||||
xmlns:views="clr-namespace:MvvmCross.Platforms.Wpf.Views;assembly=MvvmCross.Platforms.Wpf"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d"
|
||||
Title="GoldbergGUI" MinHeight="500" MinWidth="600" Background="#FFF0F0F0">
|
||||
<Grid />
|
||||
</views:MvxWindow>
|
15
GoldbergGUI.WPF/MainWindow.xaml.cs
Normal file
15
GoldbergGUI.WPF/MainWindow.xaml.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using MvvmCross.Platforms.Wpf.Views;
|
||||
|
||||
namespace GoldbergGUI.WPF
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow : MvxWindow
|
||||
{
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
90
GoldbergGUI.WPF/Views/MainView.xaml
Normal file
90
GoldbergGUI.WPF/Views/MainView.xaml
Normal file
@ -0,0 +1,90 @@
|
||||
<views:MvxWpfView x:Class="GoldbergGUI.WPF.Views.MainView"
|
||||
xmlns:views="clr-namespace:MvvmCross.Platforms.Wpf.Views;assembly=MvvmCross.Platforms.Wpf"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:viewmodel="clr-namespace:GoldbergGUI.Core.ViewModels;assembly=GoldbergGUI.Core"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="500" d:DesignWidth="400" d:DataContext="{d:DesignInstance Type=viewmodel:MainViewModel }">
|
||||
<Grid Margin="5,5,5,5" IsEnabled="{Binding MainWindowEnabled}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TabControl Margin="5,5,5,5">
|
||||
<!-- General -->
|
||||
<TabItem Header="General">
|
||||
<Grid Margin="10,20,10,10">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBox Text="{Binding DllPath, Mode=OneWay}" TextWrapping="Wrap" Margin="0,0,85,5" VerticalAlignment="Center" Padding="1,0,0,0" Height="20" IsEnabled="False"/>
|
||||
<Button Content="Select..." Command="{Binding OpenFileCommand}" HorizontalAlignment="Right" Width="80" Height="20" Grid.Row="0" Margin="0,0,0,5"/>
|
||||
<Button Content="Generate steam_interfaces.txt" Command="{Binding GenerateSteamInterfacesCommand}" Height="20" Grid.Row="1" Margin="0,5,0,5" />
|
||||
<TextBox Text="{Binding GameName, Mode=TwoWay}" TextWrapping="Wrap" VerticalAlignment="Center" Padding="1,0,0,0" Grid.Row="2" Margin="0,5,215,5" Height="20"/>
|
||||
<Button Content="Find ID..." Command="{Binding FindIdCommand}" Width="80" Grid.Row="2" Margin="0,5,130,5" HorizontalAlignment="Right" Height="20"/>
|
||||
<TextBox Text="{Binding AppId, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" TextWrapping="Wrap" HorizontalAlignment="Right" VerticalAlignment="Center" Padding="1,0,0,0" Grid.Row="2" Width="125" Margin="0,5,0,5" Height="20"/>
|
||||
<GroupBox Header="DLC" Grid.Row="3" Padding="0,0,0,0" Margin="0,5,0,0">
|
||||
<Grid Margin="10,10,10,10">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<DataGrid Margin="0,0,0,5" ItemsSource="{Binding DLCs, Mode=OneWay}" IsReadOnly="True" SelectionMode="Single" SelectionUnit="FullRow" HeadersVisibility="Column"/>
|
||||
<Button Content="Get list of DLCs..." Command="{Binding GetListOfDlcCommand}" Grid.Row="1" Width="120" HorizontalAlignment="Right" Margin="0,5,125,0" Height="20"/>
|
||||
<Button Content="Advanced Settings..." Grid.Row="1" Width="120" HorizontalAlignment="Right" Margin="0,5,0,0" Height="20" IsEnabled="False" ToolTip="Work in progress..."/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<!-- Advanced -->
|
||||
<TabItem Header="Advanced">
|
||||
<Grid HorizontalAlignment="Left" Margin="10,20,10,10" >
|
||||
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal" Grid.Row="0">
|
||||
<StackPanel Margin="0,0,5,0">
|
||||
<Button Content="Subscribed Groups" Width="120" Height="20" Margin="0,0,0,5"/>
|
||||
<Button Content="Mods" Width="120" Height="20" Margin="0,5,0,5"/>
|
||||
<Button Content="Items, Inventory" Width="120" Height="20" Margin="0,5,0,5"/>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="5,0,0,0">
|
||||
<Button Content="Achievements" Width="120" Height="20" Margin="0,0,0,5"/>
|
||||
<Button Content="Stats, Leaderboards" Width="120" Height="20" Margin="0,5,0,5"/>
|
||||
<Button Content="Controller" Width="120" Height="20" Margin="0,5,0,5"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<!-- Settings -->
|
||||
<TabItem Header="Settings">
|
||||
<StackPanel Margin="10,20,10,10">
|
||||
<Grid Margin="0,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBox Text="{Binding AccountName, Mode=TwoWay}" Margin="0,0,2.5,0" Height="20"/>
|
||||
<TextBox Text="{Binding SteamId, Mode=TwoWay}" Grid.Column="1" Margin="2.5,0,0,0" Height="20"/>
|
||||
</Grid>
|
||||
<CheckBox Content="Offline" IsChecked="{Binding Offline, Mode=TwoWay}" Margin="0,5,0,5" Height="20" VerticalAlignment="Stretch" VerticalContentAlignment="Center"/>
|
||||
<CheckBox Content="Disable Networking" IsChecked="{Binding DisableNetworking, Mode=TwoWay}" Margin="0,5,0,5" Height="20" VerticalContentAlignment="Center"/>
|
||||
<CheckBox Content="Disable Overlay" IsChecked="{Binding DisableOverlay, Mode=TwoWay}" Margin="0,5,0,5" Height="20" VerticalContentAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
<!-- Bottom Row -->
|
||||
<Grid Grid.Row="1" Margin="5,5,5,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Content="Save" Command="{Binding SaveConfigCommand}" Width="80" Grid.Column="1" Height="20" Margin="0,0,5,0"/>
|
||||
<Button Content="Reset" Command="{Binding ResetConfigCommand}" Width="80" Grid.Column="2" Height="20"/>
|
||||
</Grid>
|
||||
<!-- Status Bar -->
|
||||
</Grid>
|
||||
</views:MvxWpfView>
|
17
GoldbergGUI.WPF/Views/MainView.xaml.cs
Normal file
17
GoldbergGUI.WPF/Views/MainView.xaml.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using MvvmCross.Platforms.Wpf.Presenters.Attributes;
|
||||
using MvvmCross.Platforms.Wpf.Views;
|
||||
|
||||
namespace GoldbergGUI.WPF.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainView.xaml
|
||||
/// </summary>
|
||||
[MvxContentPresentation(WindowIdentifier = nameof(MainWindow))]
|
||||
public partial class MainView : MvxWpfView
|
||||
{
|
||||
public MainView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
31
GoldbergGUI.sln
Normal file
31
GoldbergGUI.sln
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.30717.126
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GoldbergGUI.Core", "GoldbergGUI.Core\GoldbergGUI.Core.csproj", "{FB205F05-83DE-4D87-8CE2-F7DA320944FD}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GoldbergGUI.WPF", "GoldbergGUI.WPF\GoldbergGUI.WPF.csproj", "{84ED15D3-725C-43B1-B8C7-51759CAABBAA}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{FB205F05-83DE-4D87-8CE2-F7DA320944FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FB205F05-83DE-4D87-8CE2-F7DA320944FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FB205F05-83DE-4D87-8CE2-F7DA320944FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FB205F05-83DE-4D87-8CE2-F7DA320944FD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{84ED15D3-725C-43B1-B8C7-51759CAABBAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{84ED15D3-725C-43B1-B8C7-51759CAABBAA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{84ED15D3-725C-43B1-B8C7-51759CAABBAA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{84ED15D3-725C-43B1-B8C7-51759CAABBAA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {2E5CEB22-3D0A-434B-B912-1A72DB66F424}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
Loading…
Reference in New Issue
Block a user