Example #1
0
 private void m_panel_Paint(object sender, PaintEventArgs e)
 {
     if (_flag)
     {
         IntPtr hdc = e.Graphics.GetHdc();
         bool   aux = CadLib.drwPaint_1(_m_hDrawing, hdc);
         e.Graphics.ReleaseHdc(hdc);
     }
 }
Example #2
0
        public Form1()
        {
            InitializeComponent();

            _m_hDrawing = CadLib.InitSystem_1();

            bool aux = CadLib.drwLoadDataFromFile_1(_m_hDrawing, 0, 0,
                                                    GetBytesFromStringWithZero(Encoding.Default, Application.StartupPath + "\\sample.dxf"), IntPtr.Zero);

            aux   = CadLib.drwInitView_1(_m_hDrawing, 0, 0, (Int64)m_panel.Width, (Int64)m_panel.Height);
            aux   = CadLib.drwZoomExtents_1(_m_hDrawing);
            _flag = true;
            m_panel.Refresh();
        }