コード例 #1
0
        private void metroShell1_SettingsButtonClick(object sender, EventArgs e)
        {
            MainC m = (MainC)Forms.GetControl("main");

            m.LoadStats();
            this.ShowModalPanel(m, DevComponents.DotNetBar.Controls.eSlideSide.Top);
        }
コード例 #2
0
        private void protbtn_Click(object sender, EventArgs e)
        {
            try
            {
                if (SettingsManager.Login)
                {
                    logfrm = new Login();
                    logfrm.ShowDialog();
                    if (logfrm.result != DialogResult.OK)
                    {
                        hidethis = false;
                        KavprotManager.ShutDown();
                    }
                }

                if (WebMonitor.IsRuning || Firewall.Runing || NetworkMonitor.Runing || FileSystemMonitor.Runing)
                {
                    protbtn.Text = "Enable Protection             ";
                    KavprotManager.Stop();
                    AntivirusState.SetProtection(false);
                    MainC m = (MainC)Forms.GetControl("main");
                    m.LoadStats();
                }
                else
                {
                    protbtn.Text = "Disable Protection             ";
                    KavprotManager.Start();
                    AntivirusState.SetProtection(true);
                    MainC m = (MainC)Forms.GetControl("main");
                    m.LoadStats();
                }
            }
            catch (Exception ex)
            {
                AntiCrash.LogException(ex);
            }
            finally
            {
            }
        }