commit 00d8c105e8c1ade1e8f933a744e39c0c617f4c85 Author: Matt Parker [SSW] <61717342+MattParkerDev@users.noreply.github.com> Date: Fri Jan 10 18:30:33 2025 +1000 Initial commit diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..56f5c5c --- /dev/null +++ b/.editorconfig @@ -0,0 +1,33 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +max_line_length = 120 +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +csharp_style_namespace_declarations = file_scoped:warning +csharp_space_after_cast = true +csharp_space_before_colon_in_inheritance_clause = true +csharp_space_after_colon_in_inheritance_clause = true +csharp_place_attribute_on_same_line = false + +[*.yml] +indent_style = space +indent_size = 2 + +[*.{cs,vb}] +dotnet_naming_rule.private_members_with_underscore.symbols = private_fields +dotnet_naming_rule.private_members_with_underscore.style = prefix_underscore +dotnet_naming_rule.private_members_with_underscore.severity = suggestion + +dotnet_naming_symbols.private_fields.applicable_kinds = field +dotnet_naming_symbols.private_fields.applicable_accessibilities = private + +dotnet_naming_style.prefix_underscore.capitalization = camel_case +dotnet_naming_style.prefix_underscore.required_prefix = _ diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0185288 --- /dev/null +++ b/.gitignore @@ -0,0 +1,373 @@ +## 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 +# **/appsettings.json + +# 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/ +[Oo]ut/ +[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/ + +# 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 +.vscode/launch.json +.vscode/tasks.json + +# Rider +.idea/ + +# Git +.git/ +/.config/dotnet-tools.json diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 0000000..38b8e44 --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,6 @@ + + + + true + + diff --git a/README.md b/README.md new file mode 100644 index 0000000..e5dce29 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# SharpIDE.Photino diff --git a/SharpIDE.Photino.sln b/SharpIDE.Photino.sln new file mode 100644 index 0000000..d9cdb26 --- /dev/null +++ b/SharpIDE.Photino.sln @@ -0,0 +1,36 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{F4ED837F-888A-4D01-BCED-C360B9CE0865}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{124E1491-6ED8-492E-9B39-C534364929ED}" + ProjectSection(SolutionItems) = preProject + .editorconfig = .editorconfig + .gitignore = .gitignore + Directory.Build.props = Directory.Build.props + global.json = global.json + README.md = README.md + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpIDE.Photino", "src\SharpIDE.Photino\SharpIDE.Photino.csproj", "{E35167E1-0FF4-4194-97A8-CC95EDA224CD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E35167E1-0FF4-4194-97A8-CC95EDA224CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E35167E1-0FF4-4194-97A8-CC95EDA224CD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E35167E1-0FF4-4194-97A8-CC95EDA224CD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E35167E1-0FF4-4194-97A8-CC95EDA224CD}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {E35167E1-0FF4-4194-97A8-CC95EDA224CD} = {F4ED837F-888A-4D01-BCED-C360B9CE0865} + EndGlobalSection +EndGlobal diff --git a/global.json b/global.json new file mode 100644 index 0000000..4441ee6 --- /dev/null +++ b/global.json @@ -0,0 +1,7 @@ +{ + "sdk": { + "version": "9.0.101", + "rollForward": "latestFeature", + "allowPrerelease": true + } +} diff --git a/local-publish.bat b/local-publish.bat new file mode 100644 index 0000000..1208c4e --- /dev/null +++ b/local-publish.bat @@ -0,0 +1,3 @@ +@echo on +dotnet publish ./src/PhotinoBlazor.Template/PhotinoBlazor.Template.csproj -c Release +pause \ No newline at end of file diff --git a/src/SharpIDE.Photino/App.razor b/src/SharpIDE.Photino/App.razor new file mode 100644 index 0000000..d832b2f --- /dev/null +++ b/src/SharpIDE.Photino/App.razor @@ -0,0 +1,17 @@ + + + + + + + Not found + +

Sorry, there's nothing at this address.

