public Converter(ConversionSettings conversionSettings, StudyMetaDataValidator studyMetaDataValidator, WarningLog warningLog, IViewUpdater viewUpdater, bool labelOCoidExists, ArrayList labelOID)
 {
     this.conversionSettings = conversionSettings;
     this.studyMetaDataValidator = studyMetaDataValidator;
     this.viewUpdater = viewUpdater;
     this.warningLog = warningLog;
     this.labelOCoidExists = labelOCoidExists;
     this.labelOID = labelOID;
 }
        public Form1()
        {
            InitializeComponent();
            comboBoxSE.DrawMode = DrawMode.OwnerDrawFixed;
            comboBoxSE.DrawItem += new DrawItemEventHandler(comboBoxSE_DrawItem);
            comboBoxSE.DropDownClosed += new EventHandler(comboBoxSE_DropDownClosed);
            comboBoxSE.Leave += new EventHandler(comboBoxSE_Leave);
            comboBoxCRF.DrawMode = DrawMode.OwnerDrawFixed;
            comboBoxCRF.DrawItem += new DrawItemEventHandler(comboBoxCRF_DrawItem);
            comboBoxCRF.DropDownClosed += new EventHandler(comboBoxCRF_DropDownClosed);
            comboBoxCRF.Leave += new EventHandler(comboBoxCRF_Leave);
            comboBoxGR.DrawMode = DrawMode.OwnerDrawFixed;
            comboBoxGR.DrawItem += new DrawItemEventHandler(comboBoxGR_DrawItem);
            comboBoxGR.DropDownClosed += new EventHandler(comboBoxGR_DropDownClosed);
            comboBoxGR.Leave += new EventHandler(comboBoxGR_Leave);
            comboBoxIT.DrawMode = DrawMode.OwnerDrawFixed;
            comboBoxIT.DrawItem += new DrawItemEventHandler(comboBoxIT_DrawItem);
            comboBoxIT.DropDownClosed += new EventHandler(comboBoxIT_DropDownClosed);
            comboBoxIT.Leave += new EventHandler(comboBoxIT_Leave);
            label1.Text = OCDataImporter.Form1.VERSION_LABEL;
            conversionSettings = new ConversionSettings();
            conversionSettings.Sites = new ArrayList();
            conversionSettings.Forms = new ArrayList();
            conversionSettings.Groups = new ArrayList();
            warningLog = new WarningLog();
            studyMetaDataValidator = new StudyMetaDataValidator(warningLog, conversionSettings);
            dataGrid = new DataGrid(studyMetaDataValidator, dataGridView1, this);

            Menu = new MainMenu();
            if (DEBUGMODE) MessageBox.Show("D E B U G M O D E - !!!!!", "OCDataImporter", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            Menu.MenuItems.Add("&File");
            Menu.MenuItems[0].MenuItems.Add("&Open", new EventHandler(MenuFileOpenOnClick));
            Menu.MenuItems[0].MenuItems.Add("&Exit", new EventHandler(MenuFileExitOnClick));
            Menu.MenuItems.Add("&Help");
            Menu.MenuItems[1].MenuItems.Add("&User Manual", new EventHandler(MenuHelpHowToOnClick));
            Menu.MenuItems[1].MenuItems.Add("&About", new EventHandler(MenuHelpAboutOnClick));
            dataGridView1.RowsDefaultCellStyle.BackColor = Color.Bisque;
            dataGridView1.AlternatingRowsDefaultCellStyle.BackColor = Color.Beige;
            tbLocationEvent.Text = "Amsterdam"; // Our default location
            radioButtonUseTD.Checked = true;  // this should be added to dmpprm, in later releases.

            gbInputFiles.Enabled = true;
            gbProgramParameters.Enabled = false;
            try
            {
                fpipdf = new FileStream("OCDataImporter.pdf", FileMode.Open, FileAccess.Read);
            }
            catch (Exception exx)
            {
                MessageBox.Show("Problem opening user manual. Message = " + exx.Message, "OCDataImporter", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            conversionSettings.workdir = Directory.GetCurrentDirectory();
            StateReadFiles(true);
        }
 public StudyMetaDataValidator(WarningLog warningLog, ConversionSettings conversionSettings)
 {
     this.warningLog = warningLog;
     this.conversionSettings = conversionSettings;
 }