Example #1
0
        private void btnGen_Click(object sender, EventArgs e)
        {
            SaveItemInfos();
            SaveClassItemInfo();

            if (cmbModels.Value != null)
            {
                UIProject project = cmbModels.Value as UIProject;
                if (project != null)
                {
                    try
                    {
                        Project selectedProject = cmbProjects.Value as Project;
                        project.GenerateCode(_curEntityInfo, _config, selectedProject, GetProperty(false), _classInfo);
                        this.Close();
                    }
                    catch (CompileException cex)
                    {
                        FrmCompileResault.ShowCompileResault(cex.Code, cex.ToString(), "编译错误");
                    }
                    catch (Exception ex)
                    {
                        FrmCompileResault.ShowCompileResault(null, ex.ToString(), "编译错误");
                        return;
                    }
                }
            }
        }
Example #2
0
 private void FrmUIGenerater_Load(object sender, EventArgs e)
 {
     gvMember.AutoGenerateColumns = false;
     try
     {
         LoadInfo();
     }
     catch (Exception ex)
     {
         FrmCompileResault.ShowCompileResault(null, ex.ToString(), "加载模版失败");
         this.Close();
     }
     CreateClassItem();
     CreateItems();
     LoadItemCache();
     LoadClassItemCache();
     BindUIModleInfo(_classUIConfig, _classInfo);
     BindItems(_curEntityInfo.Propertys);
     this.Text = "UI界面生成-" + _curEntityInfo.ClassName + ToolVersionInfo.ToolVerInfo;
 }