/// <summary>
        /// The main entry point for the application.
        /// </summary>
        private static void Main(string[] args)
        {
            // --------------------------------------------------------------------------------------------------------------------
            //  Initialize the application context (create/fill data structures)
            //  See whether the required application configuration has been provided
            // --------------------------------------------------------------------------------------------------------------------
            total.InitializeContext();

            if (!total.APP.HasConfigFile)
            {
                ConsoleColor fg = Console.ForegroundColor; ConsoleColor bg = Console.BackgroundColor;
                Console.ForegroundColor = ConsoleColor.Red; Console.BackgroundColor = ConsoleColor.Black;
                Console.WriteLine(@" >>>> WinFCU Fatal Error - No application configuration file found!");
                Console.ForegroundColor = fg; Console.BackgroundColor = bg;
                Environment.Exit(1);
            }

            // --------------------------------------------------------------------------------------------------------------------
            //   If started as a service, than run as a service. Else use the interactive path
            // --------------------------------------------------------------------------------------------------------------------
            if (total.PRC.Service)
            {
                ServiceBase[] winfcuService = { new WinFCUService() };
                ServiceBase.Run(winfcuService);
            }
            else
            {
                WinFCU.runInteractive(args);
            }
        }
Exemple #2
0
 // --------------------------------------------------------------------------------------------------------------------
 private void resumeWinFCUSercvice()
 {
     EventSchedule.nextRun nxtRun = fcu.evtSch.GetNextRun();
     fcu.fcuTimer.Interval = nxtRun.RelTime.TotalMilliseconds;
     fcu.fcuTimer.Enabled  = true;
     WinFCU.SetFileSystemWatchers(true);
     WinFCU.ShowNextRunDetails(nxtRun);
 }
Exemple #3
0
 internal void runService()
 {
     WinFCU.runService();
 }
Exemple #4
0
 // --------------------------------------------------------------------------------------------------------------------
 private void suspendWinFCUSercvice()
 {
     fcu.fcuTimer.Enabled = false;
     WinFCU.SetFileSystemWatchers(false);
 }