Change every file name, add new file and modify many things
continuous-integration/drone/push Build is failing Details

Projet
Dorian HODIN 2 years ago
parent 580778c86f
commit c4b9c62cb9

@ -2,7 +2,6 @@
"ExpandedNodes": [
"",
"\\Code",
"\\Code\\ProjetBlazor",
"\\Code\\ProjetBlazor\\Properties"
],
"SelectedNode": "\\Code\\BlazorApp.sln",

Binary file not shown.

Binary file not shown.

@ -0,0 +1,21 @@
<CascadingValue Value="@this">
<div class="css-recipe">
@for(int i = 0; i<Models.InventoryList.Size;i++)
{
<ItemInventory items="@inventory.inventoryItems[i]" Index="@i"/>
}
</div>
<div class="css-grid">
<InventoryList/>
</div>
<div class="actions" id="actions">
<div>@Localizer["Actions"]</div>
</div>
</CascadingValue>

@ -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<InventoryAction> Actions { get; set; }
[Inject]
internal IJSRuntime JavaScriptRuntime { get; set; }
[Inject]
public IStringLocalizer<InventoryList> Localizer { get; set; }
[Inject]
public ILocalStorageService LocalStorage { get; set; }
[Inject]
public HttpClient Http { get; set; }
public Inventory()
{
Actions = new ObservableCollection<InventoryAction>();
Actions.CollectionChanged += OnActionsCollectionChanged;
}
private void OnActionsCollectionChanged(object? sender, NotifyCollectionChangedEventArgs e)
{
JavaScriptRuntime.InvokeVoidAsync("Crafting.AddActions", e.NewItems);
}
private async Task OnReadData(DataGridReadDataEventArgs<Item> e)
{
if (e.CancellationToken.IsCancellationRequested)
{
return;
}
var response = await LocalStorage.GetItemAsync<String>("list");
if (!e.CancellationToken.IsCancellationRequested)
{
inventory = JsonSerializer.Deserialize<Models.InventoryList>(response);
}
}
}
}

@ -14,7 +14,7 @@
padding-top: 1px;
padding-left: 5px;
border: 1px solid black;
height: 200px;
height: 250px;
clear: both;
overflow: scroll;
}

@ -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;

@ -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;
}
}
}

@ -1,7 +1,6 @@
@using ProjetBlazor.Models
<CascadingValue Value="@this">
<div class="css-grid" draggable="true">
<div class="css-grid">
<div><h1>@Localizer["List"]</h1></div>
<DataGrid TItem="Item"
@ -23,25 +22,4 @@
<DataGridColumn TItem="Item" Field="@nameof(Item.StackSize)" Caption="@Localizer["Stack"]" Filterable="false" Sortable="false"/>
</DataGrid>
</div>
<div><h1>@Localizer["Inventory"]</h1></div>
<div class="css-grid">
@for(int i = 0; i<Models.Inventory.size;i++)
{
@if (inventory.inventoryItems[i] != null)
{
<ItemInventory items="@inventory.inventoryItems[i]" Index="@i" NoDrop=true />
}
else
{
<ItemInventory items="@inventory.inventoryItems[i]" Index="@i"/>
}
<GetItemInInventory Index="@i" />
}
</div>
<div class="actions" id="actions">
<div>@Localizer["Actions"]</div>
</div>
</CascadingValue>

@ -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<Item> 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<InventoryList> 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();
}
}
}

@ -1,15 +1,13 @@
@using ProjetBlazor.Models;
<div class="item"
ondragover="event.preventDefault();"
draggable="true"
@ondragstart="@OnDragStart"
@ondrop="@OnDrop"
@ondragenter="@OnDragEnter"
@ondragleave="@OnDragLeave">
<div
class="item"
ondragover="event.preventDefault();"
draggable="true"
@ondragstart="@OnDragStart"
@ondrop="@OnDrop"
@ondragenter="@OnDragEnter"
@ondragleave="@OnDragLeave">
@if (!string.IsNullOrWhiteSpace(Item.ImageBase64))
{
@ -17,7 +15,7 @@
}
else
{
<img src="images/default.png" class="img-thumbnail" title="Item.DisplayName" alt="Item.DisplayName" style="width: 60px" />
<img src="images/default.png" class="img-thumbnail" title="Item.DisplayName" alt="Item.DisplayName" style="width: 60px"/>
}
</div>

@ -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;
}
}
}

