public FlowProps(ControlParams controlParams) { this.controlParams = controlParams; InitializeComponent(); intModeCombo.ItemsSource = Enum.GetValues(typeof(IntModeType)); intStartPhaseCombo.ItemsSource = Enum.GetValues(typeof(PhaseType)); eeModeCombo.ItemsSource = Util.GetEnumDescriptions(typeof(EEModeType)); intUpCompCombo.Items.Clear(); intLpCompCombo.Items.Clear(); foreach (ControlComp comp in controlParams.controlcomps) { intUpCompCombo.Items.Add(comp.ToString()); intLpCompCombo.Items.Add(comp.ToString()); } DataContext = controlParams; fuJog.val = controlParams.fu; flJog.val = controlParams.fl; fuJog.IsEnabled = (controlParams.runMode != RunModeType.LowerPhase); flJog.IsEnabled = (controlParams.runMode != RunModeType.UpperPhase); ptransuJog.val = controlParams.Ptransu; ptranslJog.val = controlParams.Ptransl; updateTransJogsEnabled(); }
public SetupView(ControlParams controlParams) { this.controlParams = controlParams; InitializeComponent(); profileCombo.ItemsSource = Util.GetEnumDescriptions(typeof(ProfileType)); volUnitsCombo.ItemsSource = Util.GetEnumDescriptions(typeof(VolUnitsType)); massUnitsCombo.ItemsSource = Util.GetEnumDescriptions(typeof(MassUnitsType)); timeUnitsCombo.ItemsSource = Util.GetEnumDescriptions(typeof(TimeUnitsType)); this.DataContext = controlParams; // can make dynamic using ControlParamsObserver view = new SetupPreviewProfileView(controlParams); setupContent.Content = view; }
public SetupPreviewProfileView(ControlParams controlParams) : base() { this.controlParams = controlParams; InitializeComponent(); modelCombo.ItemsSource = Enum.GetValues(typeof(ModelType)); runModeCombo.ItemsSource = Util.GetEnumDescriptions(typeof(RunModeType)); kdefCombo.ItemsSource = Util.GetEnumDescriptions(typeof(KdefType)); columnVis.updateControlParams(controlParams); this.DataContext = controlParams; previewDataGrid.DataContext = controlParams; updateParams(controlParams); }