private static Segment[] getSegmentsFromTextbox(TextBox textbox)
        {
            var segments = new List <Segment>();

            foreach (string line in textbox.Lines)
            {
                segments.Add(SegmentBuilder.CreateFromString(line));
            }
            return(segments.ToArray());
        }
        private static TranslationUnit[] getTranslationUnitsFromTextboxes(TextBox tbSource, TextBox tbTarget)
        {
            var transUnits = new List <TranslationUnit>();

            for (int i = 0; i < tbSource.Lines.Length && i < tbTarget.Lines.Length; ++i)
            {
                transUnits.Add(new TranslationUnit(
                                   SegmentBuilder.CreateFromString(tbSource.Lines[i]),
                                   SegmentBuilder.CreateFromString(tbTarget.Lines[i])));
            }
            return(transUnits.ToArray());
        }
 private static Segment getOneSegmentsFromTextbox(TextBox textbox)
 {
     return(SegmentBuilder.CreateFromString(textbox.Lines[0]));
 }