Exemple #1
0
        public override void EijirouWeb_Click(object sender, EventArgs e)
        {
            string text = null;

            if (textBoxModify.Focused && textBoxModify.SelectionLength > 0)
            {
                text = textBoxModify.SelectedText;
            }
            else if (textBoxOriginal.Focused && textBoxOriginal.SelectionLength > 0)
            {
                text = textBoxOriginal.SelectedText;
            }

            if (text != null)
            {
                TranslateBrowser browser = TranslateBrowser.Create(new WebTranslate.EijirouTranslate(text), this);
            }

            if (text != null)
            {
                string url = WebTranslate.EijirouTranslate.GetUrl(text);
                if (url != null)
                {
                    System.Diagnostics.Process.Start(url);
                }
            }
        }
Exemple #2
0
        public override void Eijirou_Click(object sender, EventArgs e)
        {
            string text = null;

            if (textBoxModify.Focused && textBoxModify.SelectionLength > 0)
            {
                text = textBoxModify.SelectedText;
            }
            else if (textBoxOriginal.Focused && textBoxOriginal.SelectionLength > 0)
            {
                text = textBoxOriginal.SelectedText;
            }

            if (text != null)
            {
                TranslateBrowser browser = TranslateBrowser.Create(new WebTranslate.EijirouTranslate(text), this);
            }
        }