Exemplo n.º 1
0
 public void ClearCacheGarbage()
 {
     foreach (var folder in Directory.GetDirectories(ResourcesAndConsts.Instance().FolderForCache))
     {
         try
         {
             Directory.Delete(folder, true);
         }
         catch { }
     }
 }
Exemplo n.º 2
0
 void InitJs()
 {
     if (GetWithUpdate_IsBotFuncsInitialized())
     {
         return;
     }
     CustomBrowser.ExJs(ResourcesAndConsts.Instance().JsLib_JqueryKeypressSimulator);
     CustomBrowser.ExJs(JsFor_InitCheckIfStillTalking);
     CustomBrowser.ExJs(JsFor_InitGetCountOfMessages);
     CustomBrowser.ExJs(JsFor_InitCheckIfCompanionsMessageAt);
     CustomBrowser.ExJs(JsFor_InitCheckCaptcha);
     CustomBrowser.ExJs(JsFor_InitClickSearchNewCompanionButton);
     CustomBrowser.ExJs(JsFor_SetIsBotFuncsInitialized);
 }
Exemplo n.º 3
0
        public TwoChatsHandler(ChatSpammerSettings spammerSettings, IChatHandler chat1, IChatHandler chat2)
        {
            Settings         = spammerSettings;
            UniqueIdentifier = RandomTextGenerator.Generate(4);
            string dateStr = string.Format("{0:dd.MM.yy_HH.mm.ss}", DateTime.Now);

            UsedFolder = ResourcesAndConsts.Instance().FolderForСorrespondenceAndLogs + "/" + dateStr + "__" + UniqueIdentifier;
            Directory.CreateDirectory(UsedFolder);
            Chat1 = chat1;
            Chat2 = chat2;
            if (spammerSettings.BotScenario != null)
            {
                BotScenario = spammerSettings.BotScenario.Clone() as IBotScenario;
            }
        }