示例#1
0
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog dlg = new OpenFileDialog();

            dlg.Filter = "DXF (*.dxf)|*.dxf";

            if (DialogResult.OK == dlg.ShowDialog())
            {
                AnyCAD.Exchange.DxfReader reader = new AnyCAD.Exchange.DxfReader();
                renderView.ClearScene();
                AnyCAD.Exchange.ShowShapeReaderContext context = new AnyCAD.Exchange.ShowShapeReaderContext(renderView.SceneManager);
                context.NextShapeId = mBeginId;
                if (reader.Read(dlg.FileName, context, false))
                {
                    renderView.RequestDraw();
                    mEndId = context.NextShapeId;
                }
            }

            renderView.View3d.FitAll();
        }
示例#2
0
 private void clearToolStripMenuItem_Click(object sender, EventArgs e)
 {
     renderView.ClearScene();
 }