DataDirectory
Inheritance: System.Windows.Forms.Form
        /// <summary>
        /// Data Directory
        /// </summary>
        protected override void MenuDataDirectory_OnClick(object sender, EventArgs e)
        {
            DataDirectory dataDirectory = new DataDirectory();

            if (dataDirectory.ShowDialog() == DialogResult.OK)
            {
                string dataDirPath = dataDirectory.DataFolder;

                if (dataDirPath == "")
                    Data.OfflineDataDir = Data.DefaultOfflineDataDir;
                else if (dataDirPath.EndsWith(Path.DirectorySeparatorChar.ToString()))
                    Data.OfflineDataDir = dataDirPath;
                else
                    Data.OfflineDataDir = dataDirPath + Path.DirectorySeparatorChar;

                if (LoadInstrument(false) == 0)
                {
                    Calculate(true);

                    // The new folder will be saved in the config file only when
                    // the data are loaded successfully
                    if (Data.OfflineDataDir == Data.DefaultOfflineDataDir)
                        Configs.DataDirectory = "";
                    else
                        Configs.DataDirectory = Data.OfflineDataDir;

                    PrepareScannerCompactMode();
                }
            }

            return;
        }