Exemple #1
0
        private async void comboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ServiceReference.DictServiceSoapClient client = new ServiceReference.DictServiceSoapClient();
            string keyid = (comboBox.SelectedItem as ServiceReference.Dictionary).Id;

            string result = await client.DictionaryInfoAsync(keyid);

            txtContent.Document.SetText(Windows.UI.Text.TextSetOptions.None, result);
        }
Exemple #2
0
        private async void btnIdWord_Click(object sender, RoutedEventArgs e)
        {
            string word = txtWord.Text;

            ServiceReference.DictServiceSoapClient client = new ServiceReference.DictServiceSoapClient();
            string keyid = (comboBox.SelectedItem as ServiceReference.Dictionary).Id;

            ServiceReference.WordDefinition result = await client.DefineInDictAsync(keyid, word);

            txtContent.Document.SetText(Windows.UI.Text.TextSetOptions.None, result.Definitions[0].WordDefinition);
        }
Exemple #3
0
        public async void cbbLoad()
        {
            List <ServiceReference.Dictionary> lstDic = new List <ServiceReference.Dictionary>();

            ServiceReference.DictServiceSoapClient client = new ServiceReference.DictServiceSoapClient();
            ServiceReference.Dictionary[]          result = await client.DictionaryListAsync();

            foreach (var item in result)
            {
                lstDic.Add(item);
            }
            comboBox.ItemsSource = lstDic;
        }
Exemple #4
0
        private async void btnDic_Click(object sender, RoutedEventArgs e)
        {
            string word = txtWord.Text;

            ServiceReference.DictServiceSoapClient client = new ServiceReference.DictServiceSoapClient();
            ServiceReference.WordDefinition        result = await client.DefineAsync(word);

            string def = "";

            foreach (var item in result.Definitions)
            {
                def += item.WordDefinition;
            }
            //result.Definitions[0].WordDefinition
            txtContent.Document.SetText(Windows.UI.Text.TextSetOptions.None, def);
        }