Пример #1
0
        public void RefreshStatus()
        {
            if (FilteringSystem.IsScheduelActive())
            {
                if (FIlterScheduelingSystem.isBlockdAt(DateTime.Now))
                {
                    statusLabel.Text      = "חסימה מתוזמנת";
                    statusLabel.ForeColor = Color.Red;

                    //Block the Internt using the service
                    ServiceAdapter.StartInternetBlocking();
                }
                else
                {
                    statusLabel.Text      = "גלישה מאופשרת";
                    statusLabel.ForeColor = Color.LimeGreen;

                    //release service's internet blocking
                    ServiceAdapter.StopInterntBlocking();
                }
            }
            else
            {
                statusLabel.Text      = "לא פעיל";
                statusLabel.ForeColor = Color.Red;
                ServiceAdapter.StopInterntBlocking();
            }
        }