Click here to Skip to main content
15,891,900 members
Articles / Web Development / Apache

The platform-independent code with Mono: Client-server application sample

Rate me:
Please Sign up or sign in to vote.
4.80/5 (23 votes)
24 Mar 2010CPOL10 min read 74.2K   798   59  
This article shows how we can develop the platform-independent software with Mono usage
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration.Install;

using System.Globalization;
using System.Runtime.InteropServices;
using System.Diagnostics;
using Microsoft.Win32;

namespace InfoCenter.Agent
{
    [RunInstaller(true)]
    public partial class AgentInstaller : Installer
    {
        private System.ServiceProcess.ServiceInstaller servInstaller;
        private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller;


        public AgentInstaller()
        {
            InitializeComponent();


            this.servInstaller = new System.ServiceProcess.ServiceInstaller();
            this.serviceProcessInstaller = new System.ServiceProcess.ServiceProcessInstaller();
            //
            // serviceInstaller1
            //
            this.servInstaller.DisplayName = "InfoCenter Agent";
            this.servInstaller.ServiceName = "InfoAgent";
            this.servInstaller.StartType = System.ServiceProcess.ServiceStartMode.Automatic;
            this.servInstaller.Description = "Client part of InfoCenter";
            //
            // serviceProcessInstaller1
            //
            this.serviceProcessInstaller.Account = System.ServiceProcess.ServiceAccount.LocalSystem;
            this.serviceProcessInstaller.Password = null;
            this.serviceProcessInstaller.Username = null;
            
            //
            // ProjectInstaller
            //
            this.Installers.AddRange(new System.Configuration.Install.Installer[] {
            this.servInstaller,this.serviceProcessInstaller});

        }
		
        private System.ComponentModel.IContainer components = null;

        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            components = new System.ComponentModel.Container();
        }

	}
}

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)


Written By
Software Developer (Senior) Nokia
Germany Germany
Interested in design/development of framework functionality using the best patterns and practices.

Comments and Discussions