public IList <Dialog> GetDialogs() { Syncro syncro = new Syncro(); syncro.Load(Dialogs); this.Dialogs = syncro.GetSynced(); return(this.Dialogs); }
public void SyncTest() { Syncro syncro = new Syncro(); syncro.Load(SyncTestData()); List <Dialog> synced = syncro.GetSynced(); foreach (Dialog dialog in synced) { StringBuilder sb = new StringBuilder(); sb.Append(new Timing(dialog.startTime).GetSrtTime()).Append(" => "); sb.Append(new Timing(dialog.endTime).GetSrtTime()); sb.AppendLine().AppendLine(dialog.text); System.Diagnostics.Debug.WriteLine(sb.ToString()); } }
public void IsOverreachingEnd_Outside() { Dialog current = new Dialog { startTime = 500, endTime = 7000, text = "Line One", isDialog = true }; Dialog compare = new Dialog { startTime = 7000, endTime = 9000, text = "Line Two", isDialog = true }; Syncro syncro = new Syncro(); Assert.IsFalse(syncro.IsOverreachingEnd(current, compare)); }
public void IsOverreachingStart_OverlappingWithinSmaller() { Dialog current = new Dialog { startTime = 500, endTime = 1000, text = "Line One", isDialog = true }; Dialog compare = new Dialog { startTime = 600, endTime = 7000, text = "Line Two", isDialog = true }; Syncro syncro = new Syncro(); Assert.IsFalse(syncro.IsOverreachingStart(current, compare)); }
public void IsOverlapping() { Dialog current = new Dialog { startTime = 500, endTime = 1000, text = "Line One", isDialog = true }; Dialog compare = new Dialog { startTime = 500, endTime = 1000, text = "Line Two", isDialog = true }; Syncro syncro = new Syncro(); Assert.IsTrue(syncro.IsWithin(current, compare)); }