Beispiel #1
0
        public void easyAfkWorkThread(object dataRulesContainer)
        {
            DataRulesAfkContainer dataRules = dataRulesContainer as DataRulesAfkContainer;
            var myInteropt       = dataRules.MyInteroptService as MyInteroptService;
            SpecifyCharacters sC = new SpecifyCharacters();

            if (myInteropt != null)
            {
                Debug.WriteLine("Worker Thread is in progress..!");
                while (true)
                {
                    Thread.Sleep(dataRules.loopTimer); //Sleep for 2 seconds
                    myInteropt.SendKeyToProcess("a");
                    Thread.Sleep(dataRules.CommandTimer);
                    myInteropt.SendKeyToProcess(sC.GetSpace());
                }
            }
            Debug.WriteLine("Worker Thread cant start..!");
        }
Beispiel #2
0
        public void advancedAfkWorkThread(object dataRulesContainer)
        {
            DataRulesAfkContainer dataRules = dataRulesContainer as DataRulesAfkContainer;
            var myInteropt       = dataRules.MyInteroptService as MyInteroptService;
            SpecifyCharacters sC = new SpecifyCharacters();

            if (myInteropt != null)
            {
                Debug.WriteLine("Worker Thread is in progress..!");
                while (true)
                {
                    Thread.Sleep(dataRules.loopTimer); //Sleep for 2 seconds
                    foreach (string command in dataRules.keyWords)
                    {
                        myInteropt.SendKeyToProcess(command);
                        Thread.Sleep(dataRules.CommandTimer);
                    }
                }
            }
            Debug.WriteLine("Worker Thread cant start..!");
        }
Beispiel #3
0
 public void init(string processName)
 {
     this.dataRulesContainer = new DataRulesAfkContainer();
     this.dataRulesContainer.MyInteroptService = new MyInteroptService(this.dataRulesContainer.processName);
 }