Example #1
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main(string[] args)
        {
            if (args.Count() == 0)
            {
                ServiceBase[] ServicesToRun;
                ServicesToRun = new ServiceBase[]
                {
                    new LeadsOnlineWindowsService()
                };
                ServiceBase.Run(ServicesToRun);
            }
            else
            {
#if (DEBUG)
                Debugger.Launch(); //<-- Simple form to debug a web services
                SmARTLeadsScheduler sch = new SmARTLeadsScheduler();
                sch.Start();
                //=========== Testing Code========================
                LeadsOnlineServiceManger leadsServiceManger = new LeadsOnlineServiceManger();
                string msg;
                leadsServiceManger.CheckLogin(out msg);
                //leadsServiceManger.PostTickets();
                Console.ReadLine();
                //=========== Testing Code========================
#endif
            }
        }
 public LeadsOnlineWindowsService()
 {
     InitializeComponent();
     ServiceName = "LeadsOnlineWindowsService";
     // Set window service properties.
     this.CanShutdown = true;
     this.CanStop     = true;
     _leadsScheduler  = new SmARTLeadsScheduler();
 }