Exemplo n.º 1
0
        public RFiDChipChildLayerViewModel()
        {
            sectorModel = new MifareClassicSectorModel(0);
            appModel    = new MifareDesfireAppModel();

            children = new ObservableCollection <RFiDChipGrandChildLayerViewModel>();
        }
Exemplo n.º 2
0
        public RFiDChipChildLayerViewModel(
            MifareClassicSectorModel _sectorModel,
            MifareClassicSetupViewModel _setupViewModel)
        {
            sectorModel    = _sectorModel;
            setupViewModel = _setupViewModel;

            isTask   = true;
            children = new ObservableCollection <RFiDChipGrandChildLayerViewModel>();

            LoadChildren();
        }
Exemplo n.º 3
0
//		public RFiDChipChildLayerViewModel(
//			MifareClassicSectorModel _sectorModel,
//			MifareClassicSetupViewModel _setupViewModel)
//		{
//			sectorModel = _sectorModel;
//			setupViewModel = _setupViewModel;
//
//			isTask = true;
//			children = new ObservableCollection<RFiDChipGrandChildLayerViewModel>();
//
//			LoadChildren();
//		}

        public RFiDChipChildLayerViewModel(
            MifareClassicSectorModel _sectorModel,
            RFiDChipParentLayerViewModel parent,
            CARD_TYPE cardType,
            ObservableCollection <IDialogViewModel> _dialogs = null,
            bool?_isTask = null)
        {
            if (_dialogs != null)
            {
                dialogs = _dialogs;
            }

            isTask      = _isTask;
            sectorModel = _sectorModel;
            _cardType   = cardType;
            _parent     = parent;

            _cmdReadSectorWithDefaults  = new RelayCommand(ReadSectorWithDefaults);
            _cmdEditAuthAndModifySector = new RelayCommand(ReadSectorWithCustoms);
            _cmdReadSectorWithCustoms   = new RelayCommand(ReadSectorWithCustoms);

            ContextMenuItems = new List <MenuItem>();
            ContextMenuItems.Add(new MenuItem()
            {
                Header  = "Read Sector with default Keys",
                Command = _cmdReadSectorWithDefaults
            });

            ContextMenuItems.Add(new MenuItem()
            {
                Header  = "Read Sector with custom Keys",
                Command = _cmdReadSectorWithCustoms
            });

            children = new ObservableCollection <RFiDChipGrandChildLayerViewModel>();

            LoadChildren();
        }