本文整理汇总了C#中Nikse.SubtitleEdit.Core.TimeCode.ToHHMMSSFF方法的典型用法代码示例。如果您正苦于以下问题:C# TimeCode.ToHHMMSSFF方法的具体用法?C# TimeCode.ToHHMMSSFF怎么用?C# TimeCode.ToHHMMSSFF使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Nikse.SubtitleEdit.Core.TimeCode
的用法示例。
在下文中一共展示了TimeCode.ToHHMMSSFF方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EncodeTimeCode
private static string EncodeTimeCode(TimeCode time)
{
//00:50:39:13 (last is frame)
return time.ToHHMMSSFF();
}
示例2: ToTimeCode
private static string ToTimeCode(TimeCode timeCode)
{
return timeCode.ToHHMMSSFF(); //10:00:07:27
}
示例3: WriteTime
private static void WriteTime(FileStream fs, TimeCode timeCode, bool addEndBytes)
{
var time = timeCode.ToHHMMSSFF();
var buffer = Encoding.ASCII.GetBytes(time);
fs.Write(buffer, 0, buffer.Length);
if (addEndBytes)
{
fs.WriteByte(0xd);
fs.WriteByte(0xa);
}
}
示例4: MakeTimeCode
/// <summary>
/// The make time code.
/// </summary>
/// <param name="tc">
/// The tc.
/// </param>
/// <returns>
/// The <see cref="string"/>.
/// </returns>
private static string MakeTimeCode(TimeCode tc)
{
return tc.ToHHMMSSFF();
}
示例5: WriteTime
private static void WriteTime(FileStream fs, TimeCode timeCode)
{
fs.WriteByte(0xb);
byte[] buffer = Encoding.ASCII.GetBytes(timeCode.ToHHMMSSFF());
fs.Write(buffer, 0, buffer.Length);
}
示例6: EncodeEndTimeCode
private static string EncodeEndTimeCode(TimeCode time)
{
//00:50:39:13 (last is frame)
//Bugfix for Avid - On 23.976 FPS and 24 FPS projects, when the End time of a subtitle ends in 02, 07, 12, 17, 22, 27 frames, the subtitle won't import.
if (Math.Abs(Configuration.Settings.General.CurrentFrameRate - 23.976) < 0.01 ||
Math.Abs(Configuration.Settings.General.CurrentFrameRate - 24) < 0.01)
{
var frames = SubtitleFormat.MillisecondsToFramesMaxFrameRate(time.Milliseconds);
if (frames == 2 || frames == 7 || frames == 12 || frames == 17 || frames == 22 || frames == 27)
frames--;
return string.Format("{0:00}:{1:00}:{2:00}:{3:00}", time.Hours, time.Minutes, time.Seconds, frames);
}
else
{
return time.ToHHMMSSFF();
}
}
示例7: EncodeTimeCode
private static string EncodeTimeCode(TimeCode time)
{
var s = time.ToHHMMSSFF();
return AddSpaces(s);
}