@ -1,20 +1,19 @@
<div class="item"
ondragover="event.preventDefault();"
<div ondragover="event.preventDefault();"
@ondragstart="@OnDragStartAsync"
@ondrop="@OnDropAsync"
@ondragenter="@OnDragEnter"
@ondragleave="@OnDragLeave">
@if(Items != null)
{
@if(!string.IsNullOrWhiteSpace(Items.item.ImageBase64))
{
<div Class="item">
@if(!string.IsNullOrWhiteSpace(Items.item.ImageBase64))
{
<div class="item">
<img src="data:image/png;base64, @(Items.item.ImageBase64)" title="@Items.item.DisplayName" alt="@Items.item.DisplayName" style="width: 50px; height: 50px" />
<span class="number-item">@Items.Stack</span>
</div>
}
else
{
<span class="number-item">@Items.Stack</span>
</div>
}
else
{
<div class="item">
<img src="images/background.png" title="@Items.item.DisplayName" alt="@Items.item.DisplayName" style="width: 50px; height: 50px"/>
<span class="number-item">@Items.Stack</span>

@ -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,9 +33,9 @@ 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);
}
@ -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<Item>("data" + this.Index, this.Items.item);
await LocalStorage.SetItemAsync<int>("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,7 +65,7 @@ namespace ProjetBlazor.Components
Parent.CurrentDragItem = null;
await LocalStorage.SetItemAsync<Item>("data" + this.Index, this.Items.item);
await LocalStorage.SetItemAsync<int>("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
@ -77,7 +78,7 @@ namespace ProjetBlazor.Components
await LocalStorage.SetItemAsync<Item>("data" + this.Index, this.Items.item);
await LocalStorage.SetItemAsync<int>("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<Item>("data" + this.Index, this.Items.item);
await LocalStorage.SetItemAsync<int>("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;
}
}
}

@ -1,5 +1,5 @@
.item {
margin: 10% 10% 10% 10%;
margin: 8% 8% 8% 8%;
width: 100px;
height: 100px;
border: 1px solid;

@ -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<ActionInInventory> Actions { get; set; }
public ItemInInventory CurrentDragItem { get; set; }
[Parameter]
public List<Item> Items { get; set; }
/// <summary>
/// Gets or sets the java script runtime.
/// </summary>
[Inject]
internal IJSRuntime JavaScriptRuntime { get; set; }
[Inject]
public IStringLocalizer<ItemsList> Localizer { get; set; }
private void OnActionsCollectionChanged(object? sender, NotifyCollectionChangedEventArgs e)
{
_ = JavaScriptRuntime.InvokeVoidAsync("Crafting.AddActions", e.NewItems);
}
private List<Item>? 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<ActionInInventory>();
Actions.CollectionChanged += OnActionsCollectionChanged;
}
protected override async Task OnInitializedAsync()
{
items = await DataService.GetAll();
totalItem = await DataService.Count();
await base.OnInitializedAsync();
}
}
}

@ -0,0 +1,11 @@
@typeparam TItem
<div>
@if ((Items?.Count ?? 0) != 0)
{
@foreach (var item in Items)
{
@ShowTemplate(item);
}
}
</div>

@ -0,0 +1,13 @@
using Microsoft.AspNetCore.Components;
namespace ProjetBlazor.Components
{
public partial class ShowItems<TItem>
{
[Parameter]
public List<TItem> Items { get; set; }
[Parameter]
public RenderFragment<TItem> ShowTemplate { get; set; }
}
}

@ -1,22 +0,0 @@
namespace ProjetBlazor.Models
{
public partial class Inventory
{
static public int size = 18;
/// <summary>
/// List of inventory items.
/// </summary>
public List<ItemInInventory> inventoryItems = new List<ItemInInventory>(new ItemInInventory[size]);
/// <summary>
/// Constructor for InventoryList.
/// </summary>
public Inventory()
{
inventoryItems[0] = new ItemInInventory();
}
}
}

