From 60d9e08bad1d22b48a43f3b5a0caee6623a81968 Mon Sep 17 00:00:00 2001 From: Snoweuph Date: Tue, 4 Apr 2023 17:39:09 +0200 Subject: [PATCH] Setting Up and Chaneging message to "Hello World" --- .gitignore | 219 ++++++++++++++++++++++++++++++++++++++++++++ .vscode/launch.json | 24 +++++ .vscode/tasks.json | 41 +++++++++ App.axaml | 8 ++ App.axaml.cs | 23 +++++ Learning.csproj | 21 +++++ MainWindow.axaml | 9 ++ MainWindow.axaml.cs | 11 +++ Program.cs | 20 ++++ app.manifest | 18 ++++ 10 files changed, 394 insertions(+) create mode 100644 .gitignore create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json create mode 100644 App.axaml create mode 100644 App.axaml.cs create mode 100644 Learning.csproj create mode 100644 MainWindow.axaml create mode 100644 MainWindow.axaml.cs create mode 100644 Program.cs create mode 100644 app.manifest diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ee778ed --- /dev/null +++ b/.gitignore @@ -0,0 +1,219 @@ +################# +## Visual Studio +################# + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates +.vs/ + +# Build results + +*.sln.ide/ +[Dd]ebug/ +[Rr]elease/ +x64/ +[Bb]in/ +[Oo]bj/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.log +*.scc + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# 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 +*.Publish.xml +*.pubxml + +# Windows Azure Build Output +csx +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# NCrunch +.NCrunch_*/ +_NCrunch_*/ +*.ncrunchsolution.user +nCrunchTemp_* + +# CodeRush +.cr/ + +# Others +sql/ +*.Cache +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.[Pp]ublish.xml +*.pfx +*.publishsettings +Events_Avalonia.cs + +# 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 + +# SQL Server files +App_Data/*.mdf +App_Data/*.ldf + +############# +## Windows detritus +############# + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Mac crap +.DS_Store + +################# +## Monodevelop +################# +*.userprefs +*.nugetreferenceswitcher + + +################# +## Rider +################# +.idea + +################# +## VS Code +################# +.vscode/ + +################# +## Cake +################# +tools/* +!tools/packages.config +.nuget +artifacts/ +nuget +Avalonia.XBuild.sln +project.lock.json +.idea/* + + +################## +## BenchmarkDotNet +################## +BenchmarkDotNet.Artifacts/ + +dirs.sln + + +################## +# Xcode +################## +Index/ +Logs/ +ModuleCache.noindex/ +Build/Intermediates.noindex/ +build-intermediate +obj-Direct2D1/ +obj-Skia/ + +################## +# Vim +################## +.vim +coc-settings.json +.ccls-cache +.ccls +*.map +src/Browser/Avalonia.Browser.Blazor/wwwroot/*.js +src/Browser/Avalonia.Browser.Blazor/Interop/Typescript/*.js +node_modules +src/Browser/Avalonia.Browser.Blazor/webapp/package-lock.json +src/Browser/Avalonia.Browser.Blazor/wwwroot +src/Browser/Avalonia.Browser/wwwroot diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..0151251 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,24 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": ".NET Core Launch (console)", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + "program": "${workspaceFolder}/bin/Debug/net7.0/fibbonachio.dll", + "args": [], + "cwd": "${workspaceFolder}", + "console": "internalConsole", + "stopAtEntry": false + }, + { + "name": ".NET Core Attach", + "type": "coreclr", + "request": "attach" + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..d0f38b6 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,41 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "command": "dotnet", + "type": "process", + "args": [ + "build", + "${workspaceFolder}/fibbonachio.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "publish", + "command": "dotnet", + "type": "process", + "args": [ + "publish", + "${workspaceFolder}/fibbonachio.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "watch", + "command": "dotnet", + "type": "process", + "args": [ + "watch", + "run", + "--project", + "${workspaceFolder}/fibbonachio.csproj" + ], + "problemMatcher": "$msCompile" + } + ] +} \ No newline at end of file diff --git a/App.axaml b/App.axaml new file mode 100644 index 0000000..4d89f61 --- /dev/null +++ b/App.axaml @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/App.axaml.cs b/App.axaml.cs new file mode 100644 index 0000000..9a32061 --- /dev/null +++ b/App.axaml.cs @@ -0,0 +1,23 @@ +using Avalonia; +using Avalonia.Controls.ApplicationLifetimes; +using Avalonia.Markup.Xaml; + +namespace Learning; + +public partial class App : Application +{ + public override void Initialize() + { + AvaloniaXamlLoader.Load(this); + } + + public override void OnFrameworkInitializationCompleted() + { + if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) + { + desktop.MainWindow = new MainWindow(); + } + + base.OnFrameworkInitializationCompleted(); + } +} \ No newline at end of file diff --git a/Learning.csproj b/Learning.csproj new file mode 100644 index 0000000..670d21b --- /dev/null +++ b/Learning.csproj @@ -0,0 +1,21 @@ + + + WinExe + net6.0 + enable + true + app.manifest + + + + + + + + + + + + + + diff --git a/MainWindow.axaml b/MainWindow.axaml new file mode 100644 index 0000000..a9b855e --- /dev/null +++ b/MainWindow.axaml @@ -0,0 +1,9 @@ + + Hello World! + diff --git a/MainWindow.axaml.cs b/MainWindow.axaml.cs new file mode 100644 index 0000000..bc78231 --- /dev/null +++ b/MainWindow.axaml.cs @@ -0,0 +1,11 @@ +using Avalonia.Controls; + +namespace Learning; + +public partial class MainWindow : Window +{ + public MainWindow() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/Program.cs b/Program.cs new file mode 100644 index 0000000..c7895ef --- /dev/null +++ b/Program.cs @@ -0,0 +1,20 @@ +using Avalonia; +using System; + +namespace Learning; + +class Program +{ + // Initialization code. Don't use any Avalonia, third-party APIs or any + // SynchronizationContext-reliant code before AppMain is called: things aren't initialized + // yet and stuff might break. + [STAThread] + public static void Main(string[] args) => BuildAvaloniaApp() + .StartWithClassicDesktopLifetime(args); + + // Avalonia configuration, don't remove; also used by visual designer. + public static AppBuilder BuildAvaloniaApp() + => AppBuilder.Configure() + .UsePlatformDetect() + .LogToTrace(); +} diff --git a/app.manifest b/app.manifest new file mode 100644 index 0000000..e0ce8d0 --- /dev/null +++ b/app.manifest @@ -0,0 +1,18 @@ + + + + + + + + + + + + + +