Example #1
0
        protected override void OnCustomCommand(int command)
        {
            switch (command)
            {
            case 128:
                InternetBlocker.Block(true);
                break;

            case 129:
                InternetBlocker.Block(false);
                break;
            }
        }
Example #2
0
 private void OnElapsedTime(object sender, ElapsedEventArgs e)
 {
     PreventClosing();
     if (InternetBlocker.GetBlockStatus() == true)
     {
         if (InternetBlocker.IsInternetAvailable())
         {
             InternetBlocker.Block(true);
         }
     }
     else
     {
         if (!InternetBlocker.IsInternetAvailable())
         {
             InternetBlocker.Block(false);
         }
     }
 }
Example #3
0
 protected override void OnStop()
 {
     timer.Stop();
     timer.Enabled = false;
     InternetBlocker.Block(false);
 }
Example #4
0
 protected override void OnAfterUninstall(IDictionary savedState)
 {
     base.OnAfterUninstall(savedState);
     InternetBlocker.Block(false);
 }