public MainWindow(ProControllerInterface controller, ControlParams controlParams) { this.controller = controller; InitializeComponent(); // static for now; make change dynamically setupView = new SetupView(controlParams); setupTab.Content = setupView; outView = new ChromView(Transparency.Outline, true); outView.CompSelected += new SelectCompEventHandler(chromview_CompSelected); outView.CompsSelected += new SelectCompsEventHandler(chromview_CompsSelected); outView.TimeMode = false; outTab.Content = outView; timeView = new ChromView(Transparency.Outline, true); timeView.registerTimeObserver(this); timeView.registerTimeObserver(controller); timeView.CompSelected += new SelectCompEventHandler(chromview_CompSelected); timeView.CompsSelected += new SelectCompsEventHandler(chromview_CompsSelected); timeView.TimeMode = true; timeTab.Content = timeView; peakinfo = new PeakInfo(); peaksinfo = new PeaksInfo(); }
public void loadExecute(object sender, ExecutedRoutedEventArgs e) { FileDialog dialog = new OpenFileDialog(); dialog.Filter = "XML files (*.xml)|*.xml|All files (*.*)|*.*"; if (dialog.ShowDialog() == DialogResult.OK) { settingsFilename = dialog.FileName; view.setTab(ViewType.Setup); controlParams.unregisterObserver(this); XmlSerializer serializer = new XmlSerializer(typeof(ControlParams)); try { controlParams = (ControlParams)serializer.Deserialize(new StreamReader(settingsFilename)); } catch (InvalidOperationException) { // read/parse error: controlparams appears unaffected } controlParams.updateControlComps(); // new controlparams not registered yet setNewControlParams(); updateTitle(); } }
public void updateParams(ControlParams controlParams) { if (setupTab.IsSelected) { setupView.updateParams(controlParams); } }
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 AdvProbProps(ControlParams controlparams) { this.controlparams = controlparams; InitializeComponent(); DataContext = controlparams; rotspeedJog.val = controlparams.mixSpeed; effJog.val = controlparams.efficiency; }
public void clearExecute(object sender, ExecutedRoutedEventArgs e) { controlParams = new ControlParams(); settingsFilename = ""; // new controlparams not registered yet setNewControlParams(); updateTitle(); }
public AdvCCDProps(ControlParams controlparams) { this.controlparams = controlparams; InitializeComponent(); DataContext = controlparams; columnJog.val = controlparams.column; effJog.val = controlparams.efficiency; }
public void updateControlParams(ControlParams controlParams) { this.controlParams = controlParams; if (mainWindow != null) { mainWindow.updateParams(controlParams); } }
public ColumnProps(ControlParams controlParams) { this.controlParams = controlParams; InitializeComponent(); DataContext = controlParams; ufJog.val = controlParams.uf; lfJog.val = controlParams.lf; }
public AdvTransProps(ControlParams controlparams) { this.controlparams = controlparams; InitializeComponent(); DataContext = controlparams; columnJog.val = controlparams.column; kaJog.val = controlparams.ka; }
public override void updateParams(ControlParams controlParams) { this.controlParams = controlParams; this.DataContext = controlParams; previewDataGrid.DataContext = controlParams; columnVis.updateControlParams(controlParams); columnVis.update(); updateParamSummary(); }
public InjectProps(ControlParams controlParams) { this.controlParams = controlParams; InitializeComponent(); injectModeCombo.ItemsSource = Enum.GetValues(typeof(InjectModeType)); phaseCombo.ItemsSource = Enum.GetValues(typeof(PhaseType)); feedUnitsCombo.ItemsSource = Enum.GetValues(typeof(QuantityType)); DataContext = controlParams; posJog.val = controlParams.injectPos; posJog.IsEnabled = controlParams.advancedMode; }
public ProView(ProControllerInterface controller, ControlParams controlParams, OptionParams optionParams, ViewParams viewParams, ProModelInterface model) { this.controller = controller; this.controlParams = controlParams; this.optionParams = optionParams; this.viewParams = viewParams; this.model = model; model.registerPreviewObserver(this); model.registerModelObserver(this); }
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); }
public void updateControlParams(ControlParams controlparams) { this.controlparams = controlparams; colvx = 2 * defvw; colvw = 1 - 4 * defvw; if (controlparams.profile == ProfileType.CCC) { colvy = defvh; colvh = 1 - defvh; } else if (controlparams.profile == ProfileType.CCD || controlparams.profile == ProfileType.ToroidalCCC) { colvy = defvh + defvs; colvh = 1 - defvh - defvs; } else { colvy = defvh + defvs / 2; colvh = 1 - defvh - defvs; } }
public void updateParams(ControlParams controlParams) { this.controlParams = controlParams; this.DataContext = controlParams; view.updateParams(controlParams); }
public virtual void updateParams(ControlParams controlparams) // will be overwritten { }