整合管理器应用端(MAUI跨平台)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
3.3 KiB

using CommunityToolkit.Mvvm.ComponentModel;
using SunlightAggregationTerminal.Models;
using System.Collections.ObjectModel;
using System.Reflection.PortableExecutable;
namespace SunlightAggregationTerminal;
public partial class InfoDetail : ContentPage
{
public static ObservableCollection<ProbuctItem> InfoProbuctItems { get; set; } = new();
public static ObservableCollection<DyelotDetailsItem> InfoDyelotDetailsItems { get; set; } = new();
public InfoDetail(InfoItem item)
{
InitializeComponent();
this.BindingContext = item;
InfoProbuctItems.Add(new ProbuctItem { ProductName="cs", ProductCode="cs", ProductState="", ProductInf="" });
InfoProbuctItems.Add(new ProbuctItem { ProductName = "c23s", ProductCode = "cweds", ProductState = "", ProductInf = "" });
InfoProbuctItems.Add(new ProbuctItem { ProductName = "arf", ProductCode = "af", ProductState = "", ProductInf = "" });
InfoProbuctItems.Add(new ProbuctItem { ProductName = "afars", ProductCode = "cs", ProductState = "", ProductInf = "" });
InfoDyelotDetailsItems.Add(new DyelotDetailsItem
{ Dyelot = "2134566", Machine = "g01", CreationTime = "", CallTime = "" ,
ReDye=0,
Information = "yyjjy\nfxfxdsdg\n",
});
InfoDyelotDetailsItems.Add(new DyelotDetailsItem
{
Dyelot = "231423134566",
Machine = "g01",
CreationTime = "",
CallTime = "",
Information = "yyjjy\nfxfxdsdg\n",
});
InfoDyelotDetailsItems.Add(new DyelotDetailsItem
{
Dyelot = "2131324354566",
Machine = "g01",
CreationTime = "",
CallTime = "",
Information = "yyjjy\nfxfxdsdg\n",
});
InfoDyelotDetailsItems.Add(new DyelotDetailsItem
{
Dyelot = "2134123243566",
Machine = "g01",
CreationTime = "",
CallTime = "",
Information = "yyjjy\nfxfxdsdg\n",
});
InfoDyelotDetailsItems.Add(new DyelotDetailsItem
{
Dyelot = "2134566",
Machine = "g01",
CreationTime = "",
Information = "yyjjy\nfxfxdsdg\n",
});
CardCollectionView_machine.ItemsSource = InfoProbuctItems;
CardCollectionView_history.ItemsSource = InfoDyelotDetailsItems;
}
private void Button_real(object sender, EventArgs e)
{
_real.IsVisible = true;
_machine.IsVisible = false;
_history.IsVisible = false;
_control.IsVisible = false;
}
private void Button_machine(object sender, EventArgs e)
{
_real.IsVisible = false;
_machine.IsVisible = true;
_history.IsVisible = false;
_control.IsVisible = false;
}
private void Button_history(object sender, EventArgs e)
{
_real.IsVisible = false;
_machine.IsVisible = false;
_history.IsVisible = true;
_control.IsVisible = false;
}
private async void Button_control(object sender, EventArgs e)
{
_real.IsVisible = false;
_machine.IsVisible = false;
_history.IsVisible = false;
_control.IsVisible = true;
await DisplayAlertAsync("限制", "当前功能暂不可用", "是");
}
}