Ejemplo n.º 1
0
        internal void LoadGadgetList(SubTypeItem item)
        {
            //base.Title = item.Title;

            //SortedDictionary<DateTime, AppItem> itemDictionary = new SortedDictionary<DateTime, AppItem>();

            //this.subTypeList.Children.Clear();
            //this.subTypeList.SelectedIndex = -1;
            //foreach (AppItem gi in DataMgr.Instance.GadgetItems)
            //{
            //    if (gi.SubType == (int)item.Type)
            //    {
            //        if (itemDictionary.ContainsKey(gi.CreateDate))
            //        {
            //            DateTime createDate = gi.CreateDate;
            //            while (itemDictionary.ContainsKey(gi.CreateDate))
            //            {
            //                createDate = createDate.AddDays(1);
            //            }

            //            itemDictionary.Add(createDate, gi);
            //        }
            //        else
            //        {
            //            itemDictionary.Add(gi.CreateDate, gi);
            //        }
            //    }
            //}

            //foreach (DateTime dt in itemDictionary.Keys)
            //{
            //    ListBoxItem li = new ListBoxItem();
            //    li.DataContext = itemDictionary[dt];
            //    li.Style = App.Current.FindResource("thumbnailListBoxItemStyle") as Style;
            //    subTypeList.Children.Add(li);
            //}

            //if (this.subTypeList.Children.Count > 0)
            //    this.subTypeList.SelectedIndex = 0;

            //Binding binding = new Binding();
            //binding.Source = this.subTypeList;
            //binding.Path = new PropertyPath("SelectedIndex");
            //this.SetBinding(GadgetUserControl.IndexProperty, binding);

            //this.Total = this.subTypeList.Children.Count;
        }
Ejemplo n.º 2
0
        internal void LoadGadgetList(SubTypeItem item)
        {
            this.containerPanel.Content = ControlMgr.Instance.SubTypeListUserControl;

            ControlMgr.Instance.SubTypeListUserControl.LoadGadgetList(item);
        }