Here are the examples of the csharp api class Code.ElementInList(int) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
3 Examples
0
1. Example
View licenseprivate void UpdateLineText(int NumberLine, string LineText) { if(InterpreterView) { CurrentLine = LineText; return; } if(!ElementInList(NumberLine)) return; Lines[NumberLine-1] = new List<string>(); foreach(Match results in Regex.Matches(LineText,@"(\t)|(\w+)|(\s+)|(.)")) Lines[NumberLine-1].Add(results.Value); CurrentLine = LineText; }
0
2. Example
View licensepublic string GetLine(int NumberLine) { if(!ElementInList(NumberLine)) return string.Empty; return string.Join("",Lines[NumberLine-1].ToArray()); }
0
3. Example
View licensepublic void RemoveText() { if(!ElementInList(Line) && !InterpreterView) return; if(Column > 0) { //Remove single char. GoLeft(); string LineTab = CurrentLine; LineTab = LineTab.Remove(Math.Max(0,ColumnIndex),1); UpdateLineText(Line,LineTab); }else if(!InterpreterView && Line != 1) { //Remove line. Lines[Line-2].Add(CurrentLine); Lines.RemoveAt(Line-1); GoUp(); Column = GetLine(Line-1).IndexOf(CurrentLine); SetColumnIndex(); } }