コード例 #1
0
        private void ColorPicker(ComboBox cb)
        {
            var color = EplDrawingExtention.GetDisplayColor(cb.Text);

            if (cb.Name == "cbxPinColor")
            {
                lbPinColor.BackColor = color;
            }
            else
            {
                lbOutlineColor.BackColor = color;
            }
        }
コード例 #2
0
        private void btnDraw_Click(object sender, EventArgs e)
        {
            Logger.WriteLine(JsonConvert.SerializeObject(EplDrawinSymbolModel));

            EplDrawingExtention eplDrawingExtention = new EplDrawingExtention();

            Page currentPage = GenGlobal.CurrentProject.GetActivePage();

            EplDrawingExtention.Rectangle(ref currentPage, EplDrawinSymbolModel.MainLayout);

            eplDrawingExtention.BasePosition = new Eplan.EplApi.Base.PointD(EplDrawinSymbolModel.MainLayout.PositionX, EplDrawinSymbolModel.MainLayout.PositionY);

            eplDrawingExtention.DrawPolyline(ref currentPage, CurrentPinModel);
            //GenGlobal.CurrentProject.GetActivePage().DrawRectangle(new Eplan.EplApi.Base.PointD(EplDrawinSymbolgModel.PositionX, EplDrawinSymbolgModel.PositionY),
            //    EplDrawinSymbolgModel.Fill, EplDrawinSymbolgModel.DimensionX, EplDrawinSymbolgModel.DimensionY, EplDrawinSymbolgModel.OutlineWidthVal, EplDrawinSymbolgModel.ColorId);
        }
コード例 #3
0
 public static void DrawRectangle(this Page page, PointD location, bool fill, double width, double height,
                                  double pen_width, short colorId, short styleId = (short)EplDrawStyle.from_layer)
 {
     EplDrawingExtention.Rectangle(ref page, location, fill, width, height, pen_width, colorId, styleId);
 }