TFLH/Views/MainInterface.xaml.cs
2026-08-06 09:50:46 +08:00

66 lines
1.7 KiB
C#

using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace Views
{
/// <summary>
/// MainInterface.xaml 的交互逻辑
/// </summary>
public partial class MainInterface : UserControl
{
public MainInterface()
{
InitializeComponent();
}
ShowInfo sw { get; set; }
int a = 0;
/// <summary>
/// 载具产品状态切换
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void Label_MouseDoubleClick(object sender, MouseButtonEventArgs e)
{
Label la = sender as Label;
sw = la.DataContext as ShowInfo;
switch (a)
{
case 0:
sw.StatusBackground = ColorStr.Gray;
break;
case 1:
sw.StatusBackground = ColorStr.Green;
break;
case 2:
sw.StatusBackground = ColorStr.Blue;
break;
case 3:
sw.StatusBackground = ColorStr.Yellow;
break;
case 4:
sw.StatusBackground = ColorStr.White;
break;
}
a++;
if (a >= 5)
{
a = 0;
}
}
}
}