コード例 #1
0
ファイル: view.cs プロジェクト: mwheelerjr/mptvseries
 void setType(string typeString)
 {
     if (typeString.Contains(type.group.ToString()))
     {
         this.Type            = type.group;
         groupedBy            = new grouped();
         groupedBy.PrettyName = typeString.Split(':')[1];
         getTableFieldname(typeString.Split(':')[1], out groupedBy.table, out groupedBy.rawFieldname);
         groupedBy.tableField = getQTableNameFromUnknownType(groupedBy.table, groupedBy.rawFieldname);
         // DBFields Requiring Split
         groupedBy.attempSplit = DBSeries.FieldsRequiringSplit.Contains(groupedBy.rawFieldname) ||
                                 DBOnlineEpisode.FieldsRequiringSplit.Contains(groupedBy.rawFieldname);
     }
     else if (typeString == type.series.ToString())
     {
         this.Type = type.series;
     }
     else if (typeString == type.season.ToString())
     {
         this.Type = type.season;
     }
     else if (typeString == type.episode.ToString())
     {
         this.Type = type.episode;
     }
     else
     {
         this.Type = type.series; // this should never happen!
     }
 }
コード例 #2
0
ファイル: view.cs プロジェクト: MichelZ/MP-TVSeries
 void setType(string typeString)
 {
     if (typeString.Contains(type.group.ToString()))
     {
         this.Type = type.group;
         groupedBy = new grouped();
         groupedBy.PrettyName = typeString.Split(':')[1];
         getTableFieldname(typeString.Split(':')[1], out groupedBy.table, out groupedBy.rawFieldname);
         groupedBy.tableField = getQTableNameFromUnknownType(groupedBy.table, groupedBy.rawFieldname);
         // DBFields Requiring Split
         groupedBy.attempSplit = DBSeries.FieldsRequiringSplit.Contains(groupedBy.rawFieldname)
                              || DBOnlineEpisode.FieldsRequiringSplit.Contains(groupedBy.rawFieldname);
     }
     else if (typeString == type.series.ToString())
         this.Type = type.series;
     else if (typeString == type.season.ToString())
         this.Type = type.season;
     else if (typeString == type.episode.ToString())
         this.Type = type.episode;
     else
         this.Type = type.series; // this should never happen!
 }