using System; using System.Collections.Generic; using System.Linq; using System.Reflection; 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.Controls { /// /// ShelfStatusControl.xaml 的交互逻辑 /// public partial class ShelfStatusControl : UserControl { public ShelfStatusControl(string shelfCode, int currentMode, string orderNumber) { InitializeComponent(); txtShelfCode.Text = shelfCode; txtOrderNumber.Text = orderNumber; //待机模式 = 0, //入库模式 = 1, //出库模式 = 2, //盘点模式 = 3 switch (currentMode) { case 0: txtCurrentMode.Text = "待机模式"; border.Background = Brushes.White; break; case 1: txtCurrentMode.Text = "入库模式"; border.Background = Brushes.LightSkyBlue; break; case 2: txtCurrentMode.Text = "出库模式"; border.Background = Brushes.Green; break; case 3: txtCurrentMode.Text = "盘点模式"; border.Background = Brushes.Pink; break; default: txtCurrentMode.Text = "未知"; border.Background = Brushes.White; break; } } } }