private async void Window_Loaded(object sender, RoutedEventArgs e) { MediaList.Settings.SetCondition(FieldConditionEnum.IsPersonal, true); await Task.Delay(1); await MediaList.LoadDataAsync(); }
private async void DownloadBusiness_DownloadCompleted(object sender, DownloadCompletedEventArgs e) { if (e.DownloadInfo.IsCompleted) { DownloadItemData IData = e.DownloadInfo.Data as DownloadItemData; MediaList.business.RefreshPlaylist(IData.Media, null); await MediaList.LoadDataAsync(); } }
private async void timerChangeFilters_Tick(object sender, EventArgs e) { if (!MediaList.IsLoading) { timerChangeFilters.Stop(); await MediaList.LoadDataAsync(); } //else // mustReload = true; }
private async void timerChangeFilters_Tick(object sender, EventArgs e) { if (!MediaList.IsLoading) { if (RatingValueText.IsFocused) { RatingValueText.GetBindingExpression(TextBox.TextProperty).UpdateSource(); } timerChangeFilters.Stop(); await MediaList.LoadDataAsync(); } }
private async void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (!IsLoaded) { return; } string Sel; if (e != null) { Sel = ((ComboBoxItem)e.AddedItems[0]).Content.ToString(); } else { Sel = ResolutionCombo.Text; } if (Sel != "> 1080p") { int SelHeight = 0; if (Sel == "288p") { SelHeight = 288; } else if (Sel == "360p") { SelHeight = 360; } else if (Sel == "480p") { SelHeight = 480; } else if (Sel == "720p") { SelHeight = 720; } else // 1080p { SelHeight = 1080; } MediaList.Settings.SetRatingCategory("Height", OperatorConditionEnum.Equal, SelHeight); } else { MediaList.Settings.SetRatingCategory("Height", OperatorConditionEnum.GreaterOrEqual, 1081); } await MediaList.LoadDataAsync(); }
private async void Window_Loaded(object sender, RoutedEventArgs e) { await SessionCore.Instance.Business.SetEditorModeAsync(true); business.Manager = SessionCore.Instance.Business.DownloadManager; timerChangeFilters = new DispatcherTimer(); timerChangeFilters.Interval = TimeSpan.FromSeconds(1); timerChangeFilters.Tick += timerChangeFilters_Tick; this.DataContext = MediaList.Settings; MediaList.Settings.SetCondition(FieldConditionEnum.HasDownloadUrl, true); RatingCategoryCombo.ItemsSource = await MediaList.business.GetRatingCategoriesAsync(true); await MediaList.LoadDataAsync(); isLoaded = true; }
private async void Window_Loaded(object sender, RoutedEventArgs e) { await SessionCore.Instance.Business.SetEditorModeAsync(true); timerChangeFilters = new DispatcherTimer(); timerChangeFilters.Interval = TimeSpan.FromSeconds(1); timerChangeFilters.Tick += timerChangeFilters_Tick; this.DataContext = MediaList.Settings; RatingCategoryCombo.ItemsSource = await MediaList.business.GetRatingCategoriesAsync(true); // Load categories list. await MediaList.LoadDataAsync(); // Auto-attach files. await MediaList.ManualLoadPlaylist(); await LoadMediaInfoAsync(); isLoaded = true; }
private async void Window_Loaded(object sender, RoutedEventArgs e) { SessionCore.Instance?.Business?.SetEditorModeAsync(true); timerChangeFilters = new DispatcherTimer(); timerChangeFilters.Interval = TimeSpan.FromSeconds(1); timerChangeFilters.Tick += timerChangeFilters_Tick; MediaList.Settings = settings; if (settings.ConditionField == FieldConditionEnum.None) { settings.SetCondition(FieldConditionEnum.FileExists, true); } if (settings.MediaType == MediaType.None) { this.Title = "Search Files"; } else if (settings.MediaType == MediaType.Video) { this.Title = "Search Videos"; } else if (settings.MediaType == MediaType.Audio) { this.Title = "Search Audios"; } else if (settings.MediaType == MediaType.Image) { this.Title = "Search Images"; } RatingCategoryCombo.ItemsSource = await MediaList.business.GetRatingCategoriesAsync(true); this.DataContext = settings; await MediaList.LoadDataAsync(); isLoaded = true; }
private async void LoadVideos(float[] minMax) { MediaList.Settings.RatingFilters.Clear(); string Name = ((RatingCategory)GraphTypeCombo.SelectedItem).Name; if (!string.IsNullOrEmpty(Name)) { MediaList.Settings.RatingFilters.Add(new SearchRatingSetting() { Category = Name, Operator = OperatorConditionEnum.GreaterOrEqual, Value = minMax[0] + .01f // It should be > instead of >=, so this fixed it. }); MediaList.Settings.RatingFilters.Add(new SearchRatingSetting() { Category = Name, Operator = OperatorConditionEnum.Smaller, Value = minMax[1] + .01f // It should be <= instead of <, so this fixed it. }); await MediaList.LoadDataAsync(); } }
private async void window_Loaded(object sender, RoutedEventArgs e) { this.Left = mainForm.Left; this.Top = mainForm.Top; this.Title = mainForm.Title + " [Manual Mode]"; AttachControls(); SessionCore.Instance.Business.NowPlaying += business_NowPlaying; SessionCore.Instance.Business.DisplayPlayTime += business_DisplayPlayTime; SessionCore.Instance.Business.Loop = false; timerChangeFilters = new DispatcherTimer(); timerChangeFilters.Interval = TimeSpan.FromSeconds(1); timerChangeFilters.Tick += timerChangeFilters_Tick; // Keep main window's settings and it will be set back when closing manual mode. mainSettings = SessionCore.Instance.Business.FilterSettings; MediaList.Settings.RatingRatio = mainSettings.RatingRatio; SessionCore.Instance.Business.FilterSettings = MediaList.Settings; this.DataContext = MediaList.Settings; await MediaList.LoadDataAsync(); isLoaded = true; }