예제 #1
0
        //Fill 'Words' list-box with default values.
        void FillWords(List <int> tmp)
        {
            List <int> lst = new List <int>(_proxy.GetUserItemWordsAsync(user, item, type).Result);

            foreach (int item in lst)
            {
                lstWords.Items.Add(new CheckBox {
                    VerticalAlignment = VerticalAlignment.Stretch, Tag = item, Content = _proxy.GetItemPropertyAsync(item, EngServRef.ServerData.Word, EngServRef.PropertyData.Name).Result, Style = TryFindResource("chNormal") as Style, HorizontalAlignment = HorizontalAlignment.Left, IsChecked = true
                });
            }
        }
예제 #2
0
        //Fill 'Categories' list-box.
        void FillCategories()
        {
            List <int> lst = new List <int>(_proxy.GetItemsAsync(EngServRef.ServerData.WordCategory).Result);

            foreach (int item in lst)
            {
                CheckBox chItem = new CheckBox {
                    VerticalAlignment = VerticalAlignment.Stretch, Tag = item, Content = _proxy.GetItemPropertyAsync(item, EngServRef.ServerData.WordCategory, EngServRef.PropertyData.Name).Result, Style = TryFindResource("chNormal") as Style, HorizontalAlignment = HorizontalAlignment.Left
                };
                chItem.Click += ChItem_Click;
                lstCategory.Items.Add(chItem);
            }
        }
예제 #3
0
 //Fill 'Rules' list-box.
 void FillRules(List <int> lst)
 {
     foreach (int item in lst)
     {
         lstRules.Items.Add(new CheckBox {
             VerticalAlignment = VerticalAlignment.Stretch, Tag = item, Content = _proxy.GetItemPropertyAsync(item, EngServRef.ServerData.Rule, EngServRef.PropertyData.Name).Result, Style = TryFindResource("chNormal") as Style, HorizontalAlignment = HorizontalAlignment.Left, IsChecked = true
         });
     }
 }