private void CreateLegendRow(FtTransmitterMCPDataEntry mcp, Graphics g, float x, float y, float rowHeight) { var spacingOffs = rowHeight * 0.15; string str = CreateLegendString(mcp); //g.DrawRectangle(new Pen(dataset.Color), x, (float) (y + spacingOffs), rowHeight, (float)(rowHeight - (float)(2 * spacingOffs))); g.FillRectangle(new SolidBrush(mcp.Color), x, (float)(y + spacingOffs), rowHeight, (float)(rowHeight - (float)(2 * spacingOffs))); g.DrawString(str, Font, ForeGroundBrush, x + colorFieldOffs, y); }
//private void MCPAvailable(object sender, MCPAvailableArgs e) //{ // CreateMCPNode(e.Dataset, e.PercentageMCP); //} private void CreateMCPNode(FtTransmitterDataset dataset, FtTransmitterMCPDataEntry mcpEntry, int percentageMCP) { var parent = GetParentTreeNodeForTag(dataset); var tn = new TreeNodeAdv($"MCP {percentageMCP}%") { ShowCheckBox = true, LeftImageIndices = parent.LeftImageIndices, Tag = new TreeNodeTagObject(TreeNodeTagObject.TreeViewNodeType.MCPNode, dataset, mcpEntry) }; parent.Nodes.Add(tn); SetTreeNodeCheckState(tn, true); RegenImageList(); }
private string CreateLegendString(FtTransmitterMCPDataEntry mcp) { return(String.Format(FormatString, mcp.Parent.TagId, mcp.PercentageMCP)); }