diff --git a/.vs/Blazor/v17/workspaceFileList.bin b/.vs/Blazor/v17/workspaceFileList.bin index d0f5411..d862c79 100644 Binary files a/.vs/Blazor/v17/workspaceFileList.bin and b/.vs/Blazor/v17/workspaceFileList.bin differ diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json index e295364..958e5d1 100644 --- a/.vs/VSWorkspaceState.json +++ b/.vs/VSWorkspaceState.json @@ -2,7 +2,6 @@ "ExpandedNodes": [ "", "\\Code", - "\\Code\\ProjetBlazor", "\\Code\\ProjetBlazor\\Properties" ], "SelectedNode": "\\Code\\BlazorApp.sln", diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite index 5cfb7f8..8abd146 100644 Binary files a/.vs/slnx.sqlite and b/.vs/slnx.sqlite differ diff --git a/Code/.vs/BlazorApp/DesignTimeBuild/.dtbcache.v2 b/Code/.vs/BlazorApp/DesignTimeBuild/.dtbcache.v2 index b2aea91..34e6475 100644 Binary files a/Code/.vs/BlazorApp/DesignTimeBuild/.dtbcache.v2 and b/Code/.vs/BlazorApp/DesignTimeBuild/.dtbcache.v2 differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/051f460e-6e82-44ba-91dd-2a8009e16ed5.vsidx b/Code/.vs/BlazorApp/FileContentIndex/051f460e-6e82-44ba-91dd-2a8009e16ed5.vsidx deleted file mode 100644 index f1235cd..0000000 Binary files a/Code/.vs/BlazorApp/FileContentIndex/051f460e-6e82-44ba-91dd-2a8009e16ed5.vsidx and /dev/null differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/095a9e88-0040-47b8-a23e-6c7fe03a87e7.vsidx b/Code/.vs/BlazorApp/FileContentIndex/095a9e88-0040-47b8-a23e-6c7fe03a87e7.vsidx deleted file mode 100644 index f87032b..0000000 Binary files a/Code/.vs/BlazorApp/FileContentIndex/095a9e88-0040-47b8-a23e-6c7fe03a87e7.vsidx and /dev/null differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/0a792d01-ff4b-403f-9b30-44d6a1b0f78e.vsidx b/Code/.vs/BlazorApp/FileContentIndex/0a792d01-ff4b-403f-9b30-44d6a1b0f78e.vsidx new file mode 100644 index 0000000..85b8c4f Binary files /dev/null and b/Code/.vs/BlazorApp/FileContentIndex/0a792d01-ff4b-403f-9b30-44d6a1b0f78e.vsidx differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/0f5ddbee-3089-448a-8a96-39e8c9bf8905.vsidx b/Code/.vs/BlazorApp/FileContentIndex/0f5ddbee-3089-448a-8a96-39e8c9bf8905.vsidx new file mode 100644 index 0000000..6e06743 Binary files /dev/null and b/Code/.vs/BlazorApp/FileContentIndex/0f5ddbee-3089-448a-8a96-39e8c9bf8905.vsidx differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/527ac2e8-f4c9-4890-a608-cd14c22cad46.vsidx b/Code/.vs/BlazorApp/FileContentIndex/18ad67e1-dd84-4504-816a-26d064708090.vsidx similarity index 51% rename from Code/.vs/BlazorApp/FileContentIndex/527ac2e8-f4c9-4890-a608-cd14c22cad46.vsidx rename to Code/.vs/BlazorApp/FileContentIndex/18ad67e1-dd84-4504-816a-26d064708090.vsidx index 780ad18..a369a13 100644 Binary files a/Code/.vs/BlazorApp/FileContentIndex/527ac2e8-f4c9-4890-a608-cd14c22cad46.vsidx and b/Code/.vs/BlazorApp/FileContentIndex/18ad67e1-dd84-4504-816a-26d064708090.vsidx differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/1939dbc8-6a25-4322-9719-d4d735c72f98.vsidx b/Code/.vs/BlazorApp/FileContentIndex/1939dbc8-6a25-4322-9719-d4d735c72f98.vsidx new file mode 100644 index 0000000..9c4f45d Binary files /dev/null and b/Code/.vs/BlazorApp/FileContentIndex/1939dbc8-6a25-4322-9719-d4d735c72f98.vsidx differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/1ac9dad2-20c4-40c7-9da1-fdf1d85915d1.vsidx b/Code/.vs/BlazorApp/FileContentIndex/1ac9dad2-20c4-40c7-9da1-fdf1d85915d1.vsidx new file mode 100644 index 0000000..83e0c42 Binary files /dev/null and b/Code/.vs/BlazorApp/FileContentIndex/1ac9dad2-20c4-40c7-9da1-fdf1d85915d1.vsidx differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/233a86ed-7de4-497c-948f-db6e8f4e998e.vsidx b/Code/.vs/BlazorApp/FileContentIndex/233a86ed-7de4-497c-948f-db6e8f4e998e.vsidx deleted file mode 100644 index c17b201..0000000 Binary files a/Code/.vs/BlazorApp/FileContentIndex/233a86ed-7de4-497c-948f-db6e8f4e998e.vsidx and /dev/null differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/249e4bc5-295f-4c5d-9271-96c4a76de34c.vsidx b/Code/.vs/BlazorApp/FileContentIndex/249e4bc5-295f-4c5d-9271-96c4a76de34c.vsidx new file mode 100644 index 0000000..0b7faab Binary files /dev/null and b/Code/.vs/BlazorApp/FileContentIndex/249e4bc5-295f-4c5d-9271-96c4a76de34c.vsidx differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/cc77efaf-6490-4c7c-92d1-1ef47042fc21.vsidx b/Code/.vs/BlazorApp/FileContentIndex/2b27b05a-52d2-4194-a2fc-b7fb3805ca3a.vsidx similarity index 62% rename from Code/.vs/BlazorApp/FileContentIndex/cc77efaf-6490-4c7c-92d1-1ef47042fc21.vsidx rename to Code/.vs/BlazorApp/FileContentIndex/2b27b05a-52d2-4194-a2fc-b7fb3805ca3a.vsidx index 854e60b..bb2eb00 100644 Binary files a/Code/.vs/BlazorApp/FileContentIndex/cc77efaf-6490-4c7c-92d1-1ef47042fc21.vsidx and b/Code/.vs/BlazorApp/FileContentIndex/2b27b05a-52d2-4194-a2fc-b7fb3805ca3a.vsidx differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/2d992ede-94cf-435b-846e-1dc884093e28.vsidx b/Code/.vs/BlazorApp/FileContentIndex/2d992ede-94cf-435b-846e-1dc884093e28.vsidx new file mode 100644 index 0000000..ca71951 Binary files /dev/null and b/Code/.vs/BlazorApp/FileContentIndex/2d992ede-94cf-435b-846e-1dc884093e28.vsidx differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/2f564917-51ed-4312-84c0-4e3cb9ea872b.vsidx b/Code/.vs/BlazorApp/FileContentIndex/2f564917-51ed-4312-84c0-4e3cb9ea872b.vsidx new file mode 100644 index 0000000..373d1db Binary files /dev/null and b/Code/.vs/BlazorApp/FileContentIndex/2f564917-51ed-4312-84c0-4e3cb9ea872b.vsidx differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/302e7e32-179f-4a01-9c91-9a199b0e405a.vsidx b/Code/.vs/BlazorApp/FileContentIndex/302e7e32-179f-4a01-9c91-9a199b0e405a.vsidx deleted file mode 100644 index 2b20a08..0000000 Binary files a/Code/.vs/BlazorApp/FileContentIndex/302e7e32-179f-4a01-9c91-9a199b0e405a.vsidx and /dev/null differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/3606de9f-dd67-4f30-9d00-66f72ea61e44.vsidx b/Code/.vs/BlazorApp/FileContentIndex/3606de9f-dd67-4f30-9d00-66f72ea61e44.vsidx deleted file mode 100644 index 82d010d..0000000 Binary files a/Code/.vs/BlazorApp/FileContentIndex/3606de9f-dd67-4f30-9d00-66f72ea61e44.vsidx and /dev/null differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/399098f0-8536-42ab-a7a4-f1f3a056dc69.vsidx b/Code/.vs/BlazorApp/FileContentIndex/399098f0-8536-42ab-a7a4-f1f3a056dc69.vsidx deleted file mode 100644 index d6cf7a5..0000000 Binary files a/Code/.vs/BlazorApp/FileContentIndex/399098f0-8536-42ab-a7a4-f1f3a056dc69.vsidx and /dev/null differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/39a91296-80e4-4fc2-a58a-a5b7c837d3c7.vsidx b/Code/.vs/BlazorApp/FileContentIndex/39a91296-80e4-4fc2-a58a-a5b7c837d3c7.vsidx deleted file mode 100644 index f79ddf0..0000000 Binary files a/Code/.vs/BlazorApp/FileContentIndex/39a91296-80e4-4fc2-a58a-a5b7c837d3c7.vsidx and /dev/null differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/3f3b083e-128a-4cc9-8f02-e830c29876c5.vsidx b/Code/.vs/BlazorApp/FileContentIndex/3f3b083e-128a-4cc9-8f02-e830c29876c5.vsidx deleted file mode 100644 index a89d637..0000000 Binary files a/Code/.vs/BlazorApp/FileContentIndex/3f3b083e-128a-4cc9-8f02-e830c29876c5.vsidx and /dev/null differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/4147ce52-fc40-4ba8-a67b-a33799ca089f.vsidx b/Code/.vs/BlazorApp/FileContentIndex/4147ce52-fc40-4ba8-a67b-a33799ca089f.vsidx new file mode 100644 index 0000000..3293614 Binary files /dev/null and b/Code/.vs/BlazorApp/FileContentIndex/4147ce52-fc40-4ba8-a67b-a33799ca089f.vsidx differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/438e662a-5490-48f9-aab9-a13c8373a2e9.vsidx b/Code/.vs/BlazorApp/FileContentIndex/438e662a-5490-48f9-aab9-a13c8373a2e9.vsidx deleted file mode 100644 index 77e421d..0000000 Binary files a/Code/.vs/BlazorApp/FileContentIndex/438e662a-5490-48f9-aab9-a13c8373a2e9.vsidx and /dev/null differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/53b6ab42-afe8-4fce-a0d9-e9dc13befcb8.vsidx b/Code/.vs/BlazorApp/FileContentIndex/53b6ab42-afe8-4fce-a0d9-e9dc13befcb8.vsidx deleted file mode 100644 index cb7c108..0000000 Binary files a/Code/.vs/BlazorApp/FileContentIndex/53b6ab42-afe8-4fce-a0d9-e9dc13befcb8.vsidx and /dev/null differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/55fb1293-0991-467b-aa59-3a529d4e0557.vsidx b/Code/.vs/BlazorApp/FileContentIndex/55fb1293-0991-467b-aa59-3a529d4e0557.vsidx deleted file mode 100644 index ce43842..0000000 Binary files a/Code/.vs/BlazorApp/FileContentIndex/55fb1293-0991-467b-aa59-3a529d4e0557.vsidx and /dev/null differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/5a5016e4-a65b-4ecd-ab4b-9820f98cb73f.vsidx b/Code/.vs/BlazorApp/FileContentIndex/5a5016e4-a65b-4ecd-ab4b-9820f98cb73f.vsidx deleted file mode 100644 index 71002b1..0000000 Binary files a/Code/.vs/BlazorApp/FileContentIndex/5a5016e4-a65b-4ecd-ab4b-9820f98cb73f.vsidx and /dev/null differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/680b0fac-9b05-461c-90e8-4aa88f05747a.vsidx b/Code/.vs/BlazorApp/FileContentIndex/680b0fac-9b05-461c-90e8-4aa88f05747a.vsidx deleted file mode 100644 index 49056f6..0000000 Binary files a/Code/.vs/BlazorApp/FileContentIndex/680b0fac-9b05-461c-90e8-4aa88f05747a.vsidx and /dev/null differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/692517b2-e26f-4000-bae2-e4f6dc965c1c.vsidx b/Code/.vs/BlazorApp/FileContentIndex/692517b2-e26f-4000-bae2-e4f6dc965c1c.vsidx deleted file mode 100644 index 3746a0d..0000000 Binary files a/Code/.vs/BlazorApp/FileContentIndex/692517b2-e26f-4000-bae2-e4f6dc965c1c.vsidx and /dev/null differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/7a8f01df-a9b6-4f98-adb4-008fdaf615bb.vsidx b/Code/.vs/BlazorApp/FileContentIndex/7a8f01df-a9b6-4f98-adb4-008fdaf615bb.vsidx new file mode 100644 index 0000000..50d04cb Binary files /dev/null and b/Code/.vs/BlazorApp/FileContentIndex/7a8f01df-a9b6-4f98-adb4-008fdaf615bb.vsidx differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/7ca26a5d-6434-4f3a-adb9-ccc159e2190e.vsidx b/Code/.vs/BlazorApp/FileContentIndex/7ca26a5d-6434-4f3a-adb9-ccc159e2190e.vsidx deleted file mode 100644 index d7cb7a3..0000000 Binary files a/Code/.vs/BlazorApp/FileContentIndex/7ca26a5d-6434-4f3a-adb9-ccc159e2190e.vsidx and /dev/null differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/7cbfedfd-b5df-480f-9635-9d88fe57fc94.vsidx b/Code/.vs/BlazorApp/FileContentIndex/7cbfedfd-b5df-480f-9635-9d88fe57fc94.vsidx new file mode 100644 index 0000000..bf97e93 Binary files /dev/null and b/Code/.vs/BlazorApp/FileContentIndex/7cbfedfd-b5df-480f-9635-9d88fe57fc94.vsidx differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/7d473ec2-8050-4a8a-a5a9-0b3f9175668e.vsidx b/Code/.vs/BlazorApp/FileContentIndex/7d473ec2-8050-4a8a-a5a9-0b3f9175668e.vsidx deleted file mode 100644 index e20f629..0000000 Binary files a/Code/.vs/BlazorApp/FileContentIndex/7d473ec2-8050-4a8a-a5a9-0b3f9175668e.vsidx and /dev/null differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/81f11814-6ba4-446e-b669-46304f684955.vsidx b/Code/.vs/BlazorApp/FileContentIndex/81f11814-6ba4-446e-b669-46304f684955.vsidx deleted file mode 100644 index 4b435c4..0000000 Binary files a/Code/.vs/BlazorApp/FileContentIndex/81f11814-6ba4-446e-b669-46304f684955.vsidx and /dev/null differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/85174e40-6c3d-4226-9df8-d74d930a5623.vsidx b/Code/.vs/BlazorApp/FileContentIndex/85174e40-6c3d-4226-9df8-d74d930a5623.vsidx new file mode 100644 index 0000000..ef6c595 Binary files /dev/null and b/Code/.vs/BlazorApp/FileContentIndex/85174e40-6c3d-4226-9df8-d74d930a5623.vsidx differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/12d85556-a2f5-49ed-869a-f5ea4e2cd511.vsidx b/Code/.vs/BlazorApp/FileContentIndex/8ad65cf9-9de2-42a7-9f84-bc52704a9db4.vsidx similarity index 55% rename from Code/.vs/BlazorApp/FileContentIndex/12d85556-a2f5-49ed-869a-f5ea4e2cd511.vsidx rename to Code/.vs/BlazorApp/FileContentIndex/8ad65cf9-9de2-42a7-9f84-bc52704a9db4.vsidx index f47c374..10c3410 100644 Binary files a/Code/.vs/BlazorApp/FileContentIndex/12d85556-a2f5-49ed-869a-f5ea4e2cd511.vsidx and b/Code/.vs/BlazorApp/FileContentIndex/8ad65cf9-9de2-42a7-9f84-bc52704a9db4.vsidx differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/9866ac50-9c05-4944-b197-29a6632a1387.vsidx b/Code/.vs/BlazorApp/FileContentIndex/9866ac50-9c05-4944-b197-29a6632a1387.vsidx deleted file mode 100644 index 4ff412a..0000000 Binary files a/Code/.vs/BlazorApp/FileContentIndex/9866ac50-9c05-4944-b197-29a6632a1387.vsidx and /dev/null differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/996953ff-6166-4005-a2df-58496da2b091.vsidx b/Code/.vs/BlazorApp/FileContentIndex/996953ff-6166-4005-a2df-58496da2b091.vsidx deleted file mode 100644 index fd0be4d..0000000 Binary files a/Code/.vs/BlazorApp/FileContentIndex/996953ff-6166-4005-a2df-58496da2b091.vsidx and /dev/null differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/99d2191d-503f-420b-bcfd-263e1cd053d1.vsidx b/Code/.vs/BlazorApp/FileContentIndex/99d2191d-503f-420b-bcfd-263e1cd053d1.vsidx new file mode 100644 index 0000000..dc99c28 Binary files /dev/null and b/Code/.vs/BlazorApp/FileContentIndex/99d2191d-503f-420b-bcfd-263e1cd053d1.vsidx differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/a075bdf8-042f-49dd-8ac3-ad2b0a6318d3.vsidx b/Code/.vs/BlazorApp/FileContentIndex/a075bdf8-042f-49dd-8ac3-ad2b0a6318d3.vsidx new file mode 100644 index 0000000..a8a7716 Binary files /dev/null and b/Code/.vs/BlazorApp/FileContentIndex/a075bdf8-042f-49dd-8ac3-ad2b0a6318d3.vsidx differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/a0954d1a-df95-4067-aa32-dc28b895112c.vsidx b/Code/.vs/BlazorApp/FileContentIndex/a0954d1a-df95-4067-aa32-dc28b895112c.vsidx deleted file mode 100644 index 84d8950..0000000 Binary files a/Code/.vs/BlazorApp/FileContentIndex/a0954d1a-df95-4067-aa32-dc28b895112c.vsidx and /dev/null differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/a3f732c3-7003-421d-b71c-09972b1087fd.vsidx b/Code/.vs/BlazorApp/FileContentIndex/a3f732c3-7003-421d-b71c-09972b1087fd.vsidx new file mode 100644 index 0000000..6c89dec Binary files /dev/null and b/Code/.vs/BlazorApp/FileContentIndex/a3f732c3-7003-421d-b71c-09972b1087fd.vsidx differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/a5de7489-9763-43f7-81fa-0b4c285f3204.vsidx b/Code/.vs/BlazorApp/FileContentIndex/a5de7489-9763-43f7-81fa-0b4c285f3204.vsidx deleted file mode 100644 index d46ef15..0000000 Binary files a/Code/.vs/BlazorApp/FileContentIndex/a5de7489-9763-43f7-81fa-0b4c285f3204.vsidx and /dev/null differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/bcc10b0d-a759-432f-b061-b66740afe00f.vsidx b/Code/.vs/BlazorApp/FileContentIndex/bcc10b0d-a759-432f-b061-b66740afe00f.vsidx deleted file mode 100644 index cd28063..0000000 Binary files a/Code/.vs/BlazorApp/FileContentIndex/bcc10b0d-a759-432f-b061-b66740afe00f.vsidx and /dev/null differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/c169f7dc-a288-44d1-a091-566f1482fa85.vsidx b/Code/.vs/BlazorApp/FileContentIndex/c169f7dc-a288-44d1-a091-566f1482fa85.vsidx new file mode 100644 index 0000000..e1bdec0 Binary files /dev/null and b/Code/.vs/BlazorApp/FileContentIndex/c169f7dc-a288-44d1-a091-566f1482fa85.vsidx differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/c470a985-ba00-4120-baea-751cc6d43d7c.vsidx b/Code/.vs/BlazorApp/FileContentIndex/c470a985-ba00-4120-baea-751cc6d43d7c.vsidx deleted file mode 100644 index d1562c7..0000000 Binary files a/Code/.vs/BlazorApp/FileContentIndex/c470a985-ba00-4120-baea-751cc6d43d7c.vsidx and /dev/null differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/c557a65d-3b86-4f11-8f75-dcc254f2b17b.vsidx b/Code/.vs/BlazorApp/FileContentIndex/c557a65d-3b86-4f11-8f75-dcc254f2b17b.vsidx deleted file mode 100644 index fb1d9fc..0000000 Binary files a/Code/.vs/BlazorApp/FileContentIndex/c557a65d-3b86-4f11-8f75-dcc254f2b17b.vsidx and /dev/null differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/ca42ab30-0746-477a-95a9-fe76a6488829.vsidx b/Code/.vs/BlazorApp/FileContentIndex/ca42ab30-0746-477a-95a9-fe76a6488829.vsidx new file mode 100644 index 0000000..10d5fd9 Binary files /dev/null and b/Code/.vs/BlazorApp/FileContentIndex/ca42ab30-0746-477a-95a9-fe76a6488829.vsidx differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/cc513625-c80b-4fb9-9be3-62a00f56617b.vsidx b/Code/.vs/BlazorApp/FileContentIndex/cc513625-c80b-4fb9-9be3-62a00f56617b.vsidx new file mode 100644 index 0000000..80bb1bb Binary files /dev/null and b/Code/.vs/BlazorApp/FileContentIndex/cc513625-c80b-4fb9-9be3-62a00f56617b.vsidx differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/e9bd4c14-8ac9-49f3-ab78-43f5ba390bcd.vsidx b/Code/.vs/BlazorApp/FileContentIndex/e9bd4c14-8ac9-49f3-ab78-43f5ba390bcd.vsidx deleted file mode 100644 index 16316de..0000000 Binary files a/Code/.vs/BlazorApp/FileContentIndex/e9bd4c14-8ac9-49f3-ab78-43f5ba390bcd.vsidx and /dev/null differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/ebb32373-91a4-4660-807a-769098295fc9.vsidx b/Code/.vs/BlazorApp/FileContentIndex/ebb32373-91a4-4660-807a-769098295fc9.vsidx deleted file mode 100644 index 821265d..0000000 Binary files a/Code/.vs/BlazorApp/FileContentIndex/ebb32373-91a4-4660-807a-769098295fc9.vsidx and /dev/null differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/f89a6f5a-f457-4ab8-b63c-4a82a42542b8.vsidx b/Code/.vs/BlazorApp/FileContentIndex/f89a6f5a-f457-4ab8-b63c-4a82a42542b8.vsidx deleted file mode 100644 index 2a8cdd2..0000000 Binary files a/Code/.vs/BlazorApp/FileContentIndex/f89a6f5a-f457-4ab8-b63c-4a82a42542b8.vsidx and /dev/null differ diff --git a/Code/.vs/BlazorApp/FileContentIndex/fee5e7ad-b88d-466d-8a77-503bb979b1ec.vsidx b/Code/.vs/BlazorApp/FileContentIndex/fee5e7ad-b88d-466d-8a77-503bb979b1ec.vsidx new file mode 100644 index 0000000..119d3c3 Binary files /dev/null and b/Code/.vs/BlazorApp/FileContentIndex/fee5e7ad-b88d-466d-8a77-503bb979b1ec.vsidx differ diff --git a/Code/.vs/BlazorApp/v17/.futdcache.v2 b/Code/.vs/BlazorApp/v17/.futdcache.v2 index 0eceefa..6b67de4 100644 Binary files a/Code/.vs/BlazorApp/v17/.futdcache.v2 and b/Code/.vs/BlazorApp/v17/.futdcache.v2 differ diff --git a/Code/.vs/BlazorApp/v17/.suo b/Code/.vs/BlazorApp/v17/.suo index 0067161..56657e2 100644 Binary files a/Code/.vs/BlazorApp/v17/.suo and b/Code/.vs/BlazorApp/v17/.suo differ diff --git a/Code/.vs/BlazorApp/v17/fileList.bin b/Code/.vs/BlazorApp/v17/fileList.bin index f24190d..887b076 100644 Binary files a/Code/.vs/BlazorApp/v17/fileList.bin and b/Code/.vs/BlazorApp/v17/fileList.bin differ diff --git a/Code/.vs/ProjectEvaluation/blazorapp.metadata.v5.2 b/Code/.vs/ProjectEvaluation/blazorapp.metadata.v5.2 index 64d952c..d65c072 100644 Binary files a/Code/.vs/ProjectEvaluation/blazorapp.metadata.v5.2 and b/Code/.vs/ProjectEvaluation/blazorapp.metadata.v5.2 differ diff --git a/Code/.vs/ProjectEvaluation/blazorapp.projects.v5.2 b/Code/.vs/ProjectEvaluation/blazorapp.projects.v5.2 index 4621cbb..bf637e9 100644 Binary files a/Code/.vs/ProjectEvaluation/blazorapp.projects.v5.2 and b/Code/.vs/ProjectEvaluation/blazorapp.projects.v5.2 differ diff --git a/Code/ProjetBlazor/Components/Inventory.razor b/Code/ProjetBlazor/Components/Inventory.razor new file mode 100644 index 0000000..4540096 --- /dev/null +++ b/Code/ProjetBlazor/Components/Inventory.razor @@ -0,0 +1,21 @@ + +
+ @for(int i = 0; i + } +
+ + + +
+ +
+ + +
+
@Localizer["Actions"]
+
+ +
+ diff --git a/Code/ProjetBlazor/Components/Inventory.razor.cs b/Code/ProjetBlazor/Components/Inventory.razor.cs new file mode 100644 index 0000000..085792c --- /dev/null +++ b/Code/ProjetBlazor/Components/Inventory.razor.cs @@ -0,0 +1,66 @@ +using ProjetBlazor.Models; +using ProjetBlazor.Pages; +using Blazored.LocalStorage; +using Blazorise.DataGrid; +using Blazorise; +using Microsoft.AspNetCore.Components; +using Microsoft.JSInterop; +using System.Collections.ObjectModel; +using System.Collections.Specialized; +using System.Text.Json; +using ProjetBlazor.Components; +using Microsoft.Extensions.Localization; +using ProjetBlazor.Models; + +namespace ProjetBlazor.Components +{ + partial class Inventory + { + public Models.InventoryList inventory = new Models.InventoryList(); + public Models.InventoryItem CurrentDragItem { get; set; } + public ObservableCollection Actions { get; set; } + + [Inject] + internal IJSRuntime JavaScriptRuntime { get; set; } + + [Inject] + public IStringLocalizer Localizer { get; set; } + + + [Inject] + public ILocalStorageService LocalStorage { get; set; } + + [Inject] + public HttpClient Http { get; set; } + + public Inventory() + { + Actions = new ObservableCollection(); + Actions.CollectionChanged += OnActionsCollectionChanged; + } + + + private void OnActionsCollectionChanged(object? sender, NotifyCollectionChangedEventArgs e) + { + JavaScriptRuntime.InvokeVoidAsync("Crafting.AddActions", e.NewItems); + } + + + + private async Task OnReadData(DataGridReadDataEventArgs e) + { + if (e.CancellationToken.IsCancellationRequested) + { + return; + } + + var response = await LocalStorage.GetItemAsync("list"); + + if (!e.CancellationToken.IsCancellationRequested) + { + inventory = JsonSerializer.Deserialize(response); + } + } + + } +} diff --git a/Code/ProjetBlazor/Components/ItemsList.razor.css b/Code/ProjetBlazor/Components/Inventory.razor.css similarity index 93% rename from Code/ProjetBlazor/Components/ItemsList.razor.css rename to Code/ProjetBlazor/Components/Inventory.razor.css index 7f9ac5e..168f08f 100644 --- a/Code/ProjetBlazor/Components/ItemsList.razor.css +++ b/Code/ProjetBlazor/Components/Inventory.razor.css @@ -14,7 +14,7 @@ padding-top: 1px; padding-left: 5px; border: 1px solid black; - height: 200px; + height: 250px; clear: both; overflow: scroll; -} +} \ No newline at end of file diff --git a/Code/ProjetBlazor/Components/ItemsList.razor.js b/Code/ProjetBlazor/Components/Inventory.razor.js similarity index 100% rename from Code/ProjetBlazor/Components/ItemsList.razor.js rename to Code/ProjetBlazor/Components/Inventory.razor.js diff --git a/Code/ProjetBlazor/Components/ActionInInventory.cs b/Code/ProjetBlazor/Components/InventoryAction.cs similarity index 72% rename from Code/ProjetBlazor/Components/ActionInInventory.cs rename to Code/ProjetBlazor/Components/InventoryAction.cs index 9469ef0..4cfe8fd 100644 --- a/Code/ProjetBlazor/Components/ActionInInventory.cs +++ b/Code/ProjetBlazor/Components/InventoryAction.cs @@ -2,10 +2,9 @@ namespace ProjetBlazor.Components { - public class ActionInInventory + public class InventoryAction { - public ActionInInventory(String ac, int num, Item objet) - { + public InventoryAction(String ac, int num,Item objet) { Action = ac; Index = num; Item = objet; diff --git a/Code/ProjetBlazor/Components/InventoryImageList.razor.cs b/Code/ProjetBlazor/Components/InventoryImageList.razor.cs deleted file mode 100644 index 456c40c..0000000 --- a/Code/ProjetBlazor/Components/InventoryImageList.razor.cs +++ /dev/null @@ -1,42 +0,0 @@ -using Microsoft.AspNetCore.Components; -using ProjetBlazor.Models; - -namespace ProjetBlazor.Components -{ - public partial class InventoryImageList - { - - [Parameter] - public Item Item { get; set; } - - [CascadingParameter] - public ItemsList Parent { get; set; } - - internal void OnDragEnter() - { - - Parent.Actions.Add(new ActionInInventory("On drag enter", Item.Id, Item)); - return; - } - - internal void OnDragLeave() - { - Parent.Actions.Add(new ActionInInventory("On drag leave", Item.Id, Item)); - return; - } - - internal void OnDrop() - { - Parent.Actions.Add(new ActionInInventory("On drop", Item.Id, Item)); - Parent.CurrentDragItem = null; - return; - } - - private void OnDragStart() - { - Parent.CurrentDragItem = new ItemInInventory(Item); - Parent.Actions.Add(new ActionInInventory("On drag start", Item.Id, Item)); - return; - } - } -} diff --git a/Code/ProjetBlazor/Components/ItemsList.razor b/Code/ProjetBlazor/Components/InventoryList.razor similarity index 64% rename from Code/ProjetBlazor/Components/ItemsList.razor rename to Code/ProjetBlazor/Components/InventoryList.razor index 6bcc1f0..2ab8a42 100644 --- a/Code/ProjetBlazor/Components/ItemsList.razor +++ b/Code/ProjetBlazor/Components/InventoryList.razor @@ -1,7 +1,6 @@ @using ProjetBlazor.Models - -
+

@Localizer["List"]

-

@Localizer["Inventory"]

-
- @for(int i = 0; i - } - else - { - - } - - } -
- - -
-
@Localizer["Actions"]
-
- - + \ No newline at end of file diff --git a/Code/ProjetBlazor/Components/InventoryList.razor.cs b/Code/ProjetBlazor/Components/InventoryList.razor.cs new file mode 100644 index 0000000..e3b5103 --- /dev/null +++ b/Code/ProjetBlazor/Components/InventoryList.razor.cs @@ -0,0 +1,43 @@ +using ProjetBlazor.Models; +using ProjetBlazor.Pages; +using ProjetBlazor.Services; +using Blazored.Modal; +using Blazored.Modal.Services; +using Blazorise.DataGrid; +using Microsoft.AspNetCore.Components; +using Microsoft.Extensions.Localization; + +namespace ProjetBlazor.Components +{ + public partial class InventoryList + { + private List items; + + private int totalItem; + + [Inject] + public IDataService DataService { get; set; } + + [Inject] + public IWebHostEnvironment WebHostEnvironment { get; set;} + + [Inject] + public NavigationManager NavigationManager { get; set; } + + [CascadingParameter] + public IModalService Modal { get; set; } + + [Inject] + public IStringLocalizer Localizer { get; set; } + + [CascadingParameter] + public Inventory Parent { get; set; } + + protected override async Task OnInitializedAsync() + { + items = await DataService.GetAll(); + totalItem = await DataService.Count(); + await base.OnInitializedAsync(); + } + } +} \ No newline at end of file diff --git a/Code/ProjetBlazor/Components/InventoryImageList.razor b/Code/ProjetBlazor/Components/InventoryListImage.razor similarity index 54% rename from Code/ProjetBlazor/Components/InventoryImageList.razor rename to Code/ProjetBlazor/Components/InventoryListImage.razor index aed2ef7..cde488d 100644 --- a/Code/ProjetBlazor/Components/InventoryImageList.razor +++ b/Code/ProjetBlazor/Components/InventoryListImage.razor @@ -1,15 +1,13 @@ @using ProjetBlazor.Models; - - - -
+
@if (!string.IsNullOrWhiteSpace(Item.ImageBase64)) { @@ -17,7 +15,7 @@ } else { - Item.DisplayName + Item.DisplayName }
\ No newline at end of file diff --git a/Code/ProjetBlazor/Components/InventoryListImage.razor.cs b/Code/ProjetBlazor/Components/InventoryListImage.razor.cs new file mode 100644 index 0000000..8088e94 --- /dev/null +++ b/Code/ProjetBlazor/Components/InventoryListImage.razor.cs @@ -0,0 +1,43 @@ +using ProjetBlazor.Models; +using Microsoft.AspNetCore.Components; +using ProjetBlazor.Components; + +namespace ProjetBlazor.Components +{ + public partial class InventoryListImage + { + + [Parameter] + public Item Item { get; set; } + + [CascadingParameter] + public Inventory Parent { get; set; } + + internal void OnDragEnter() + { + + Parent.Actions.Add(new InventoryAction("On drag enter", Item.Id, Item)); + return; + } + + internal void OnDragLeave() + { + Parent.Actions.Add(new InventoryAction("On drag leave", Item.Id, Item)); + return; + } + + internal void OnDrop() + { + Parent.Actions.Add(new InventoryAction("On drop", Item.Id, Item)); + Parent.CurrentDragItem = null; + return; + } + + private void OnDragStart() + { + Parent.CurrentDragItem = new InventoryItem(Item); + Parent.Actions.Add(new InventoryAction("On drag start", Item.Id, Item)); + return; + } + } +} diff --git a/Code/ProjetBlazor/Components/GetItemInInventory.razor b/Code/ProjetBlazor/Components/ItemInventory.razor similarity index 78% rename from Code/ProjetBlazor/Components/GetItemInInventory.razor rename to Code/ProjetBlazor/Components/ItemInventory.razor index d49e5e3..b0445ee 100644 --- a/Code/ProjetBlazor/Components/GetItemInInventory.razor +++ b/Code/ProjetBlazor/Components/ItemInventory.razor @@ -1,20 +1,19 @@ -
@if(Items != null) { - @if(!string.IsNullOrWhiteSpace(Items.item.ImageBase64)) - { -
+ @if(!string.IsNullOrWhiteSpace(Items.item.ImageBase64)) + { +
@Items.item.DisplayName - @Items.Stack -
- } - else - { + @Items.Stack +
+ } + else + {
@Items.item.DisplayName @Items.Stack diff --git a/Code/ProjetBlazor/Components/GetItemInInventory.razor.cs b/Code/ProjetBlazor/Components/ItemInventory.razor.cs similarity index 74% rename from Code/ProjetBlazor/Components/GetItemInInventory.razor.cs rename to Code/ProjetBlazor/Components/ItemInventory.razor.cs index a6690e1..4bc6c3e 100644 --- a/Code/ProjetBlazor/Components/GetItemInInventory.razor.cs +++ b/Code/ProjetBlazor/Components/ItemInventory.razor.cs @@ -1,23 +1,24 @@ -using Blazored.LocalStorage; -using Blazorise; +using ProjetBlazor.Models; +using Blazored.LocalStorage; +using Blazorise.Extensions; using Microsoft.AspNetCore.Components; -using ProjetBlazor.Models; +using ProjetBlazor.Components; namespace ProjetBlazor.Components { - public partial class GetItemInInventory + public partial class ItemInventory { [Parameter] public bool NoDrop { get; set; } [Parameter] - public ItemInInventory? Items { get; set; } + public InventoryItem Items { get; set; } [Parameter] public int Index { get; set; } [CascadingParameter] - public ItemsList Parent { get; set; } + public Inventory Parent { get; set; } [Inject] public ILocalStorageService LocalStorage { get; set; } @@ -32,13 +33,13 @@ namespace ProjetBlazor.Components } Parent.CurrentDragItem = this.Items; - Parent.Actions.Add(new ActionInInventory("On drag start", this.Index, Items.item)); + Parent.Actions.Add(new InventoryAction("On drag start",this.Index,Items.item)); this.Items = null; - Parent.inventory.inventoryItems[this.Index] = null; + Parent.inventory.inventoryItems[this.Index] = null ; await LocalStorage.RemoveItemAsync("data" + this.Index); await LocalStorage.RemoveItemAsync("stack" + this.Index); } - + public async Task OnDropAsync() { @@ -48,13 +49,13 @@ namespace ProjetBlazor.Components return; } - if (this.Items == null) + if(this.Items == null) { this.Items = Parent.CurrentDragItem; Parent.CurrentDragItem = null; await LocalStorage.SetItemAsync("data" + this.Index, this.Items.item); await LocalStorage.SetItemAsync("stack" + this.Index, this.Items.Stack); - Parent.Actions.Add(new ActionInInventory("On drag drop", this.Index, Items.item)); + Parent.Actions.Add(new InventoryAction("On drag drop",this.Index,Items.item)); return; } @@ -64,11 +65,11 @@ namespace ProjetBlazor.Components Parent.CurrentDragItem = null; await LocalStorage.SetItemAsync("data" + this.Index, this.Items.item); await LocalStorage.SetItemAsync("stack" + this.Index, this.Items.Stack); - Parent.Actions.Add(new ActionInInventory("On drag drop", this.Index, Items.item)); + Parent.Actions.Add(new InventoryAction("On drag drop",this.Index,Items.item)); return; } else - { + { int total = Parent.CurrentDragItem.Stack + this.Items.Stack; if (total > this.Items.item.StackSize) { @@ -77,7 +78,7 @@ namespace ProjetBlazor.Components await LocalStorage.SetItemAsync("data" + this.Index, this.Items.item); await LocalStorage.SetItemAsync("stack" + this.Index, this.Items.Stack); - Parent.Actions.Add(new ActionInInventory("On drag drop", this.Index, Items.item)); + Parent.Actions.Add(new InventoryAction("On drag drop",this.Index,Items.item)); return; } else @@ -86,7 +87,7 @@ namespace ProjetBlazor.Components Parent.CurrentDragItem = null; await LocalStorage.SetItemAsync("data" + this.Index, this.Items.item); await LocalStorage.SetItemAsync("stack" + this.Index, this.Items.Stack); - Parent.Actions.Add(new ActionInInventory("On drag drop", this.Index, Items.item)); + Parent.Actions.Add(new InventoryAction("On drag drop",this.Index,Items.item)); return; } } @@ -94,13 +95,13 @@ namespace ProjetBlazor.Components internal void OnDragEnter() { if (this.Items == null) return; - Parent.Actions.Add(new ActionInInventory("Drag Enter", this.Index, Items.item)); + Parent.Actions.Add(new InventoryAction("Drag Enter",this.Index,Items.item)); } internal void OnDragLeave() { if (this.Items == null) return; - Parent.Actions.Add(new ActionInInventory("Drag Leave", this.Index, Items.item)); + Parent.Actions.Add(new InventoryAction("Drag Leave",this.Index,Items.item)); } @@ -117,14 +118,14 @@ namespace ProjetBlazor.Components if (item != null) { - this.Items = new Models.ItemInInventory(item, stack); + this.Items = new Models.InventoryItem(item, stack); } else { this.Items = null; } - StateHasChanged(); - return; + StateHasChanged(); + return; } } } diff --git a/Code/ProjetBlazor/Components/GetItemInInventory.razor.css b/Code/ProjetBlazor/Components/ItemInventory.razor.css similarity index 90% rename from Code/ProjetBlazor/Components/GetItemInInventory.razor.css rename to Code/ProjetBlazor/Components/ItemInventory.razor.css index 10796f3..fb18436 100644 --- a/Code/ProjetBlazor/Components/GetItemInInventory.razor.css +++ b/Code/ProjetBlazor/Components/ItemInventory.razor.css @@ -1,5 +1,5 @@ .item { - margin: 10% 10% 10% 10%; + margin: 8% 8% 8% 8%; width: 100px; height: 100px; border: 1px solid; diff --git a/Code/ProjetBlazor/Components/ItemsList.razor.cs b/Code/ProjetBlazor/Components/ItemsList.razor.cs deleted file mode 100644 index 4936c66..0000000 --- a/Code/ProjetBlazor/Components/ItemsList.razor.cs +++ /dev/null @@ -1,69 +0,0 @@ -using Blazored.Modal.Services; -using Microsoft.AspNetCore.Components; -using Microsoft.Extensions.Localization; -using Microsoft.JSInterop; -using ProjetBlazor.Models; -using ProjetBlazor.Services; -using System.Collections.ObjectModel; -using System.Collections.Specialized; - -namespace ProjetBlazor.Components -{ - public partial class ItemsList - { - public Models.Inventory inventory = new Models.Inventory(); - public ObservableCollection Actions { get; set; } - public ItemInInventory CurrentDragItem { get; set; } - - [Parameter] - public List Items { get; set; } - - /// - /// Gets or sets the java script runtime. - /// - [Inject] - internal IJSRuntime JavaScriptRuntime { get; set; } - - [Inject] - - public IStringLocalizer Localizer { get; set; } - - - private void OnActionsCollectionChanged(object? sender, NotifyCollectionChangedEventArgs e) - { - _ = JavaScriptRuntime.InvokeVoidAsync("Crafting.AddActions", e.NewItems); - } - - private List? items; - - private int totalItem; - - [Inject] - public IDataService DataService { get; set; } - - [Inject] - public IWebHostEnvironment WebHostEnvironment { get; set; } - - [Inject] - public NavigationManager NavigationManager { get; set; } - - [CascadingParameter] - public IModalService Modal { get; set; } - public object Action { get; internal set; } - - public ItemsList() - { - Actions = new ObservableCollection(); - Actions.CollectionChanged += OnActionsCollectionChanged; - } - - - protected override async Task OnInitializedAsync() - { - items = await DataService.GetAll(); - totalItem = await DataService.Count(); - await base.OnInitializedAsync(); - } - - } -} diff --git a/Code/ProjetBlazor/Components/ShowItems.razor b/Code/ProjetBlazor/Components/ShowItems.razor new file mode 100644 index 0000000..e8fccfd --- /dev/null +++ b/Code/ProjetBlazor/Components/ShowItems.razor @@ -0,0 +1,11 @@ +@typeparam TItem + +
+ @if ((Items?.Count ?? 0) != 0) + { + @foreach (var item in Items) + { + @ShowTemplate(item); + } + } +
\ No newline at end of file diff --git a/Code/ProjetBlazor/Components/ShowItems.razor.cs b/Code/ProjetBlazor/Components/ShowItems.razor.cs new file mode 100644 index 0000000..3dfcbf0 --- /dev/null +++ b/Code/ProjetBlazor/Components/ShowItems.razor.cs @@ -0,0 +1,13 @@ +using Microsoft.AspNetCore.Components; + +namespace ProjetBlazor.Components +{ + public partial class ShowItems + { + [Parameter] + public List Items { get; set; } + + [Parameter] + public RenderFragment ShowTemplate { get; set; } + } +} diff --git a/Code/ProjetBlazor/Models/Inventory.cs b/Code/ProjetBlazor/Models/Inventory.cs deleted file mode 100644 index 3f4a273..0000000 --- a/Code/ProjetBlazor/Models/Inventory.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace ProjetBlazor.Models -{ - public partial class Inventory - { - - static public int size = 18; - - /// - /// List of inventory items. - /// - public List inventoryItems = new List(new ItemInInventory[size]); - - /// - /// Constructor for InventoryList. - /// - public Inventory() - { - inventoryItems[0] = new ItemInInventory(); - } - } -} - diff --git a/Code/ProjetBlazor/Models/ItemInInventory.cs b/Code/ProjetBlazor/Models/InventoryItem.cs similarity index 74% rename from Code/ProjetBlazor/Models/ItemInInventory.cs rename to Code/ProjetBlazor/Models/InventoryItem.cs index ba26c6f..01f0ea0 100644 --- a/Code/ProjetBlazor/Models/ItemInInventory.cs +++ b/Code/ProjetBlazor/Models/InventoryItem.cs @@ -1,6 +1,11 @@ -namespace ProjetBlazor.Models -{ - public class ItemInInventory +using System.Collections; + +namespace ProjetBlazor.Models +{ + /// + /// Represents an item in a player's inventory. + /// + public class InventoryItem { public Item item; int stack; @@ -13,7 +18,7 @@ /// /// Constructor for InventoryItem with no parameters. /// - public ItemInInventory() + public InventoryItem() { item = new Item(); Stack = 64; @@ -22,7 +27,7 @@ /// Constructor for InventoryItem with a single item. /// /// The item. - public ItemInInventory(Item item) + public InventoryItem(Item item) { this.item = item; Stack = 1; @@ -33,7 +38,7 @@ /// /// The item /// The number of items in the stack. - public ItemInInventory(Item item, int stock) + public InventoryItem(Item item, int stock) { this.item = item; Stack = stock; diff --git a/Code/ProjetBlazor/Models/InventoryList.cs b/Code/ProjetBlazor/Models/InventoryList.cs new file mode 100644 index 0000000..e6addfa --- /dev/null +++ b/Code/ProjetBlazor/Models/InventoryList.cs @@ -0,0 +1,26 @@ +using Microsoft.AspNetCore.Http.Features; + +namespace ProjetBlazor.Models +{ + /// + /// Represents a list of items in a player's inventory. + /// + public partial class InventoryList + { + + public static readonly int Size = 27; + + /// + /// List of inventory items. + /// + public List inventoryItems = new List(new InventoryItem[Size]); + + /// + /// Constructor for InventoryList. + /// + public InventoryList() + { + inventoryItems[0] = new InventoryItem(); + } + } +} diff --git a/Code/ProjetBlazor/Models/Item.cs b/Code/ProjetBlazor/Models/Item.cs index 9e31dcf..b08ad37 100644 --- a/Code/ProjetBlazor/Models/Item.cs +++ b/Code/ProjetBlazor/Models/Item.cs @@ -1,16 +1,20 @@ namespace ProjetBlazor.Models -{ +{ + /// + /// Represents an item. + /// public class Item { public int Id { get; set; } - public string? DisplayName { get; set; } - public string? Name { get; set; } + public string DisplayName { get; set; } + public string Name { get; set; } public int StackSize { get; set; } public int MaxDurability { get; set; } - public List? EnchantCategories { get; set; } - public List? RepairWith { get; set; } - public DateTime? CreatedDate { get; set; } + public List EnchantCategories { get; set; } + public List RepairWith { get; set; } + public DateTime CreatedDate { get; set; } public DateTime? UpdatedDate { get; set; } - public string? ImageBase64 { get; set; } + public string ImageBase64 { get; set; } + } -} \ No newline at end of file +} diff --git a/Code/ProjetBlazor/Models/ItemModel.cs b/Code/ProjetBlazor/Models/ItemModel.cs index 2b8e113..f59d84c 100644 --- a/Code/ProjetBlazor/Models/ItemModel.cs +++ b/Code/ProjetBlazor/Models/ItemModel.cs @@ -1,40 +1,41 @@ using System.ComponentModel.DataAnnotations; namespace ProjetBlazor.Models -{ +{ + /// + /// Model for creating or updating an item. + /// public class ItemModel { public int Id { get; set; } [Required] - [StringLength(50, ErrorMessage = "Le nom affiché ne doit pas dépasser 50 caractères.")] - public string? DisplayName { get; set; } + [StringLength(50, ErrorMessage = "The display name must not exceed 50 characters.")] + public string DisplayName { get; set; } [Required] - [StringLength(50, ErrorMessage = "Le nom ne doit pas dépasser 50 caractères.")] - [RegularExpression(@"^[a-z''-'\s]{1,40}$", ErrorMessage = "Seulement les caractères en minuscule sont acceptées.")] - public string? Name { get; set; } + [StringLength(50, ErrorMessage = "The name must not exceed 50 characters.")] + [RegularExpression(@"^[a-z''-'\s]{1,40}$", ErrorMessage = "Only lowercase characters are accepted.")] + public string Name { get; set; } [Required] [Range(1, 64)] public int StackSize { get; set; } [Required] - [Range(1, 3000)] + [Range(1, 125)] public int MaxDurability { get; set; } - public List? EnchantCategories { get; set; } + public List EnchantCategories { get; set; } - public List? RepairWith { get; set; } + public List RepairWith { get; set; } [Required] - [Range(typeof(bool), "true", "true", ErrorMessage = "Vous devez accepter les conditions.")] + [Range(typeof(bool), "true", "true", ErrorMessage = "You must agree to the terms.")] public bool AcceptCondition { get; set; } - [Required(ErrorMessage = "L'image de l'item est obligatoire !")] - public byte[]? ImageContent { get; set; } - - public string? ImageBase64 { get; set; } + [Required(ErrorMessage = "The image of the item is mandatory!")] + public byte[] ImageContent { get; set; } + public string ImageBase64 { get; set; } } } - diff --git a/Code/ProjetBlazor/Pages/Inventory.razor.cs b/Code/ProjetBlazor/Pages/Inventory.razor.cs deleted file mode 100644 index af67799..0000000 --- a/Code/ProjetBlazor/Pages/Inventory.razor.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Microsoft.AspNetCore.Components; -using Microsoft.Extensions.Localization; -using ProjetBlazor.Components; -using ProjetBlazor.Models; -using ProjetBlazor.Services; -using System.Collections.Generic; - -namespace ProjetBlazor.Pages -{ - public partial class Inventory - { - [Inject] - public IDataService DataService { get; set; } - - public List Items { get; set; } = new List(); - - protected override async Task OnAfterRenderAsync(bool firstRender) - { - _ = base.OnAfterRenderAsync(firstRender); - - if (!firstRender) - { - return; - } - - Items = await DataService.List(0, await DataService.Count()); - - StateHasChanged(); - } - } -} diff --git a/Code/ProjetBlazor/Pages/Inventory.razor b/Code/ProjetBlazor/Pages/InventoryPages.razor similarity index 80% rename from Code/ProjetBlazor/Pages/Inventory.razor rename to Code/ProjetBlazor/Pages/InventoryPages.razor index c8faaad..cd9750c 100644 --- a/Code/ProjetBlazor/Pages/Inventory.razor +++ b/Code/ProjetBlazor/Pages/InventoryPages.razor @@ -8,5 +8,5 @@
- +
\ No newline at end of file diff --git a/Code/ProjetBlazor/Resources/Components.ItemsList.fr-FR.resx b/Code/ProjetBlazor/Resources/Components .Inventory.fr-FR.resx similarity index 100% rename from Code/ProjetBlazor/Resources/Components.ItemsList.fr-FR.resx rename to Code/ProjetBlazor/Resources/Components .Inventory.fr-FR.resx diff --git a/Code/ProjetBlazor/Resources/Components.ItemsList.en-US.resx b/Code/ProjetBlazor/Resources/Components.Inventory.en-US.resx similarity index 100% rename from Code/ProjetBlazor/Resources/Components.ItemsList.en-US.resx rename to Code/ProjetBlazor/Resources/Components.Inventory.en-US.resx diff --git a/Code/ProjetBlazor/Resources/Components.InventoryList.en-US.resx b/Code/ProjetBlazor/Resources/Components.InventoryList.en-US.resx new file mode 100644 index 0000000..1e4ffdc --- /dev/null +++ b/Code/ProjetBlazor/Resources/Components.InventoryList.en-US.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Actions + + + Item Picture + + + My Inventory : + + + List of Items : + + + Name + + + Stack Size + + \ No newline at end of file diff --git a/Code/ProjetBlazor/Resources/Components.InventoryList.fr-FR.resx b/Code/ProjetBlazor/Resources/Components.InventoryList.fr-FR.resx new file mode 100644 index 0000000..02ac5c4 --- /dev/null +++ b/Code/ProjetBlazor/Resources/Components.InventoryList.fr-FR.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Actions + + + Image de l'item + + + Mon Inventaire : + + + Liste des Items : + + + Nom + + + Taille du Stack + + \ No newline at end of file diff --git a/Code/ProjetBlazor/Services/DataApiService.cs b/Code/ProjetBlazor/Services/DataApiService.cs index b53b2e5..372b591 100644 --- a/Code/ProjetBlazor/Services/DataApiService.cs +++ b/Code/ProjetBlazor/Services/DataApiService.cs @@ -40,7 +40,7 @@ namespace Blazor.Services /// Task representing the asynchronous operation, returning a list of items. public async Task> List(int currentPage, int pageSize) { - return await _http.GetFromJsonAsync>($"https://codefirst.iut.uca.fr/containers/container-blazor-web-api-marcchevaldonne/api/Crafting/?currentPage={currentPage}&pageSize={pageSize}"); + return await _http.GetFromJsonAsync>($"https://localhost:7234/api/Crafting/?currentPage={currentPage}&pageSize={pageSize}"); } /// @@ -59,7 +59,7 @@ namespace Blazor.Services /// Task representing the asynchronous operation, returning the item with the specified ID. public async Task GetById(int id) { - return await _http.GetFromJsonAsync($"https://codefirst.iut.uca.fr/containers/container-blazor-web-api-marcchevaldonne/api/Crafting/{id}"); + return await _http.GetFromJsonAsync($"https://localhost:7234/api/Crafting/{id}"); } } }