コード例 #1
0
ファイル: SubtitleGrid.cs プロジェクト: tvdburgt/subtle
 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;
     }
 }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: tvdburgt/subtle
 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;
     }
 }