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 { /// /// MainInterface.xaml 的交互逻辑 /// public partial class MainInterface : UserControl { public MainInterface() { InitializeComponent(); } ShowInfo sw { get; set; } int a = 0; /// /// 载具产品状态切换 /// /// /// 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; } } } }