commit fc632663f294088c6ea61eedfb74d7e642719cda Author: Cinka Date: Fri Apr 10 11:17:17 2026 +0300 - init: init repo diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..add57be --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +bin/ +obj/ +/packages/ +riderModule.iml +/_ReSharper.Caches/ \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/.gitignore b/.idea/.idea.LaborWork/.idea/.gitignore new file mode 100644 index 0000000..0477a8e --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/.gitignore @@ -0,0 +1,15 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Rider ignored files +/projectSettingsUpdater.xml +/.idea.LaborWork.iml +/modules.xml +/contentModel.xml +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/.idea.LaborWork/.idea/encodings.xml b/.idea/.idea.LaborWork/.idea/encodings.xml new file mode 100644 index 0000000..df87cf9 --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/indexLayout.xml b/.idea/.idea.LaborWork/.idea/indexLayout.xml new file mode 100644 index 0000000..7b08163 --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/indexLayout.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_activity_activity.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_activity_activity.xml new file mode 100644 index 0000000..f9c4041 --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_activity_activity.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_annotation_annotation.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_annotation_annotation.xml new file mode 100644 index 0000000..1f569af --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_annotation_annotation.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_annotation_annotation_experimental.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_annotation_annotation_experimental.xml new file mode 100644 index 0000000..9c3fbbd --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_annotation_annotation_experimental.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_annotation_annotation_jvm.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_annotation_annotation_jvm.xml new file mode 100644 index 0000000..cd4ab6a --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_annotation_annotation_jvm.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_appcompat_appcompat.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_appcompat_appcompat.xml new file mode 100644 index 0000000..72460ec --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_appcompat_appcompat.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_appcompat_appcompat_resources.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_appcompat_appcompat_resources.xml new file mode 100644 index 0000000..aaa23cf --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_appcompat_appcompat_resources.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_arch_core_core_common.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_arch_core_core_common.xml new file mode 100644 index 0000000..c3e2111 --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_arch_core_core_common.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_arch_core_core_runtime.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_arch_core_core_runtime.xml new file mode 100644 index 0000000..62d717c --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_arch_core_core_runtime.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_collection_collection.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_collection_collection.xml new file mode 100644 index 0000000..c086adf --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_collection_collection.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_collection_collection_jvm.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_collection_collection_jvm.xml new file mode 100644 index 0000000..138c81c --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_collection_collection_jvm.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_concurrent_concurrent_futures.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_concurrent_concurrent_futures.xml new file mode 100644 index 0000000..6d120d0 --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_concurrent_concurrent_futures.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_core_core.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_core_core.xml new file mode 100644 index 0000000..d937f68 --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_core_core.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_core_core_ktx.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_core_core_ktx.xml new file mode 100644 index 0000000..3203bb9 --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_core_core_ktx.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_core_core_splashscreen.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_core_core_splashscreen.xml new file mode 100644 index 0000000..241ff29 --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_core_core_splashscreen.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_cursoradapter_cursoradapter.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_cursoradapter_cursoradapter.xml new file mode 100644 index 0000000..2e5715c --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_cursoradapter_cursoradapter.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_customview_customview.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_customview_customview.xml new file mode 100644 index 0000000..5d66dac --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_customview_customview.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_drawerlayout_drawerlayout.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_drawerlayout_drawerlayout.xml new file mode 100644 index 0000000..cfb80eb --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_drawerlayout_drawerlayout.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_emoji2_emoji2.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_emoji2_emoji2.xml new file mode 100644 index 0000000..868b903 --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_emoji2_emoji2.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_emoji2_emoji2_views_helper.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_emoji2_emoji2_views_helper.xml new file mode 100644 index 0000000..4e0be82 --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_emoji2_emoji2_views_helper.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_fragment_fragment.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_fragment_fragment.xml new file mode 100644 index 0000000..0084d5f --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_fragment_fragment.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_interpolator_interpolator.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_interpolator_interpolator.xml new file mode 100644 index 0000000..c36b6fb --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_interpolator_interpolator.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_lifecycle_lifecycle_common.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_lifecycle_lifecycle_common.xml new file mode 100644 index 0000000..389d1b3 --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_lifecycle_lifecycle_common.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_lifecycle_lifecycle_livedata_core.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_lifecycle_lifecycle_livedata_core.xml new file mode 100644 index 0000000..dc898a6 --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_lifecycle_lifecycle_livedata_core.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_lifecycle_lifecycle_process.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_lifecycle_lifecycle_process.xml new file mode 100644 index 0000000..6d3d921 --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_lifecycle_lifecycle_process.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_lifecycle_lifecycle_runtime.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_lifecycle_lifecycle_runtime.xml new file mode 100644 index 0000000..0e0047b --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_lifecycle_lifecycle_runtime.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_lifecycle_lifecycle_viewmodel.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_lifecycle_lifecycle_viewmodel.xml new file mode 100644 index 0000000..5df892f --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_lifecycle_lifecycle_viewmodel.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_lifecycle_lifecycle_viewmodel_savedstate.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_lifecycle_lifecycle_viewmodel_savedstate.xml new file mode 100644 index 0000000..e5ea909 --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_lifecycle_lifecycle_viewmodel_savedstate.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_loader_loader.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_loader_loader.xml new file mode 100644 index 0000000..0a78fd0 --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_loader_loader.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_profileinstaller_profileinstaller.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_profileinstaller_profileinstaller.xml new file mode 100644 index 0000000..d708c14 --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_profileinstaller_profileinstaller.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_resourceinspection_resourceinspection_annotation.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_resourceinspection_resourceinspection_annotation.xml new file mode 100644 index 0000000..63ef78b --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_resourceinspection_resourceinspection_annotation.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_savedstate_savedstate.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_savedstate_savedstate.xml new file mode 100644 index 0000000..8643e82 --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_savedstate_savedstate.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_startup_startup_runtime.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_startup_startup_runtime.xml new file mode 100644 index 0000000..820ea4a --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_startup_startup_runtime.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_tracing_tracing.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_tracing_tracing.xml new file mode 100644 index 0000000..fbd138f --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_tracing_tracing.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_vectordrawable_vectordrawable.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_vectordrawable_vectordrawable.xml new file mode 100644 index 0000000..cefc0db --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_vectordrawable_vectordrawable.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_vectordrawable_vectordrawable_animated.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_vectordrawable_vectordrawable_animated.xml new file mode 100644 index 0000000..8b4cfd3 --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_vectordrawable_vectordrawable_animated.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_versionedparcelable_versionedparcelable.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_versionedparcelable_versionedparcelable.xml new file mode 100644 index 0000000..e6779dd --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_versionedparcelable_versionedparcelable.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/androidx_viewpager_viewpager.xml b/.idea/.idea.LaborWork/.idea/libraries/androidx_viewpager_viewpager.xml new file mode 100644 index 0000000..c7a9bc3 --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/androidx_viewpager_viewpager.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/guava_listenablefuture.xml b/.idea/.idea.LaborWork/.idea/libraries/guava_listenablefuture.xml new file mode 100644 index 0000000..372c95e --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/guava_listenablefuture.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/org_jetbrains_kotlin_kotlin_stdlib_common_1_9_10.xml b/.idea/.idea.LaborWork/.idea/libraries/org_jetbrains_kotlin_kotlin_stdlib_common_1_9_10.xml new file mode 100644 index 0000000..c374d5b --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/org_jetbrains_kotlin_kotlin_stdlib_common_1_9_10.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/org_jetbrains_kotlin_kotlin_stdlib_jdk7_1_9_10.xml b/.idea/.idea.LaborWork/.idea/libraries/org_jetbrains_kotlin_kotlin_stdlib_jdk7_1_9_10.xml new file mode 100644 index 0000000..1bf8b00 --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/org_jetbrains_kotlin_kotlin_stdlib_jdk7_1_9_10.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/org_jetbrains_kotlin_kotlin_stdlib_jdk8_1_9_10.xml b/.idea/.idea.LaborWork/.idea/libraries/org_jetbrains_kotlin_kotlin_stdlib_jdk8_1_9_10.xml new file mode 100644 index 0000000..74f5472 --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/org_jetbrains_kotlin_kotlin_stdlib_jdk8_1_9_10.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/org_jetbrains_kotlinx_kotlinx_coroutines_android_1_7_3.xml b/.idea/.idea.LaborWork/.idea/libraries/org_jetbrains_kotlinx_kotlinx_coroutines_android_1_7_3.xml new file mode 100644 index 0000000..6adc21f --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/org_jetbrains_kotlinx_kotlinx_coroutines_android_1_7_3.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/libraries/org_jetbrains_kotlinx_kotlinx_coroutines_core_jvm_1_7_3.xml b/.idea/.idea.LaborWork/.idea/libraries/org_jetbrains_kotlinx_kotlinx_coroutines_core_jvm_1_7_3.xml new file mode 100644 index 0000000..6b0ad19 --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/libraries/org_jetbrains_kotlinx_kotlinx_coroutines_core_jvm_1_7_3.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.LaborWork/.idea/vcs.xml b/.idea/.idea.LaborWork/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/.idea.LaborWork/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Directory.Packages.props b/Directory.Packages.props new file mode 100644 index 0000000..1e986ba --- /dev/null +++ b/Directory.Packages.props @@ -0,0 +1,21 @@ + + + + true + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/LaborWork.Browser/LaborWork.Browser.csproj b/LaborWork.Browser/LaborWork.Browser.csproj new file mode 100644 index 0000000..66929c8 --- /dev/null +++ b/LaborWork.Browser/LaborWork.Browser.csproj @@ -0,0 +1,16 @@ + + + net10.0-browser + Exe + true + enable + + + + + + + + + + diff --git a/LaborWork.Browser/Program.cs b/LaborWork.Browser/Program.cs new file mode 100644 index 0000000..a59316d --- /dev/null +++ b/LaborWork.Browser/Program.cs @@ -0,0 +1,15 @@ +using System.Runtime.Versioning; +using System.Threading.Tasks; +using Avalonia; +using Avalonia.Browser; +using LaborWork; + +internal sealed partial class Program +{ + private static Task Main(string[] args) => BuildAvaloniaApp() + .WithInterFont() + .StartBrowserAppAsync("out"); + + public static AppBuilder BuildAvaloniaApp() + => AppBuilder.Configure(); +} \ No newline at end of file diff --git a/LaborWork.Browser/Properties/AssemblyInfo.cs b/LaborWork.Browser/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..f31aed8 --- /dev/null +++ b/LaborWork.Browser/Properties/AssemblyInfo.cs @@ -0,0 +1 @@ +[assembly: System.Runtime.Versioning.SupportedOSPlatform("browser")] \ No newline at end of file diff --git a/LaborWork.Browser/Properties/launchSettings.json b/LaborWork.Browser/Properties/launchSettings.json new file mode 100644 index 0000000..907b17f --- /dev/null +++ b/LaborWork.Browser/Properties/launchSettings.json @@ -0,0 +1,13 @@ +{ + "profiles": { + "LaborWork.Browser": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:7169;http://localhost:5235", + "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}" + } + } +} diff --git a/LaborWork.Browser/runtimeconfig.template.json b/LaborWork.Browser/runtimeconfig.template.json new file mode 100644 index 0000000..b96a943 --- /dev/null +++ b/LaborWork.Browser/runtimeconfig.template.json @@ -0,0 +1,10 @@ +{ + "wasmHostProperties": { + "perHostConfig": [ + { + "name": "browser", + "host": "browser" + } + ] + } +} \ No newline at end of file diff --git a/LaborWork.Browser/wwwroot/app.css b/LaborWork.Browser/wwwroot/app.css new file mode 100644 index 0000000..1d6f754 --- /dev/null +++ b/LaborWork.Browser/wwwroot/app.css @@ -0,0 +1,58 @@ +/* HTML styles for the splash screen */ +.avalonia-splash { + position: absolute; + height: 100%; + width: 100%; + background: white; + font-family: 'Outfit', sans-serif; + justify-content: center; + align-items: center; + display: flex; + pointer-events: none; +} + +/* Light theme styles */ +@media (prefers-color-scheme: light) { + .avalonia-splash { + background: white; + } + + .avalonia-splash h2 { + color: #1b2a4e; + } + + .avalonia-splash a { + color: #0D6EFD; + } +} + +@media (prefers-color-scheme: dark) { + .avalonia-splash { + background: #1b2a4e; + } + + .avalonia-splash h2 { + color: white; + } + + .avalonia-splash a { + color: white; + } +} + +.avalonia-splash h2 { + font-weight: 400; + font-size: 1.5rem; +} + +.avalonia-splash a { + text-decoration: none; + font-size: 2.5rem; + display: block; +} + +.avalonia-splash.splash-close { + transition: opacity 200ms, display 200ms; + display: none; + opacity: 0; +} diff --git a/LaborWork.Browser/wwwroot/favicon.ico b/LaborWork.Browser/wwwroot/favicon.ico new file mode 100644 index 0000000..f7da8bb Binary files /dev/null and b/LaborWork.Browser/wwwroot/favicon.ico differ diff --git a/LaborWork.Browser/wwwroot/index.html b/LaborWork.Browser/wwwroot/index.html new file mode 100644 index 0000000..6f24870 --- /dev/null +++ b/LaborWork.Browser/wwwroot/index.html @@ -0,0 +1,22 @@ + + + + + LaborWork.Browser + + + + + + +
+
+

+ Загрузка... +

+
+
+ + + + diff --git a/LaborWork.Browser/wwwroot/main.js b/LaborWork.Browser/wwwroot/main.js new file mode 100644 index 0000000..bf1555e --- /dev/null +++ b/LaborWork.Browser/wwwroot/main.js @@ -0,0 +1,13 @@ +import { dotnet } from './_framework/dotnet.js' + +const is_browser = typeof window != "undefined"; +if (!is_browser) throw new Error(`Expected to be running in a browser`); + +const dotnetRuntime = await dotnet + .withDiagnosticTracing(false) + .withApplicationArgumentsFromQuery() + .create(); + +const config = dotnetRuntime.getConfig(); + +await dotnetRuntime.runMain(config.mainAssemblyName, [globalThis.location.href]); diff --git a/LaborWork.sln b/LaborWork.sln new file mode 100644 index 0000000..7b5e79a --- /dev/null +++ b/LaborWork.sln @@ -0,0 +1,36 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.3.32811.315 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LaborWork", "LaborWork\LaborWork.csproj", "{EBFA8512-1EA5-4D8C-B4AC-AB5B48A6D568}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LaborWork.Browser", "LaborWork.Browser\LaborWork.Browser.csproj", "{1C1A049E-235C-4CD0-B6FA-D53AC418F4DA}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3DA99C4E-89E3-4049-9C22-0A7EC60D83D8}" + ProjectSection(SolutionItems) = preProject + Directory.Packages.props = Directory.Packages.props + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {EBFA8512-1EA5-4D8C-B4AC-AB5B48A6D568}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EBFA8512-1EA5-4D8C-B4AC-AB5B48A6D568}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EBFA8512-1EA5-4D8C-B4AC-AB5B48A6D568}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EBFA8512-1EA5-4D8C-B4AC-AB5B48A6D568}.Release|Any CPU.Build.0 = Release|Any CPU + {1C1A049E-235C-4CD0-B6FA-D53AC418F4DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1C1A049E-235C-4CD0-B6FA-D53AC418F4DA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1C1A049E-235C-4CD0-B6FA-D53AC418F4DA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1C1A049E-235C-4CD0-B6FA-D53AC418F4DA}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {83CB65B8-011F-4ED7-BCD3-A6CFA935EF7E} + EndGlobalSection +EndGlobal diff --git a/LaborWork.sln.DotSettings.user b/LaborWork.sln.DotSettings.user new file mode 100644 index 0000000..25bd25d --- /dev/null +++ b/LaborWork.sln.DotSettings.user @@ -0,0 +1,3 @@ + + ForceIncluded + ForceIncluded \ No newline at end of file diff --git a/LaborWork/App.axaml b/LaborWork/App.axaml new file mode 100644 index 0000000..8c95427 --- /dev/null +++ b/LaborWork/App.axaml @@ -0,0 +1,15 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/LaborWork/App.axaml.cs b/LaborWork/App.axaml.cs new file mode 100644 index 0000000..9c094b0 --- /dev/null +++ b/LaborWork/App.axaml.cs @@ -0,0 +1,54 @@ +using Avalonia; +using Avalonia.Controls.ApplicationLifetimes; +using Avalonia.Data.Core; +using Avalonia.Data.Core.Plugins; +using System.Linq; +using Avalonia.Markup.Xaml; +using LaborWork.ViewModels; +using LaborWork.Views; + +namespace LaborWork; + +public partial class App : Application +{ + public override void Initialize() + { + AvaloniaXamlLoader.Load(this); + } + + public override void OnFrameworkInitializationCompleted() + { + if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) + { + // Avoid duplicate validations from both Avalonia and the CommunityToolkit. + // More info: https://docs.avaloniaui.net/docs/guides/development-guides/data-validation#manage-validationplugins + DisableAvaloniaDataAnnotationValidation(); + desktop.MainWindow = new MainWindow + { + DataContext = new MainViewModel() + }; + } + else if (ApplicationLifetime is ISingleViewApplicationLifetime singleViewPlatform) + { + singleViewPlatform.MainView = new MainView + { + DataContext = new MainViewModel() + }; + } + + base.OnFrameworkInitializationCompleted(); + } + + private void DisableAvaloniaDataAnnotationValidation() + { + // Get an array of plugins to remove + var dataValidationPluginsToRemove = + BindingPlugins.DataValidators.OfType().ToArray(); + + // remove each entry found + foreach (var plugin in dataValidationPluginsToRemove) + { + BindingPlugins.DataValidators.Remove(plugin); + } + } +} \ No newline at end of file diff --git a/LaborWork/Assets/avalonia-logo.ico b/LaborWork/Assets/avalonia-logo.ico new file mode 100644 index 0000000..f7da8bb Binary files /dev/null and b/LaborWork/Assets/avalonia-logo.ico differ diff --git a/LaborWork/Converters.cs b/LaborWork/Converters.cs new file mode 100644 index 0000000..90512ef --- /dev/null +++ b/LaborWork/Converters.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using Avalonia.Data.Converters; + +namespace LaborWork; + +public class HeightConverter : IMultiValueConverter +{ + public static readonly HeightConverter Instance = new(); + + public object? Convert(IList values, Type targetType, object? parameter, CultureInfo culture) + { + if (values.Count >= 2 && values[0] is int value && values[1] is double windowHeight) + { + Console.WriteLine("YAY"); + // value - это число от 10 до 100 + // windowHeight - высота окна + // Делаем отступ снизу 50 пикселей + return (value / 100.0) * (windowHeight - 50); + } + Console.WriteLine($"NOO " + values[0].GetType().Name); + return 0; + } +} \ No newline at end of file diff --git a/LaborWork/LaborWork.csproj b/LaborWork/LaborWork.csproj new file mode 100644 index 0000000..c28f28f --- /dev/null +++ b/LaborWork/LaborWork.csproj @@ -0,0 +1,25 @@ + + + net10.0 + enable + latest + true + + + + + + + + + + + + + + None + All + + + + diff --git a/LaborWork/Models/ItemState.cs b/LaborWork/Models/ItemState.cs new file mode 100644 index 0000000..ae8b328 --- /dev/null +++ b/LaborWork/Models/ItemState.cs @@ -0,0 +1,10 @@ +namespace LaborWork.Models; + +public enum ItemState +{ + Default, // Обычный цвет + Pivot, // Опорный элемент (красный) + Compare, // Сравниваемые элементы (желтый) + Swap, // Элементы при обмене (оранжевый) + Sorted // Отсортированная часть (зеленый) +} \ No newline at end of file diff --git a/LaborWork/Models/SortItem.cs b/LaborWork/Models/SortItem.cs new file mode 100644 index 0000000..00c923e --- /dev/null +++ b/LaborWork/Models/SortItem.cs @@ -0,0 +1,48 @@ +using System; +using System.ComponentModel; +using System.Runtime.CompilerServices; +using Avalonia.Media; + +namespace LaborWork.Models; + + +public class SortItem : INotifyPropertyChanged +{ + private float _value; + private ItemState _state; + + public float Value + { + get => _value; + set { _value = value; OnPropertyChanged(); } + } + + public ItemState State + { + get => _state; + set { _state = value; OnPropertyChanged(); OnPropertyChanged(nameof(Color)); } + } + + // Вспомогательное свойство для привязки цвета в XAML + public IBrush Color + { + get + { + return State switch + { + ItemState.Pivot => Brushes.Red, + ItemState.Compare => Brushes.Yellow, + ItemState.Swap => Brushes.Orange, + ItemState.Sorted => Brushes.Green, + _ => Brushes.DodgerBlue + }; + } + } + + public event PropertyChangedEventHandler? PropertyChanged; + + protected virtual void OnPropertyChanged([CallerMemberName] string? propertyName = null) + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); + } +} \ No newline at end of file diff --git a/LaborWork/ViewLocator.cs b/LaborWork/ViewLocator.cs new file mode 100644 index 0000000..429398b --- /dev/null +++ b/LaborWork/ViewLocator.cs @@ -0,0 +1,37 @@ +using System; +using System.Diagnostics.CodeAnalysis; +using Avalonia.Controls; +using Avalonia.Controls.Templates; +using LaborWork.ViewModels; + +namespace LaborWork; + +/// +/// Given a view model, returns the corresponding view if possible. +/// +[RequiresUnreferencedCode( + "Default implementation of ViewLocator involves reflection which may be trimmed away.", + Url = "https://docs.avaloniaui.net/docs/concepts/view-locator")] +public class ViewLocator : IDataTemplate +{ + public Control? Build(object? param) + { + if (param is null) + return null; + + var name = param.GetType().FullName!.Replace("ViewModel", "View", StringComparison.Ordinal); + var type = Type.GetType(name); + + if (type != null) + { + return (Control)Activator.CreateInstance(type)!; + } + + return new TextBlock { Text = "Not Found: " + name }; + } + + public bool Match(object? data) + { + return data is ViewModelBase; + } +} \ No newline at end of file diff --git a/LaborWork/ViewModels/MainViewModel.cs b/LaborWork/ViewModels/MainViewModel.cs new file mode 100644 index 0000000..74d91ea --- /dev/null +++ b/LaborWork/ViewModels/MainViewModel.cs @@ -0,0 +1,109 @@ +using System; +using System.Collections.ObjectModel; +using System.Threading.Tasks; +using CommunityToolkit.Mvvm.ComponentModel; +using CommunityToolkit.Mvvm.Input; +using LaborWork.Models; + +namespace LaborWork.ViewModels; + +public partial class MainViewModel : ViewModelBase +{ + [ObservableProperty] private int _arraySize = 30; + + [ObservableProperty] private bool _isSorting; + + [ObservableProperty] private ObservableCollection _items = new(); + + [ObservableProperty] private int _speed = 50; + + [RelayCommand] + private void GenerateArray() + { + if (IsSorting) return; + + Items.Clear(); + var random = new Random(); + for (var i = 0; i < ArraySize; i++) + Items.Add(new SortItem { Value = (float)(50 + random.NextDouble() * 220), State = ItemState.Default }); + } + + [RelayCommand] + private async Task StartSort() + { + if (IsSorting || Items.Count == 0) return; + + IsSorting = true; + + foreach (var item in Items) item.State = ItemState.Default; + + await QuickSort(0, Items.Count - 1); + + foreach (var item in Items) item.State = IsSorting ? ItemState.Sorted : ItemState.Default; + + IsSorting = false; + } + + [RelayCommand] + private void StopSort() + { + IsSorting = false; + } + + private async Task QuickSort(int left, int right) + { + if (left >= right) return; + + var pivotIndex = left + (right - left) / 2; + var pivotValue = Items[pivotIndex].Value; + + Items[pivotIndex].State = ItemState.Pivot; + await Task.Delay(Speed); + + var i = left; + var j = right; + + while (i <= j) + { + while (Items[i].Value < pivotValue) + { + if(!IsSorting) return; + Items[i].State = ItemState.Compare; + await Task.Delay(Speed / 2); + Items[i].State = ItemState.Default; + i++; + } + + while (Items[j].Value > pivotValue) + { + if(!IsSorting) return; + Items[j].State = ItemState.Compare; + await Task.Delay(Speed / 2); + Items[j].State = ItemState.Default; + j--; + } + + if (i <= j) + { + // Обмен местами + Items[i].State = ItemState.Swap; + Items[j].State = ItemState.Swap; + + (Items[i].Value, Items[j].Value) = (Items[j].Value, Items[i].Value); + + await Task.Delay(Speed); + + Items[i].State = ItemState.Default; + Items[j].State = ItemState.Default; + + i++; + j--; + } + } + + Items[pivotIndex].State = ItemState.Default; + + await QuickSort(left, j); + await QuickSort(i, right); + } +} \ No newline at end of file diff --git a/LaborWork/ViewModels/ViewModelBase.cs b/LaborWork/ViewModels/ViewModelBase.cs new file mode 100644 index 0000000..261186f --- /dev/null +++ b/LaborWork/ViewModels/ViewModelBase.cs @@ -0,0 +1,7 @@ +using CommunityToolkit.Mvvm.ComponentModel; + +namespace LaborWork.ViewModels; + +public abstract class ViewModelBase : ObservableObject +{ +} \ No newline at end of file diff --git a/LaborWork/Views/MainView.axaml b/LaborWork/Views/MainView.axaml new file mode 100644 index 0000000..6c98782 --- /dev/null +++ b/LaborWork/Views/MainView.axaml @@ -0,0 +1,68 @@ + + + + +