本文整理汇总了C#中Torrent.GetInformation方法的典型用法代码示例。如果您正苦于以下问题:C# Torrent.GetInformation方法的具体用法?C# Torrent.GetInformation怎么用?C# Torrent.GetInformation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Torrent
的用法示例。
在下文中一共展示了Torrent.GetInformation方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddTorrent
public void AddTorrent(Torrent torrent)
{
#region Information Contents
/* **Information[0-10] -- Music information**
*
* information[0] --> Artist
* information[1] --> Album
* information[2] --> AlbumType
* information[3] --> bitrate
* information[4] --> year
* information[5] --> physical format (CD,DVD,VINYL,WEB)
* information[6] --> bit format (MP3,FLAC)
*
* **Information[10-20] -- File Information**
*
* information[10] --> path
* information[11] --> file name
* information[12] --> birth
* information[13] --> destination path
* information[14] --> discard
* */
#endregion
dataset.TorrentsTableRow row = data.TorrentsTable.NewTorrentsTableRow();
string[] information = torrent.GetInformation();
row.BeginEdit();
row.File = information[11];
row.Artist = information[0];
row.Album = information[1];
row.Save_Structure = information[13];
row.Sent = false;
row.Release_Format = information[2];
row.Bit_Rate = information[3];
row.Year = information[4];
row.Physical_Format = information[5];
row.Bit_Format = information[6];
row.File_Path = information[10];
row.Site_Origin = information[12];
row.EndEdit();
while (datasetbusy) System.Threading.Thread.Sleep(100);//sleep while changes are occuring..
DataRow dr = data.TorrentsTable.Rows.Find(row.ID);
while (dr != null)
{
row.ID++;
dr = data.TorrentsTable.Rows.Find(row.ID);
}
data.TorrentsTable.AddTorrentsTableRow(row);
musicadapter.Update(row);
}
示例2: AddOtherTorrent
public void AddOtherTorrent(Torrent torrent)
{
string[] information = torrent.GetInformation();
dataset.OthersTableRow row = data.OthersTable.NewOthersTableRow();
row.File = information[11];
row.File_Path = information[10];
row.Save_Structure = information[13];
row.Site_Origin = information[12];
row.Sent = false;
data.OthersTable.AddOthersTableRow(row);
}