コード例 #1
0
        // generate code
        protected void onGenerateCodeCommand(object sender, EventArgs args)
        {
            if (this.Package == null)
            {
                return;
            }

            if (this.CurrentMVCVisualDesignerDocData != null &&
                this.CurrentMVCVisualDesignerDocData.RootElement != null &&
                this.CurrentMVCVisualDesignerDocData.RootElement is VDView)
            {
                CodeGenerationForm deployWin = new CodeGenerationForm(this.ServiceProvider);
                deployWin.InitializeForm(
                    this.Package.GetCodeGeneratorAssemblyList(),
                    (VDView)(this.CurrentMVCVisualDesignerDocData.RootElement),
                    this.activeDocumentPath);

                if (deployWin.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    deployWin.Close();
                    System.Windows.Forms.MessageBox.Show("Files are generated successfully", "Message",
                                                         System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Information);
                }
            }
        }
コード例 #2
0
        // generate code
        protected void onGenerateCodeCommand(object sender, EventArgs args)
        {
            if (this.Package == null) return;

            if (this.CurrentMVCVisualDesignerDocData != null
                && this.CurrentMVCVisualDesignerDocData.RootElement != null
                && this.CurrentMVCVisualDesignerDocData.RootElement is VDView)
            {
                CodeGenerationForm deployWin = new CodeGenerationForm(this.ServiceProvider);
                deployWin.InitializeForm(
                    this.Package.GetCodeGeneratorAssemblyList(),
                    (VDView)(this.CurrentMVCVisualDesignerDocData.RootElement),
                    this.activeDocumentPath);

                if (deployWin.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    deployWin.Close();
                    System.Windows.Forms.MessageBox.Show("Files are generated successfully", "Message",
                        System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Information);
                }
            }
        }