Example #1
0
        /// <summary>
        /// 获取DWG文件位置
        /// </summary>
        private string OpenFilePath()
        {
            ViewDWG dv           = new ViewDWG();
            string  sGetFilePath = this.sGetDWGFilePath();

            lFilePath.Text = sGetFilePath;
            return(sGetFilePath);
        }
Example #2
0
        /// <summary>
        /// DWG转换为bmp/jpg格式
        /// </summary>
        private void ShiftFileFormat()
        {
            //string sGetFilePath;
            try
            {
                ViewDWG dv        = new ViewDWG();
                string  sFilePath = lFilePath.Text.Substring(0, lFilePath.Text.LastIndexOf("\\"));

                string sGetPicName = Path.GetFileNameWithoutExtension(lFilePath.Text) + ".bmp";
                dv.GetDwgImage(lFilePath.Text, tbOutputPath.Text + "\\" + sGetPicName);
                MessageBox.Show("转换成功");
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }