public GnomApp(IGnomTree view, IPressable startingElementId, IConsoleManipulator manipulator, Action<GnomEventArgs> keyRoutingMethod) { this.View = view; this.KeyRoutingMethod = keyRoutingMethod; this.Selected = startingElementId; this.Manipulator = manipulator; }
public void DrawGnomTree(IGnomTree tree, int topStart = 0, int leftStart = 0) { if(this.RefreshConsole) { Console.Clear(); } DrawTreeRec(tree.Root, topStart, leftStart); }
/// <summary> /// Assign a gnom view to the current instance. /// </summary> /// <param name="view"></param> public GnomController(IGnomTree view) { this.View = view; this.field = this.View[FieldId]; // TODO: extract in resource provider var text2 = new TextElement("Current moves: 0"); text2.Style.PaddingTop = 3; this.View[MessageBoxId].AddChild(text2); }
public GnomEventArgs(IGnomTree view, IPressable target, ConsoleKeyInfo keyInfo) { this.View = view; this.Target = target; this.PressedKeyInfo = keyInfo; }