private List <TokenCircle> buildCircles() { string tokenParams = BrailleService.getGlyphParamsById(this.id); List <TokenCircle> tokenCircles = new List <TokenCircle>(); for (int i = 0; i < tokenParams.Length; i += 4) { TokenCircle tokenCircle = new TokenCircle(tokenParams[i], tokenParams[i + 2]); tokenCircles.Add(tokenCircle); } return(tokenCircles); }
public Translator(string inputText, int brailleSchema) { this.inputText = inputText; this.brailleSchema = brailleSchema; Dictionary <string, double> configs = BrailleService.getConfigsById(3); this.circleRadio = configs["Circle_Radio"]; this.circleRatio = configs["Circle_Ratio"]; this.width = configs["Width"]; this.heigth = configs["Heigth"]; this.lines = Convert.ToInt32(configs["Lines"]); this.tokens = Convert.ToInt32(configs["Tokens"]); }
public BrailleToken(string symbol) { this.title = symbol; this.id = BrailleService.getGlyphId(this.title); this.tokenCircles = buildCircles(); }