Example #1
0
        public FaultDetailViewModel(Fault fault, PageViewModelBase pvmb, CatalogueViewModel cvm)
        {
            _previousViewModel = pvmb;
            _cvm = cvm;

            Fault = fault;

            Cancel               = new RelayCommand(GoToLastViewModel);
            ResolvedCommand      = new RelayCommand(MarkAsResolved);
            MachineDetailCommand = new RelayCommand(GoToMachineDetail);
        }
Example #2
0
        public MachineDetailViewModel(string comnumber, CatalogueViewModel cvm)
        {
            _cvm = cvm;

            Back           = new RelayCommand(ChangeToCataloguePage);
            DetailsCommand = new RelayParameterizedCommand(ChangeToFaultDetailPage);
            AddFaultPage   = new RelayCommand(ChangeToAddFaultPage);
            EnableTextBox  = new RelayCommand(SwitchTextBoxEnabled);

            IsTextBoxEnabled = false;

            Machine = _cvm.Machines.Machines[comnumber];
        }
        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();
        }
 public AddPageViewModel(CatalogueViewModel cvm)
 {
     _cvm = cvm;
     this.AddMachineCommand = new RelayCommand(AddMachine);
     this.CancelCommand     = new RelayCommand(Cancel);
 }