public static IEnumerable <WinStenoEntry> Parse(FileInfo fi) { List <WinStenoEntry> output = new List <WinStenoEntry>(); if (fi == null || !File.Exists(fi.FullName)) { return(output); } DataTable dt = LoadMDB(fi, "BatTab"); foreach (var row in dt.AsEnumerable()) { WinStenoEntry wse = new WinStenoEntry(); wse.WinstenoStroke = row.Field <string>("Battuta"); wse.Complete = row.Field <string>("Completa"); wse.Partial = row.Field <string>("Semplice"); wse.CapsFlag = row.Field <bool>("Completa_Iniziale"); if (!String.IsNullOrEmpty(wse.Complete) || !String.IsNullOrEmpty(wse.Partial)) { output.Add(wse); } } return(output); }
public static IEnumerable<WinStenoEntry> Parse(FileInfo fi) { List<WinStenoEntry> output = new List<WinStenoEntry>(); if (fi == null || !File.Exists(fi.FullName)) { return output; } DataTable dt = LoadMDB(fi, "BatTab"); foreach(var row in dt.AsEnumerable()) { WinStenoEntry wse = new WinStenoEntry(); wse.WinstenoStroke = row.Field<string>("Battuta"); wse.Complete = row.Field<string>("Completa"); wse.Partial = row.Field<string>("Semplice"); wse.CapsFlag = row.Field<bool>("Completa_Iniziale"); if (!String.IsNullOrEmpty(wse.Complete) || !String.IsNullOrEmpty(wse.Partial)) { output.Add(wse); } } return output; }
public static List <PloverEntry> FromWinstenoEntry(WinStenoEntry wse) { List <PloverEntry> entries = new List <PloverEntry>(); if (!String.IsNullOrEmpty(wse.Complete)) { PloverEntry pe = new PloverEntry(); pe.Strokes = wse.PloverStrokes; pe.Value = ConvertValue(wse.Complete); entries.Add(pe); } if (!String.IsNullOrEmpty(wse.Partial)) { PloverEntry pe = new PloverEntry(); pe.Strokes = wse.PloverStrokes; pe.Strokes.Last().RightStroke.Add('&'); pe.Value = ConvertValue(wse.Partial + "&rb;"); entries.Add(pe); } return(entries); }
public static List<PloverEntry> FromWinstenoEntry(WinStenoEntry wse) { List<PloverEntry> entries = new List<PloverEntry>(); if (!String.IsNullOrEmpty(wse.Complete)) { PloverEntry pe = new PloverEntry(); pe.Strokes = wse.PloverStrokes; pe.Value = ConvertValue(wse.Complete); entries.Add(pe); } if (!String.IsNullOrEmpty(wse.Partial)) { PloverEntry pe = new PloverEntry(); pe.Strokes = wse.PloverStrokes; pe.Strokes.Last().RightStroke.Add('&'); pe.Value = ConvertValue(wse.Partial + "&rb;"); entries.Add(pe); } return entries; }