public void AddCast() { Podcast retrievedCast = SelectedSource.GetPodcast(PodcastAddress); _storage.SaveCast(retrievedCast); _eventAggregator.PublishOnUIThread(retrievedCast); TryClose(); }
void DisplayData() { if (SelectedSource != null && messagesList.Columns.Count > 0 && SelectedSource.Count > 0) { messagesList.Invoke(new Action(() => { messagesList.Items.Clear(); })); QueryEngine qe = new QueryEngine(SelectedSource); var fields = new List <DDField>(); foreach (var row in dataGridViewX1.Rows) { var dr = row as DataGridViewRow; if (dr.Cells.Count != 5 || !(dr.Cells[0].Value is ComboBoxItem)) { continue; } fields.Add((dr.Cells[1].Value as ComboBoxItem).Tag as DDField); } double progress = 0; double count = recordperpage.Value; int c = 0; int start = Math.Min(SelectedSource.Count - 1, (page.Value - 1) * recordperpage.Value), stop = Math.Min(SelectedSource.Count - 1, page.Value * recordperpage.Value); foreach (var entry in SelectedSource.GetRange(start, stop - start)) { c++; progress = ((double)c / count) * 100; messagesList.Invoke(new Action(() => { ListViewItem item = messagesList.Items.Add(new ListViewItem(qe.GetValueFromEntry(fields[0].Tag, entry))); for (int i = 1; i < fields.Count; i++) { item.SubItems.Add(qe.GetValueFromEntry(fields[i].Tag, entry)); } item.Tag = entry; var m = entry.Message ?? entry.Error.ParsedMessage; if (m != null) { if (m.IsAdmin()) { item.ImageKey = "admin"; } else { item.ImageKey = "app"; } if (entry.Message == null) { item.ForeColor = Color.Red; } } dataDisplay.ReportProgress((int)progress, "Displaying data..."); })); } } }
public override int GetHashCode() { unchecked { var hashCode = base.GetHashCode(); hashCode = (hashCode * 397) ^ (SelectedSource != null ? SelectedSource.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (DeletePath != null ? DeletePath.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = base.GetHashCode(); hashCode = (hashCode * 397) ^ (SelectedSource != null ? SelectedSource.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ToPath != null ? ToPath.GetHashCode() : 0); hashCode = (hashCode * 397) ^ OverwriteFile.GetHashCode(); hashCode = (hashCode * 397) ^ (FromPath != null ? FromPath.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = base.GetHashCode(); hashCode = (hashCode * 397) ^ (SelectedSource != null ? SelectedSource.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Files != null ? Files.GetHashCode() : 0); hashCode = (hashCode * 397) ^ IncludeMediaInfo.GetHashCode(); hashCode = (hashCode * 397) ^ IsRecursive.GetHashCode(); hashCode = (hashCode * 397) ^ IncludeDeleted.GetHashCode(); hashCode = (hashCode * 397) ^ (ToPath != null ? ToPath.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (DisplayName != null ? DisplayName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ IsFilesSelected.GetHashCode(); hashCode = (hashCode * 397) ^ IsFoldersSelected.GetHashCode(); hashCode = (hashCode * 397) ^ IsFilesAndFoldersSelected.GetHashCode(); return(hashCode); } }
public override string ToString() => $"{QueryString} from {SelectedSource.ToString()}";
private void OnSelectedCategoryPositionChanged() { System.Diagnostics.Debug.WriteLine($"SelectedCategoryPosition changed to {SelectedSourcePosition}"); SelectedSource.InitAsync().HandleResult(); }
public async override Task InitAsync() { await SelectedSource.InitAsync(); await base.InitAsync(); }