private void GoToFaultDetail(object parameter) { int faultID = -1; if (Int32.TryParse(parameter.ToString(), out faultID)) { this.ParentWindow.Navigate(new FaultDetailViewModel(FaultOverview.FindFault(faultID), this, _cvm)); } }
public FaultOverviewViewModel(CatalogueViewModel cvm) { FaultOverview = new FaultOverview(cvm.Machines); _cvm = cvm; this.AllFaultsCommand = new RelayCommand(ShowAllFaults); this.UnresolvedFaultsCommand = new RelayCommand(ShowUnresolvedFaults); this.ResolvedFaultsCommand = new RelayCommand(ShowResolvedFaults); this.BackCommand = new RelayCommand(Back); this.MachineCommand = new RelayParameterizedCommand(GoToFaultDetail); ShowUnresolvedFaults(); }
private void ShowAllFaults() { Faults = FaultOverview.GetAllFaults(); }
private void ShowUnresolvedFaults() { Faults = FaultOverview.GetUnresolvedFaults(); }
private void ShowResolvedFaults() { Faults = FaultOverview.GetResolvedFaults(); }