当前位置: 首页>>代码示例>>C#>>正文


C# Logic.Paragraph类代码示例

本文整理汇总了C#中Nikse.SubtitleEdit.Logic.Paragraph的典型用法代码示例。如果您正苦于以下问题:C# Paragraph类的具体用法?C# Paragraph怎么用?C# Paragraph使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Paragraph类属于Nikse.SubtitleEdit.Logic命名空间,在下文中一共展示了Paragraph类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ParagraphEventArgs

 /// <summary>
 /// Initializes a new instance of the <see cref="ParagraphEventArgs"/> class.
 /// </summary>
 /// <param name="seconds">
 /// The seconds.
 /// </param>
 /// <param name="p">
 /// The p.
 /// </param>
 /// <param name="b">
 /// The b.
 /// </param>
 /// <param name="mouseDownParagraphType">
 /// The mouse down paragraph type.
 /// </param>
 public ParagraphEventArgs(double seconds, Paragraph p, Paragraph b, MouseDownParagraphType mouseDownParagraphType)
 {
     this.Seconds = seconds;
     this.Paragraph = p;
     this.BeforeParagraph = b;
     this.MouseDownParagraphType = mouseDownParagraphType;
 }
开发者ID:KatyaMarincheva,项目名称:SubtitleEditOriginal,代码行数:22,代码来源:ParagraphEventArgs.cs

示例2: ParagraphEventArgs

 public ParagraphEventArgs(double seconds, Paragraph p, Paragraph b, MouseDownParagraphType mouseDownParagraphType)
 {
     Seconds = seconds;
     Paragraph = p;
     BeforeParagraph = b;
     MouseDownParagraphType = mouseDownParagraphType;
 }
开发者ID:IlgnerBri,项目名称:subtitleedit,代码行数:7,代码来源:AudioVisualizer.cs

示例3: Constructor

        public Paragraph Constructor(int startFrame, int endFrame, string text)
        {
            Paragraph target = new Paragraph(startFrame, endFrame, text);
            return target;

            // TODO: add assertions to method ParagraphTest.Constructor(Int32, Int32, String)
        }
开发者ID:KatyaMarincheva,项目名称:SubtitleEditOriginal,代码行数:7,代码来源:ParagraphTest.cs

示例4: TestToStringNewParagraph

 public void TestToStringNewParagraph()
 {
     string expectedOutput = "00:00:00,000 --> 00:00:00,000 ";
     var paragraph = new Paragraph();
     string actualOutput = paragraph.ToString();
     Assert.AreEqual(expectedOutput, actualOutput);
 }
开发者ID:AsenTahchiyski,项目名称:SoftUni-Projects,代码行数:7,代码来源:ParagraphTest.cs

示例5: GeneratePreview

 private void GeneratePreview()
 {
     Subtitle subtitle = new Subtitle();
     var p1 = new Paragraph("Line 1a." + Environment.NewLine + "Line 1b.", 1000, 3500);
     string start1 = GetTimeCode(p1.StartTime, comboBoxTimeCode.Text);
     string end1 = GetTimeCode(p1.EndTime, comboBoxTimeCode.Text);
     var p2 = new Paragraph("Line 2a." + Environment.NewLine + "Line 2b.", 1000, 3500);
     string start2 = GetTimeCode(p2.StartTime, comboBoxTimeCode.Text);
     string end2 = GetTimeCode(p2.EndTime, comboBoxTimeCode.Text);
     subtitle.Paragraphs.Add(p1);
     subtitle.Paragraphs.Add(p2);
     try
     {
         string newLine = comboBoxNewLine.Text.Replace(Configuration.Settings.Language.ExportCustomTextFormat.DoNotModify, EnglishDoNoModify);
         string template = GetParagraphTemplate(textBoxParagraph.Text);
         textBoxPreview.Text = GetHeaderOrFooter("Demo", subtitle, textBoxHeader.Text) +
                               GetParagraph(template, start1, end1, GetText(p1.Text, newLine), GetText("Linje 1a." + Environment.NewLine + "Line 1b.", newLine), 0, p1.Duration, comboBoxTimeCode.Text) +
                               GetParagraph(template, start2, end2, GetText(p2.Text, newLine), GetText("Linje 2a." + Environment.NewLine + "Line 2b.", newLine), 1, p2.Duration, comboBoxTimeCode.Text) +
                               GetHeaderOrFooter("Demo", subtitle, textBoxFooter.Text);
     }
     catch (Exception ex)
     {
         textBoxPreview.Text = ex.Message;
     }
 }
开发者ID:athikan,项目名称:subtitleedit,代码行数:25,代码来源:ExportCustomTextFormat.cs

示例6: ParagraphEventArgs

 public ParagraphEventArgs(double seconds, Paragraph p, Paragraph b, MouseDownParagraphType mouseDownParagraphType, bool movePreviousOrNext)
 {
     this.Seconds = seconds;
     this.Paragraph = p;
     this.BeforeParagraph = b;
     this.MouseDownParagraphType = mouseDownParagraphType;
     this.MovePreviousOrNext = movePreviousOrNext;
 }
开发者ID:AsenTahchiyski,项目名称:SoftUni-Projects,代码行数:8,代码来源:ParagraphEventArgs.cs

示例7: TestMethodAdjustOneSecond

 public void TestMethodAdjustOneSecond()
 {
     var paragraph = new Paragraph();
     paragraph.Adjust(0, 1);
     int startSeconds = paragraph.StartTime.Seconds;
     int endSeconds = paragraph.EndTime.Seconds;
     Assert.AreEqual(1, startSeconds);
     Assert.AreEqual(1, endSeconds);
 }
