public Layer_PartSet_Connected(IM2MStructure m2mStructure, int levelSequence) { this.m2mStructure = m2mStructure; this.levelSequence = levelSequence; positionSetDrawerPump = new PositionSetDrawerPump(this); pointCoordinateDrawer.Visible = false; connectionDrawer.LineWidth = 1; pointDrawer.IsDrawPointBorder = true; pointDrawer.PointRadius = 1; PartColor = GenerateColor.GetSimilarColor(MainColor); }
public override void Draw(Graphics graphics) { if (Visible) { Color tempColor = GridColor; for (int i = m2mStructure.GetLevelNum() - 1; i > 0; i--) { layer_Grid = new Layer_Grid(m2mStructure.GetLevel(i)); layer_Grid.ScreenScaleX = this.ScreenScaleX; layer_Grid.ScreenScaleY = this.ScreenScaleY; layer_Grid.ScreenTranslationX = this.ScreenTranslationX; layer_Grid.ScreenTranslationY = this.ScreenTranslationY; layer_Grid.Visible = true; tempColor = GenerateColor.GetSimilarColor(tempColor); layer_Grid.GridLine.LineColor = Color.FromArgb(alpha, tempColor); layer_Grid.GridLine.LineWidth = (float)((m2mStructure.GetLevelNum() - i)); layer_Grid.Draw(graphics); } } }