当前位置: 首页>>代码示例>>C#>>正文


C# Models.MetaData类代码示例

本文整理汇总了C#中DropNet.Models.MetaData的典型用法代码示例。如果您正苦于以下问题:C# MetaData类的具体用法?C# MetaData怎么用?C# MetaData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


MetaData类属于DropNet.Models命名空间,在下文中一共展示了MetaData类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateFolderViewModel

 public CreateFolderViewModel()
 {
     if (IsInDesignMode)
     {
         _metadata = new MetaData { Path = "/photos" };
     }
 }
开发者ID:prashantvc,项目名称:WinBox-Win8,代码行数:7,代码来源:CreateFolderViewModel.cs

示例2: OnNavigatedTo

        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            if (RemoveBackEntry)
            {
                NavigationService.RemoveBackEntry();
            }

            Messenger.Default.Register<MetaDataViewModel>(this, MessengerToken.GetLink, GetLinkPage);

            var data = new MetaData
                           {
                               Path = GetPath(),
                               Icon = GetIcon()
                           };

            PageTitle.Text = data.Name.ToLower();
            _viewModel.RegisterMessengers.Execute(null);
            _viewModel.LoadItems.Execute(data);

            SetPinIcon(data);

            if (RemoveBackEntry)
            {
                App.NeedDataRefresh = true;
            }

            base.OnNavigatedTo(e);
        }
开发者ID:prashantvc,项目名称:WinBox-Win8,代码行数:28,代码来源:FolderPage.xaml.cs

示例3: IsPinned

        public static bool IsPinned(MetaData metaData)
        {
            string path = string.Format("/FolderPage.xaml?path={0}&icon={1}", metaData.Path, metaData.Icon);
            var tile = LiveTileHelper.GetTile(new Uri(path, UriKind.Relative));

            return tile != null;
        }
开发者ID:prashantvc,项目名称:WinBox-Win8,代码行数:7,代码来源:TileHelper.cs

示例4: FromMetaData

 public static DropBoxItem FromMetaData(MetaData metaData)
 {
     if(metaData.Is_Dir)
     {
         return new DropBoxFolder(metaData.Path, metaData.Name);
     }
     return new DropBoxFile(metaData.Path, metaData.Name);
 }
开发者ID:runegri,项目名称:CrossBox,代码行数:8,代码来源:DropBoxItem.cs

示例5: GetMetaData

 private async void GetMetaData()
 {
     _metaData = _client.GetMetaData(path: "/Photos/Camera/2014/2014-05-11");
     _position = 0;
     LoadImageIntoControl(await GetImage(_position));
     if (_position < _metaData.Contents.Count - 1)
         await GetImage(_position + 1); // cache the next image
 }
开发者ID:JeffreyVest,项目名称:PhotoTagger,代码行数:8,代码来源:MainWindow.xaml.cs

示例6: ParseImageMetadata

 protected virtual void ParseImageMetadata(MetaData data)
 {
     Client.GetMediaAsync(data.Path, response =>
                                         {
                                             var media = MediaFactory.CreateFromUrl(Settings.Id, response.Url);
                                             NewMedia(media);
                                             ((List<Media>)Media).Add(media);
                                         }, exception => Debug.WriteLine(exception));
 }
开发者ID:vegardlarsen,项目名称:Mat,代码行数:9,代码来源:DropboxMediaSource.cs

示例7: RemoveTile

        public static void RemoveTile(MetaData metaData)
        {
            string path = string.Format("/FolderPage.xaml?path={0}&icon={1}", metaData.Path, metaData.Icon);
            var tile = LiveTileHelper.GetTile(new Uri(path, UriKind.Relative));

            if (tile != null)
            {
                tile.Delete();
            }
        }
开发者ID:prashantvc,项目名称:WinBox-Win8,代码行数:10,代码来源:TileHelper.cs

示例8: GetMetadataRecursive

 public static IEnumerable<MetaData> GetMetadataRecursive(MetaData metaData)
 {
     var result = new List<MetaData>() {metaData};
     if (metaData.Contents != null) {
         foreach (var data in metaData.Contents) {
             result.AddRange(GetMetadataRecursive(data));
         }
     }
     return result;
 }
开发者ID:uluhonolulu,项目名称:DropnetExt,代码行数:10,代码来源:DropnetExtensions.cs

