zoukankan      html  css  js  c++  java
  • C# WinForm 技巧十: 开发工具

    一、摘要

     

    为了开发效率就应该为这个框架开发一个配套工具。来生成固定格式的代码。工具界面如下:

    clipboard[48]

     

    二、数据库整理篇

     

    添加表主键

    修改表说明

    clipboard[56]

    修改表字段说明

    clipboard[58]

    生成数据库文档

    clipboard[60]

    导出数据库里相同的字段

    数据库里相同的字段描述一样

    三、根据模板生成代码

     

    clipboard[62]

    单表生成界面

    clipboard[64]

     

    四、工具实现架构

     

    其他就是一个简单的函数工厂类

    clipboard[66]

       public enum BuildType

        {

            WebBuild,

            WinFromBuild,

            WPFBuild,

            WCFBuild,

            WebService,

            WindowsService,

            EntityFrameworkBuild,

        }

        public interface IBuild

        {

            void Library(string path, string tablename, ProgressBar progressBar, out string content);

        }

        public class BuildHelper

        {

            public static IBuild FactoryBuild(BuildType buildtype)

            {

                IBuild ibuild = null;

                switch (buildtype)

                {

                    case BuildType.WebBuild:

                        ibuild = new WebBuild();

                        break;

                    case BuildType.WinFromBuild:

                        ibuild = new WinFromBuild();

                        break;

                    case BuildType.WPFBuild:

                        ibuild = new WPFBuild();

                        break;

                    case BuildType.WCFBuild:

                        break;

                    case BuildType.EntityFrameworkBuild:

                        ibuild = new EntityFrameworkBuild();

                        break;

                }

                return ibuild;

            }

        }

       五、生成效果图

     

    clipboard[68]

    http://www.cnblogs.com/luomingui/archive/2012/09/02/2667217.html

  • 相关阅读:
    PAT:1069. The Black Hole of Numbers (20) AC
    PAT:1008. Elevator (20) AC
    PAT:1052. Linked List Sorting (25) 部分错误
    PAT:1032. Sharing (25) AC
    PAT:1059. Prime Factors (25) AC
    素数表(筛选法)
    PAT:1048. Find Coins (25)(双指针法) AC
    PAT:1048. Find Coins (25)(二分查找) AC
    iOS 9.0 设置状态栏颜色 和隐藏
    UIPageViewController用法
  • 原文地址:https://www.cnblogs.com/luomingui/p/3410486.html
Copyright © 2011-2022 走看看