All pastes #340289 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-02-04 17:58 UTC
rendered paste body
using System;
using System.Windows.Forms;
using System.Collections.Generic;
using RJH.CommandLineHelper;

namespace VP
{
    public class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        /// 		
        public static string m_infoPath;
        public static bool m_isHidden;
        public static string m_showEscape;

        /// <summary>
        /// Commandline switches defined below.
        /// </summary>
        #region Commandline switches defined
        [CommandLineSwitch("showinfo", "dumps info text in the display.")]
        [CommandLineAlias("infoPath")]
        public string showINFO
        {
            get { return m_infoPath; }
            set { m_infoPath = value; }
        } 
 
        [CommandLineSwitch("hidden", "Keeps the program window hidden.")]
        public bool isHidden
        {
            get { return m_isHidden; }
            set { m_isHidden = value; }
        }
        
        [CommandLineSwitch("showescape", "Shows a timer with interupt options.")]
        [CommandLineAlias("nfoPath")]
        public string showEscape
        {
            get { return m_showEscape; }
            set { m_showEscape = value; }
        }
        #endregion

        [STAThread]
        static void Main(string[] cmdLine)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            frmMain frmMain1 = new frmMain();
            if (m_isHidden == true) { frmMain1.Visible = true; }

            Application.Run(frmMain1);
        }
    }
}