Пример #1
0
        private void convertCommand(IList <string> commandLine)
        {
            SpecifyCharacters sC = new SpecifyCharacters();

            foreach (string command in commandLine)
            {
                string c = command;
                if (command.Contains("SHIFT"))
                {
                    c = sC.GetShift(command.Replace("SHIFT ", ""));
                }
                else if (command.Contains("STRG"))
                {
                    c = sC.GetCtrl(command.Replace("STRG ", ""));
                }
                else if (command.Contains("ALT"))
                {
                    c = sC.GetAlt(command.Replace("ALT ", ""));
                }
                else if (command.Contains("Return"))
                {
                    c = sC.GetEnter();
                }

                if (!string.IsNullOrEmpty(c))
                {
                    this.dataRulesContainer.keyWords.Add(c);
                }
            }
        }
Пример #2
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..!");
        }
Пример #3
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..!");
        }