Exemple #1
0
        public IList <Dialog> GetDialogs()
        {
            Syncro syncro = new Syncro();

            syncro.Load(Dialogs);
            this.Dialogs = syncro.GetSynced();

            return(this.Dialogs);
        }
Exemple #2
0
        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());
            }
        }
Exemple #3
0
        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));
        }
Exemple #4
0
        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));
        }
Exemple #5
0
        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));
        }