@ -1,6 +1,11 @@
namespace ProjetBlazor.Models
using System.Collections;
namespace ProjetBlazor.Models
{
public class ItemInInventory
/// <summary>
/// Represents an item in a player's inventory.
/// </summary>
public class InventoryItem
{
public Item item;
int stack;
@ -13,7 +18,7 @@
/// <summary>
/// Constructor for InventoryItem with no parameters.
/// </summary>
public ItemInInventory()
public InventoryItem()
{
item = new Item();
Stack = 64;
@ -22,7 +27,7 @@
/// Constructor for InventoryItem with a single item.
/// </summary>
/// <param name="item">The item.</param>
public ItemInInventory(Item item)
public InventoryItem(Item item)
{
this.item = item;
Stack = 1;
@ -33,7 +38,7 @@
/// </summary>
/// <param name="item">The item</param>
/// <param name="stock">The number of items in the stack.</param>
public ItemInInventory(Item item, int stock)
public InventoryItem(Item item, int stock)
{
this.item = item;
Stack = stock;

@ -0,0 +1,26 @@
using Microsoft.AspNetCore.Http.Features;
namespace ProjetBlazor.Models
{
/// <summary>
/// Represents a list of items in a player's inventory.
/// </summary>
public partial class InventoryList
{
public static readonly int Size = 27;
/// <summary>
/// List of inventory items.
/// </summary>
public List<InventoryItem> inventoryItems = new List<InventoryItem>(new InventoryItem[Size]);
/// <summary>
/// Constructor for InventoryList.
/// </summary>
public InventoryList()
{
inventoryItems[0] = new InventoryItem();
}
}
}

@ -1,16 +1,20 @@
namespace ProjetBlazor.Models
{
/// <summary>
/// Represents an item.
/// </summary>
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<string>? EnchantCategories { get; set; }
public List<string>? RepairWith { get; set; }
public DateTime? CreatedDate { get; set; }
public List<string> EnchantCategories { get; set; }
public List<string> RepairWith { get; set; }
public DateTime CreatedDate { get; set; }
public DateTime? UpdatedDate { get; set; }
public string? ImageBase64 { get; set; }
public string ImageBase64 { get; set; }
}
}

@ -2,39 +2,40 @@
namespace ProjetBlazor.Models
{
/// <summary>
/// Model for creating or updating an item.
/// </summary>
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<string>? EnchantCategories { get; set; }
public List<string> EnchantCategories { get; set; }
public List<string>? RepairWith { get; set; }
public List<string> 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; }
}
}

@ -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<Item> Items { get; set; } = new List<Item>();
protected override async Task OnAfterRenderAsync(bool firstRender)
{
_ = base.OnAfterRenderAsync(firstRender);
if (!firstRender)
{
return;
}
Items = await DataService.List(0, await DataService.Count());
StateHasChanged();
}
}
}

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Actions" xml:space="preserve">
<value>Actions</value>
</data>
<data name="Image" xml:space="preserve">
<value>Item Picture</value>
</data>
<data name="Inventory" xml:space="preserve">
<value>My Inventory :</value>
</data>
<data name="List" xml:space="preserve">
<value>List of Items :</value>
</data>
<data name="Nom" xml:space="preserve">
<value>Name</value>
</data>
<data name="Stack" xml:space="preserve">
<value>Stack Size</value>
</data>
</root>

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Actions" xml:space="preserve">
<value>Actions</value>
</data>
<data name="Image" xml:space="preserve">
<value>Image de l'item</value>
</data>
<data name="Inventory" xml:space="preserve">
<value>Mon Inventaire :</value>
</data>
<data name="List" xml:space="preserve">
<value>Liste des Items :</value>
</data>
<data name="Nom" xml:space="preserve">
<value>Nom</value>
</data>
<data name="Stack" xml:space="preserve">
<value>Taille du Stack</value>
</data>
</root>

@ -40,7 +40,7 @@ namespace Blazor.Services
/// <returns>Task representing the asynchronous operation, returning a list of items.</returns>
public async Task<List<Item>> List(int currentPage, int pageSize)
{
return await _http.GetFromJsonAsync<List<Item>>($"https://codefirst.iut.uca.fr/containers/container-blazor-web-api-marcchevaldonne/api/Crafting/?currentPage={currentPage}&pageSize={pageSize}");
return await _http.GetFromJsonAsync<List<Item>>($"https://localhost:7234/api/Crafting/?currentPage={currentPage}&pageSize={pageSize}");
}
/// <summary>
@ -59,7 +59,7 @@ namespace Blazor.Services
/// <returns>Task representing the asynchronous operation, returning the item with the specified ID.</returns>
public async Task<Item> GetById(int id)
{
return await _http.GetFromJsonAsync<Item>($"https://codefirst.iut.uca.fr/containers/container-blazor-web-api-marcchevaldonne/api/Crafting/{id}");
return await _http.GetFromJsonAsync<Item>($"https://localhost:7234/api/Crafting/{id}");
}
}
}

Loading…
Cancel
Save