예제 #1
0
        private async void AddDocument()
        {
            var option = await mMessageboxService.ShowThreeOptions("Add document",
                                                                   "Please choose an option",
                                                                   "Cancel", "Take photo", "Select from library");

            if (option > 0)
            {
                byte[] image;
                if (option == 1)
                {
                    image = await Mvx.Resolve <IImageService>().TakePicture();
                }
                else
                {
                    image = await Mvx.Resolve <IImageService>().SelectFromLibrary();
                }

                if (image != null)
                {
                    var path = Guid.NewGuid().ToString();

                    Document document = new Document
                    {
                    };
                    DocumentItemViewModel itemModel = new DocumentItemViewModel(document);
                    DocumentItems.Add(itemModel);
                }
            }
        }
예제 #2
0
        public void AddItem()
        {
            var ret = new DocumentItemViewModel();

            Items.Add(ret);
            SelectedItem = ret;
        }
예제 #3
0
 private void SelectDocumenItem(DocumentItemViewModel documentItem)
 {
     //mCacheService.DocumentItems = this.DocumentItems;
     //mCacheService.DocumentItem = documentItem;
     ShowViewModel <DocumentDetailsViewModel>(new { canEdit = mCanEdit });
 }