From 1d31dbc2f857836023e97c5df5a9767a9593698e Mon Sep 17 00:00:00 2001 From: Ciastex Date: Thu, 26 May 2022 22:09:42 +0200 Subject: [PATCH] Initial commit lol --- .gitignore | 6 + .gitmodules | 3 + Glitonea | 1 + Saradomin.sln | 22 + Saradomin/.gitignore | 454 ++++++++++++++++++ Saradomin/App.axaml | 70 +++ Saradomin/App.axaml.cs | 33 ++ Saradomin/FodyWeavers.xml | 3 + Saradomin/Messaging/MainViewLoadedMessage.cs | 14 + Saradomin/Program.cs | 17 + Saradomin/Resources/Fonts/runescape_uf.ttf | Bin 0 -> 14248 bytes Saradomin/Resources/Icons/09logo.png | Bin 0 -> 9401 bytes Saradomin/Resources/Icons/settings.png | Bin 0 -> 261 bytes Saradomin/Resources/Styles/CheckBox.axaml | 63 +++ Saradomin/Resources/Styles/CloseButton.axaml | 29 ++ Saradomin/Resources/Styles/GroupBox.axaml | 34 ++ .../Styles/OutsideNavigatorButton.axaml | 26 + Saradomin/Resources/Styles/TextBox.axaml | 30 ++ .../Resources/Styles/TopBarNavigation.axaml | 39 ++ Saradomin/Saradomin.csproj | 53 ++ Saradomin/Utilities/CrossPlatform.cs | 24 + .../ViewModel/Controls/SettingsViewModel.cs | 9 + .../ViewModel/Windows/MainWindowViewModel.cs | 52 ++ .../Views/Controls/HeaderedTextBox.axaml | 18 + .../Views/Controls/HeaderedTextBox.axaml.cs | 45 ++ Saradomin/Views/Controls/MenuPreview.axaml | 69 +++ Saradomin/Views/Controls/MenuPreview.axaml.cs | 131 +++++ Saradomin/Views/Controls/SettingsView.axaml | 99 ++++ .../Views/Controls/SettingsView.axaml.cs | 20 + Saradomin/Views/Windows/MainWindow.axaml | 129 +++++ Saradomin/Views/Windows/MainWindow.axaml.cs | 42 ++ 31 files changed, 1535 insertions(+) create mode 100644 .gitignore create mode 100644 .gitmodules create mode 160000 Glitonea create mode 100644 Saradomin.sln create mode 100644 Saradomin/.gitignore create mode 100644 Saradomin/App.axaml create mode 100644 Saradomin/App.axaml.cs create mode 100644 Saradomin/FodyWeavers.xml create mode 100644 Saradomin/Messaging/MainViewLoadedMessage.cs create mode 100644 Saradomin/Program.cs create mode 100644 Saradomin/Resources/Fonts/runescape_uf.ttf create mode 100644 Saradomin/Resources/Icons/09logo.png create mode 100644 Saradomin/Resources/Icons/settings.png create mode 100644 Saradomin/Resources/Styles/CheckBox.axaml create mode 100644 Saradomin/Resources/Styles/CloseButton.axaml create mode 100644 Saradomin/Resources/Styles/GroupBox.axaml create mode 100644 Saradomin/Resources/Styles/OutsideNavigatorButton.axaml create mode 100644 Saradomin/Resources/Styles/TextBox.axaml create mode 100644 Saradomin/Resources/Styles/TopBarNavigation.axaml create mode 100644 Saradomin/Saradomin.csproj create mode 100644 Saradomin/Utilities/CrossPlatform.cs create mode 100644 Saradomin/ViewModel/Controls/SettingsViewModel.cs create mode 100644 Saradomin/ViewModel/Windows/MainWindowViewModel.cs create mode 100644 Saradomin/Views/Controls/HeaderedTextBox.axaml create mode 100644 Saradomin/Views/Controls/HeaderedTextBox.axaml.cs create mode 100644 Saradomin/Views/Controls/MenuPreview.axaml create mode 100644 Saradomin/Views/Controls/MenuPreview.axaml.cs create mode 100644 Saradomin/Views/Controls/SettingsView.axaml create mode 100644 Saradomin/Views/Controls/SettingsView.axaml.cs create mode 100644 Saradomin/Views/Windows/MainWindow.axaml create mode 100644 Saradomin/Views/Windows/MainWindow.axaml.cs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..39c9242 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +bin/ +obj/ +/packages/ +riderModule.iml +/_ReSharper.Caches/ +.idea/ diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..629f195 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "Glitonea"] + path = Glitonea + url = https://github.com/Ciastex/Glitonea diff --git a/Glitonea b/Glitonea new file mode 160000 index 0000000..6f7db23 --- /dev/null +++ b/Glitonea @@ -0,0 +1 @@ +Subproject commit 6f7db236c74d30e988c83aa2ca558f20784be86f diff --git a/Saradomin.sln b/Saradomin.sln new file mode 100644 index 0000000..cfbf37a --- /dev/null +++ b/Saradomin.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Saradomin", "Saradomin\Saradomin.csproj", "{29C8B474-5AE6-4B2D-9BE4-4764AFC50E16}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Glitonea", "Glitonea\Glitonea.csproj", "{D2884654-2246-4AC0-B53B-5F1DF33DEDD7}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {29C8B474-5AE6-4B2D-9BE4-4764AFC50E16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {29C8B474-5AE6-4B2D-9BE4-4764AFC50E16}.Debug|Any CPU.Build.0 = Debug|Any CPU + {29C8B474-5AE6-4B2D-9BE4-4764AFC50E16}.Release|Any CPU.ActiveCfg = Release|Any CPU + {29C8B474-5AE6-4B2D-9BE4-4764AFC50E16}.Release|Any CPU.Build.0 = Release|Any CPU + {D2884654-2246-4AC0-B53B-5F1DF33DEDD7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D2884654-2246-4AC0-B53B-5F1DF33DEDD7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D2884654-2246-4AC0-B53B-5F1DF33DEDD7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D2884654-2246-4AC0-B53B-5F1DF33DEDD7}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/Saradomin/.gitignore b/Saradomin/.gitignore new file mode 100644 index 0000000..8afdcb6 --- /dev/null +++ b/Saradomin/.gitignore @@ -0,0 +1,454 @@ +## 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/ +[Ww][Ii][Nn]32/ +[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/ + +# Tye +.tye/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# 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 +coverage*.xml +coverage*.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/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +## +## Visual studio for Mac +## + + +# globs +Makefile.in +*.userprefs +*.usertasks +config.make +config.status +aclocal.m4 +install-sh +autom4te.cache/ +*.tar.gz +tarballs/ +test-results/ + +# Mac bundle stuff +*.dmg +*.app + +# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore +# Windows thumbnail cache files +Thumbs.db +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 + +# JetBrains Rider +.idea/ +*.sln.iml + +## +## Visual Studio Code +## +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json diff --git a/Saradomin/App.axaml b/Saradomin/App.axaml new file mode 100644 index 0000000..887b30b --- /dev/null +++ b/Saradomin/App.axaml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Saradomin/App.axaml.cs b/Saradomin/App.axaml.cs new file mode 100644 index 0000000..4e2fb37 --- /dev/null +++ b/Saradomin/App.axaml.cs @@ -0,0 +1,33 @@ +using Avalonia; +using Avalonia.Controls.ApplicationLifetimes; +using Avalonia.Markup.Xaml; +using Glitonea; +using Glitonea.Mvvm; +using PropertyChanged; +using Saradomin.Views.Windows; + +namespace Saradomin +{ + [DoNotNotify] + public class App : Application + { + public static Messenger Messenger { get; private set; } + + public override void Initialize() + { + AvaloniaXamlLoader.Load(this); + GlitoneaCore.Initialize(); + Messenger = new Messenger(); + } + + public override void OnFrameworkInitializationCompleted() + { + if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) + { + desktop.MainWindow = new MainWindow(); + } + + base.OnFrameworkInitializationCompleted(); + } + } +} \ No newline at end of file diff --git a/Saradomin/FodyWeavers.xml b/Saradomin/FodyWeavers.xml new file mode 100644 index 0000000..d5abfed --- /dev/null +++ b/Saradomin/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/Saradomin/Messaging/MainViewLoadedMessage.cs b/Saradomin/Messaging/MainViewLoadedMessage.cs new file mode 100644 index 0000000..33afde1 --- /dev/null +++ b/Saradomin/Messaging/MainViewLoadedMessage.cs @@ -0,0 +1,14 @@ +using Avalonia.Controls.Html; + +namespace Saradomin.Messaging +{ + public class MainViewLoadedMessage + { + public HtmlControl HtmlView { get; } + + public MainViewLoadedMessage(HtmlControl htmlView) + { + HtmlView = htmlView; + } + } +} \ No newline at end of file diff --git a/Saradomin/Program.cs b/Saradomin/Program.cs new file mode 100644 index 0000000..b4d03a0 --- /dev/null +++ b/Saradomin/Program.cs @@ -0,0 +1,17 @@ +using System; +using Avalonia; + +namespace Saradomin +{ + internal class Program + { + [STAThread] + public static void Main(string[] args) => BuildAvaloniaApp() + .StartWithClassicDesktopLifetime(args); + + public static AppBuilder BuildAvaloniaApp() + => AppBuilder.Configure() + .UsePlatformDetect() + .LogToTrace(); + } +} \ No newline at end of file diff --git a/Saradomin/Resources/Fonts/runescape_uf.ttf b/Saradomin/Resources/Fonts/runescape_uf.ttf new file mode 100644 index 0000000000000000000000000000000000000000..24feecde41f28b3389554340611efa9b2d93a383 GIT binary patch literal 14248 zcmd^`PmJByRmac!y|Ep8oTQ1H#EFykSK=0@kQv88)G3jAi-X%p&?1{e2%)5JW}ZEh z%)ib&$96!~6)I5|6$Gh5EV`_akhMvehywH90=oOLqlW4!RywTg1 zFMewI;6Yq=+~{->DMjK8+gyR|L7;SWUSh#~c6Z=?UuztTC)n0QBjXM1aR zAk~m~^XobfRZtiDFrOgroRm5F8RHXjA9Ff;zq~GA84i(Du8BXC&hV$he;fWtK>mN` z`u|!ttF9~mm(O2$?ezy={3(0Imh^A`;y3<9g~W$!58WoVE7Ze$x}w{n8~6y!COw0E zv3HBBL54apdHBXN8`XzIs;`jEw#hs)hio>=A+}_2%}B10$718Bbt+lBFtRm$Q;f6hz0vq8S7F@7;>WCW-c00W?EcCXm#s=qf*e6k z<|Y&$b?2RS?H)nz>w8ij$#Nyf{mSJl{p&Z@dpno6HV0P+J2#dG_1J7-S!dH%`#Za9 zTbuQB3!^~KzH+&Uu(n(G>cLKLrN7bJd9&WSR$spQa%~2yTif-^n}hz&W^X`{-g^DH zjit}84hGwwUR=Beh+PA*U?Ro~%Uc@>dA7NE^XAy(Y}X)FqSGR61UU=cc#ZO(l zw9^N|TmAad*2V^N^=AizowcPK3akFYR{c_cXYDPs*v&bXvj>pWVPR|M`r`W9a({ET zzq`0}``OKv#pf5!FJ9K5OKaEbFW=}bzqz(~y?(pDy?T3Rw|--5eNb=Qu5b2k)l2;q zxg=Y%Ew^Py*5taZ%0Oz_lpdOEd~PzjAm`;d=!)E6+~+=6W@a0ymRIC5`aYgFWF74e z<1MTPSPdB6z*Zw3>^nWCdX!OLWwax^VASX}cowE2de#t4$FPP!Pk2a?^<;&Z8;1E! zbX(M0gZ`?#Y}~6@wf@v-wJJrS-5F#gJ*uwdbHrJa&s+Bfbmr5t$bZ*zCw47g>cm2! zO_3Mq&=&q>&vg|>ac+wKc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%+-d+I7cjxN~1DSCI)TTOqTJ#DUPL)QqjTVaT~!h{AXVTG=E}f zHl?vUGwb|bv-u|ZWF$I@s$uU7SI87cvSzSf)8TElig~?16zAkyvQ9-Pc&0oSU$0a% zYo9DeYkt6U1Ap6JV<(LI>O=#DoGIatNuyeyaopaWv|V}M3DdrT+I`zhpbvQ*MXxYg zTSef=d?j;y-6!L}LE)!ZtUodH6fG3{I2Qg>cJUZKj{^59bKE?mHJbeq4Vx$d)B z=T9imB6~;6{GQXQYAexxc<;48dT*OWp||m9?au&e#znj~zvnEw*y=n(Ox0#DMlJd< z!s1@Wu~FXQ23x+@589U=2~X?E#JKHK@Z1)^!5T{~UH6OfiQn0D-yHaEi1~OeffzAi zFYB?^ws)c<@ajs-ENi{&i0arh)9RBhNPEY&GYvZQhQc|za-8<7L|!xb zpKcR;Qf;b`JssUWezlHJNYwU1bxqRkn?sLXU>3<|%W;XfjflO4PkTgOZrD!(AS_wkik$jI=oa)>{8`v9K@s|{$Rp?}s(c#4?y>KQoCe!z z_~Y0k(2tjcK;1UDv5#s literal 0 HcmV?d00001 diff --git a/Saradomin/Resources/Icons/09logo.png b/Saradomin/Resources/Icons/09logo.png new file mode 100644 index 0000000000000000000000000000000000000000..c512e2a4a3d0a28db7d10b34259276ef62c333a5 GIT binary patch literal 9401 zcmV;qBu3kbP)Flag-F@!4 zea`;&THpHC+Uscee=synBOmb52c3U=sP{doRQx?ksiKrdKcjP0N~sAU3;>3vX)K*i zQ`0o1>$-lc)$&6ghENb6=K(&Ep=sLt-HW_yLhqa*Api9DlaJqh4Pz`iln4S6N(n*; zQwkbm)Y5f5q3e2vQkrr-&klS)x`#)AhLcDfIF8fW-{1G%_aQ#YFbo5fF$m7VIe+K8 zuIupwhGF<&0N~vd7DAw}uMc~Bdms7!mSqvoi=Uq|O*3>|Hz^@DV>Bg|%JYy9NGV5@ zQvICsbTW}3(Zrjr_Iw!lvyNl0jSQBXa|@5(u>$syCvTeZ&wu-SzlXcmt|67qz)I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1E9V3pk+ za{I;`TliFotnaE~JT{ilx) z8lNZtZ;y@FE+LgFKyW|uZxKcyXqrnY?I@*swS%g^zOvG7HXAE}@81mre*uK-GR9g` zO5f0pAQZd-LbfPlk9A$&fKt0s$_Ay>O{decvcLa{JnO&MyTgu?h}+zHzE2p_Ou@sf zVVVO{%84)xM}>%c4qVH&S0U9B7krB`)>KLfDW%CMwc_q|LZp&1P=}SNh;TyNwpFv) z{6wDfU-ac^%QWHnew6AGN~sZsp`#l{ni7)YT-cn4QF`3b4Wl8s=zt)yX--Jo)~M0A z`6`;fRFu-lnv}+v>O}+I*f6~;ACvAM6)cC&v00960zjgI`Wy?y300000NkvXXu0mjfXu;P} literal 0 HcmV?d00001 diff --git a/Saradomin/Resources/Icons/settings.png b/Saradomin/Resources/Icons/settings.png new file mode 100644 index 0000000000000000000000000000000000000000..b8800b66d7d02549860ae6d74dd22c7915c8c795 GIT binary patch literal 261 zcmV+g0s8)lP)LXjfEW+9)QFP7!r;^Z0S58W-!Ci=hEhxRd|{*8%ci^Pcz=;9Z_ud$kM^1FS(hfKgd= zfP2?3eIW2teXt6kCxAf`f-P{PsfcialnjHfw;^HS49Xb>hpk)?T-Q;K3=E!Lwx7Y% zKLD&bse2wfnNST!g$Kpn0>}Xo!)HFX&*3i} + + + + + + + + \ No newline at end of file diff --git a/Saradomin/Resources/Styles/CloseButton.axaml b/Saradomin/Resources/Styles/CloseButton.axaml new file mode 100644 index 0000000..449f14f --- /dev/null +++ b/Saradomin/Resources/Styles/CloseButton.axaml @@ -0,0 +1,29 @@ + + + + + + + \ No newline at end of file diff --git a/Saradomin/Resources/Styles/GroupBox.axaml b/Saradomin/Resources/Styles/GroupBox.axaml new file mode 100644 index 0000000..f7c2a40 --- /dev/null +++ b/Saradomin/Resources/Styles/GroupBox.axaml @@ -0,0 +1,34 @@ + + + \ No newline at end of file diff --git a/Saradomin/Resources/Styles/OutsideNavigatorButton.axaml b/Saradomin/Resources/Styles/OutsideNavigatorButton.axaml new file mode 100644 index 0000000..af00876 --- /dev/null +++ b/Saradomin/Resources/Styles/OutsideNavigatorButton.axaml @@ -0,0 +1,26 @@ + + + + + + + \ No newline at end of file diff --git a/Saradomin/Resources/Styles/TextBox.axaml b/Saradomin/Resources/Styles/TextBox.axaml new file mode 100644 index 0000000..d75cfbd --- /dev/null +++ b/Saradomin/Resources/Styles/TextBox.axaml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Saradomin/Resources/Styles/TopBarNavigation.axaml b/Saradomin/Resources/Styles/TopBarNavigation.axaml new file mode 100644 index 0000000..2b74756 --- /dev/null +++ b/Saradomin/Resources/Styles/TopBarNavigation.axaml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/Saradomin/Saradomin.csproj b/Saradomin/Saradomin.csproj new file mode 100644 index 0000000..a17f1c3 --- /dev/null +++ b/Saradomin/Saradomin.csproj @@ -0,0 +1,53 @@ + + + Exe + net6.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MainWindow.axaml + Code + + + MainWindow.axaml + Code + + + HeaderedTextBox.axaml + Code + + + MenuPreview.axaml + Code + + + diff --git a/Saradomin/Utilities/CrossPlatform.cs b/Saradomin/Utilities/CrossPlatform.cs new file mode 100644 index 0000000..991a962 --- /dev/null +++ b/Saradomin/Utilities/CrossPlatform.cs @@ -0,0 +1,24 @@ +using System.Diagnostics; +using System.Runtime.InteropServices; + +namespace Saradomin.Utilities +{ + public static class CrossPlatform + { + public static void LaunchURL(string url) + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + Process.Start(url); + } + else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + { + Process.Start("xdg-open", url); + } + else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + Process.Start("open", url); + } + } + } +} \ No newline at end of file diff --git a/Saradomin/ViewModel/Controls/SettingsViewModel.cs b/Saradomin/ViewModel/Controls/SettingsViewModel.cs new file mode 100644 index 0000000..2925839 --- /dev/null +++ b/Saradomin/ViewModel/Controls/SettingsViewModel.cs @@ -0,0 +1,9 @@ +using Glitonea.Mvvm; + +namespace Saradomin.ViewModel.Controls +{ + public class SettingsViewModel : ViewModelBase + { + public bool UseRuneScape3StyleBorder { get; set; } + } +} \ No newline at end of file diff --git a/Saradomin/ViewModel/Windows/MainWindowViewModel.cs b/Saradomin/ViewModel/Windows/MainWindowViewModel.cs new file mode 100644 index 0000000..6f0dd55 --- /dev/null +++ b/Saradomin/ViewModel/Windows/MainWindowViewModel.cs @@ -0,0 +1,52 @@ +using System; +using System.Net.Http; +using Glitonea.Mvvm; +using HtmlAgilityPack; +using Saradomin.Messaging; +using Saradomin.Utilities; + +namespace Saradomin.ViewModel.Windows +{ + public class MainWindowViewModel : ViewModelBase + { + public string Title { get; set; } = "2009scape launcher"; + + public MainWindowViewModel() + { + App.Messenger.Register(this, MainViewLoaded); + } + + public void ExitApplication() + { + Environment.Exit(0); + } + + public async void MainViewLoaded(MainViewLoadedMessage msg) + { + msg.HtmlView.BaseStylesheet = "* { font-size: 18px; }"; + + using (var httpClient = new HttpClient()) + { + var response = await httpClient.GetAsync("https://2009scape.org/services/m=news/archives/latest.html"); + var doc = new HtmlDocument(); + doc.Load(await response.Content.ReadAsStreamAsync()); + var node = doc.DocumentNode.SelectSingleNode("//div[@class='msgcontents']"); + msg.HtmlView.Text = node.InnerHtml; + } + } + + public void LaunchPage(string parameter) + { + var url = parameter switch + { + "news" => "https://2009scape.org/services/m=news/archives/latest.html", + "issues" => "https://gitlab.com/2009scape/2009scape/-/issues", + "hiscores" => "https://2009scape.org/services/m=hiscore/hiscores.html?world=2", + "discord" => "https://discord.gg/YY7WSttN7H", + _ => throw new ArgumentException($"{parameter} is not a valid page parameter.") + }; + + CrossPlatform.LaunchURL(url); + } + } +} \ No newline at end of file diff --git a/Saradomin/Views/Controls/HeaderedTextBox.axaml b/Saradomin/Views/Controls/HeaderedTextBox.axaml new file mode 100644 index 0000000..fe36a58 --- /dev/null +++ b/Saradomin/Views/Controls/HeaderedTextBox.axaml @@ -0,0 +1,18 @@ + + + + + + + \ No newline at end of file diff --git a/Saradomin/Views/Controls/HeaderedTextBox.axaml.cs b/Saradomin/Views/Controls/HeaderedTextBox.axaml.cs new file mode 100644 index 0000000..298b0d8 --- /dev/null +++ b/Saradomin/Views/Controls/HeaderedTextBox.axaml.cs @@ -0,0 +1,45 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Markup.Xaml; +using PropertyChanged; + +namespace Saradomin.Views.Controls +{ + [DoNotNotify] + public class HeaderedTextBox : UserControl + { + public static readonly StyledProperty HeaderProperty = new( + nameof(Header), + typeof(HeaderedTextBox), + new StyledPropertyMetadata("i_am_a_lazy_piece_of_shit") + ); + + public static readonly StyledProperty TextProperty = new( + nameof(Text), + typeof(HeaderedTextBox), + new StyledPropertyMetadata(string.Empty) + ); + + public string Header + { + get => GetValue(HeaderProperty); + set => SetValue(HeaderProperty, value); + } + + public string Text + { + get => GetValue(TextProperty); + set => SetValue(TextProperty, value); + } + + public HeaderedTextBox() + { + InitializeComponent(); + } + + private void InitializeComponent() + { + AvaloniaXamlLoader.Load(this); + } + } +} \ No newline at end of file diff --git a/Saradomin/Views/Controls/MenuPreview.axaml b/Saradomin/Views/Controls/MenuPreview.axaml new file mode 100644 index 0000000..eb95c10 --- /dev/null +++ b/Saradomin/Views/Controls/MenuPreview.axaml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Saradomin/Views/Controls/MenuPreview.axaml.cs b/Saradomin/Views/Controls/MenuPreview.axaml.cs new file mode 100644 index 0000000..021add4 --- /dev/null +++ b/Saradomin/Views/Controls/MenuPreview.axaml.cs @@ -0,0 +1,131 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Markup.Xaml; +using Avalonia.Media; +using PropertyChanged; + +namespace Saradomin.Views.Controls +{ + [DoNotNotify] + public class MenuPreview : UserControl + { + public static readonly StyledProperty BackgroundColorProperty = new( + nameof(BackgroundColor), + typeof(MenuPreview), + new StyledPropertyMetadata( + new(SolidColorBrush.Parse("#5D5447")) + ) + ); + + public static readonly StyledProperty TitleBarColorProperty = new( + nameof(TitleBarColor), + typeof(MenuPreview), + new(SolidColorBrush.Parse("#000000")) + ); + + public static readonly StyledProperty TitleFontColorProperty = new( + nameof(TitleFontColor), + typeof(MenuPreview), + new(SolidColorBrush.Parse("#FFFFFF")) + ); + + public static readonly StyledProperty BorderColorProperty = new( + nameof(TitleFontColor), + typeof(MenuPreview), + new(SolidColorBrush.Parse("#FFFFFF")) + ); + + public static readonly StyledProperty UseRuneScape3StyleBorderProperty = new( + nameof(UseRuneScape3StyleBorder), + typeof(MenuPreview), + new(false) + ); + + private static readonly StyledProperty OldStyleBorderThicknessProperty = new( + nameof(OldStyleBorderThickness), + typeof(MenuPreview), + new(Thickness.Parse("1")) + ); + + private static readonly StyledProperty RuneScape3StyleBorderThicknessProperty = new( + nameof(RuneScape3StyleBorderThickness), + typeof(MenuPreview), + new(Thickness.Parse("0")) + ); + + public SolidColorBrush BackgroundColor + { + get => GetValue(BackgroundColorProperty); + set => SetValue(BackgroundColorProperty, value); + } + + public SolidColorBrush TitleBarColor + { + get => GetValue(TitleBarColorProperty); + set => SetValue(TitleBarColorProperty, value); + } + + public SolidColorBrush TitleFontColor + { + get => GetValue(TitleFontColorProperty); + set => SetValue(TitleFontColorProperty, value); + } + + public SolidColorBrush BorderColor + { + get => GetValue(BorderColorProperty); + set => SetValue(BorderColorProperty, value); + } + + public bool UseRuneScape3StyleBorder + { + get => GetValue(UseRuneScape3StyleBorderProperty); + set => SetValue(UseRuneScape3StyleBorderProperty, value); + } + + private Thickness OldStyleBorderThickness + { + get => GetValue(OldStyleBorderThicknessProperty); + set => SetValue(OldStyleBorderThicknessProperty, value); + } + + private Thickness RuneScape3StyleBorderThickness + { + get => GetValue(RuneScape3StyleBorderThicknessProperty); + set => SetValue(RuneScape3StyleBorderThicknessProperty, value); + } + + public MenuPreview() + { + InitializeComponent(); + } + + private void InitializeComponent() + { + AvaloniaXamlLoader.Load(this); + PropertyChanged += OnPropertyChanged; + } + + private void OnPropertyChanged(object sender, AvaloniaPropertyChangedEventArgs e) + { + switch (e.Property.Name) + { + case nameof(UseRuneScape3StyleBorder): + { + if (UseRuneScape3StyleBorder) + { + OldStyleBorderThickness = new(0); + RuneScape3StyleBorderThickness = new(1); + } + else + { + OldStyleBorderThickness = new(1); + RuneScape3StyleBorderThickness = new(0); + } + + break; + } + } + } + } +} \ No newline at end of file diff --git a/Saradomin/Views/Controls/SettingsView.axaml b/Saradomin/Views/Controls/SettingsView.axaml new file mode 100644 index 0000000..5d63cba --- /dev/null +++ b/Saradomin/Views/Controls/SettingsView.axaml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Saradomin/Views/Controls/SettingsView.axaml.cs b/Saradomin/Views/Controls/SettingsView.axaml.cs new file mode 100644 index 0000000..14a4e11 --- /dev/null +++ b/Saradomin/Views/Controls/SettingsView.axaml.cs @@ -0,0 +1,20 @@ +using Avalonia.Controls; +using Avalonia.Markup.Xaml; +using PropertyChanged; + +namespace Saradomin.Views.Controls +{ + [DoNotNotify] + public class SettingsView : UserControl + { + public SettingsView() + { + InitializeComponent(); + } + + private void InitializeComponent() + { + AvaloniaXamlLoader.Load(this); + } + } +} \ No newline at end of file diff --git a/Saradomin/Views/Windows/MainWindow.axaml b/Saradomin/Views/Windows/MainWindow.axaml new file mode 100644 index 0000000..351b000 --- /dev/null +++ b/Saradomin/Views/Windows/MainWindow.axaml @@ -0,0 +1,129 @@ + + + + + + + +