protected override void OnCustomCommand(int command) { switch (command) { case 128: InternetBlocker.Block(true); break; case 129: InternetBlocker.Block(false); break; } }
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); } } }
protected override void OnStop() { timer.Stop(); timer.Enabled = false; InternetBlocker.Block(false); }
protected override void OnAfterUninstall(IDictionary savedState) { base.OnAfterUninstall(savedState); InternetBlocker.Block(false); }