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 BPASmartClient.CustomResource.Pages.View { /// /// VariableConfigView.xaml 的交互逻辑 /// public partial class VariableConfigView : UserControl { public VariableConfigView() { InitializeComponent(); } private void DataGrid_LoadingRow(object sender, DataGridRowEventArgs e) { e.Row.Header = e.Row.GetIndex() + 1; } private void fryOne_LoadingRow(object sender, DataGridRowEventArgs e) { e.Row.Header = e.Row.GetIndex() + 1; } private void fryTwo_LoadingRow(object sender, DataGridRowEventArgs e) { e.Row.Header = e.Row.GetIndex() + 1; } private void fryThree_LoadingRow(object sender, DataGridRowEventArgs e) { e.Row.Header = e.Row.GetIndex() + 1; } private void fryFour_LoadingRow(object sender, DataGridRowEventArgs e) { e.Row.Header = e.Row.GetIndex() + 1; } private void fryFive_LoadingRow(object sender, DataGridRowEventArgs e) { e.Row.Header = e.Row.GetIndex() + 1; } private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { ComboBox cbo= sender as ComboBox; if (cbo != null&>!=null&&fryOne!=null&&fryTwo!=null&&fryThree!=null&&fryFour!=null&&fryFive!=null) { switch (cbo.SelectedValue) { case "滚筒输送线": this.GT.Visibility = Visibility.Visible; this.fryOne.Visibility = Visibility.Collapsed; this.fryTwo.Visibility = Visibility.Collapsed; this.fryThree.Visibility = Visibility.Collapsed; this.fryFour.Visibility = Visibility.Collapsed; this.fryFive.Visibility = Visibility.Collapsed; break; case "炒锅1": this.GT.Visibility = Visibility.Collapsed; this.fryOne.Visibility = Visibility.Visible; this.fryTwo.Visibility = Visibility.Collapsed; this.fryThree.Visibility = Visibility.Collapsed; this.fryFour.Visibility = Visibility.Collapsed; this.fryFive.Visibility = Visibility.Collapsed; break; case "炒锅2": this.GT.Visibility = Visibility.Collapsed; this.fryOne.Visibility = Visibility.Collapsed; this.fryTwo.Visibility = Visibility.Visible; this.fryThree.Visibility = Visibility.Collapsed; this.fryFour.Visibility = Visibility.Collapsed; this.fryFive.Visibility = Visibility.Collapsed; break; case "炒锅3": this.GT.Visibility = Visibility.Collapsed; this.fryOne.Visibility = Visibility.Collapsed; this.fryTwo.Visibility = Visibility.Collapsed; this.fryThree.Visibility = Visibility.Visible; this.fryFour.Visibility = Visibility.Collapsed; this.fryFive.Visibility = Visibility.Collapsed; break; case "炒锅4": this.GT.Visibility = Visibility.Collapsed; this.fryOne.Visibility = Visibility.Collapsed; this.fryTwo.Visibility = Visibility.Collapsed; this.fryThree.Visibility = Visibility.Collapsed; this.fryFour.Visibility = Visibility.Visible; this.fryFive.Visibility = Visibility.Collapsed; break; case "炒锅5": this.GT.Visibility = Visibility.Collapsed; this.fryOne.Visibility = Visibility.Collapsed; this.fryTwo.Visibility = Visibility.Collapsed; this.fryThree.Visibility = Visibility.Collapsed; this.fryFour.Visibility = Visibility.Collapsed; this.fryFive.Visibility = Visibility.Visible; break; } } } } }