Esempio n. 1
0
        /// <summary>
        /// Set things in motion so your service can do its work.
        /// </summary>
        protected override void OnStart(string[] args)
        {
            int iChannel = Channel;
            string sWMVDirectory = WMVFilename;

            launcher = new Launcher(iChannel, sWMVDirectory);
            thread = new Thread(new ThreadStart(launcher.Start));
            #if DEBUG_SERVICE
            System.Threading.Thread.Sleep(15000);
            #endif
            thread.Start();
        }
Esempio n. 2
0
        private static void Main(string[] args)
        {
            string sWMVDirectory;
            int iChannel;
            iChannel = 1;
            sWMVDirectory =
                ConfigurationManager.AppSettings["DefaultStorageDirectory"];

            switch (args.GetLength(0))
            {
                case 1:
                    iChannel = Convert.ToInt32(args[0]);
                    break;
                case 2:
                    iChannel = Convert.ToInt32(args[0]);
                    sWMVDirectory = args[1];
                    break;
            }

            Launcher launcher = new Launcher(iChannel, sWMVDirectory);
            launcher.Start();
        }