private static void FormatSearchMethodColumn(Subtitle sub, DataGridViewCell cell, DataGridViewCellFormattingEventArgs e) { switch (sub.MatchMethod) { case SearchMethod.Hash: e.Value = Resources.HashIcon; cell.ToolTipText = "Matched by file hash"; break; case SearchMethod.FullText: e.Value = Resources.TextSearchIcon; cell.ToolTipText = "Matched by full-text search"; break; case SearchMethod.Imdb: e.Value = Resources.ImdbIcon; cell.ToolTipText = "Matched by IMDb ID"; break; } }
private static int GetMatchMethodSortOrder(Subtitle sub) { switch (sub.MatchMethod) { case SearchMethod.Hash: return 0; case SearchMethod.Imdb: return 1; case SearchMethod.FullText: return 2; default: return int.MaxValue; } }