Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

dotNetInstaller - Setup Bootstrapper for .NET Application

, 4 Jan 2004 MIT
With this tool the developer can define the application prerequisites and install the correct version of these components in the correct order based on the user operating system type and language, allow the user to download these components from the web or install these components directly.
dotnetinstaller_source.zip
dotNetInstaller_source
dotNetInstaller
dotNetInstaller.vcproj.vspscc
dotNetInstaller.vssscc
mssccprj.scc
res
banner.bmp
dotNetInstaller.ico
dotNetInstaller.manifest
Thumbs.db
vssver.scc
Tools
vssver.scc
vssver.scc
InstallerEditor
App.ico
banner.bmp
bin
Release
InstallerEditor.exe
SourceLibrary.dll
vssver.scc
InstallerEditor.csproj.user
InstallerEditor.csproj.vspscc
InstallerEditor.suo
InstallerEditor.vssscc
mssccprj.scc
References
SourceLibrary.dll
vssver.scc
Thumbs.db
vssver.scc
Sample
banner.bmp
dotNetInstaller.exe
SupportFiles
DataAccess
Jet
Jet40Sp7
Win2000_English
Win2000_Italiano
Win9x_NT
WinME
WinXp_English
WinXp_Italiano
MDAC2.7Sp1Refresh
Win_98_ME_NT_2000
dotNet
v1.1
English
Italiano
InternetExplorer
IE60SP1_English
IE60SP1_Italiano
ServicePack
2000_SP4_English
2000_SP4_Italiano
NT4_SP6a_English
NT4_SP6a_Italiano
Win98_Y2k_Update_English
Win98_Y2k_Update_Italiano
using System;
using System.Xml;
using System.ComponentModel;

namespace InstallerEditor
{
	/// <summary>
	/// Gestione del tag downloaddialog
	/// </summary>
	public class DownloadDialog : IXmlClass
	{
		public DownloadDialog():this("COMPONENT_NAME")
		{
		}
		public DownloadDialog(string p_ComponentName)
		{
			if (LanguageUI.Language == SupportedLanguage.Italian)
			{
				m_buttoncancel_caption = "Annulla";
				m_buttonstart_caption = "Avanti";
				m_dialog_caption = p_ComponentName + " - Download Componenti";
				m_dialog_message = "Premi 'Avanti' per scaricare i componenti necessari all'installazione di " + p_ComponentName + ".";
				m_dialog_message_downloading = "Download in corso. Attendere...";
			}
			else //english
			{
				m_buttoncancel_caption = "Cancel";
				m_buttonstart_caption = "Start";
				m_dialog_caption = p_ComponentName + " - Download Components";
				m_dialog_message = "Press 'Start' to download the required components for installing " + p_ComponentName + ".";
				m_dialog_message_downloading = "Download in progress. Wait...";
			}
		}

		#region Attributes
		private string m_dialog_caption;
		[Description("The caption of the download dialog. (REQUIRED)")]
		public string dialog_caption
		{
			get{return m_dialog_caption;}
			set{m_dialog_caption = value;}
		}

		private string m_dialog_message;
		[Description("The initial message that appears in the download dialog before the user press the 'Start' button. (REQUIRED)")]
		public string dialog_message
		{
			get{return m_dialog_message;}
			set{m_dialog_message = value;}
		}

		private bool m_autostartdownload;
		[Description("True to start the download without user interaction, False to let the user press the 'Start' button. (REQUIRED)")]
		public bool autostartdownload
		{
			get{return m_autostartdownload;}
			set{m_autostartdownload = value;}
		}

		private string m_dialog_message_downloading;
		[Description("The message that appears in the download dialog when the download process start. (REQUIRED)")]
		public string dialog_message_downloading
		{
			get{return m_dialog_message_downloading;}
			set{m_dialog_message_downloading = value;}
		}

