public static AssetManagerManaged getInstance()
 {
     if (inst == null)
     {
         inst = new AssetManagerManaged();
     }
     return(inst);
 }
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value == null)
            {
                return(new List <AssetItem>());
            }

            string type = value as string;

            return(AssetManagerManaged.getInstance().asset_type_to_item[type]);
        }
        void generateContents()
        {
            if (assets == null)
            {
                filteredAssets         = new ObservableCollection <AssetItem>();
                assets                 = new ObservableCollection <AssetItem>();
                FilterView.ItemsSource = assets;
            }
            assets.Clear();

            if (AssetManagerManaged.getInstance().asset_type_to_item.ContainsKey(_assetWatchedType))
            {
                foreach (AssetItem item in AssetManagerManaged.getInstance().asset_type_to_item[_assetWatchedType])
                {
                    assets.Add(item);
                }
            }
            filteredAssets = assets;

            FilterControl_TextChanged(null, null);
        }
예제 #4
0
 public static AssetManagerManaged getInstance()
 {
     if (inst == null)
         inst = new AssetManagerManaged();
     return inst;
 }
        public AssetFilterViewControl()
        {
            InitializeComponent();

            AssetManagerManaged.getInstance().OnAssetsChanged += AssetFilterViewControl_OnAssetsChanged;
        }