public void Run(string[] args) { RebooterProperties = new AppProperties(); // Parse the command line arguments var oParser = new SimpleCommandLineParser(); oParser.Parse(args); RebooterProperties.CurrentModem = GetModemClass(); // Show startup text ShowIntro(RebooterProperties); // Read the command line parameters RebooterProperties.ReadParameters(oParser, RebooterProperties); // One minute timer Timer oTimer = new Timer { Interval = 60000 }; oTimer.Elapsed += (sender, e) => { HandleTimerElapsed(RebooterProperties); }; oTimer.Enabled = !String.IsNullOrEmpty(RebooterProperties.ModemIP); if (oTimer.Enabled) { DoTimedEvents(RebooterProperties); } DoConsoleRead(); oTimer.Dispose(); }