private object LoadTagOptions(PrivateMessageDataSource state)
        {
            PrivateMessageDataSource source = state as PrivateMessageDataSource;

            if (source == null)
            {
                // TODO: CREATE NEW PRIVATE MESSAGE
                var request = MainDataSource.Instance.CurrentUser.Metadata.CreateNewPrivateMessage();
                this._request = request;
            }

            else
            {
                this._request = IsForward ? source.Metadata.BeginForward() : source.Metadata.BeginReply();
            }

            this._tagOptions = this._request.TagOptions.Select(tag => new IconTagDataModel()
            {
                Metadata = tag
            }).ToList();
            this._tagOptions.Insert(0, IconTagDataModel.NoIcon);
            this._body    = this._request.Body;
            this._subject = this._request.Subject;
            this._to      = this._request.To;
            return(true);
        }
 public void LoadMessage(PrivateMessageDataSource message)
 {
     var thread = Common.BackgroundThread <PrivateMessageDataSource> .RunAsync(message,
                                                                               LoadTagOptions,
                                                                               OnSuccess,
                                                                               OnTagLoadError);
 }
        public PrivateMessageDetailsViewModel()
            : base()
        {
            if (DesignerProperties.IsInDesignTool)
            {
                _currentFolder = new PrivateMessageFolderDataSource()
                {
                    Title = "Sample Folder",
                    Subtitle = "1 of 9 messages, 0 unread"
                };

                _selectedItem = new PrivateMessageDataSource()
                {
                    Title = "H2SO4",
                    Subtitle = "Re: Awful Beta Invite",
                    Description = "4/13/2013 8:00 PM"
                };
            }
        }
Ejemplo n.º 4
0
        public PrivateMessageDetailsViewModel()
            : base()
        {
            if (DesignerProperties.IsInDesignTool)
            {
                _currentFolder = new PrivateMessageFolderDataSource()
                {
                    Title    = "Sample Folder",
                    Subtitle = "1 of 9 messages, 0 unread"
                };

                _selectedItem = new PrivateMessageDataSource()
                {
                    Title       = "H2SO4",
                    Subtitle    = "Re: Awful Beta Invite",
                    Description = "4/13/2013 8:00 PM"
                };
            }
        }
        private object LoadTagOptions(PrivateMessageDataSource state)
        {
            PrivateMessageDataSource source = state as PrivateMessageDataSource;
            if (source == null)
            {
                // TODO: CREATE NEW PRIVATE MESSAGE
                var request = MainDataSource.Instance.CurrentUser.Metadata.CreateNewPrivateMessage();
                this._request = request;
            }

            else
                this._request = IsForward ? source.Metadata.BeginForward() : source.Metadata.BeginReply();
            
            this._tagOptions = this._request.TagOptions.Select(tag => new IconTagDataModel() { Metadata = tag }).ToList();
            this._tagOptions.Insert(0, IconTagDataModel.NoIcon);
            this._body = this._request.Body;
            this._subject = this._request.Subject;
            this._to = this._request.To;
            return true;
        }
 public void LoadMessage(PrivateMessageDataSource message)
 {
     var thread = Common.BackgroundThread<PrivateMessageDataSource>.RunAsync(message,
         LoadTagOptions,
         OnSuccess,
         OnTagLoadError);
 }