Esempio n. 1
0
        /// <summary>
        /// Format a single line of .ass dialog text.
        /// </summary>
        private string formatDialogSingle(bool isSubs1, InfoCombined comb)
        {
            string name   = "";
            string text   = "";
            string single = "";

            if (isSubs1)
            {
                name = "Subs1";
                text = comb.Subs1.Text;
            }
            else
            {
                name = "Subs2";
                text = comb.Subs2.Text;
            }

            // Example:
            // Dialogue: 0,0:00:31.14,0:00:36.16,Subs1,NA,0000,0000,0000,,This is the first line from Subs1
            single = String.Format("Dialogue: 0,{0},{1},{2},NA,0000,0000,0000,,{3}",
                                   UtilsSubs.formatAssTime(comb.Subs1.StartTime),
                                   UtilsSubs.formatAssTime(comb.Subs1.EndTime),
                                   name,
                                   text);

            return(single);
        }