Ejemplo n.º 1
0
        /// <summary>
        /// Used whenever the user wants to modify a data record
        /// </summary>
        /// <param name="dataRecord">The data record to modify</param>
        private void ModifyDataRecord(ref DataRecord dataRecord)
        {
            DataRecordForm dataRecordForm = new DataRecordForm(ref dataRecord);

            if (dataRecordForm.ShowDialog(this).Equals(DialogResult.OK))
            {
                dataRecordListView.UpdateObject(dataRecord);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Used whenever the user wants to create a new data record
        /// </summary>
        private void CreateDataRecord()
        {
            DataRecordForm dataRecordForm = new DataRecordForm();

            if (dataRecordForm.ShowDialog(this).Equals(DialogResult.OK))
            {
                currentMeter.dataRecords.Add(dataRecordForm.resultRecord);
                updateGUI();
            }
        }