commit 820d03f7259ffb0aee92fd231dc4e325152decfc Author: EugenIsay Date: Mon Dec 16 12:55:24 2024 +0300 init diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..410092a --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +belonging filter=lfs diff=lfs merge=lfs -text diff --git a/.vs/ProjectEvaluation/belonging.metadata.v7.bin b/.vs/ProjectEvaluation/belonging.metadata.v7.bin new file mode 100644 index 0000000..a694974 Binary files /dev/null and b/.vs/ProjectEvaluation/belonging.metadata.v7.bin differ diff --git a/.vs/ProjectEvaluation/belonging.projects.v7.bin b/.vs/ProjectEvaluation/belonging.projects.v7.bin new file mode 100644 index 0000000..7ba127f Binary files /dev/null and b/.vs/ProjectEvaluation/belonging.projects.v7.bin differ diff --git a/.vs/ProjectEvaluation/belonging.strings.v9.bin b/.vs/ProjectEvaluation/belonging.strings.v9.bin new file mode 100644 index 0000000..8a86db1 Binary files /dev/null and b/.vs/ProjectEvaluation/belonging.strings.v9.bin differ diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json new file mode 100644 index 0000000..23dccce --- /dev/null +++ b/.vs/VSWorkspaceState.json @@ -0,0 +1,7 @@ +{ + "ExpandedNodes": [ + "", + "\\Views" + ], + "PreviewInSolutionExplorer": false +} \ No newline at end of file diff --git a/.vs/belonging/DesignTimeBuild/.dtbcache.v2 b/.vs/belonging/DesignTimeBuild/.dtbcache.v2 new file mode 100644 index 0000000..e0fc04a Binary files /dev/null and b/.vs/belonging/DesignTimeBuild/.dtbcache.v2 differ diff --git a/.vs/belonging/FileContentIndex/012c33e4-c211-4c5c-85b3-588ecdb69a21.vsidx b/.vs/belonging/FileContentIndex/012c33e4-c211-4c5c-85b3-588ecdb69a21.vsidx new file mode 100644 index 0000000..70aef67 Binary files /dev/null and b/.vs/belonging/FileContentIndex/012c33e4-c211-4c5c-85b3-588ecdb69a21.vsidx differ diff --git a/.vs/belonging/FileContentIndex/80399fd0-e6bf-4cdc-bbde-bcfdaff54b6c.vsidx b/.vs/belonging/FileContentIndex/80399fd0-e6bf-4cdc-bbde-bcfdaff54b6c.vsidx new file mode 100644 index 0000000..70aef67 Binary files /dev/null and b/.vs/belonging/FileContentIndex/80399fd0-e6bf-4cdc-bbde-bcfdaff54b6c.vsidx differ diff --git a/.vs/belonging/FileContentIndex/8d253d83-bcb5-446c-8f8a-8274fdc444d5.vsidx b/.vs/belonging/FileContentIndex/8d253d83-bcb5-446c-8f8a-8274fdc444d5.vsidx new file mode 100644 index 0000000..70aef67 Binary files /dev/null and b/.vs/belonging/FileContentIndex/8d253d83-bcb5-446c-8f8a-8274fdc444d5.vsidx differ diff --git a/.vs/belonging/FileContentIndex/b9769ed4-11e0-4c55-970a-0620cd96dd47.vsidx b/.vs/belonging/FileContentIndex/b9769ed4-11e0-4c55-970a-0620cd96dd47.vsidx new file mode 100644 index 0000000..d7528da Binary files /dev/null and b/.vs/belonging/FileContentIndex/b9769ed4-11e0-4c55-970a-0620cd96dd47.vsidx differ diff --git a/.vs/belonging/FileContentIndex/d62604b0-3b16-46bb-8a48-377f3617e4e5.vsidx b/.vs/belonging/FileContentIndex/d62604b0-3b16-46bb-8a48-377f3617e4e5.vsidx new file mode 100644 index 0000000..70aef67 Binary files /dev/null and b/.vs/belonging/FileContentIndex/d62604b0-3b16-46bb-8a48-377f3617e4e5.vsidx differ diff --git a/.vs/belonging/v17/.futdcache.v2 b/.vs/belonging/v17/.futdcache.v2 new file mode 100644 index 0000000..f55119c Binary files /dev/null and b/.vs/belonging/v17/.futdcache.v2 differ diff --git a/.vs/belonging/v17/.suo b/.vs/belonging/v17/.suo new file mode 100644 index 0000000..6630a3f Binary files /dev/null and b/.vs/belonging/v17/.suo differ diff --git a/.vs/belonging/v17/.wsuo b/.vs/belonging/v17/.wsuo new file mode 100644 index 0000000..f9d420c Binary files /dev/null and b/.vs/belonging/v17/.wsuo differ diff --git a/.vs/belonging/v17/DocumentLayout.backup.json b/.vs/belonging/v17/DocumentLayout.backup.json new file mode 100644 index 0000000..96d3d18 --- /dev/null +++ b/.vs/belonging/v17/DocumentLayout.backup.json @@ -0,0 +1,118 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\\u041C\u0443\u0440\u0430\u0442\\source\\repos\\belonging\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{4BE901C1-B0C9-4BF1-802D-E239FFB3A7AE}|belonging.csproj|c:\\users\\\u043C\u0443\u0440\u0430\u0442\\source\\repos\\belonging\\views\\mainwindow.axaml||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|", + "RelativeMoniker": "D:0:0:{4BE901C1-B0C9-4BF1-802D-E239FFB3A7AE}|belonging.csproj|solutionrelative:views\\mainwindow.axaml||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|" + }, + { + "AbsoluteMoniker": "D:0:0:{4BE901C1-B0C9-4BF1-802D-E239FFB3A7AE}|belonging.csproj|c:\\users\\\u043C\u0443\u0440\u0430\u0442\\source\\repos\\belonging\\models\\shapemanager.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{4BE901C1-B0C9-4BF1-802D-E239FFB3A7AE}|belonging.csproj|solutionrelative:models\\shapemanager.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{4BE901C1-B0C9-4BF1-802D-E239FFB3A7AE}|belonging.csproj|c:\\users\\\u043C\u0443\u0440\u0430\u0442\\source\\repos\\belonging\\views\\mainwindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{4BE901C1-B0C9-4BF1-802D-E239FFB3A7AE}|belonging.csproj|solutionrelative:views\\mainwindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{4BE901C1-B0C9-4BF1-802D-E239FFB3A7AE}|belonging.csproj|c:\\users\\\u043C\u0443\u0440\u0430\u0442\\source\\repos\\belonging\\views\\mainwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}", + "RelativeMoniker": "D:0:0:{4BE901C1-B0C9-4BF1-802D-E239FFB3A7AE}|belonging.csproj|solutionrelative:views\\mainwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}" + }, + { + "AbsoluteMoniker": "D:0:0:{4BE901C1-B0C9-4BF1-802D-E239FFB3A7AE}|belonging.csproj|c:\\users\\\u043C\u0443\u0440\u0430\u0442\\source\\repos\\belonging\\app.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{4BE901C1-B0C9-4BF1-802D-E239FFB3A7AE}|belonging.csproj|solutionrelative:app.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{4BE901C1-B0C9-4BF1-802D-E239FFB3A7AE}|belonging.csproj|c:\\users\\\u043C\u0443\u0440\u0430\u0442\\source\\repos\\belonging\\app.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}", + "RelativeMoniker": "D:0:0:{4BE901C1-B0C9-4BF1-802D-E239FFB3A7AE}|belonging.csproj|solutionrelative:app.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 3, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 4, + "Title": "App.axaml.cs", + "DocumentMoniker": "C:\\Users\\\u041C\u0443\u0440\u0430\u0442\\source\\repos\\belonging\\App.axaml.cs", + "RelativeDocumentMoniker": "App.axaml.cs", + "ToolTip": "C:\\Users\\\u041C\u0443\u0440\u0430\u0442\\source\\repos\\belonging\\App.axaml.cs", + "RelativeToolTip": "App.axaml.cs", + "ViewState": "AgIAAAUAAAAAAAAAAAAowBsAAAABAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-12-11T08:10:26.257Z" + }, + { + "$type": "Document", + "DocumentIndex": 5, + "Title": "App.axaml", + "DocumentMoniker": "C:\\Users\\\u041C\u0443\u0440\u0430\u0442\\source\\repos\\belonging\\App.axaml", + "RelativeDocumentMoniker": "App.axaml", + "ToolTip": "C:\\Users\\\u041C\u0443\u0440\u0430\u0442\\source\\repos\\belonging\\App.axaml", + "RelativeToolTip": "App.axaml", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|", + "WhenOpened": "2024-12-09T18:58:15.208Z" + }, + { + "$type": "Document", + "DocumentIndex": 3, + "Title": "MainWindow.axaml", + "DocumentMoniker": "C:\\Users\\\u041C\u0443\u0440\u0430\u0442\\source\\repos\\belonging\\Views\\MainWindow.axaml", + "RelativeDocumentMoniker": "Views\\MainWindow.axaml", + "ToolTip": "C:\\Users\\\u041C\u0443\u0440\u0430\u0442\\source\\repos\\belonging\\Views\\MainWindow.axaml", + "RelativeToolTip": "Views\\MainWindow.axaml", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|", + "WhenOpened": "2024-12-09T18:48:16.088Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "MainWindow.axaml", + "DocumentMoniker": "C:\\Users\\\u041C\u0443\u0440\u0430\u0442\\source\\repos\\belonging\\Views\\MainWindow.axaml", + "RelativeDocumentMoniker": "Views\\MainWindow.axaml", + "ToolTip": "C:\\Users\\\u041C\u0443\u0440\u0430\u0442\\source\\repos\\belonging\\Views\\MainWindow.axaml", + "RelativeToolTip": "Views\\MainWindow.axaml", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAQAAAAYAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|", + "WhenOpened": "2024-12-09T11:29:37.756Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 2, + "Title": "MainWindow.axaml.cs", + "DocumentMoniker": "C:\\Users\\\u041C\u0443\u0440\u0430\u0442\\source\\repos\\belonging\\Views\\MainWindow.axaml.cs", + "RelativeDocumentMoniker": "Views\\MainWindow.axaml.cs", + "ToolTip": "C:\\Users\\\u041C\u0443\u0440\u0430\u0442\\source\\repos\\belonging\\Views\\MainWindow.axaml.cs", + "RelativeToolTip": "Views\\MainWindow.axaml.cs", + "ViewState": "AgIAAAYAAAAAAAAAAAAAABUAAAAFAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-12-09T11:29:04.749Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "ShapeManager.cs", + "DocumentMoniker": "C:\\Users\\\u041C\u0443\u0440\u0430\u0442\\source\\repos\\belonging\\Models\\ShapeManager.cs", + "RelativeDocumentMoniker": "Models\\ShapeManager.cs", + "ToolTip": "C:\\Users\\\u041C\u0443\u0440\u0430\u0442\\source\\repos\\belonging\\Models\\ShapeManager.cs", + "RelativeToolTip": "Models\\ShapeManager.cs", + "ViewState": "AgIAAHMAAAAAAAAAAAAwwIwAAAABAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-12-09T11:26:41.225Z", + "EditorCaption": "" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/.vs/belonging/v17/DocumentLayout.json b/.vs/belonging/v17/DocumentLayout.json new file mode 100644 index 0000000..67b3c35 --- /dev/null +++ b/.vs/belonging/v17/DocumentLayout.json @@ -0,0 +1,191 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\Class_Student\\Desktop\\belonging\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{4BE901C1-B0C9-4BF1-802D-E239FFB3A7AE}|belonging.csproj|c:\\users\\class_student\\desktop\\belonging\\views\\mainwindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{4BE901C1-B0C9-4BF1-802D-E239FFB3A7AE}|belonging.csproj|solutionrelative:views\\mainwindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{4BE901C1-B0C9-4BF1-802D-E239FFB3A7AE}|belonging.csproj|c:\\users\\class_student\\desktop\\belonging\\models\\shapemanager.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{4BE901C1-B0C9-4BF1-802D-E239FFB3A7AE}|belonging.csproj|solutionrelative:models\\shapemanager.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{4BE901C1-B0C9-4BF1-802D-E239FFB3A7AE}|belonging.csproj|c:\\users\\class_student\\desktop\\belonging\\viewmodels\\viewmodelbase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{4BE901C1-B0C9-4BF1-802D-E239FFB3A7AE}|belonging.csproj|solutionrelative:viewmodels\\viewmodelbase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{4BE901C1-B0C9-4BF1-802D-E239FFB3A7AE}|belonging.csproj|c:\\users\\class_student\\desktop\\belonging\\viewmodels\\mainwindowviewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{4BE901C1-B0C9-4BF1-802D-E239FFB3A7AE}|belonging.csproj|solutionrelative:viewmodels\\mainwindowviewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{4BE901C1-B0C9-4BF1-802D-E239FFB3A7AE}|belonging.csproj|c:\\users\\class_student\\desktop\\belonging\\views\\mainwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}", + "RelativeMoniker": "D:0:0:{4BE901C1-B0C9-4BF1-802D-E239FFB3A7AE}|belonging.csproj|solutionrelative:views\\mainwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}" + }, + { + "AbsoluteMoniker": "D:0:0:{4BE901C1-B0C9-4BF1-802D-E239FFB3A7AE}|belonging.csproj|c:\\users\\class_student\\desktop\\belonging\\viewlocator.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{4BE901C1-B0C9-4BF1-802D-E239FFB3A7AE}|belonging.csproj|solutionrelative:viewlocator.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{4BE901C1-B0C9-4BF1-802D-E239FFB3A7AE}|belonging.csproj|c:\\users\\class_student\\desktop\\belonging\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{4BE901C1-B0C9-4BF1-802D-E239FFB3A7AE}|belonging.csproj|solutionrelative:program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{4BE901C1-B0C9-4BF1-802D-E239FFB3A7AE}|belonging.csproj|c:\\users\\class_student\\desktop\\belonging\\app.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{4BE901C1-B0C9-4BF1-802D-E239FFB3A7AE}|belonging.csproj|solutionrelative:app.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{4BE901C1-B0C9-4BF1-802D-E239FFB3A7AE}|belonging.csproj|c:\\users\\class_student\\desktop\\belonging\\views\\mainwindow.axaml||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|", + "RelativeMoniker": "D:0:0:{4BE901C1-B0C9-4BF1-802D-E239FFB3A7AE}|belonging.csproj|solutionrelative:views\\mainwindow.axaml||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|" + }, + { + "AbsoluteMoniker": "D:0:0:{4BE901C1-B0C9-4BF1-802D-E239FFB3A7AE}|belonging.csproj|c:\\users\\class_student\\desktop\\belonging\\app.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}", + "RelativeMoniker": "D:0:0:{4BE901C1-B0C9-4BF1-802D-E239FFB3A7AE}|belonging.csproj|solutionrelative:app.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 9, + "Children": [ + { + "$type": "Bookmark", + "Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}" + }, + { + "$type": "Document", + "DocumentIndex": 5, + "Title": "ViewLocator.cs", + "DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\belonging\\ViewLocator.cs", + "RelativeDocumentMoniker": "ViewLocator.cs", + "ToolTip": "C:\\Users\\Class_Student\\Desktop\\belonging\\ViewLocator.cs", + "RelativeToolTip": "ViewLocator.cs", + "ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-12-16T08:47:12.85Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 6, + "Title": "Program.cs", + "DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\belonging\\Program.cs", + "RelativeDocumentMoniker": "Program.cs", + "ToolTip": "C:\\Users\\Class_Student\\Desktop\\belonging\\Program.cs", + "RelativeToolTip": "Program.cs", + "ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-12-16T08:47:10.527Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 2, + "Title": "ViewModelBase.cs", + "DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\belonging\\ViewModels\\ViewModelBase.cs", + "RelativeDocumentMoniker": "ViewModels\\ViewModelBase.cs", + "ToolTip": "C:\\Users\\Class_Student\\Desktop\\belonging\\ViewModels\\ViewModelBase.cs", + "RelativeToolTip": "ViewModels\\ViewModelBase.cs", + "ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-12-16T08:46:16.973Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 3, + "Title": "MainWindowViewModel.cs", + "DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\belonging\\ViewModels\\MainWindowViewModel.cs", + "RelativeDocumentMoniker": "ViewModels\\MainWindowViewModel.cs", + "ToolTip": "C:\\Users\\Class_Student\\Desktop\\belonging\\ViewModels\\MainWindowViewModel.cs", + "RelativeToolTip": "ViewModels\\MainWindowViewModel.cs", + "ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-12-16T08:46:15.032Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 7, + "Title": "App.axaml.cs", + "DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\belonging\\App.axaml.cs", + "RelativeDocumentMoniker": "App.axaml.cs", + "ToolTip": "C:\\Users\\Class_Student\\Desktop\\belonging\\App.axaml.cs", + "RelativeToolTip": "App.axaml.cs", + "ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-12-11T08:10:26.257Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 9, + "Title": "App.axaml", + "DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\belonging\\App.axaml", + "RelativeDocumentMoniker": "App.axaml", + "ToolTip": "C:\\Users\\Class_Student\\Desktop\\belonging\\App.axaml", + "RelativeToolTip": "App.axaml", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|", + "WhenOpened": "2024-12-09T18:58:15.208Z" + }, + { + "$type": "Document", + "DocumentIndex": 4, + "Title": "MainWindow.axaml", + "DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\belonging\\Views\\MainWindow.axaml", + "RelativeDocumentMoniker": "Views\\MainWindow.axaml", + "ToolTip": "C:\\Users\\Class_Student\\Desktop\\belonging\\Views\\MainWindow.axaml", + "RelativeToolTip": "Views\\MainWindow.axaml", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|", + "WhenOpened": "2024-12-09T18:48:16.088Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 8, + "Title": "MainWindow.axaml", + "DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\belonging\\Views\\MainWindow.axaml", + "RelativeDocumentMoniker": "Views\\MainWindow.axaml", + "ToolTip": "C:\\Users\\Class_Student\\Desktop\\belonging\\Views\\MainWindow.axaml", + "RelativeToolTip": "Views\\MainWindow.axaml", + "ViewState": "AQIAAAAAAAAAAAAAAAAAAAkAAAACAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|", + "WhenOpened": "2024-12-09T11:29:37.756Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "MainWindow.axaml.cs", + "DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\belonging\\Views\\MainWindow.axaml.cs", + "RelativeDocumentMoniker": "Views\\MainWindow.axaml.cs", + "ToolTip": "C:\\Users\\Class_Student\\Desktop\\belonging\\Views\\MainWindow.axaml.cs", + "RelativeToolTip": "Views\\MainWindow.axaml.cs", + "ViewState": "AQIAAAMAAAAAAAAAAAAAAG4AAAAjAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-12-09T11:29:04.749Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "ShapeManager.cs", + "DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\belonging\\Models\\ShapeManager.cs", + "RelativeDocumentMoniker": "Models\\ShapeManager.cs", + "ToolTip": "C:\\Users\\Class_Student\\Desktop\\belonging\\Models\\ShapeManager.cs", + "RelativeToolTip": "Models\\ShapeManager.cs", + "ViewState": "AQIAAAMAAAAAAAAAAAAAACQAAAAlAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-12-09T11:26:41.225Z", + "EditorCaption": "" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite new file mode 100644 index 0000000..dc3f142 Binary files /dev/null and b/.vs/slnx.sqlite differ diff --git a/App.axaml b/App.axaml new file mode 100644 index 0000000..0923714 --- /dev/null +++ b/App.axaml @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/App.axaml.cs b/App.axaml.cs new file mode 100644 index 0000000..8ef4b04 --- /dev/null +++ b/App.axaml.cs @@ -0,0 +1,28 @@ +using Avalonia; +using Avalonia.Controls.ApplicationLifetimes; +using Avalonia.Markup.Xaml; +using belonging.ViewModels; +using belonging.Views; + +namespace belonging; + +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 + { + DataContext = new MainWindowViewModel(), + }; + } + + base.OnFrameworkInitializationCompleted(); + } +} \ No newline at end of file diff --git a/Assets/avalonia-logo.ico b/Assets/avalonia-logo.ico new file mode 100644 index 0000000..da8d49f Binary files /dev/null and b/Assets/avalonia-logo.ico differ diff --git a/Models/ShapeManager.cs b/Models/ShapeManager.cs new file mode 100644 index 0000000..f1cbbb7 --- /dev/null +++ b/Models/ShapeManager.cs @@ -0,0 +1,141 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Controls.Shapes; +using Avalonia.Input; +using Avalonia.Media; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace belonging.Models +{ + public class ShapeManager + { + private readonly Canvas _canvas; + private readonly List _shapes = new List(); + private Shape? _draggedShape; + private Point _dragStart; + private TextBlock? _messageTextBlock; // Ссылка на текущее сообщение + + // Статический объект Random для генерации случайных чисел + private static readonly Random _random = new Random(); + + public ShapeManager(Canvas canvas) + { + _canvas = canvas; + } + + public void AddShape(Shape shape) + { + _shapes.Add(shape); + _canvas.Children.Add(shape); + } + + public void ClearShapes() + { + _shapes.Clear(); + _canvas.Children.Clear(); + } + + public void OnPointerPressed(object? sender, PointerPressedEventArgs e) + { + var point = e.GetPosition(_canvas); + _draggedShape = null; + + foreach (var shape in _shapes) + { + if (shape.Bounds.Contains(point)) + { + _draggedShape = shape; + _dragStart = point; + break; + } + } + + if (_draggedShape == null) + { + ShowMessage("Не попал"); + } + else + { + // Определяем тип фигуры и показываем соответствующее сообщение + string shapeName = _draggedShape is Rectangle ? "квадрат" : + _draggedShape is Polygon polygon ? (polygon.Points.Count == 5 ? "пятиугольник" : "шестиугольник") : + "фигуру"; + + ShowMessage($"Ты попал в {shapeName}!!!"); + } + } + + public void OnPointerMoved(object? sender, PointerEventArgs e) + { + if (_draggedShape != null) + { + var currentPoint = e.GetPosition(_canvas); + var delta = currentPoint - _dragStart; + + var newLeft = Canvas.GetLeft(_draggedShape) + delta.X; + var newTop = Canvas.GetTop(_draggedShape) + delta.Y; + + // Проверка границ + if (newLeft < 0) newLeft = 0; + if (newTop < 0) newTop = 0; + if (newLeft + _draggedShape.Bounds.Width > _canvas.Bounds.Width) newLeft = _canvas.Bounds.Width - _draggedShape.Bounds.Width; + if (newTop + _draggedShape.Bounds.Height > _canvas.Bounds.Height) newTop = _canvas.Bounds.Height - _draggedShape.Bounds.Height; + + Canvas.SetLeft(_draggedShape, newLeft); + Canvas.SetTop(_draggedShape, newTop); + + _dragStart = currentPoint; + } + } + + public void OnPointerReleased(object? sender, PointerReleasedEventArgs e) + { + _draggedShape = null; + } + + private async void ShowMessage(string message) + { + // Удаляем старое сообщение, если оно есть + if (_messageTextBlock != null) + { + _canvas.Children.Remove(_messageTextBlock); + _messageTextBlock = null; + } + + // Создаем новое сообщение + _messageTextBlock = new TextBlock + { + Text = message, + FontSize = 40, + Foreground = Brushes.Black, + HorizontalAlignment = Avalonia.Layout.HorizontalAlignment.Center, + VerticalAlignment = Avalonia.Layout.VerticalAlignment.Top, + TextAlignment = Avalonia.Media.TextAlignment.Center, + Margin = new Thickness(0, 30, 0, 0) // Отступ сверху + }; + + // Фиксированная позиция по центру сверху + Canvas.SetLeft(_messageTextBlock, (_canvas.Bounds.Width - _messageTextBlock.Bounds.Width) / 2); + Canvas.SetTop(_messageTextBlock, 0); + + _canvas.Children.Add(_messageTextBlock); + + // Удаляем сообщение через 2 секунды + await Task.Delay(3000); + if (_messageTextBlock != null) + { + _canvas.Children.Remove(_messageTextBlock); + _messageTextBlock = null; + } + } + + public Point GenerateRandomPosition(Shape shape) + { + double x = _random.NextDouble() * (_canvas.Bounds.Width - shape.Bounds.Width); + double y = _random.NextDouble() * (_canvas.Bounds.Height - shape.Bounds.Height); + return new Point(x, y); + } + } +} \ No newline at end of file diff --git a/Program.cs b/Program.cs new file mode 100644 index 0000000..ef82645 --- /dev/null +++ b/Program.cs @@ -0,0 +1,17 @@ +using Avalonia; +using System; + +namespace belonging; + +sealed class Program +{ + [STAThread] + public static void Main(string[] args) => BuildAvaloniaApp() + .StartWithClassicDesktopLifetime(args); + + public static AppBuilder BuildAvaloniaApp() + => AppBuilder.Configure() + .UsePlatformDetect() + .WithInterFont() + .LogToTrace(); +} \ No newline at end of file diff --git a/ViewLocator.cs b/ViewLocator.cs new file mode 100644 index 0000000..f807c17 --- /dev/null +++ b/ViewLocator.cs @@ -0,0 +1,30 @@ +using System; +using Avalonia.Controls; +using Avalonia.Controls.Templates; +using belonging.ViewModels; + +namespace belonging; + +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/ViewModels/MainWindowViewModel.cs b/ViewModels/MainWindowViewModel.cs new file mode 100644 index 0000000..857d71f --- /dev/null +++ b/ViewModels/MainWindowViewModel.cs @@ -0,0 +1,13 @@ +// namespace belonging.ViewModels; + +// public partial class MainWindowViewModel : ViewModelBase +// { +// public string Greeting { get; } = "Welcome to Avalonia!"; +// } + +namespace belonging.ViewModels; + +public partial class MainWindowViewModel : ViewModelBase +{ + public string Greeting { get; } = "Welcome to Avalonia!"; +} \ No newline at end of file diff --git a/ViewModels/ViewModelBase.cs b/ViewModels/ViewModelBase.cs new file mode 100644 index 0000000..0a955ef --- /dev/null +++ b/ViewModels/ViewModelBase.cs @@ -0,0 +1,7 @@ +using CommunityToolkit.Mvvm.ComponentModel; + +namespace belonging.ViewModels; + +public class ViewModelBase : ObservableObject +{ +} diff --git a/Views/MainWindow.axaml b/Views/MainWindow.axaml new file mode 100644 index 0000000..814e1be --- /dev/null +++ b/Views/MainWindow.axaml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + +