private void Window_Loaded(object sender, RoutedEventArgs e) { GS_SPA = (GS_SPAvWindow)Owner; cbPortNameGS.IsEnabled = !GS_SPA.Working; cbPortNameCUDR.IsEnabled = !GS_SPA.Working; cbPortNameGS.SelectedItem = GS_SPA.Core.Setting.inputGS.SerialPort.PortName; if (cbPortNameGS.SelectedItem == null && cbPortNameGS.Items.Count > 0) { cbPortNameGS.SelectedIndex = 0; } cbPortNameCUDR.SelectedItem = GS_SPA.Core.Setting.inputCUDR.SerialPort.PortName; if (cbPortNameCUDR.SelectedItem == null && cbPortNameCUDR.Items.Count > 0) { cbPortNameCUDR.SelectedIndex = 0; } tbDepthOnlineGraph.Text = GS_SPA.Core.Setting.DepthOnlineGraph.ToString(); cbIsGS.IsChecked = GS_SPA.Core.Setting.IsGS; cbIsCUDR.IsChecked = GS_SPA.Core.Setting.IsCUDR; cbBaudRateGS.SelectedItem = GS_SPA.Core.Setting.inputGS.SerialPort.BaudRate; cbDataBitsGS.SelectedItem = GS_SPA.Core.Setting.inputGS.SerialPort.DataBits; cbParityGS.SelectedItem = GS_SPA.Core.Setting.inputGS.SerialPort.Parity; cbStopBitsGS.SelectedItem = GS_SPA.Core.Setting.inputGS.SerialPort.StopBits; tbTimeoutGS.Text = GS_SPA.Core.Setting.intervalReadGS.ToString(); cbBaudRateCUDR.SelectedItem = GS_SPA.Core.Setting.inputCUDR.SerialPort.BaudRate; cbDataBitsCUDR.SelectedItem = GS_SPA.Core.Setting.inputCUDR.SerialPort.DataBits; cbParityCUDR.SelectedItem = GS_SPA.Core.Setting.inputCUDR.SerialPort.Parity; cbStopBitsCUDR.SelectedItem = GS_SPA.Core.Setting.inputCUDR.SerialPort.StopBits; tbTimeoutCUDR.Text = GS_SPA.Core.Setting.intervalReadCUDR.ToString(); }
private void Window_Loaded(object sender, RoutedEventArgs e) { GS_SPA = (GS_SPAvWindow)this.Owner; WorkInfo[] listWork = GS_SPA.Core.Archive.GetListWorks(); lvArchives.ItemsSource = listWork; controller.UnbindAll(); controller.BindMouseDown(OxyMouseButton.Right, PlotCommands.PanAt); controller.BindMouseWheel(PlotCommands.ZoomWheel); controller.BindKeyDown(OxyKey.R, PlotCommands.Reset); controller.BindMouseDown(OxyMouseButton.Left, new DelegatePlotCommand <OxyMouseDownEventArgs>( (view, controller, args) => controller.AddMouseManipulator(view, new WpbTrackerManipulator(view), args))); plotter.Controller = controller; }
private void Window_Loaded(object sender, RoutedEventArgs e) { GS_SPA = (GS_SPAvWindow)Owner; dataParams = new ObservableCollection <DataParam>(); foreach (DataParam param in GS_SPA.Core.Setting.ListDataParams) { dataParams.Add(param.CopyNewDataParam()); dataParams[dataParams.Count - 1].IsBlock = !working; } dgParamSetting.ItemsSource = dataParams; cbSelectFlow.Items.Add(GS_SPA.Core.Setting.inputGS.InputParams[0].Param.Title.Split(',')[0]); cbSelectFlow.Items.Add(GS_SPA.Core.Setting.inputGS.InputParams[2].Param.Title.Split(',')[0]); if (GS_SPA.Core.Setting.firstFlow.Value == "1") { cbSelectFlow.SelectedIndex = 0; } else { cbSelectFlow.SelectedIndex = 1; } }
private void Window_Loaded(object sender, RoutedEventArgs e) { GS_SPA = (GS_SPAvWindow)Owner; }