整合管理器应用端(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.

126 lines
4.0 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<DyelotItem> InfoDyelotItems { 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 = "" });
InfoDyelotItems.Add(new DyelotItem { Dyelot = "2134566", Machine = "g01", CreationTime = "", CallTime = "" ,
ReDye="0",
Step = "0",
FabricName = "21345122343566",
ColorName = "g01",
CustomerName = "",
EndTime = "",
StartTime = "",
Information = "yyjjy\nfxfxdsdg\n",
});
InfoDyelotItems.Add(new DyelotItem
{
Step = "3",
Dyelot = "231423134566",
Machine = "g01",
CreationTime = "",
CallTime = "",
FabricName = "2134566",
ColorName = "g01",
CustomerName = "",
EndTime = "",
StartTime = "",
Information = "yyjjy\nfxfxdsdg\n",
});
InfoDyelotItems.Add(new DyelotItem
{
Step = "3",
Dyelot = "2131324354566",
Machine = "g01",
CreationTime = "",
CallTime = "",
FabricName = "2134566",
ColorName = "g01",
CustomerName = "",
EndTime = "",
StartTime = "",
Information = "yyjjy\nfxfxdsdg\n",
});
InfoDyelotItems.Add(new DyelotItem
{
Dyelot = "2134123243566",
Machine = "g01",
CreationTime = "",
CallTime = "",
FabricName = "2134566",
ColorName = "g01",
CustomerName = "",
EndTime = "",
StartTime = "",
Information = "yyjjy\nfxfxdsdg\n",
});
InfoDyelotItems.Add(new DyelotItem
{
Dyelot = "2134566",
Machine = "g01",
CreationTime = "",
CallTime = "",
FabricName = "2134566",
ColorName = "g01",
CustomerName = "",
EndTime = "",
StartTime = "",
Information = "yyjjy\nfxfxdsdg\n",
});
CardCollectionView_machine.ItemsSource = InfoProbuctItems;
CardCollectionView_history.ItemsSource = InfoDyelotItems;
}
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("限制", "当前功能暂不可用", "是");
}
}