Beispiel #1
0
 private void ResetFilters_Click(object sender, EventArgs e)
 {
     FilterAndSearchConfig.ClearUnsavedAll();
     ReleaseYearSort.Text = "";
     TrackCountSort.Text  = "";
     ReleaseYearSort_Leave(sender, e);
     TrackCountSort_Leave(sender, e);
 }
Beispiel #2
0
 private void ResetFilters_Click(object sender, EventArgs e)
 {
     FilterAndSearchConfig.ClearUnsavedAll();
     ChangeGenreComboBox();
     ChangeAuthorsComboBox();
     ChangeCarriersComboBox();
     ChangeReleaseLabelsComboBox();
     ChangeTracksCountComboBox();
     ChangeTypesComboBox();
     ChangeReleaseYearsComboBox();
 }
Beispiel #3
0
 private void ResetData_Click(object sender, EventArgs e)
 {
     FilterAndSearchConfig.ClearAll();
     if (this.ContentPanel.Controls.Count == 1)
     {
         if (this.ContentPanel.Controls[0] is BigAlbumView)
         {
             BigAlbumView buf = (BigAlbumView)this.ContentPanel.Controls[0];
             if (buf.isSlide())
             {
                 this.SlideModeButton.PerformClick();
             }
             return;
         }
     }
     HomeButton.PerformClick();
 }
Beispiel #4
0
        private async void AuthorsComboBox_CheckStateChanged(object sender, EventArgs e)
        {
            if (sender is CheckComboBoxItem)
            {
                CheckComboBoxItem item = (CheckComboBoxItem)sender;
                if (item.CheckState)
                {
                    FilterAndSearchConfig.AddFilterUnsavedAuthor(item.Text);
                }
                else
                {
                    FilterAndSearchConfig.DeleteFilterUnsavedAuthor(item.Text);
                }
                string result = await Task.Factory.StartNew <string>(() => Timer(), TaskCreationOptions.LongRunning);

                ChangeAuthorsComboBox();
            }
        }
Beispiel #5
0
 private void SaveAndReloadButton_Click(object sender, EventArgs e)
 {
     CancelButton.PerformClick();
     FilterAndSearchConfig.SaveSort();
     if (parentForm.ContentPanel.Controls.Count == 1)
     {
         if (parentForm.ContentPanel.Controls[0] is BigAlbumView)
         {
             BigAlbumView buf = (BigAlbumView)parentForm.ContentPanel.Controls[0];
             Close();
             if (buf.isSlide())
             {
                 parentForm.SlideModeButton.PerformClick();
             }
             return;
         }
     }
     parentForm.HomeButton.PerformClick();
     Close();
 }
Beispiel #6
0
        private async void GenresComboBox_CheckStateChanged(object sender, EventArgs e)
        {
            if (sender is CheckComboBoxItem)
            {
                CheckComboBoxItem item = (CheckComboBoxItem)sender;
                if (item.CheckState == true)
                {
                    FilterAndSearchConfig.AddUnsavedFilterGenre(item.Text);
                }
                else if (item.CheckState == false)
                {
                    FilterAndSearchConfig.DeleteUnsavedFilterGenre(item.Text);
                }
                string UNS    = FilterAndSearchConfig.UnsavedFilterGenre;
                string result = await Task.Factory.StartNew <string>(
                    () => Timer());

                ChangeGenreComboBox();
            }
        }
Beispiel #7
0
 private void ChangeTracksCountComboBox()
 {
     if (TrackCountSort.Text != "")
     {
         if (TrackCountSort.Text == "Меньше->Больше")
         {
             FilterAndSearchConfig.SetFilterTrackCountAsc(true);
         }
         else if (TrackCountSort.Text == "Больше->Меньше")
         {
             FilterAndSearchConfig.SetFilterTrackCountDesc(true);
         }
         else if (TrackCountSort.Text == "Отключить")
         {
             FilterAndSearchConfig.SetFilterTrackCountSortFalse();
         }
     }
     if (TrackCountSort.Text == "")
     {
         TrackCountSort.Text = "По году выпуска";
     }
 }
Beispiel #8
0
 private void ChangeReleaseYearsComboBox()
 {
     if (ReleaseYearSort.Text != "")
     {
         if (ReleaseYearSort.Text == "Старые->Новые")
         {
             FilterAndSearchConfig.SetReleasingYearAsc(true);
         }
         else if (ReleaseYearSort.Text == "Новые->Старые")
         {
             FilterAndSearchConfig.SetReleasingYearDesc(true);
         }
         else if (ReleaseYearSort.Text == "Отключить")
         {
             FilterAndSearchConfig.SetFilterReleaseYearSortFalse();
         }
     }
     if (ReleaseYearSort.Text == "")
     {
         ReleaseYearSort.Text = "По году выпуска";
     }
 }