Exemple #1
0
 public void ConsumeItem(StoryItem item)
 {
     item.LocationKey = "usedItem";
     RoomItems.Remove(item);
     ItemCount--;
     usedItems.Add(item);
 }
Exemple #2
0
        new public bool AddItem(StoryItem item)
        {
            if (ItemCount < Slots)
            {
                RoomItems.Add(item);
                ItemCount++;
                return(true);
            }

            return(false);
        }
        #pragma warning disable 1998
        protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
        {
            __builder.OpenElement(0, "div");
            __builder.AddAttribute(1, "class", "container-fluid");
            __builder.AddAttribute(2, "style", "margin-top:150px");
            __builder.AddMarkupContent(3, "\r\n    ");
            __builder.OpenElement(4, "div");
            __builder.AddAttribute(5, "class", "row d-flex flex-row justify-content-center");
            __builder.AddMarkupContent(6, "\r\n        ");
            __builder.OpenElement(7, "div");
            __builder.AddAttribute(8, "class", "col-10");
            __builder.AddMarkupContent(9, "\r\n            ");
            __builder.OpenElement(10, "table");
            __builder.AddAttribute(11, "class", "table table-striped");
            __builder.AddMarkupContent(12, "\r\n                ");
            __builder.AddMarkupContent(13, @"<thead class=""thead-light"">
                    <tr>
                        <th scope=""col"" class=""rounded-left"">ردیف</th>
                        <th scope=""col"">تعداد تخت</th>
                        <th scope=""col"">نوع اتاق</th>
                        <th scope=""col"">خوابگاه</th>
                        <th scope=""col"" class=""rounded-right"">عملیات</th>
                    </tr>
                </thead>
                ");
            __builder.OpenElement(14, "tbody");
            __builder.AddMarkupContent(15, "\r\n");
#line 21 "E:\Blazor\Albatross\Albatross\Client\Pages\Rooms.razor"
            if (RoomItems == null || RoomItems.Count() == 0)
            {
#line default
#line hidden
                __builder.AddContent(16, "                        ");
                __builder.AddMarkupContent(17, "<tr>\r\n                            <td class=\"text-center\" colspan=\"6\">داده ای برای نمایش وجود ندارد</td>\r\n                        </tr>\r\n");
#line 26 "E:\Blazor\Albatross\Albatross\Client\Pages\Rooms.razor"
            }
            else
            {
#line default
#line hidden
#line 29 "E:\Blazor\Albatross\Albatross\Client\Pages\Rooms.razor"
                foreach (var item in RoomItems)
                {
#line default
#line hidden
                    __builder.AddContent(18, "                            ");
                    __builder.OpenElement(19, "tr");
                    __builder.AddMarkupContent(20, "\r\n                                ");
                    __builder.OpenElement(21, "th");
                    __builder.AddAttribute(22, "scope", "row");
                    __builder.AddContent(23,
#line 32 "E:\Blazor\Albatross\Albatross\Client\Pages\Rooms.razor"
                                         Counter.ToString()

#line default
#line hidden
                                         );
                    __builder.CloseElement();
                    __builder.AddMarkupContent(24, "\r\n                                ");
                    __builder.OpenElement(25, "td");
                    __builder.AddContent(26,
#line 33 "E:\Blazor\Albatross\Albatross\Client\Pages\Rooms.razor"
                                         item.Capacity

#line default
#line hidden
                                         );
                    __builder.CloseElement();
                    __builder.AddMarkupContent(27, "\r\n                                ");
                    __builder.OpenElement(28, "td");
                    __builder.AddContent(29,
#line 34 "E:\Blazor\Albatross\Albatross\Client\Pages\Rooms.razor"
                                         item.Type

#line default
#line hidden
                                         );
                    __builder.CloseElement();
                    __builder.AddMarkupContent(30, "\r\n                                ");
                    __builder.OpenElement(31, "td");
                    __builder.AddContent(32,
#line 35 "E:\Blazor\Albatross\Albatross\Client\Pages\Rooms.razor"
                                         item.Dormitory

#line default
#line hidden
                                         );
                    __builder.CloseElement();
                    __builder.AddMarkupContent(33, "\r\n                                ");
                    __builder.AddMarkupContent(34, @"<td>
                                    <a href>
                                        <i title=""جزییات اتاق"" class=""fas fa-info text-info pr-1""></i>
                                    </a>
                                    <a href>
                                        <i title=""ویرایش اتاق"" class=""fas fa-edit text-warning""></i>
                                    </a>
                                    <a href>
                                        <i title=""حذف اتاق"" class=""fas fa-trash-alt text-danger""></i>
                                    </a>
                                </td>
                            ");
                    __builder.CloseElement();
                    __builder.AddMarkupContent(35, "\r\n");
#line 48 "E:\Blazor\Albatross\Albatross\Client\Pages\Rooms.razor"
                    Counter++;
                }

#line default
#line hidden
#line 49 "E:\Blazor\Albatross\Albatross\Client\Pages\Rooms.razor"
            }

#line default
#line hidden
            __builder.AddContent(36, "                ");
            __builder.CloseElement();
            __builder.AddMarkupContent(37, "\r\n            ");
            __builder.CloseElement();
            __builder.AddMarkupContent(38, "\r\n        ");
            __builder.CloseElement();
            __builder.AddMarkupContent(39, "\r\n    ");
            __builder.CloseElement();
            __builder.AddMarkupContent(40, "\r\n");
            __builder.CloseElement();
            __builder.AddMarkupContent(41, "\r\n\r\n");
            __builder.AddMarkupContent(42, "<a href=\"/Admin/Rooms/Register\" class=\"float\">\r\n    <i class=\"fa fa-plus my-float\"></i>\r\n</a>");
        }
Exemple #4
0
 public void addRoomItem(Item item)
 {
     RoomItems.Add(item);
 }