void ReleaseDesignerOutlets()
        {
            if (CallButton != null)
            {
                CallButton.Dispose();
                CallButton = null;
            }

            if (PhoneNumberText != null)
            {
                PhoneNumberText.Dispose();
                PhoneNumberText = null;
            }

            if (TranslateButton != null)
            {
                TranslateButton.Dispose();
                TranslateButton = null;
            }

            if (VerifyButton != null)
            {
                VerifyButton.Dispose();
                VerifyButton = null;
            }
        }
        private void SetTranslateButtonEnabled(bool enabled)
        {
            MethodInvoker mi = new MethodInvoker(() =>
            {
                TranslateButton.Enabled = enabled;
            });

            if (TranslateButton.InvokeRequired)
            {
                TranslateButton.Invoke(mi);
            }
            else
            {
                mi.Invoke();
            }
        }
Exemplo n.º 3
0
 public void TranslateText(string text)
 {
     InputField.SendKeys(text);
     TranslateButton.Click();
 }