public void DeactivateTimer(object sender, RoutedEventArgs e) { TimerLogic.StopTimer(); SwitchStopWindowToStart(); OperationsOnHostFile.EnableHosts(); }
private void ExitApplication() { _isExit = true; MainWindow.Close(); _notifyIcon.Dispose(); _notifyIcon = null; OperationsOnHostFile.EnableHosts(); }
public void ActivateTimer(object sender, RoutedEventArgs e) { TimerLogic.StartTimer(choosenTimeSpan); SwitchStartWindowToStop(); var positionsToBlock = StartWindow.BlackList.Items.OfType <string>().ToList(); OperationsOnHostFile.BlockHosts(positionsToBlock); }
protected void OnPropertyChanged() { StopWindow.timerLabel.Content = ChoosenTimeSpan.ToString(); if (ChoosenTimeSpan == new TimeSpan(0, 0, 0)) { SwitchStopWindowToStart(); OperationsOnHostFile.EnableHosts(); } }