示例9: FileEntry

 public FileEntry(MetaData md, ImageSource thumb)
 {
     Modified = md.ModifiedDate;
     Title = md.Name;
     Image = thumb;
     IdString = md.Path;
     IsFolder = md.Is_Dir;
     IsGDrive = false;
     IsViewable = !md.Is_Dir && IsExtViewable(md.Extension.Replace(".", ""));
 }
开发者ID:gdlprj,项目名称:duscusys,代码行数:10,代码来源:FileEntry.cs

示例10: Create

 public static DropboxFileMeta Create(MetaData m)
 {
   return new DropboxFileMeta
   {
     IsDir = m.Is_Dir,
     IsDeleted = m.Is_Deleted,
     Extension = m.Extension,
     Name = m.Name,
     LastModifiedUtc = m.UTCDateModified,
     Path = m.Path
   };
 }
开发者ID:popopome,项目名称:memocloud,代码行数:12,代码来源:SyncPolicy.cs

示例11: ConvertToFileObject

        /// <summary>
        /// Converting DropBox Model to FileObject
        /// </summary>
        /// <param name="meta">DropBox Model</param>
        /// <returns>POJO FileObject</returns>
        public static FileObject ConvertToFileObject(MetaData meta)
        {
            string Name = meta.Name;
            string UpdateAt = meta.ModifiedDate.ToString(); //14/02/2014 15:48:13
            string Id = meta.Path; // Full path
            string ParentId = meta.Path;
            double Size = meta.Bytes * 1.0;
            FileObject.FileObjectType Type = (meta.Is_Dir ? FileObject.FileObjectType.FOLDER : FileObject.FileObjectType.FILE);
            string Extension = (meta.Extension == null || "".Equals(meta.Extension)) ? "" : meta.Extension.Substring(1, meta.Extension.Length -1); // .png

            return new FileObject(Id,Name,Size,Type,Extension,UpdateAt);
        }
开发者ID:pinthecloud,项目名称:pin_the_cloud,代码行数:17,代码来源:ConvertToFileObjectHelper.cs

示例12: GetRelativeTime

        private static string GetRelativeTime(MetaData data)
        {
            DateTime date;
            var parsed = DateTime.TryParseExact(
                data.Modified,
                "ddd, dd MMM yyyy HH:mm:ss +ffff",
                CultureInfo.InvariantCulture,
                DateTimeStyles.None, out date);

            return parsed
                ? date.ToRelative()
                : string.Empty;
        }
开发者ID:oldlaurel,项目名称:WinPass,代码行数:13,代码来源:MetaListItemInfo.cs

示例13: MetaListItemInfo

        public MetaListItemInfo(MetaData data)
        {
            if (data == null)
                throw new ArgumentNullException("data");

            Title = data.Name;
            _path = data.Path;
            _idDir = data.Is_Dir;
            _modified = data.Modified;

            Icon = ThemeData.GetImage(
                data.Is_Dir ? "folder" : "entry");
        }
开发者ID:nthobois,项目名称:7Pass,代码行数:13,代码来源:MetaListItemInfo.cs

示例14: UnpublishedMarkdownFiles

        private static bool UnpublishedMarkdownFiles(MetaData arg)
        {
            if (arg.Name == null)
                return false;
            var withoutExtension = Path.GetFileNameWithoutExtension(arg.Name);
            var extension = Path.GetExtension(arg.Name);
            return
                withoutExtension != null &&
                extension != null &&
                withoutExtension.IndexOf(PublishedMarker, StringComparison.Ordinal) == -1 &&
                withoutExtension.IndexOf(WorkInProgressMarker, StringComparison.Ordinal) == -1 &&
                extension == ".md";

        }
开发者ID:flq,项目名称:Rf.Sites,代码行数:14,代码来源:DropboxFacade.cs

示例15: CreateTile

        public static void CreateTile(MetaData metaData)
        {
            ImageSource imageSource = new BitmapImage(new Uri(string.Format("/TileIcon/{0}.png", metaData.Icon), UriKind.Relative));
            var visual = new LiveTileVisual();
            visual.SetProperties(metaData.Name, imageSource);
            var data = new RadExtendedTileData
                           {
                               VisualElement = visual
                           };

            string path = string.Format("/FolderPage.xaml?path={0}&icon={1}", metaData.Path, metaData.Icon);

            LiveTileHelper.CreateTile(data, new Uri(path, UriKind.Relative));
        }
开发者ID:prashantvc,项目名称:WinBox-Win8,代码行数:14,代码来源:TileHelper.cs


注:本文中的DropNet.Models.MetaData类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。