public void CreateReferenceDatabaseFile()
        {
            if (!File.Exists(_referenceDatabasePath))
            {
                /*
                 * If auto-populate is enabled create the file
                 * and get the reference assemblies. If not just
                 * create an empty file.
                 */

                if (_applicationManager.ClientProfile.
                    HaveFlag(ClientFlags.CodeAssistDotNetAutoPopulateDatabase))
                {
                    CreateReferenceDatabaseForm form =
                        new CreateReferenceDatabaseForm();

                    form.ShowDialog();

                    form.WriteReferenceDatabase();
                }
                else
                {
                    FileTools.CreateFile(_referenceDatabasePath);
                }
            }

            LoadReferenceDatabaseFromFile();
        }
        private void reloadNamespacesButton_Click(
            object sender, EventArgs e)
        {
            if (MessageBox.Show(String.Format("{0}\r\n{1}",
                                              Resources.OptionsReloadWarningMessage1,
                                              Resources.OptionsReloadWarningMessage2),
                                Resources.OptionsReloadWarningTitle,
                                MessageBoxButtons.OKCancel,
                                MessageBoxIcon.Warning) == DialogResult.OK)
            {
                CreateReferenceDatabaseForm form =
                    new CreateReferenceDatabaseForm();

                // Clear the MessageBox
                Refresh();

                form.ShowDialog();

                /*
                 * The form is now populated with the reloaded
                 * database. We need to update the local copies
                 * for editing.
                 */

                ReferenceDatabase database = form.ReferenceDatabase;

                _activeNamespaces.Clear();
                _inactiveNamespaces.Clear();

                foreach (String ns in database.Keys)
                {
                    if (database[ns].Name.StartsWith("System"))
                    {
                        _activeNamespaces[ns] = database[ns];
                    }
                    else
                    {
                        _inactiveNamespaces[ns] = database[ns];
                    }
                }
            }
        }