public SpeechControl(UserInputProfile _profile) { InitializeComponent(); userInputProfile = _profile; init(userInputProfile); }
public UserSetup(HomeScreen _homeScreen) { InitializeComponent(); homeScreen = _homeScreen; userInputProfile = homeScreen.userInputProfile; ConfigureDropdown(); LoadGrid(); }
private void init(UserInputProfile _profile) { isChatRendering = true; chatRenderThread = new Thread(RenderIRC); chatRenderThread.Start(); inputManager.SetControlScheme(userInputProfile); RefreshOpenWindows(); LoadGrid(); }
public void UpdateUserInputProfile(UserInputProfile _userInputProfile) { isChatRendering = false; chatRenderThread.Abort(); inputManager.EndProcessing(); isPlaying = false; PlayButton.Content = "Play"; userInputProfile = _userInputProfile; init(userInputProfile); }
public void UpdateUserInputProfile(UserInputProfile _userInputProfile) { isSpeechRendering = false; speechRenderThread.Abort(); speechManager.StopRecognising(); inputManager.EndProcessing(); isPlaying = false; PlayButton.Content = "Play"; userInputProfile = _userInputProfile; init(userInputProfile); }
public void UpdateUserInputProfile(UserInputProfile _newProfile) { userInputProfile = _newProfile; if (speechControlWindow != null) { speechControlWindow.UpdateUserInputProfile(userInputProfile); } if (chatControlWindow != null) { chatControlWindow.UpdateUserInputProfile(userInputProfile); } }
public void LoadSelectedProfile(object sender, RoutedEventArgs e) { if (LoadingDropdown.SelectedItem.ToString() != "") { var settings = new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.All }; userInputProfile = JsonConvert.DeserializeObject <UserInputProfile>(File.ReadAllText(FILEDIRECTORY + LoadingDropdown.SelectedItem.ToString()), settings); ReloadGrid(); } }
void init(UserInputProfile _profile) { inputManager.SetControlScheme(userInputProfile); List <string> temp = new List <string>(); foreach (var instruction in userInputProfile.actions) { temp.Add(instruction.activationKeyword); } speechManager.LoadCommands(temp); isSpeechRendering = true; speechRenderThread = new Thread(ProcessVoice); speechRenderThread.Start(); RefreshOpenWindows(); LoadGrid(); }
private void ConfigureDropdown() { LoadingDropdown.Items.Clear(); List <string> filesInFolder = Directory.GetFiles(FILEDIRECTORY, "*.*", SearchOption.AllDirectories).Where(file => new string[] { ".json" }.Contains(System.IO.Path.GetExtension(file))).ToList(); int i = 0; foreach (var fileName in filesInFolder) { string[] words = fileName.Split('/'); LoadingDropdown.Items.Add(words.Last()); UserInputProfile temp = JsonConvert.DeserializeObject <UserInputProfile>(File.ReadAllText(FILEDIRECTORY + words.Last())); if (temp.profileId == userInputProfile.profileId) { LoadingDropdown.SelectedIndex = i; } i++; } }
public void NewProfile(object sender, RoutedEventArgs e) { userInputProfile = new UserInputProfile(); ReloadGrid(); }