private void CreateWorkSheet(string line) { var bounds = line.Split(' '); if (bounds.Length != 2) { throw new CommandlineInputException($"Bounds could not be resolved from {line}"); } if (bounds[0].StartsWith('-') || bounds[1].StartsWith('-')) { throw new WorksheetInvalidBoundsException(bounds[0], bounds[1]); } if (!uint.TryParse(bounds[0], out uint width) || !uint.TryParse(bounds[1], out uint height)) { throw new CommandlineInputException($"Incorrect bound specification (width : {bounds[0]}, height : {bounds[1]})"); } if (height > ((ROWEND - ROWSTART) + 1)) { throw new OverflowException($"There cannot be more than {(ROWEND - ROWSTART)} rows at this time"); } CurrentSheet = new WorkSheetGraph(this, height, width); }
public GraphNode(WorkSheetGraph root, string id, uint row, uint col) { Edges = new List <GraphNode>(); Name = id; Position = (row, col); formula = new List <string>(); Observers = new GraphNodeObserver(this); Parent = root; }