예제 #1
0
 void ConnectAndSetup()
 {
     OnAuthorizedEvent(this, new AuthEventArgs()
     {
         IsAuthenticated = isAuthorized
     });
     //StartExceptionHandling();
     StartDirectoryWatcher();
     OnFileEvent += (o, e) =>
     {
         HandleFileEvent(e);
     };
     transmitTimer          = new Timer();
     transmitTimer.Interval = transmitTimerInterval;
     transmitTimer.Tick    += (o, e) =>
     {
         Transmitter.LoadSettings();
         if (Transmitter.TSettings == null)
         {
             return;
         }
         //Transmitter.UpdateLastActive();
         OnCommandEvent(this, new CommandEventArgs()
         {
             Command = Transmitter.TSettings.Command
         });
     };
     transmitTimer.Enabled = true;
 }