		private string m_buttonstart_caption;
		[Description("Caption of the 'Start' button. (REQUIRED)")]
		public string buttonstart_caption
		{
			get{return m_buttonstart_caption;}
			set{m_buttonstart_caption = value;}
		}

		private string m_buttoncancel_caption;
		[Description("Caption of the 'Cancel' button. (REQUIRED)")]
		public string buttoncancel_caption
		{
			get{return m_buttoncancel_caption;}
			set{m_buttoncancel_caption = value;}
		}
		#endregion

		#region IXmlClass Members

		public void ToXml(XmlWriter p_Writer)
		{
			p_Writer.WriteStartElement("downloaddialog");

				OnXmlWriteTagDownloaddialog(new XmlWriterEventArgs(p_Writer));

				p_Writer.WriteStartElement("downloads");
				foreach (Download d in Downloads)
					d.ToXml(p_Writer);
				p_Writer.WriteEndElement();

			p_Writer.WriteEndElement();
		}

		public void FromXml(XmlElement p_Element)
		{
			OnXmlReadTagDownloaddialog(new XmlElementEventArgs(p_Element));

			XmlNode l_Node = p_Element.SelectSingleNode("downloads");
			if (l_Node!=null)
			{
				XmlNodeList l_List = l_Node.SelectNodes("download");
				foreach (XmlElement l in l_List)
				{
					Download d = new Download();
					d.FromXml(l);
					Downloads.Add(d);
				}
			}
		}
		#endregion


		protected virtual void OnXmlWriteTagDownloaddialog(XmlWriterEventArgs e)
		{
			e.XmlWriter.WriteAttributeString("dialog_caption",m_dialog_caption);
			e.XmlWriter.WriteAttributeString("dialog_message",m_dialog_message);
			e.XmlWriter.WriteAttributeString("dialog_message_downloading",m_dialog_message_downloading);
			e.XmlWriter.WriteAttributeString("autostartdownload",m_autostartdownload.ToString());
			e.XmlWriter.WriteAttributeString("buttonstart_caption",m_buttonstart_caption);
			e.XmlWriter.WriteAttributeString("buttoncancel_caption",m_buttoncancel_caption);
		}
		protected virtual void OnXmlReadTagDownloaddialog(XmlElementEventArgs e)
		{
			if (e.XmlElement.Attributes["autostartdownload"] != null &&
				e.XmlElement.Attributes["autostartdownload"].InnerText != null &&
				e.XmlElement.Attributes["autostartdownload"].InnerText.Length > 0)
				m_autostartdownload = bool.Parse(e.XmlElement.Attributes["autostartdownload"].InnerText);

			if (e.XmlElement.Attributes["buttoncancel_caption"] != null)
				m_buttoncancel_caption = e.XmlElement.Attributes["buttoncancel_caption"].InnerText;

			if (e.XmlElement.Attributes["buttonstart_caption"] != null)
				m_buttonstart_caption = e.XmlElement.Attributes["buttonstart_caption"].InnerText;

			if (e.XmlElement.Attributes["dialog_caption"] != null)
				m_dialog_caption = e.XmlElement.Attributes["dialog_caption"].InnerText;

			if (e.XmlElement.Attributes["dialog_message"] != null)
				m_dialog_message = e.XmlElement.Attributes["dialog_message"].InnerText;

			if (e.XmlElement.Attributes["dialog_message_downloading"] != null)
				m_dialog_message_downloading = e.XmlElement.Attributes["dialog_message_downloading"].InnerText;
		}

		private DownloadCollection m_Downloads = new DownloadCollection();
		[System.ComponentModel.Browsable(false)]
		public DownloadCollection Downloads
		{
			get{return m_Downloads;}
			set{m_Downloads = value;}
		}
	}
}

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 MIT License

Share

About the Author

Davide Icardi
Software Developer
Italy Italy
No Biography provided

| Advertise | Privacy | Mobile
Web02 | 2.8.141029.1 | Last Updated 5 Jan 2004
Article Copyright 2003 by Davide Icardi
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid