public static IInspectorController MakeController(InspectorView view, IHexGridController grid, BaseNode.NodeType type) { IInspectorController result = null; switch (type) { case BaseNode.NodeType.Group: result = new GroupInspectorController(view, grid); break; case BaseNode.NodeType.Invokable: result = new InvokableInspectorController(view, grid); break; case BaseNode.NodeType.Tweakable: result = new TweakableInspectorController(view, grid); break; default: LogManager.GetCurrentClassLogger().Error("Cannot inspect node of type {0}", type); result = null; break; case BaseNode.NodeType.Watchable: break; } return(result); }
public TileController(IHexGridController grid, TView view, HexGridCell <BaseNode> cell) { this.grid = grid; View = view; BaseCell = cell; Node = BaseCell.Value as TNode; }
public InspectorController(InspectorView view, IHexGridController gridController) { this.view = view; this.gridController = gridController; consoleController = gridController.Console; contentFactory = new InspectorContentViewFactory(view); contentViews = new List <IInspectorContentView>(); ConfigureViews(); }
public InvokableInspectorController(InspectorView view, IHexGridController gridController) : base(view, gridController) { }
public InvokableTileController(IHexGridController console, TileView view, HexGridCell <BaseNode> cell) : base(console, view, cell) { invokable = base.Node.Invokable; }
public static ITileController MakeController(TileView view, HexGridCell <BaseNode> cell, IHexGridController console) { ITileController tileController; switch (cell.Value.Type) { case BaseNode.NodeType.Group: tileController = new GroupTileController(console, view, cell); break; case BaseNode.NodeType.Invokable: tileController = new InvokableTileController(console, view, cell); break; case BaseNode.NodeType.Tweakable: tileController = new TweakableTileController(console, view as TweakableTileView, cell); break; case BaseNode.NodeType.Watchable: tileController = new WatchableTileController(console, view, cell); break; case BaseNode.NodeType.Unknown: tileController = new TileController <TileView, BaseNode>(console, view, cell); break; default: LogManager.GetCurrentClassLogger().Error("Invalid or unsupported BaseNode.Type value: {0}", cell.Value.Type); tileController = null; break; } tileController.Init(); return(tileController); }
public WatchableTileController(IHexGridController console, TileView view, HexGridCell <BaseNode> cell) : base(console, view, cell) { watchable = base.Node.Watchable; }
public GroupInspectorController(InspectorView view, IHexGridController gridController) : base(view, gridController) { }
public TweakableTileController(IHexGridController console, TweakableTileView view, HexGridCell <BaseNode> cell) : base(console, view, cell) { tweakable = base.Node.Tweakable; }
public GroupTileController(IHexGridController console, TileView view, HexGridCell <BaseNode> cell) : base(console, view, cell) { }