Ejemplo n.º 1
0
 public void TabSelected(object obj)
 {
     if ((int)obj == 0)
     {
         if (!String.IsNullOrEmpty(CatalogPath))
         {
             SelectedValue = FileVMLogic.GetFiles(CatalogPath);
         }
         else
         {
             SelectedValue = null;
         }
     }
     else
     {
         if (CategoryId != 0)
         {
             SelectedValue = FileVMLogic.GetFiles(CategoryId);
         }
         else
         {
             SelectedValue = null;
         }
     }
 }
Ejemplo n.º 2
0
 public void SelectedCatalog(object obj)
 {
     if (obj is string)
     {
         CatalogPath   = obj.ToString();
         SelectedValue = FileVMLogic.GetFiles(CatalogPath);
     }
     else
     {
         if (obj is int)
         {
             CategoryId    = (int)obj;
             SelectedValue = FileVMLogic.GetFiles(CategoryId);
         }
         else
         {
             SelectedValue = null;
         }
     }
 }
Ejemplo n.º 3
0
 public MainWindowViewModel()
 {
     Collapse = new Command(CollapseElement);
     Visible  = new Command(VisibleElement);
     Media    = new MediaViewModel();
     Trees    = new TreeViewModel()
     {
         CatalogPath = Properties.Settings.Default.CatalogPath, SelectedValue = FileVMLogic.GetFiles(Properties.Settings.Default.CatalogPath), CategoryId = Properties.Settings.Default.CategoryId
     };
 }