public FirstPageViewModel(IFirstPageViewProvider viewProvider)
 {
     _viewProvider         = viewProvider;
     CollectionListCommand = new RelayCommand(() => Navigations.GotoCollectionItemList());
     ImageListCommand      = new RelayCommand(() => Navigations.GotoImageList());
     CollectionItemCommand = new RelayCommand(() => Navigations.GotoCollectionItem());
     PrintCommand          = new RelayCommand(() => Navigations.GotoLabelPrint());
 }
 public CollectionItemListViewModel(ICollectionItemListViewProvider viewProvider)
 {
     _viewProvider                      = viewProvider;
     GotoImageGallaryCommand            = new RelayCommand(() => Navigations.GotoCollectionItemImageGallary(SelectedCollectionItem.InnerObject.Id), IsItemSelected);
     EditCurrentCollectionItemCommand   = new RelayCommand(() => Navigations.GotoCollectionItem(SelectedCollectionItem.InnerObject.Id), IsItemSelected);
     DeleteCurrentCollectionItemCommand = new RelayCommand(DeleteCurrentCollectionItem, IsItemSelected);
     CopyNameCommand                    = new RelayCommand(CopyNameToClipboard, IsItemSelected);
     SortCommand = new RelayCommand(Sort);
 }
예제 #3
0
 public MainViewModel()
 {
     MenuItemCommand = new RelayCommand(destination =>
     {
         var cmd = destination.ToString().ToLower();
         if (cmd == "genus")
         {
             Navigations.GotoGenera();
         }
         else if (cmd == "taxon")
         {
             Navigations.GotoTaxa();
         }
         else if (cmd == "collectionitem")
         {
             Navigations.GotoCollectionItem();
         }
         else if (cmd == "supplier")
         {
             Navigations.GotoSuppliers();
         }
         else if (cmd == "collector")
         {
             Navigations.GotoCollectors();
         }
         else if (cmd == "printlabel")
         {
             Navigations.GotoLabelPrint();
         }
         else if (cmd == "gallary")
         {
             Navigations.GotoImageList();
         }
     });
     HomeCommand = new RelayCommand(() => Navigations.GotoHome());
 }