Exemple #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Settings"/> class.
        /// </summary>
        /// <param name="Parent">The parent Window</param>
        public Settings(MainForm Parent)
        {
            ParentWindow = Parent;
            InitializeComponent();

            InputDisplaySpeed.DisplayMember = "Value";
            InputDisplaySpeed.ValueMember = "Key";
            InputDisplaySpeed.DataSource = new BindingSource(SpeedValues, null);
            InputDisplaySpeed.DataBindings.Add("SelectedValue", ParentWindow.DisplaySpeed, null, true, DataSourceUpdateMode.Never);

            InputConnectOnStart.DisplayMember = "Value";
            InputConnectOnStart.ValueMember = "Key";
            InputConnectOnStart.DataSource = new BindingSource(BoolValues, null);
            InputConnectOnStart.DataBindings.Add("SelectedValue", ParentWindow.connectOnStart, null, true, DataSourceUpdateMode.Never);

            InputLogLevel.DisplayMember = "Value";
            InputLogLevel.ValueMember = "Key";
            InputLogLevel.DataSource = new BindingSource(Verbosity, null);
            InputLogLevel.DataBindings.Add("SelectedValue", ParentWindow.debugLevel, null, true, DataSourceUpdateMode.Never);

            InputRefresh.DataBindings.Add("Text", ParentWindow.refreshSpeed, null, true, DataSourceUpdateMode.OnPropertyChanged);

            BoxComPorts.DataSource = SerialPort.GetPortNames();
            BoxBaud.DataSource = new int[] { 9600, 19200, 38400 };

            BoxBaud.Text = Properties.Settings.Default.BaudRate;
            BoxComPorts.Text = Properties.Settings.Default.ComPort;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="LogOptions"/> class.
        /// </summary>
        /// <param name="Window">The Parent Window</param>
        public LogOptions(MainForm Window)
        {
            InitializeComponent();
            ParentWindow = Window;
            Default = InputDuration.BackColor;

            InputLogSpeed.DisplayMember = "Value";
            InputLogSpeed.ValueMember = "Key";
            InputLogSpeed.DataSource = new BindingSource(SpeedValues, null);
            InputLogSpeed.SelectedValue = Properties.Settings.Default.LogSpeed;
        }
Exemple #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DataLogger"/> class.
 /// </summary>
 /// <param name="Window">The window.</param>
 public DataLogger(MainForm Window)
 {
     MainWindow = Window;
 }
Exemple #4
0
 public PressureChart(MainForm Parent)
 {
     MainWindow = Parent;
     InitializeComponent();
 }