Esempio n. 1
0
 private void MenuForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     e.Cancel = true;
     this.lockForm();
     this.Hide();
     CustomNotifyIcon.showBalloonTip(500, "לוקחים אחריות!", "המערכת ממשיכה לעבוד ברקע, ניתן לפתוח את חלון הניהול בלחיצה על האייקון", ToolTipIcon.Info);
 }
Esempio n. 2
0
 public MenuForm()
 {
     InitializeComponent();
     font_setup();
     currentClickedLabel = currentStatusLabel;
     lockForm();
     CustomNotifyIcon.update();
     NotifyIcon notifyIcon = CustomNotifyIcon.getNotifyIcon();
 }
Esempio n. 3
0
        private void exitButton_Click(object sender, EventArgs e)
        {
            DialogResult dialogResult = MessageBox.Show("יציאה תוביל לסגירה מלאה של המערכת ולהשבתת הסינון" + Environment.NewLine + "האם אתה בטוח שברצונך לצאת?", "יציאה", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);

            if (dialogResult == DialogResult.Yes)
            {
                exitButton.Text = "יוצא....";
                CustomNotifyIcon.hide();
                if (ServiceAdapter.GetServiceStatus("GUIAdapter") == "Running")
                {
                    ServiceAdapter.StopService("GUIAdapter", 10000);
                    while (ServiceAdapter.GetServiceStatus("GUIAdapter") != "Stopped")
                    {
                        exitButton.Text = ServiceAdapter.GetServiceStatus("GUIAdapter");
                        ServiceAdapter.StopService("GUIAdapter", 10000);
                        System.Threading.Thread.Sleep(3000);
                    }
                }
                InternetBlocker.block(false);
                Application.ExitThread();
            }
        }