diff --git a/ValblazeProject/Components/InventoryItem.razor.cs b/ValblazeProject/Components/InventoryItem.razor.cs
index 88d27c6..a20f81b 100644
--- a/ValblazeProject/Components/InventoryItem.razor.cs
+++ b/ValblazeProject/Components/InventoryItem.razor.cs
@@ -21,7 +21,7 @@ namespace ValblazeProject.Components
public Inventaire Parent { get; set; }
///
- /// method call when a drag enter a slot and send an action
+ /// appel de la méthode lorsqu'un item entre dans un emplacement et envoie une action
///
internal void OnDragEnter()
{
@@ -32,8 +32,9 @@ namespace ValblazeProject.Components
Parent.Actions.Add(new InventoryAction { Action = "Drag Enter", Item = this.Item, Index = this.Index });
}
+
///
- /// method call when a drag leave a slot and send an action
+ /// appel de la méthode lorsqu'un item quitte un slot et envoie une action
///
internal void OnDragLeave()
{
@@ -44,8 +45,9 @@ namespace ValblazeProject.Components
Parent.Actions.Add(new InventoryAction { Action = "Drag Leave", Item = this.Item, Index = this.Index });
}
+
///
- /// method that manage a drop and send an action
+ /// Cette méthode gère le dépôt d'un item et envoie une action
///
internal void OnDrop()
{
@@ -77,8 +79,9 @@ namespace ValblazeProject.Components
}
+
///
- /// method call when darg start and send an action
+ /// appel de la méthode lorsque le darg démarre et envoie une action
///
private void OnDragStart()
@@ -88,8 +91,9 @@ namespace ValblazeProject.Components
Parent.Actions.Add(new InventoryAction { Action = "Drag Start", Item = this.Item, Index = this.Index });
}
+
///
- /// method call when drag end and send an action specialy when outside the inventory
+ /// Appel de la méthode quand le drag se termine et envoie une action spécialement en dehors de l'inventaire.
///
private void OnDragEnd()
{
diff --git a/ValblazeProject/Factories/ItemFactory.cs b/ValblazeProject/Factories/ItemFactory.cs
index 5bf0b6b..256f9f5 100644
--- a/ValblazeProject/Factories/ItemFactory.cs
+++ b/ValblazeProject/Factories/ItemFactory.cs
@@ -4,6 +4,12 @@ namespace ValblazeProject.Factories
{
public static class ItemFactory
{
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
public static ItemModel ToModel(Item item, byte[] imageContent)
{
return new ItemModel
@@ -20,6 +26,11 @@ namespace ValblazeProject.Factories
};
}
+ ///
+ ///
+ ///
+ ///
+ ///
public static Item Create(ItemModel model)
{
return new Item
@@ -37,6 +48,11 @@ namespace ValblazeProject.Factories
};
}
+ ///
+ ///
+ ///
+ ///
+ ///
public static void Update(Item item, ItemModel model)
{
item.DisplayName = model.DisplayName;
@@ -48,6 +64,12 @@ namespace ValblazeProject.Factories
item.UpdatedDate = DateTime.Now;
item.ImageBase64 = Convert.ToBase64String(model.ImageContent);
}
+
+ ///
+ ///
+ ///
+ ///
+ ///
public static Item Create(Item model)
{
return new Item
@@ -65,6 +87,11 @@ namespace ValblazeProject.Factories
};
}
+ ///
+ ///
+ ///
+ ///
+ ///
public static void Update(Item item, Item model)
{
item.DisplayName = model.DisplayName;
@@ -78,6 +105,11 @@ namespace ValblazeProject.Factories
item.Num = model.Num;
}
+ ///
+ /// Ajoute le numéro a un item
+ ///
+ ///
+ ///
public static void Add1(Item item, Item model)
{
item.Num = model.Num + 1;
diff --git a/ValblazeProject/Pages/Inventaire.razor.cs b/ValblazeProject/Pages/Inventaire.razor.cs
index 793f149..1f97460 100644
--- a/ValblazeProject/Pages/Inventaire.razor.cs
+++ b/ValblazeProject/Pages/Inventaire.razor.cs
@@ -14,9 +14,15 @@ namespace ValblazeProject.Pages
public partial class Inventaire
{
/******************* Initialisation des attributs *******************/
+ ///
+ /// Pour traduire la page
+ ///
[Inject]
public IStringLocalizer Localizer { get; set; }
+ ///
+ /// Data de l'API
+ ///
[Inject]
public IDataService DataService { get; set; }
@@ -26,24 +32,36 @@ namespace ValblazeProject.Pages
[Inject]
internal IJSRuntime JavaScriptRuntime { get; set; }
+ ///
+ /// Ma liste d'Item
+ ///
public List- items { get; set; } = new List
- ();
- private int totalItem;
-
- // List inventaire sauvegarder
+
+ ///
+ /// List inventaire sauvegarder
+ ///
public List
- Jitems;
+ ///
+ /// Donnée de la Grid Blazorise
+ ///
private DataGrid
- dataGrid;
- private string _searchText;
- private int totalSizeByPage = 5;
- private bool _trie = false;
- // Gestion logs
+ ///
+ /// Liste des actions
+ ///
public ObservableCollection Actions { get; set; }
- // Drag Item
+ ///
+ /// Item selectionner lors d'un glisser déposer
+ ///
public Item CurrentDragItem { get; set; }
-
+ private int totalItem;
+ private string _searchText;
+ private int totalSizeByPage = 5;
+ private bool _trie = false;
+
/******************* Attribut modifier *******************/
private string search
{
@@ -92,6 +110,7 @@ namespace ValblazeProject.Pages
///
private void OnActionsCollectionChanged(object? sender, NotifyCollectionChangedEventArgs e)
{
+ // je fais appel au fichier js de crafting, car je n'ai pas su résoudre le problème avec celui Inventaire.razor.js
JavaScriptRuntime.InvokeVoidAsync("Crafting.AddActions", e.NewItems);
}