コード例 #1
0
        public void OpenMessageModal(Action <bool> callback)
        {
            var navItem = new MessageModalNavItem {
                MobileDataID = _mobileData.ID, IsRead = (_mobileData.ProgressState == Enums.InstructionProgress.Complete)
            };
            var navData = new NavData <MessageModalNavItem> {
                Data = navItem
            };

            _navigationService.ShowModalViewModel <MessageViewModel, bool>(navData, callback);
        }
コード例 #2
0
        public async Task Init(Guid navID)
        {
            SetMessageID(navID);

            var navData = Mvx.Resolve <INavigationService>().GetNavData <MessageModalNavItem>(navID);

            _navItem = navData.Data;

            _isMessageRead = _navItem.IsRead;
            _mobileData    = await _repositories.MobileDataRepository.GetByIDAsync(_navItem.MobileDataID);

            this.MessageContentText = _mobileData.Order.Items.First().Description;
            this.IsWithPoint        = _mobileData.Order.Addresses.Any();
            this.PointDescription   = _mobileData.Order.Description;
            this.ReadButtonText     = _isMessageRead ? "Return" : "Mark as read";
            this.Address            = this.IsWithPoint ? (_mobileData.Order.Addresses[0].Lines.Replace("|", "\n") + "\n" + _mobileData.Order.Addresses[0].Postcode) : string.Empty;

            RaiseAllPropertiesChanged();
        }