Beispiel #1
0
        public FrmModelCreater(BasicParameter basicParameter, DbSchema dbSchema)
        {
            InitializeComponent();

            #region 设置高亮显示属性

            txtCode.ShowEOLMarkers                = false;
            txtCode.ShowHRuler                    = false;
            txtCode.ShowInvalidLines              = false;
            txtCode.ShowMatchingBracket           = true;
            txtCode.ShowSpaces                    = false;
            txtCode.ShowTabs                      = false;
            txtCode.ShowVRuler                    = false;
            txtCode.AllowCaretBeyondEOL           = false;
            txtCode.Document.HighlightingStrategy = HighlightingStrategyFactory.CreateHighlightingStrategy("C#");
            txtCode.Encoding                      = Encoding.GetEncoding("GB2312");

            #endregion 设置高亮显示属性

            this.m_basicParameter = basicParameter;
            this.m_dbSchema       = dbSchema;
            foreach (var item in m_dbSchema.DatabaseSchema.Tables)
            {
                m_lstLeft.Add(item.Name);
                lsbleft.Items.Add(item.Name);
            }
        }
Beispiel #2
0
 public FrmWinFormGen(DbSchema dbSchema, CodeGenType codeGenType)
 {
     InitializeComponent();
     lstCheckInputFileds.MouseEnter += ListMouseEnter;
     lstEditShowFileds.MouseEnter   += ListMouseEnter;
     lstQueryFileds.MouseEnter      += ListMouseEnter;
     lstShowFileds.MouseEnter       += ListMouseEnter;
     m_dbSchema    = dbSchema;
     m_codeGenType = codeGenType;
     SetVisible();
 }
Beispiel #3
0
 public FrmNestQuerySetting(DbSchema dbSchema, CodeGenType codeGenType)
 {
     InitializeComponent();
     m_codeGenType = codeGenType;
     m_dbSchema    = dbSchema;
     grdQuery.AutoGenerateColumns = false;
     if (codeGenType == CodeGenType.WinFromNestQuery)
     {
         cboNestType.SelectedIndex             = 0;
         txtSql.Document.HighlightingStrategy  = HighlightingStrategyFactory.CreateHighlightingStrategy("TSQL");
         txtSql1.Document.HighlightingStrategy = HighlightingStrategyFactory.CreateHighlightingStrategy("TSQL");
         txtSql2.Document.HighlightingStrategy = HighlightingStrategyFactory.CreateHighlightingStrategy("TSQL");
     }
 }
Beispiel #4
0
 /// <summary>构造函数
 ///
 /// </summary>
 /// <param name="dbSchema">dbSchema</param>
 public FrmCodeMakerMain(DbSchema dbSchema)
 {
     InitializeComponent();
     m_dbSchema     = dbSchema;
     m_frmTableList = new FrmTableList();
     m_frmTableList.Show(dockPanel);
     //GlobalHelp.TreeView.ImageList = imgList;
     GlobalHelp.TreeView.ContextMenuStrip = contextMenu;
     GlobalHelp.TreeView.MouseUp         += tvwDataBase_MouseUp;
     GlobalHelp.DockPanel = dockPanel;
     if (m_dbSchema != null)
     {
         TreeNode treeNode = new TreeNode(m_dbSchema.DatabaseName);
         GlobalHelp.TreeView.Nodes.Add(treeNode);
         FillTables(treeNode, m_dbSchema.DatabaseSchema);
         treeNode.ExpandAll();
     }
 }
Beispiel #5
0
        public FrmWinFormGen2(DbSchema dbSchema, CodeGenType codeGenType)
        {
            InitializeComponent();
            lstCheckInputFileds.MouseEnter += ListMouseEnter;
            lstEditShowFileds.MouseEnter   += ListMouseEnter;
            lstQueryFileds.MouseEnter      += ListMouseEnter;
            lstShowFileds.MouseEnter       += ListMouseEnter;
            lstDontRepeatFileds.MouseEnter += ListMouseEnter;

            if (codeGenType == CodeGenType.WinFromParentChildEditWithDialog)
            {
                lstCheckInputFiledsDetail.MouseEnter += ListMouseEnter;
                lstEditShowFiledsDetail.MouseEnter   += ListMouseEnter;
                lstShowFiledsDetail.MouseEnter       += ListMouseEnter;
                lstDontRepeatFiledsDetail.MouseEnter += ListMouseEnter;
            }

            m_dbSchema    = dbSchema;
            m_codeGenType = codeGenType;
            SetVisible();
        }