public UCTopologyItem(ITopologyItem v) : this() { Item = v; AreInUse = new AreInUse(); _IsDataInput = Item == null || Item is IDataInput; RefreshDesign(); if (_IsDataInput) { Size = new Size((int)(Width * 1.2), (int)(Height * 1.2)); } if (!_IsDataInput && SystemHelper.IsWindows) { using (Graphics gp = CreateGraphics()) { if (_IsDataInput) { _EdgeFilter = RectangleEdgeFilter.BottomLeft | RectangleEdgeFilter.TopRight; } else { _EdgeFilter = RectangleEdgeFilter.All; } _EdgeBorder = 10F; Region = new Region(gp.GenerateRoundedRectangle(Bounds, _EdgeBorder, _EdgeFilter)); } } else { _EdgeFilter = RectangleEdgeFilter.None; _EdgeBorder = 0; } }
public void RefreshInPlay(bool inPlay) { _InPlay = inPlay; AreInUse.Clear(); //Invalidate(); }