画布 C# 中的 dxf 文件

问题描述

我正在将一个 DXF 文件导入我的项目并在画布上显示它,有没有办法在我的画布上移动这个对象?用鼠标选择对象并拖动。如果有人可以回答,那将是一个优势,我可以将这些文件导出为 dxf 格式吗?

            {
                inputFileTxt = openFileDialog1.FileName;    //filename is taken (file path is also included to this name example: c:\windows\system\blabla.dxf

                int ino = inputFileTxt.LastIndexOf("\\");   //index no of the last "\" (that is before the filename) is found here


                newCanvas = new Canvas();           //a new canvas is created...

                newCanvas.MdiParent = this;         //...its mdiparent is set...

                newCanvas.Text = inputFileTxt.Substring(ino+1,inputFileTxt.Length - ino - 1);  //...filename is extracted from the text...(blabla.dxf)...
                newCanvas.MinimumSize = new Size (500,400);        //...canvas minimum size is set...
    

                if(inputFileTxt.Length > 0)
                {
                    newCanvas.ReadFromFile(inputFileTxt);       //the filename is sent to the method for data extraction and interpretation...
                }



                newCanvas.Show();                           //the canvas is displayed...
                newCanvas.Activate();
                newCanvas.Focus();

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)