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

            case 129:
                InternetBlocker.Block(false);
                break;
            }
        }
예제 #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);
         }
     }
 }
예제 #3
0
 protected override void OnStop()
 {
     timer.Stop();
     timer.Enabled = false;
     InternetBlocker.Block(false);
 }
예제 #4
0
 protected override void OnAfterUninstall(IDictionary savedState)
 {
     base.OnAfterUninstall(savedState);
     InternetBlocker.Block(false);
 }