private void Execute(DateTime date) { _log.Info($"Execute; {date} "); if (_itemsToRunOnNextMinute.Any()) { foreach (var cronDefinition in _itemsToRunOnNextMinute) { var processWrapper = new ProcessWrapper(); var t1 = Pharse.Tokenize(cronDefinition.ExecutePart); processWrapper.Start(t1, ""); } var nextItemToRun = _cronDefinitions .SelectMany(x => x.Value) .OrderBy(x => x.Expression.GetNextOccurrence(DateTime.UtcNow)) .FirstOrDefault(); if (nextItemToRun != null) { _log.Info( $"Next item to run at: {nextItemToRun.Expression.GetNextOccurrence(DateTime.UtcNow)}; " + $"Execute: {nextItemToRun.ExecutePart}"); } } var next = date.AddMinutes(1); ScheduleNext(next); }
public void FactMethodName() { var ss = @"eo.exe -clients=client1,client2 -waitTime=10 -SeriesMode=2"; var t1 = Pharse.Tokenize(ss); ProcessWrapper processWrapper = new ProcessWrapper(); processWrapper.Start(t1, ""); //var t = new ProcessWrapper("'SiteScrapera.exe\a\a\' -clients=client1,client2 -waitTime=10 -SeriesMode=2", "", false, false); }
public void EndPartConversation() { _textInput.SetActive(false); inputAllreadyShow = false; int actualPhrase = _genericManager._conversationManager.getCurrentPhraseIndex(); Pharse phrase = _genericManager.isBoy ? _genericManager.phrasesBoy[actualPhrase] : _genericManager.phrasesGirl[actualPhrase]; if (phrase.withPuzzle && _genericManager.AllPistasConocidas()) { _genericManager._conversationManager.Block(true); } _alphabetManager.resetAlphabet(); }
public void pulsadoEnTexto() { int actualPhrase = _genericManager._conversationManager.getCurrentPhraseIndex(); if (!inputAllreadyShow) { Pharse phrase = _genericManager.isBoy ? _genericManager.phrasesBoy[actualPhrase] : _genericManager.phrasesGirl[actualPhrase]; if (phrase.withPuzzle && _genericManager.AllPistasConocidas()) { _textInput.SetActive(true); _textInput.GetComponent <InputField>().text = ""; inputAllreadyShow = true; } } }
private void Awake() { if (_conversationManager == null) { Debug.LogError("[GenericManager.Awake] ERROR: Serializable _conversationManager not set"); return; } if (_localizationManager == null) { Debug.LogError("[GenericManager.Awake] ERROR: Serializable _localizationManager not set"); return; } if (_characterConversationAnimator == null) { Debug.LogError("[GenericManager.Awake] ERROR: Serializable _characterConversationAnimator not set"); return; } if (_postgameAnimator == null) { Debug.LogError("[GenericManager.Awake] ERROR: Serializable _postgameAnimator not set"); return; } if (_pregameTextAnimator == null) { Debug.LogError("[GenericManager.Awake] ERROR: Serializable _pregameTextAnimator not set"); return; } if (_pregameText == null) { Debug.LogError("[GenericManager.Awake] ERROR: Serializable _pregameText not set"); return; } if (_postgameTextAnimator == null) { Debug.LogError("[GenericManager.Awake] ERROR: Serializable _postgameTextAnimator not set"); return; } if (_postgameText == null) { Debug.LogError("[GenericManager.Awake] ERROR: Serializable _postgameText not set"); return; } for (int i = 0; i < _pistas.Count; ++i) { _pistaConocida.Add(false); } //read boy keys phrasesBoy = new List <Pharse>(); phrasesGirl = new List <Pharse>(); for (int i = 0; i < _keysBoy.Count; ++i) { Tuple <string, string> puzzle = new Tuple <string, string>("", ""); bool withPuzzle = false; string allString = _localizationManager.GetString(_keysBoy[i], ref puzzle, ref withPuzzle); Pharse p = new Pharse { allString = allString, puzzle = puzzle, withPuzzle = withPuzzle }; if (withPuzzle) { ++_maxPalabrasCorrectas; } phrasesBoy.Add(p); } for (int i = 0; i < _keysGirl.Count; ++i) { Tuple <string, string> puzzle = new Tuple <string, string>("", ""); bool withPuzzle = false; string allString = _localizationManager.GetString(_keysGirl[i], ref puzzle, ref withPuzzle); Pharse p = new Pharse { allString = allString, puzzle = puzzle, withPuzzle = withPuzzle }; phrasesGirl.Add(p); } }