コード例 #1
0
 private void btnSearch_Click(object sender, RoutedEventArgs e)
 {
     if (txtSearch.Text.Length >= 3)
     {
         logMessage($"Searching items for \"{txtSearch.Text}\"");
         TarkovTools.ItemsByName(txtSearch.Text, PriceCheck);
     }
 }
コード例 #2
0
        // Handle the SpeechRecognized event.
        private void recognizer_SpeechRecognized(object sender, SpeechRecognizedEventArgs e)
        {
            var text = e.Result.Text.ToLower();

            if (text.StartsWith($"{Properties.Settings.Default.PriceCheckKeyword} "))
            {
                var searchString = CleanText(text.Replace($"{Properties.Settings.Default.PriceCheckKeyword} ", ""));
                logMessage($"Searching items for \"{searchString}\"");
                TarkovTools.ItemsByName(searchString, PriceCheck);
            }
            else
            {
                //logMessage("not recognized as a command: " + text);
            }
        }