开发者ID:AsenTahchiyski,项目名称:SoftUni-Projects,代码行数:9,代码来源:ParagraphTest.cs

示例8: SetTimeCodes

 private static void SetTimeCodes(string fileName, ListViewItem item)
 {
     string name = Path.GetFileNameWithoutExtension(fileName);
     var p = new Paragraph();
     SetEndTimeAndStartTime(name, p);
     item.SubItems.Add(p.StartTime.ToString());
     item.SubItems.Add(p.EndTime.ToString());
     item.SubItems.Add(p.Duration.ToShortString());
 }
开发者ID:aisam97,项目名称:subtitleedit,代码行数:9,代码来源:ImportImages.cs

示例9: Constructor

 public Paragraph Constructor(
     string text,
     double startTotalMilliseconds,
     double endTotalMilliseconds
 )
 {
     Paragraph target = new Paragraph(text, startTotalMilliseconds, endTotalMilliseconds);
     return target;
     // TODO: add assertions to method ParagraphTest.Constructor(String, Double, Double)
 }
开发者ID:KatyaMarincheva,项目名称:SubtitleEditOriginal,代码行数:10,代码来源:ParagraphTest.cs

示例10: Create

        public static Paragraph Create(Paragraph paragraph_paragraph1)
        {
            Paragraph paragraph = new Paragraph(paragraph_paragraph1);
            return paragraph;

            // TODO: Edit factory method of Paragraph
            // This method should be able to configure the object in all possible ways.
            // Add as many parameters as needed,
            // and assign their values to each field by using the API.
        }
开发者ID:KatyaMarincheva,项目名称:SubtitleEditOriginal,代码行数:10,代码来源:ParagraphFactory.cs

示例11: Initialize

        internal void Initialize(Paragraph paragraph)
        {
            _paragraph = paragraph;

            labelPreview.Text = paragraph.Text;
            labelTotalMillisecs.Text = string.Format("{0:#,##0.000}", paragraph.Duration.TotalMilliseconds / 1000);
            numericUpDownDelay.Maximum = (decimal)((paragraph.Duration.TotalMilliseconds - 500) / 1000);
            numericUpDownDelay.Minimum = 0;

            numericUpDownDelay.Left = labelEndDelay.Left + labelEndDelay.Width + 5;
        }
开发者ID:athikan,项目名称:subtitleedit,代码行数:11,代码来源:EffectTypewriter.cs

示例12: AddToListView

        private void AddToListView(Paragraph p, string lineNumbers, string newText)
        {
            var item = new ListViewItem(string.Empty) { Tag = p, Checked = true };

            var subItem = new ListViewItem.ListViewSubItem(item, lineNumbers);
            item.SubItems.Add(subItem);
            subItem = new ListViewItem.ListViewSubItem(item, newText.Replace(Environment.NewLine, Configuration.Settings.General.ListViewLineSeparatorString));
            item.SubItems.Add(subItem);

            listViewFixes.Items.Add(item);
        }
开发者ID:athikan,项目名称:subtitleedit,代码行数:11,代码来源:SplitLongLines.cs

示例13: AddFixToListView

 private void AddFixToListView(Paragraph p, string before, string after)
 {
     if (_onlyListFixes)
     {
         var item = new ListViewItem(string.Empty) { Checked = true, Tag = p };
         item.SubItems.Add(p.Number.ToString());
         item.SubItems.Add(before.Replace(Environment.NewLine, Configuration.Settings.General.ListViewLineSeparatorString));
         item.SubItems.Add(after.Replace(Environment.NewLine, Configuration.Settings.General.ListViewLineSeparatorString));
         listViewFixes.Items.Add(item);
     }
 }
开发者ID:KatyaMarincheva,项目名称:SubtitleEditOriginal,代码行数:11,代码来源:ApplyDurationLimits.cs

示例14: AllowFix

        public bool AllowFix(Paragraph p)
        {
            if (_onlyListFixes)
                return true;

            string ln = p.Number.ToString();
            foreach (ListViewItem item in listViewFixes.Items)
            {
                if (item.SubItems[1].Text == ln)
                    return item.Checked;
            }
            return false;
        }
开发者ID:aisam97,项目名称:subtitleedit,代码行数:13,代码来源:ApplyDurationLimits.cs

示例15: AddToListView

        private void AddToListView(Paragraph p, string lineNumbers, string newText)
        {
            var item = new ListViewItem(string.Empty) { Tag = p, Checked = true };

            var subItem = new ListViewItem.ListViewSubItem(item, lineNumbers.TrimEnd(','));
            item.SubItems.Add(subItem);
            subItem = new ListViewItem.ListViewSubItem(item, newText.Replace(Environment.NewLine, Configuration.Settings.General.ListViewLineSeparatorString));
            item.SubItems.Add(subItem);

            listViewFixes.Items.Add(item);

            foreach (string number in lineNumbers.TrimEnd(',').Split(",".ToCharArray(), StringSplitOptions.RemoveEmptyEntries))
            {
                _isFixAllowedList.Add(Convert.ToInt32(number), true);
            }
        }
开发者ID:athikan,项目名称:subtitleedit,代码行数:16,代码来源:MergeTextWithSameTimeCodes.cs


注:本文中的Nikse.SubtitleEdit.Logic.Paragraph类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。