public override void ViewDidLoad() { base.ViewDidLoad(); UIPickerViewModel pickerViewModel = new UIPickerViewModel(); //SP::Assign the dictioanry keys to the picker /* * https://github.com/xamarin/ios-samples/blob/master/MonoCatalog-MonoDevelop/PickerViewController.xib.cs * https://stackoverflow.com/questions/36510230/xamarin-ios-uipickerview-tutorial */ foreach (String key in translateClass.dictionaries.Keys) { //LangPicker.Add(key); } UITapGestureRecognizer gestureRecognizer = new UITapGestureRecognizer(() => translateClass.ChangeDirection()); gestureRecognizer.NumberOfTapsRequired = 2; TextBoxOne.AddGestureRecognizer(gestureRecognizer); TextBoxTwo.AddGestureRecognizer(gestureRecognizer); TextBoxOne.Changed += (object sender, EventArgs e) => { TextBoxTwo.Text = translateClass.TranslateString(TextBoxOne.ToString(), LangPicker.ToString()); }; }
void ReleaseDesignerOutlets() { if (Button != null) { Button.Dispose(); Button = null; } if (LangPicker != null) { LangPicker.Dispose(); LangPicker = null; } if (TextBoxOne != null) { TextBoxOne.Dispose(); TextBoxOne = null; } if (TextBoxTwo != null) { TextBoxTwo.Dispose(); TextBoxTwo = null; } }
public void TestRightClickContextMenu_Copy_PasteUsingRepo() { TextBoxOne.Text = "right click copy"; var textBox2 = new TextBoxControl(); textBox2.SystemUnderTestFromRepo("text box2"); textBox2.Text = "box2"; TextBoxOne.Wait(2); TextBoxOne.ContextMenuClick("Select All"); TextBoxOne.ContextMenuClick("Copy"); textBox2.ContextMenuClick("Select All"); textBox2.ContextMenuClick("Paste"); Assert.AreEqual(TextBoxOne.Text, textBox2.Text); }
public void TestRightClickContextMenu_Copy_Paste() { TextBoxOne.Text = "right click copy"; var textBox2 = new TextBoxControl(); textBox2.SystemUnderTest(new ControlLocatorDef <FindControl>( () => new FindWindow("Demo Form"), () => new FindByAutomationId("textBox2") )); textBox2.Text = "box2"; TextBoxOne.Wait(3); TextBoxOne.ContextMenuClick("Select All"); TextBoxOne.ContextMenuClick("Copy"); textBox2.ContextMenuClick("Select All"); textBox2.ContextMenuClick("Paste"); Assert.AreEqual(TextBoxOne.Text, textBox2.Text); }