Ejemplo n.º 1
0
        private void GenModelCode(object sender, EventArgs args)
        {
            var codeFrm = new ShowCodeFrm();
            var model   = ModelManager.Instance().GetModel(this.FileId.Value);
            //var ns = "";
            //var p = this.Parent as FolderNode;
            //if (p != null)
            //{
            //    ns = p.NameSpace;
            //}

            var module = ModelManager.Instance().MakeSureParseModule(model.File);

            if (module == null)
            {
                System.Windows.Forms.MessageBox.Show("模块还没解析");
                return;
            }

            var builder = new IndentStringBuilder();

            //module.NameSpace = ns;
            ((WorkflowDB)module).RenderModel(builder);
            codeFrm.SetText(builder.ToString());
            codeFrm.Show();
        }
Ejemplo n.º 2
0
        private void ValidateModel(object sender, EventArgs args)
        {
            var codeFrm = new ShowCodeFrm();
            var model   = ModelManager.Instance().GetModel(this.FileId.Value);

            var module  = ModelManager.Instance().MakeSureParseModule(model.File);
            var builder = new IndentStringBuilder();

            ((ViewModelDB)module).Render(builder);
            codeFrm.SetText(builder.ToString());
            codeFrm.Show();
        }
Ejemplo n.º 3
0
        private void ValidateModel(object sender, EventArgs args)
        {
            var codeFrm = new ShowCodeFrm();
            var model   = ModelManager.Instance().GetModel(this.FileId.Value);

            var module = ModelManager.Instance().MakeSureParseModule(model.File);

            if (module == null)
            {
                System.Windows.Forms.MessageBox.Show("模块还未生成");
                return;
            }

            var builder = new IndentStringBuilder();

            ((WorkflowDB)module).Render(builder);
            codeFrm.SetText(builder.ToString());
            codeFrm.Show();
        }
Ejemplo n.º 4
0
        private void Mnu_GenerateDBCode(object sender, EventArgs args)
        {
            var codeFrm = new ShowCodeFrm();
            var model   = ModelManager.Instance().GetModel(this.FileId.Value);
            var module  = ModelManager.Instance().MakeSureParseModule(model.File);

            if (module == null)
            {
                System.Windows.Forms.MessageBox.Show("模块还没解析");
                return;
            }

            var builder = new IndentStringBuilder();

            //module.NameSpace = ns;
            ((DmModelDB)module).RenderSql(builder);
            codeFrm.SetText(builder.ToString());
            codeFrm.Show();
        }