コード例 #1
0
        public ASSEvent EndReplace(double end)
        {
            ASSEvent result = this.MemberwiseClone() as ASSEvent;

            result.End = end;
            return(result);
        }
コード例 #2
0
 public static ASS FromFile(string filename)
 {
     using (StreamReader fin = new StreamReader(new FileStream(filename, FileMode.Open), Encoding.Unicode))
     {
         ASS ass = new ASS();
         ass.Header = new List <string>();
         ass.Events = new List <ASSEvent>();
         bool isHeader = true;
         while (true)
         {
             string line = fin.ReadLine();
             if (line == null)
             {
                 break;
             }
             ASSEvent ev = ASSEvent.FromString(line);
             if (ev == null && isHeader)
             {
                 ass.Header.Add(line);
             }
             else
             {
                 if (ev != null)
                 {
                     ass.Events.Add(ev);
                 }
                 isHeader = false;
             }
         }
         return(ass);
     }
 }
コード例 #3
0
        public ASSEvent TextReplace(string text)
        {
            ASSEvent result = this.MemberwiseClone() as ASSEvent;

            result.Text = text;
            return(result);
        }
コード例 #4
0
        public ASSEvent StartReplace(double start)
        {
            ASSEvent result = this.MemberwiseClone() as ASSEvent;

            result.Start = start;
            return(result);
        }
コード例 #5
0
        public ASSEvent LayerReplace(int layer)
        {
            ASSEvent result = this.MemberwiseClone() as ASSEvent;

            result.Layer = layer;
            return(result);
        }
コード例 #6
0
        public ASSEvent StyleReplace(string style)
        {
            ASSEvent result = this.MemberwiseClone() as ASSEvent;

            result.Style = style;
            return(result);
        }
コード例 #7
0
        public ASSEvent Last_ChangeEnd(double last)
        {
            ASSEvent result = this.MemberwiseClone() as ASSEvent;

            result.End = result.Start + last;
            return(result);
        }
コード例 #8
0
        public ASSEvent EndOffset(double offset)
        {
            ASSEvent result = this.MemberwiseClone() as ASSEvent;

            result.End += offset;
            return(result);
        }
コード例 #9
0
        public ASSEvent StartOffset(double offset)
        {
            ASSEvent result = this.MemberwiseClone() as ASSEvent;

            result.Start += offset;
            return(result);
        }