private void readSettingsDataFromDlg()
        {
            //current settings
            if (settings == null)
            {
                settings = new PressureLossReportData();
            }
            settings.DisplayCriticalPath             = checkBoxCriticalPath.Checked;
            settings.DisplayDetailInfoForStraightSeg = checkBoxSegmentInfo.Checked;
            settings.DisplayFittingLCSum             = checkBoxFittingInfo.Checked;
            settings.DisplaySysInfo   = checkBoxDisplaySystemInfo.Checked;
            settings.OpenAfterCreated = checkBoxOpenAfterCreated.Checked;

            UIHelperFunctions.getFieldsFromSelectedListBox(settings.AvailableFields, listBoxReportFields);
        }
        private void buttonOK_Click(object sender, EventArgs e)
        {
            if (reportData == null)
            {
                return;
            }

            List <PressureLossParameter> avaliableParams = null;

            if (eType == PartialReportSettingsDlgType.Segment)
            {
                avaliableParams = reportData.StraightSegFields;
            }
            else
            {
                avaliableParams = reportData.FittingFields;
            }
            UIHelperFunctions.getFieldsFromSelectedListBox(avaliableParams, listBoxReportFields);

            DialogResult = DialogResult.OK;
        }