private void MenuItem_Click_1(object sender, RoutedEventArgs e)
        {
            int[]       ind;
            DataRowView drv = dataGrid1.SelectedItem as DataRowView;

            if (drv != null)
            {
                tabControl1.IsEnabled = false;
                ind = da.GetSimilarSongs(Convert.ToInt32(drv.Row.ItemArray[0]), comboBox2.SelectedIndex + 1, (int)comboBox1.SelectedValue);
                DataTable TempTable = new DataTable();
                DataRow[] TempRows  = new DataRow[ind.Length];
                for (int k = 0; k < ind.Length; k++)
                {
                    DataRow[] dr = dt.Select("song_id=" + ind[k].ToString());
                    TempRows[k] = dr[0];
                }
                TempTable = TempRows.CopyToDataTable();
                ShowSongsWindow SimilarSongWindow = new ShowSongsWindow();
                SimilarSongWindow.Title = drv.Row.ItemArray[2].ToString() + " - " + drv.Row.ItemArray[3].ToString();
                SimilarSongWindow.dataGrid1.DataContext = TempTable;
                SimilarSongWindow.data  = TempTable;
                SimilarSongWindow.Owner = this;
                SimilarSongWindow.Show();
                tabControl1.IsEnabled = true;
            }
        }
        private void button2_Click(object sender, RoutedEventArgs e)
        {
            tabControl1.IsEnabled = false;
            FrequencyState[] state           = new FrequencyState[5];
            string           SearchCondition = "";

            #region CheckBoxState
            if (checkBox2.IsChecked == true)
            {
                if (radioButton1.IsChecked == true)
                {
                    state[0]         = FrequencyState.Min;
                    SearchCondition += "SubBass-Min";
                }
                else
                {
                    state[0]         = FrequencyState.Max;
                    SearchCondition += "SubBass-Max ";
                }
            }
            if (checkBox3.IsChecked == true)
            {
                if (radioButton3.IsChecked == true)
                {
                    state[1]         = FrequencyState.Min;
                    SearchCondition += "Bass-Min ";
                }
                else
                {
                    state[1]         = FrequencyState.Max;
                    SearchCondition += "Bass-Max ";
                }
            }
            if (checkBox4.IsChecked == true)
            {
                if (radioButton5.IsChecked == true)
                {
                    state[2]         = FrequencyState.Min;
                    SearchCondition += "Mid-Min ";
                }
                else
                {
                    state[2]         = FrequencyState.Max;
                    SearchCondition += "Mid-Max ";
                }
            }
            if (checkBox5.IsChecked == true)
            {
                if (radioButton7.IsChecked == true)
                {
                    state[3]         = FrequencyState.Min;
                    SearchCondition += "HighMid-Min ";
                }
                else
                {
                    state[3]         = FrequencyState.Max;
                    SearchCondition += "HighMid-Max ";
                }
            }
            if (checkBox6.IsChecked == true)
            {
                if (radioButton9.IsChecked == true)
                {
                    state[4]         = FrequencyState.Min;
                    SearchCondition += "High-Min ";
                }
                else
                {
                    state[4]         = FrequencyState.Max;
                    SearchCondition += "High-Max ";
                }
            }
            #endregion
            int[]     ind       = da.GetSongsBySpectra(state, (int)comboBox1.SelectedValue);
            DataTable TempTable = new DataTable();
            DataRow[] TempRows  = new DataRow[ind.Length];
            for (int k = 0; k < ind.Length; k++)
            {
                DataRow[] dr = dt.Select("song_id=" + ind[k].ToString());
                TempRows[k] = dr[0];
            }
            TempTable = TempRows.CopyToDataTable();
            ShowSongsWindow SpectraSongWindow = new ShowSongsWindow();
            SpectraSongWindow.ToolTip = "Double-click on item to play";
            SpectraSongWindow.Title   = SearchCondition;
            SpectraSongWindow.dataGrid1.DataContext = TempTable;
            SpectraSongWindow.data  = TempTable;
            SpectraSongWindow.Owner = this;
            SpectraSongWindow.Show();
            tabControl1.IsEnabled = true;
        }