public DistributedPowerInterfaceRenderer(Viewer viewer, MSTSLocomotive locomotive, CVCScreen control, CabShader shader) : base(viewer, locomotive, control, shader) { Position.X = (float)Control.PositionX; Position.Y = (float)Control.PositionY; DPI = new DistributedPowerInterface((int)Control.Height, (int)Control.Width, locomotive, viewer, control); }
public DPDefaultWindow(DistributedPowerInterface dpi, CabViewControl control) : base(dpi, 640, 240) { var param = (control as CVCScreen).CustomParameters; if (param.ContainsKey("fulltable")) { bool.TryParse(param["fulltable"], out FullTable); } if (param.ContainsKey("loadunits")) { string sUnits = param["loadunits"].ToUpper(); sUnits = sUnits.Replace('/', '_'); CABViewControlUnits.TryParse(sUnits, out LoadUnits); } DPITable = new DPITable(FullTable, LoadUnits, fullScreen: true, dpi: dpi); AddToLayout(DPITable, new Point(0, 0)); }
public DPITable(bool fullTable, CABViewControlUnits loadUnits, bool fullScreen, DistributedPowerInterface dpi) : base(dpi, 640, fullTable? 230 : 162) { DPI = dpi; FullScreen = fullScreen; FullTable = fullTable; LoadUnits = loadUnits; BackgroundColor = DPI.BlackWhiteTheme ? Color.Black : ColorBackground; SetFont(); string text = ""; for (int iRow = 0; iRow < (fullTable ? NumberOfRowsFull : NumberOfRowsPartial); iRow++) { for (int iCol = 0; iCol < NumberOfColumns; iCol++) { // text = iCol.ToString() + "--" + iRow.ToString(); TableText[iRow, iCol] = new TextPrimitive(new Point(20 + ColLength * iCol, (iRow) * (FontHeightTableText + 8)), Color.White, text, TableTextFont); TableSymbol[iRow, iCol] = new TextPrimitive(new Point(10 + ColLength * iCol, (iRow) * (FontHeightTableText + 8)), Color.Green, text, TableSymbolFont); } } }
protected DPIWindow(DistributedPowerInterface dpi, int width, int height) : base(dpi, width, height) { }
public DPIArea(DistributedPowerInterface dpi, int width, int height) { DPI = dpi; Width = width; Height = height; }
public DPIArea(DistributedPowerInterface dpi) { DPI = dpi; }