public void ProcessQuery()
        {
            UpdateExoplanetListView(false);

            if (VisualizationDialog != null)
            {
                VisualizationDialog.RefreshGraphics();
            }
        }
        private void open_Click(object sender, EventArgs e)
        {
            OpenFileDialog openFileDialog = new OpenFileDialog();

            openFileDialog.InitialDirectory = Constant.ProgramDataFolder;
            openFileDialog.Filter           = "xml files (*.xml)|*.xml|Exoplanet.eu Exoplanet Archive files (*.vot)|*.vot" +
                                              "|NASA Exoplanet Archive files (*.vot)|*.vot" +
                                              "|Exoplanets.org Archive files (*.csv)|*.csv" +
                                              "|All files (*.*)|*.*";
            openFileDialog.FilterIndex      = Settings.FilterIndex;
            openFileDialog.RestoreDirectory = true;

            if (openFileDialog.ShowDialog() == DialogResult.OK)
            {
                try
                {
                    if (openFileDialog.OpenFile() != null)
                    {
                        string fileName = openFileDialog.FileName.ToLower();

                        Cursor.Current = Cursors.WaitCursor;

                        if (openFileDialog.FilterIndex == 1)
                        {
                            XmlFileName = openFileDialog.FileName;
                        }
                        else if (openFileDialog.FilterIndex == 2 || openFileDialog.FilterIndex == 3)
                        {                                           // Exoplanet.EU or NASA data files
                            ReadVOT.Read(openFileDialog.FileName);
                            XmlFileName = ReadVOT.ReplaceExtension(openFileDialog.FileName);
                        }
                        else if (openFileDialog.FilterIndex == 4)
                        {                                           // Exoplanets.org data files
                            ReadCSV.Read(openFileDialog.FileName);
                            XmlFileName = ReadCSV.ReplaceExtension(openFileDialog.FileName);
                        }
                        else
                        {
                            if (ReadCSV.IsCSV(openFileDialog.FileName))
                            {
                                ReadCSV.Read(openFileDialog.FileName);
                                XmlFileName = ReadCSV.ReplaceExtension(openFileDialog.FileName);
                            }
                            else if (ReadVOT.IsVOT(openFileDialog.FileName))
                            {
                                ReadVOT.Read(openFileDialog.FileName);
                                XmlFileName = ReadVOT.ReplaceExtension(openFileDialog.FileName);
                            }
                            else if (ReadTBL.IsTBL(openFileDialog.FileName))
                            {
                                ReadTBL.Read(openFileDialog.FileName);
                                XmlFileName = ReadTBL.ReplaceExtension(openFileDialog.FileName);
                            }
                            else if (fileName.EndsWith(".xml"))
                            {
                                XmlFileName = openFileDialog.FileName;
                            }
                        }

                        UpdateExoplanetListView(true);

                        if (VisualizationDialog != null)
                        {
                            VisualizationDialog.RefreshGraphics();
                        }

                        if (ExoplanetDetails != null)
                        {
                            if (ExoplanetListView.SelectedItems.Count == 1)
                            {
                                Exoplanet exoplanet = ( Exoplanet )ExoplanetListView.SelectedItems [0].Tag;

                                displayAllDetails(exoplanet);
                                Focus();
                            }
                            else
                            {
                                ExoplanetDetails.Close();
                            }
                        }

                        Settings.FilterIndex = openFileDialog.FilterIndex;

                        Cursor.Current = Cursors.Default;
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Error: " + ex.Message);
                }
            }
        }