TextBox

Tag cloud

    Mercure Integration: Dedicated to Microsoft CRM Integration Products

    Standalone Workflow Configuration and Deployment

    by support 6. March 2008 06:19

    When I compiled, open and tried the CrmWorkflowConfigurationAndDeployment project, I saw that this was integrated with the Visual Studio IDE. The problem is, that I compiled my own workflow and that the tool gives me an error when I wanted to deploy it on my CRM 4.0 server.

    This tool is great, but, when it's the time to debug it, I don't want to launch, an IDE, and attach an other IDE to the Visual studio addin, just to know what is going on, and after redeploy the Addin just to see if the bug is fixed.

    I converted the VS Addin to a stand alone application, by adding a program.cs and a master form that call the 3 forms of the workflowconfigurationtool project, in the SDK samples.

    The program.cs form:

    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.Windows.Forms;
    
    namespace Microsoft.Crm.Sdk.Tools
    {
        static class Program
        {
            /// <summary>
            /// The main entry point for the application.
            /// </summary>
            [STAThread]
            static void Main()
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new Master());
            }
        }
    }
    and the master.cs form
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
    
    namespace Microsoft.Crm.Sdk.Tools
    {
        public partial class Master : Form
        {
            /// <summary>
            /// Required designer variable.
            /// </summary>
            private System.ComponentModel.IContainer components = null;
    
            /// <summary>
            /// Clean up any resources being used.
            /// </summary>
            /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
            protected override void Dispose(bool disposing)
            {
                if (disposing && (components != null))
                {
                    components.Dispose();
                }
                base.Dispose(disposing);
            }
    
            #region Windows Form Designer generated code
    
            /// <summary>
            /// Required method for Designer support - do not modify
            /// the contents of this method with the code editor.
            /// </summary>
            private void InitializeComponent()
            {
                this.btnConfiguration = new System.Windows.Forms.Button();
                this.btnDeploymentManager = new System.Windows.Forms.Button();
                this.btnServerSettings = new System.Windows.Forms.Button();
                this.SuspendLayout();
                // 
                // btnConfiguration
                // 
                this.btnConfiguration.Location = new System.Drawing.Point(12, 41);
                this.btnConfiguration.Name = "btnConfiguration";
                this.btnConfiguration.Size = new System.Drawing.Size(140, 23);
                this.btnConfiguration.TabIndex = 0;
                this.btnConfiguration.Text = "&Configuration";
                this.btnConfiguration.UseVisualStyleBackColor = true;
                this.btnConfiguration.Click += new System.EventHandler(this.button1_Click);
                // 
                // btnDeploymentManager
                // 
                this.btnDeploymentManager.Location = new System.Drawing.Point(12, 12);
                this.btnDeploymentManager.Name = "btnDeploymentManager";
                this.btnDeploymentManager.Size = new System.Drawing.Size(140, 23);
                this.btnDeploymentManager.TabIndex = 1;
                this.btnDeploymentManager.Text = "&Deployment Manager";
                this.btnDeploymentManager.UseVisualStyleBackColor = true;
                this.btnDeploymentManager.Click += new System.EventHandler(this.btnDeploymentManager_Click);
                // 
                // btnServerSettings
                // 
                this.btnServerSettings.Location = new System.Drawing.Point(12, 70);
                this.btnServerSettings.Name = "btnServerSettings";
                this.btnServerSettings.Size = new System.Drawing.Size(140, 23);
                this.btnServerSettings.TabIndex = 2;
                this.btnServerSettings.Text = "&Server Settings";
                this.btnServerSettings.UseVisualStyleBackColor = true;
                this.btnServerSettings.Click += new System.EventHandler(this.button2_Click);
                // 
                // Master
                // 
                this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
                this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
                this.ClientSize = new System.Drawing.Size(164, 106);
                this.Controls.Add(this.btnServerSettings);
                this.Controls.Add(this.btnDeploymentManager);
                this.Controls.Add(this.btnConfiguration);
                this.MaximizeBox = false;
                this.MinimizeBox = false;
                this.Name = "Master";
                this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
                this.Text = "Workflow";
                this.ResumeLayout(false);
    
            }
    
            #endregion
    
            private System.Windows.Forms.Button btnConfiguration;
            private System.Windows.Forms.Button btnDeploymentManager;
            private System.Windows.Forms.Button btnServerSettings;
    
            public Master()
            {
                InitializeComponent();
            }
    
            private void btnDeploymentManager_Click(object sender, EventArgs e)
            {
                DeploymentManager dm = new DeploymentManager();
                dm.Show();
            }
    
            private void button1_Click(object sender, EventArgs e)
            {
                ConfigurationForm cf = new ConfigurationForm("");
                cf.Show();
            }
    
            private void button2_Click(object sender, EventArgs e)
            {
                ServerSettings ss = new ServerSettings();
                ss.Show();
            }
        }
    }

    -f.

    Tags:

    Development

    Comments are closed