Esempio n. 1
0
        /// <summary>
        /// 确定按钮,创建出新的工程
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button2_Click(object sender, EventArgs e)
        {
            string path = this.textBox_path.Text;
            string name = this.textBox_name.Text;

            if (!Fs.DirExists(path))
            {
                Autodesk.AutoCAD.ApplicationServices.Application.
                ShowAlertDialog("请输入正确路径。");
                return;
            }
            if (Fs.DirExists(path + name))
            {
                Autodesk.AutoCAD.ApplicationServices.Application.
                ShowAlertDialog("该目录有同名文件夹,请另存为项目为其他名称,或者将同名文件夹删除。");
                return;
            }



            this.Close();

            Global.CreateNewProject(path + name, name);

            Fs.createDwg(Global.CurrentProjectPath, Global.CurrentProjectName);

            Global.OpenProject(path + name, name);
        }