public void LoadFromString_WithVariousContent_ValueContentShouldMatchInput(string input, int codePage, string content) { var option = new ResponseOption(); option.LoadFromString(input); Encoding encoding = Encoding.GetEncoding(codePage); option.Value.ContentBytes .ShouldBe(encoding.GetBytes(content)); }
public void LoadFromString_WithDifferentEncodings_ValueEncodingShouldMatchInput(string input, int codePage) { var option = new ResponseOption(); option.LoadFromString(input); Encoding encoding = Encoding.GetEncoding(codePage); option.Value.ContentEncoding .ShouldBe(encoding); }
void Update() { myDevice = SteamVR_Controller.Input(SteamVR_Controller.GetDeviceIndex(SteamVR_Controller.DeviceRelation.Rightmost)); ResponseOption responseOption = GetOptionCurrentlyDepressedBack(); if (Time.time > lastChangedMessageTime) { if (!displayedMessage) { textMessages.text = currentTextMessage.FormattedMessage(); //textBubble.SetActive (true); mySource.Play(); Debug.Log("Ran this"); vibrateUntilTime = Time.time + vibrateForThisTimeInterval; displayedMessage = true; } if (vibrateUntilTime > Time.time) { VibrateController(); } switch (responseOption) { case ResponseOption.OptionA: currentTextMessage = currentTextMessage.optionAReply; BlankTextBank(currentTextMessage.delay); break; case ResponseOption.OptionB: currentTextMessage = currentTextMessage.optionBReply; BlankTextBank(currentTextMessage.delay); break; case ResponseOption.OptionC: currentTextMessage = currentTextMessage.optionCReply; BlankTextBank(currentTextMessage.delay); break; case ResponseOption.OptionD: currentTextMessage = currentTextMessage.optionDReply; BlankTextBank(currentTextMessage.delay); break; } } }
public ResponseOption UpdateResponseOption(ResponseOption option) { updatedResponse = option; return(updatedResponse); }
public ResponseOptionViewModel(ResponseOption responseOption, bool selected) { ResponseOption = responseOption; Selected = selected; }
public ResponseOptionViewModel(ResponseOption responseOption) { ResponseOption = responseOption; Selected = false; }
public ResponseOptionViewModel() { ResponseOption = new ResponseOption(); Selected = false; }
public static void ResponseOption(ResponseOption option, ReturnType returnType, bool returnComposedObjects) { Assert.AreEqual(returnType, option.ReturnType); Assert.AreEqual(returnComposedObjects, option.ReturnComposedObjects); }