Exemple #1
0
        public static void StartMonitorWebsite(int i)
        {
            TaskExcuter websiteTaskExcuter = null;

            if (!taskWebExcuters.ContainsKey(i))
            {
                websiteTaskExcuter = new TaskExcuter();
                taskWebExcuters.Add(i, websiteTaskExcuter);
            }
            ConfigManager cm = null;

            if (!cms.ContainsKey(i))
            {
                cm = new ConfigManager();
                cms.Add(i, cm);
            }

            cms[i].Init();

            WebsiteMonitor wm = null;

            if (!wms.ContainsKey(i))
            {
                wm = new WebsiteMonitor(i);
                wms.Add(i, wm);
            }

            RegisterAndSetWebAction(i);
            taskWebExcuters[i].SetTask(wms[i].LetMonitor, 3);
            taskWebExcuters[i].StartTask();
        }
        public static void StartMonitorWebsite(int i)
        {
            TaskExcuter websiteTaskExcuter = null;
            if (!taskWebExcuters.ContainsKey(i))
            {
                websiteTaskExcuter = new TaskExcuter();
                taskWebExcuters.Add(i, websiteTaskExcuter);
            }
            ConfigManager cm = null;
            if (!cms.ContainsKey(i))
            {
                cm = new ConfigManager();
                cms.Add(i, cm);
            }

            cms[i].Init();

            WebsiteMonitor wm = null;
            if (!wms.ContainsKey(i))
            {
                wm = new WebsiteMonitor(i);
                wms.Add(i, wm);
            }

            RegisterAndSetWebAction(i);
            taskWebExcuters[i].SetTask(wms[i].LetMonitor, 3);
            taskWebExcuters[i].StartTask();
        }