passDataPrefChanges() public method

Passes the Data Preferences changed to the Main Control.
public passDataPrefChanges ( bool ts, int datapref, string format ) : void
ts bool true: provides timestamps along with data
datapref int Based on the GetValues, 0(raw), negative(sampling), positive(profiled sampling)
format string string version of passed data.
return void
Esempio n. 1
0
        /// <summary>
        /// Parses the string representation of the DataPreferences and setup Dialog.
        /// </summary>
        /// <remarks> if string contains "ts" then timestamp is used
        /// if string contains a number, then setups the raw/sample/profiled sample choice.</remarks>
        /// <param name="format"> String representation of the data preferences.</param>
        public void setupDataPreferences(string format)
        {
            TimeStamps = Regex.IsMatch(format, @"(ts)");
            checkTimestamps.Checked = TimeStamps;

            int i;

            format = Regex.Replace(format, @"[^\d-]", "");
            int.TryParse(format, out i);
            setDataPref(i);

            main.passDataPrefChanges(TimeStamps, getDataPref(), formatToString());
        }
Esempio n. 2
0
 //Constructor
 /// <summary>
 ///  Constructor of the Data Preferences Dialog.
 /// </summary>
 /// <param name="main"> The MainForm, needed to pass changes in the Preferences to the MainControl.</param>
 public DataPreferences(MainForm main)
 {
     this.main = main;
     InitializeComponent();
     TimeStamps        = true;
     formatTimeStamp   = "ts";
     DataPrefMultiple  = 0;
     mTBIntervals.Text = "" + 20;
     main.passDataPrefChanges(TimeStamps, getDataPref(), formatToString());
 }
 //Constructor
 /// <summary>
 ///  Constructor of the Data Preferences Dialog.
 /// </summary>
 /// <param name="main"> The MainForm, needed to pass changes in the Preferences to the MainControl.</param>
 public DataPreferences(MainForm main)
 {
     this.main = main;
     InitializeComponent();
     TimeStamps = true;
     formatTimeStamp = "ts";
     DataPrefMultiple = 0;
     mTBIntervals.Text = ""+20;
     main.passDataPrefChanges(TimeStamps, getDataPref(), formatToString());
 }