+
+
+
+ +@code +{ + +} diff --git a/src/SharpIDE.Photino/AppThemeProvider.cs b/src/SharpIDE.Photino/AppThemeProvider.cs new file mode 100644 index 0000000..ff37fc6 --- /dev/null +++ b/src/SharpIDE.Photino/AppThemeProvider.cs @@ -0,0 +1,15 @@ +using MudBlazor; + +namespace SharpIDE.Photino; + +public static class AppThemeProvider +{ + public static MudTheme GetTheme() + { + var theme = new MudTheme(); + theme.Typography.H5.FontSize = "1.4rem"; + theme.Typography.H5.FontWeight = "500"; + theme.Typography.H6.FontSize = "1.1rem"; + return theme; + } +} diff --git a/src/SharpIDE.Photino/Layout/MainLayout.razor b/src/SharpIDE.Photino/Layout/MainLayout.razor new file mode 100644 index 0000000..b66e5b4 --- /dev/null +++ b/src/SharpIDE.Photino/Layout/MainLayout.razor @@ -0,0 +1,34 @@ +@inherits LayoutComponentBase + + + + + + + + + + + + + + SharpIDE.Photino + + + + + + + @Body + + + + +@code { + bool _drawerOpen = true; + + void DrawerToggle() + { + _drawerOpen = !_drawerOpen; + } +} diff --git a/src/SharpIDE.Photino/Layout/NavMenu.razor b/src/SharpIDE.Photino/Layout/NavMenu.razor new file mode 100644 index 0000000..8b2eaf4 --- /dev/null +++ b/src/SharpIDE.Photino/Layout/NavMenu.razor @@ -0,0 +1,3 @@ + + Home + diff --git a/src/SharpIDE.Photino/Pages/Home.razor b/src/SharpIDE.Photino/Pages/Home.razor new file mode 100644 index 0000000..195ca1b --- /dev/null +++ b/src/SharpIDE.Photino/Pages/Home.razor @@ -0,0 +1,7 @@ +@page "/" + +Welcome to a new Photino Blazor app! + +@code { + +} diff --git a/src/SharpIDE.Photino/Program.cs b/src/SharpIDE.Photino/Program.cs new file mode 100644 index 0000000..5c89808 --- /dev/null +++ b/src/SharpIDE.Photino/Program.cs @@ -0,0 +1,36 @@ +using Microsoft.Extensions.DependencyInjection; +using MudBlazor.Services; +using Photino.Blazor; + +namespace SharpIDE.Photino; + +public class Program +{ + [STAThread] + public static void Main(string[] args) + { + var appBuilder = PhotinoBlazorAppBuilder.CreateDefault(args); + + appBuilder.Services.AddLogging(); + appBuilder.Services.AddMudServices(); + + appBuilder.RootComponents.Add("app"); + + var app = appBuilder.Build(); + + app.MainWindow + .SetSize(1400, 800) + .SetDevToolsEnabled(true) + .SetLogVerbosity(0) + //.SetIconFile("favicon.ico") + .SetTitle("SharpIDE.Photino"); + + AppDomain.CurrentDomain.UnhandledException += (sender, error) => + { + app.MainWindow.ShowMessage("Fatal exception", error.ExceptionObject.ToString()); + }; + + app.Run(); + } +} + diff --git a/src/SharpIDE.Photino/Properties/launchSettings.json b/src/SharpIDE.Photino/Properties/launchSettings.json new file mode 100644 index 0000000..98ea0ab --- /dev/null +++ b/src/SharpIDE.Photino/Properties/launchSettings.json @@ -0,0 +1,22 @@ +{ +"$schema": "https://json.schemastore.org/launchsettings.json", + "profiles": { + "Run": { + "commandName": "Project", + "dotnetRunMessages": true, + "environmentVariables": { + "DOTNET_ENVIRONMENT": "Development" + } + }, + "(Watch)": { + "commandName": "Executable", + "executablePath": "dotnet", + "workingDirectory": "$(ProjectDir)", + "commandLineArgs": "watch run", + "environmentVariables": { + "DOTNET_ENVIRONMENT": "Development", + "DOTNET_WATCH_RESTART_ON_RUDE_EDIT": "true" + } + } + } +} diff --git a/src/SharpIDE.Photino/SharpIDE.Photino.csproj b/src/SharpIDE.Photino/SharpIDE.Photino.csproj new file mode 100644 index 0000000..5885fac --- /dev/null +++ b/src/SharpIDE.Photino/SharpIDE.Photino.csproj @@ -0,0 +1,38 @@ + + + + WinExe + net9.0 + favicon.ico + enable + enable + + true + false + true + + + + + + + + + + + + + + + + PreserveNewest + + + + + + Always + + + + diff --git a/src/SharpIDE.Photino/_Imports.razor b/src/SharpIDE.Photino/_Imports.razor new file mode 100644 index 0000000..ed016c9 --- /dev/null +++ b/src/SharpIDE.Photino/_Imports.razor @@ -0,0 +1,11 @@ +@using System.Net.Http +@using System.Net.Http.Json +@using Microsoft.AspNetCore.Authorization +@using Microsoft.AspNetCore.Components.Forms +@using Microsoft.AspNetCore.Components.Routing +@using Microsoft.AspNetCore.Components.Web +@using Microsoft.AspNetCore.Components.Web.Virtualization +@using Microsoft.JSInterop +@using Microsoft.Extensions.Logging +@using MudBlazor +@using SharpIDE.Photino.Layout diff --git a/src/SharpIDE.Photino/favicon.ico b/src/SharpIDE.Photino/favicon.ico new file mode 100644 index 0000000..7f6f31e Binary files /dev/null and b/src/SharpIDE.Photino/favicon.ico differ diff --git a/src/SharpIDE.Photino/wwwroot/css/app.css b/src/SharpIDE.Photino/wwwroot/css/app.css new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/src/SharpIDE.Photino/wwwroot/css/app.css @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/SharpIDE.Photino/wwwroot/index.html b/src/SharpIDE.Photino/wwwroot/index.html new file mode 100644 index 0000000..71f1cae --- /dev/null +++ b/src/SharpIDE.Photino/wwwroot/index.html @@ -0,0 +1,24 @@ + + + + + + + + + + + + + Loading... + +
+ An unhandled error has occurred. + Reload + 🗙 +
+ + + + +