예제 #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();
            }
        }
예제 #2
0
 public Schedule()
 {
     InitializeComponent();
     FontSetup();
     FIlterScheduelingSystem.LoadSavedTable();
     FIlterScheduelingSystem.drawTable(40, 20, 10, 10);
     schedulePanel.Controls.Add(FIlterScheduelingSystem.getTable());
     scheduleBlockChecker_Tick(null, null);
 }
예제 #3
0
        private void saveChangsButton_Click(object sender, EventArgs e)
        {
            //Save changes in the schedueling table.
            FIlterScheduelingSystem.SaveTable();

            MessageBox.Show("השינויים נשמרו בהצלחה!", "לוקחים אחריות", MessageBoxButtons.OK, MessageBoxIcon.Information);

            //Refresh for current status
            RefreshStatus();
        }