Click here to Skip to main content
Click here to Skip to main content
Articles » Languages » XML » XML/XSLT » Downloads
 
Add your own
alternative version

Template Messages Using XSL Transformations and XML Serialization

, 23 Aug 2007
This article shows how you can implement templated messages, such as email templates
namespace TemplatesExample
{
    partial class MainForm
    {
        /// <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.openFileDialogXSLTFile = new System.Windows.Forms.OpenFileDialog();
            this.webBrowserResult = new System.Windows.Forms.WebBrowser();
            this.groupBoxArguments = new System.Windows.Forms.GroupBox();
            this.buttonTransform = new System.Windows.Forms.Button();
            this.buttonBrowse = new System.Windows.Forms.Button();
            this.textBoxXsltFile = new System.Windows.Forms.TextBox();
            this.labelXSLTFile = new System.Windows.Forms.Label();
            this.saveFileDialogOutputFile = new System.Windows.Forms.SaveFileDialog();
            this.groupBoxArguments.SuspendLayout();
            this.SuspendLayout();
            // 
            // openFileDialogXSLTFile
            // 
            this.openFileDialogXSLTFile.DefaultExt = "xslt";
            this.openFileDialogXSLTFile.Filter = "XSLT files|*.xslt";
            // 
            // webBrowserResult
            // 
            this.webBrowserResult.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.webBrowserResult.Location = new System.Drawing.Point(12, 93);
            this.webBrowserResult.MinimumSize = new System.Drawing.Size(20, 20);
            this.webBrowserResult.Name = "webBrowserResult";
            this.webBrowserResult.Size = new System.Drawing.Size(699, 315);
            this.webBrowserResult.TabIndex = 20;
            // 
            // groupBoxArguments
            // 
            this.groupBoxArguments.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.groupBoxArguments.Controls.Add(this.buttonTransform);
            this.groupBoxArguments.Controls.Add(this.buttonBrowse);
            this.groupBoxArguments.Controls.Add(this.textBoxXsltFile);
            this.groupBoxArguments.Controls.Add(this.labelXSLTFile);
            this.groupBoxArguments.Location = new System.Drawing.Point(12, 12);
            this.groupBoxArguments.Name = "groupBoxArguments";
            this.groupBoxArguments.Size = new System.Drawing.Size(699, 75);
            this.groupBoxArguments.TabIndex = 1;
            this.groupBoxArguments.TabStop = false;
            // 
            // buttonTransform
            // 
            this.buttonTransform.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.buttonTransform.Location = new System.Drawing.Point(619, 39);
            this.buttonTransform.Name = "buttonTransform";
            this.buttonTransform.Size = new System.Drawing.Size(75, 23);
            this.buttonTransform.TabIndex = 15;
            this.buttonTransform.Text = "Transform";
            this.buttonTransform.UseVisualStyleBackColor = true;
            this.buttonTransform.Click += new System.EventHandler(this.ButtonTransform_Click);
            // 
            // buttonBrowse
            // 
            this.buttonBrowse.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.buttonBrowse.Location = new System.Drawing.Point(619, 10);
            this.buttonBrowse.Name = "buttonBrowse";
            this.buttonBrowse.Size = new System.Drawing.Size(74, 23);
            this.buttonBrowse.TabIndex = 10;
            this.buttonBrowse.Text = "Browse";
            this.buttonBrowse.UseVisualStyleBackColor = true;
            this.buttonBrowse.Click += new System.EventHandler(this.ButtonBrowse_Click);
            // 
            // textBoxXsltFile
            // 
            this.textBoxXsltFile.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.textBoxXsltFile.Location = new System.Drawing.Point(62, 13);
            this.textBoxXsltFile.Name = "textBoxXsltFile";
            this.textBoxXsltFile.ReadOnly = true;
            this.textBoxXsltFile.Size = new System.Drawing.Size(551, 20);
            this.textBoxXsltFile.TabIndex = 5;
            // 
            // labelXSLTFile
            // 
            this.labelXSLTFile.AutoSize = true;
            this.labelXSLTFile.Location = new System.Drawing.Point(6, 16);
            this.labelXSLTFile.Name = "labelXSLTFile";
            this.labelXSLTFile.Size = new System.Drawing.Size(50, 13);
            this.labelXSLTFile.TabIndex = 0;
            this.labelXSLTFile.Text = "XSLT file";
            // 
            // saveFileDialogOutputFile
            // 
            this.saveFileDialogOutputFile.DefaultExt = "html";
            this.saveFileDialogOutputFile.Filter = "HTML|*.html";
            this.saveFileDialogOutputFile.Title = "Choose where to generate the result HTML";
            // 
            // MainForm
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(723, 420);
            this.Controls.Add(this.webBrowserResult);
            this.Controls.Add(this.groupBoxArguments);
            this.MinimumSize = new System.Drawing.Size(350, 150);
            this.Name = "MainForm";
            this.Text = "Templates Example";
            this.groupBoxArguments.ResumeLayout(false);
            this.groupBoxArguments.PerformLayout();
            this.ResumeLayout(false);

        }

        #endregion

        private System.Windows.Forms.OpenFileDialog openFileDialogXSLTFile;
        private System.Windows.Forms.WebBrowser webBrowserResult;
        private System.Windows.Forms.GroupBox groupBoxArguments;
        private System.Windows.Forms.Button buttonTransform;
        private System.Windows.Forms.Button buttonBrowse;
        private System.Windows.Forms.TextBox textBoxXsltFile;
        private System.Windows.Forms.Label labelXSLTFile;
        private System.Windows.Forms.SaveFileDialog saveFileDialogOutputFile;
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Cvetomir Todorov
Software Developer
Bulgaria Bulgaria
Cvetomir Todorov is a student in the Sofia University. His interests include Object Oriented Programming and Design, Design Patterns, Producing High-Quality Code, Refactoring, Unit Testing, Test Driven Development etc. The technology he's using is .NET with C# language.

| Advertise | Privacy | Mobile
Web04 | 2.8.140827.1 | Last Updated 23 Aug 2007
Article Copyright 2007 by Cvetomir Todorov
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid