Exemplo n.º 1
0
        static void Run()
        {
            int Counter       = 0;
            int MemoryCounter = 0;

            while (IronUpdater.IsOn)
            {
                if (Counter == 5)
                {
                    Counter = 0;
                    MemoryCounter++;
                }
                if (MemoryCounter == 10)
                {
                    MemoryCounter = 0;
                    if (GC.GetTotalMemory(false) > 200000000)
                    {
                        GC.Collect();
                    }
                }
                Thread.Sleep(IronUpdater.SleepTime);
                Counter++;

                try { UpdateProxyLogAndGrid(); }
                catch (Exception Exp) { IronException.Report("Error Updating Proxy Log & Grid", Exp.Message, Exp.StackTrace); }
                try
                {
                    if (Counter == 2 || Counter == 4)
                    {
                        UpdatePluginResult();
                    }
                }
                catch (Exception Exp) { IronException.Report("Error Updating PluginResult", Exp.Message, Exp.StackTrace); }

                try { UpdateShellLogAndGrid(); }
                catch (Exception Exp) { IronException.Report("Error Updating Shell Log & Grid", Exp.Message, Exp.StackTrace); }
                try
                {
                    if (Counter == 5)
                    {
                        UpdateProbeLogAndGrid();
                    }
                }
                catch (Exception Exp) { IronException.Report("Error Updating Probe Log & Grid", Exp.Message, Exp.StackTrace); }
                try
                {
                    if (Counter == 5)
                    {
                        UpdateScanLogAndGrid();
                    }
                }
                catch (Exception Exp) { IronException.Report("Error Updating Scan Log & Grid", Exp.Message, Exp.StackTrace); }
                try
                {
                    //if (Counter == 2 || Counter == 4)
                    UpdateOtherSourceLogAndGrid();
                }
                catch (Exception Exp) { IronException.Report("Error Updating Other Source Log & Grid", Exp.Message, Exp.StackTrace); }
                try
                {
                    if (Counter == 5)
                    {
                        UpdateSiteMapTree();
                    }
                }
                catch (Exception Exp) { IronException.Report("Error Updating SiteMapTree", Exp.Message, Exp.StackTrace); }
                try { UpdateTraceLogAndGrid(); }
                catch (Exception Exp) { IronException.Report("Error Updating Trace Log & Grid", Exp.Message, Exp.StackTrace); }
                try
                {
                    if (Counter == 2 || Counter == 4)
                    {
                        UpdateScanTraceLogAndGrid();
                    }
                }
                catch (Exception Exp) { IronException.Report("Error Updating ScanTrace Log & Grid", Exp.Message, Exp.StackTrace); }
                try
                {
                    if (Counter == 2 || Counter == 4)
                    {
                        UpdateScanTraceLogAndGrid();
                    }
                }
                catch (Exception Exp) { IronException.Report("Error Updating ScanTrace Log & Grid", Exp.Message, Exp.StackTrace); }
                try
                {
                    if (Counter == 2 || Counter == 4)
                    {
                        UpdateSessionPluginTraceLogAndGrid();
                    }
                }
                catch (Exception Exp) { IronException.Report("Error Updating SessionPluginTrace Log & Grid", Exp.Message, Exp.StackTrace); }
                try
                {
                    if (Counter == 5)
                    {
                        ThreadStore.CleanUp();
                    }
                }
                catch (Exception Exp) { IronException.Report("Error cleaning up ThreadStore", Exp.Message, Exp.StackTrace); }
                IronUI.ShowCurrentLogStat();
            }
        }
Exemplo n.º 2
0
        static void Run()
        {
            int Counter = 0;

            while (IronUpdater.IsOn)
            {
                if (Counter == 5)
                {
                    Counter = 0;
                }
                Thread.Sleep(IronUpdater.SleepTime);
                Counter++;

                try { UpdateProxyLogAndGrid(); }
                catch (Exception Exp) { IronException.Report("Error Updating Proxy Log & Grid", Exp.Message, Exp.StackTrace); }
                try
                {
                    if (Counter == 2 || Counter == 4)
                    {
                        UpdatePluginResult();
                    }
                }
                catch (Exception Exp) { IronException.Report("Error Updating PluginResult", Exp.Message, Exp.StackTrace); }

                try { UpdateShellLogAndGrid(); }
                catch (Exception Exp) { IronException.Report("Error Updating Shell Log & Grid", Exp.Message, Exp.StackTrace); }
                try
                {
                    if (Counter == 5)
                    {
                        UpdateProbeLogAndGrid();
                    }
                }
                catch (Exception Exp) { IronException.Report("Error Updating Probe Log & Grid", Exp.Message, Exp.StackTrace); }
                try
                {
                    if (Counter == 5)
                    {
                        UpdateScanLogAndGrid();
                    }
                }
                catch (Exception Exp) { IronException.Report("Error Updating Scan Log & Grid", Exp.Message, Exp.StackTrace); }
                try
                {
                    //if (Counter == 2 || Counter == 4)
                    UpdateOtherSourceLogAndGrid();
                }
                catch (Exception Exp) { IronException.Report("Error Updating Other Source Log & Grid", Exp.Message, Exp.StackTrace); }
                try
                {
                    if (Counter == 5)
                    {
                        UpdateSiteMapTree();
                    }
                }
                catch (Exception Exp) { IronException.Report("Error Updating SiteMapTree", Exp.Message, Exp.StackTrace); }
                try { UpdateTraceLogAndGrid(); }
                catch (Exception Exp) { IronException.Report("Error Updating Trace Log & Grid", Exp.Message, Exp.StackTrace); }
                try
                {
                    if (Counter == 2 || Counter == 4)
                    {
                        UpdateScanTraceLogAndGrid();
                    }
                }
                catch (Exception Exp) { IronException.Report("Error Updating ScanTrace Log & Grid", Exp.Message, Exp.StackTrace); }
                try
                {
                    if (Counter == 2 || Counter == 4)
                    {
                        UpdateScanTraceLogAndGrid();
                    }
                }
                catch (Exception Exp) { IronException.Report("Error Updating ScanTrace Log & Grid", Exp.Message, Exp.StackTrace); }
                try
                {
                    if (Counter == 2 || Counter == 4)
                    {
                        UpdateSessionPluginTraceLogAndGrid();
                    }
                }
                catch (Exception Exp) { IronException.Report("Error Updating SessionPluginTrace Log & Grid", Exp.Message, Exp.StackTrace); }
                try
                {
                    if (Counter == 5)
                    {
                        ThreadStore.CleanUp();
                    }
                }
                catch (Exception Exp) { IronException.Report("Error cleaning up ThreadStore", Exp.Message, Exp.StackTrace); }
            }
        }