Beispiel #1
0
        public object Convert(object value, Type targetType, object parameter, string language)
        {
            var item = (ResourceInfo)value;

            if (SyncDbUtils.IsSynced(item))
            {
                return(ResourceLoader.GetForCurrentView().GetString(ResourceConstants.SynchronizeNow));
            }
            else
            {
                return(ResourceLoader.GetForCurrentView().GetString(ResourceConstants.SynchronizeStart));
            }
        }
Beispiel #2
0
        public object Convert(object value, Type targetType, object parameter, string language)
        {
            var item = DirectoryService.Instance.PathStack.Count > 0 ? DirectoryService.Instance.PathStack[DirectoryService.Instance.PathStack.Count - 1].ResourceInfo : null;

            if (item == null)
            {
                return(String.Empty);
            }

            if (SyncDbUtils.IsSynced(item))
            {
                return(ResourceLoader.GetForCurrentView().GetString(ResourceConstants.SynchronizeThisFolderNow));
            }
            else
            {
                return(ResourceLoader.GetForCurrentView().GetString(ResourceConstants.SynchronizeThisFolderStart));
            }
        }
Beispiel #3
0
        public object Convert(object value, Type targetType, object parameter, string language)
        {
            var invert = parameter != null;
            var item   = (ResourceInfo)value;

            if (item.ContentType == null || !item.ContentType.Equals("dav/directory"))
            {
                return(Visibility.Collapsed);
            }

            if (SyncDbUtils.IsSynced(item))
            {
                return(Visibility.Visible);
            }
            else
            {
                return(Visibility.Collapsed);
            }
        }
        public object Convert(object value, Type targetType, object parameter, string language)
        {
            var item = DirectoryService.Instance.PathStack.Count > 0 ? DirectoryService.Instance.PathStack[DirectoryService.Instance.PathStack.Count - 1].ResourceInfo : null;

            if (item == null)
            {
                return(false);
            }

            if (item.ContentType == null || !item.ContentType.Equals("dav/directory"))
            {
                return(false);
            }

            if (SyncDbUtils.IsSynced(item))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        public object Convert(object value, Type targetType, object parameter, string language)
        {
            var item = (ResourceInfo)value;

            return(item.ContentType.Equals("dav/directory") ? SyncDbUtils.IsSynced(item) ? "\uE8F7" : "\uE8B7" : "\uE8A5");
        }