Exemplo n.º 1
0
        public async Task DictionaryAPIOkNotChsMeaning()
        {
            string result = "";

            _client.SetType(MockApiClient.Type.OkNotChsMeaning);
            result = await DictionaryAPIConnection.GetResult(_client, "eng", "eng", "Taiwan");

            Assert.AreEqual("English meaning", result);
        }
Exemplo n.º 2
0
        public async Task DictionaryAPIOkChsMeaning()
        {
            string result = "";

            _client.SetType(MockApiClient.Type.OkChsMeaning);
            result = await DictionaryAPIConnection.GetResult(_client, "zho", "zho", "中文");

            Assert.AreEqual("簡化字", result);
        }
Exemplo n.º 3
0
        public async Task DictionaryAPIOkChsPhrase()
        {
            string result = "";

            _client.SetType(MockApiClient.Type.OkChsPhrase);
            result = await DictionaryAPIConnection.GetResult(_client, "eng", "zho", "Taiwan");

            Assert.AreEqual("簡化字", result);
        }
Exemplo n.º 4
0
        private async void getResult(string fromCode, string toCode, string input)
        {
            resultBox.Text = await DictionaryAPIConnection.GetResult(_client, fromCode, toCode, input);

            _isConn           = false;
            inputBox.Enabled  = true;
            fromBox.Enabled   = true;
            toBox.Enabled     = true;
            submitBtn.Enabled = true;
        }