public AttachmentDetailViewModel(FileDescription file) { //Title = file.Name; //PrintCommand = new DelegateCommand<ChildWindow>(Print); //var uriString = string.Concat(System.Windows.Browser.HtmlPage.Document.DocumentUri.ToString(), "api/files/", file.Id); //Uri = new Uri(uriString, UriKind.Absolute); }
public void Init(FileDescription file, IDictionary<string, string> names) { fileId = file.Id; if (file.Metadata != null) { string str; var products = from x in file.Metadata.ProductIds let name = names.TryGetValue(x, out str) ? str : null where name != null select new ProductName { Id = x, Name = name }; Products.AddRange(products); } Title = file.Name; var uriString = string.Concat(settings.Endpoint, "api/files/", file.Id); Uri = new Uri(uriString, UriKind.Absolute); }
private void OpenFile(FileDescription file) { //openDetailRequest.Raise(new AttachmentDetailViewModel(file)); }
private void Edit(FileDescription file) { var context = editFactory(); context.Init(file, names); editRequest.Raise(context, OnFileUpdated); }