예제 #1
0
 private static void RegisterImplementations()
 {
     LicenseImpl.Register();
     Proxy.Register();
     LocalImpl.Register();
     LocaleImpl.Register();
     UserPreferences.Register();
     Keychain.Register();
     PlistWriter.Register();
     PlistSerializer.Register();
     PlistDeserializer.Register();
     HostPlistReader.Register();
     TransferPlistReader.Register();
     ProtocolPlistReader.Register();
     TcpReachability.Register();
     GrowlImpl.Register();
     TreePathReference.Register();
     LoginController.Register();
     HostKeyController.Register();
     UserDefaultsDateFormatter.Register();
     if (Preferences.instance().getBoolean("rendezvous.enable"))
     {
         Rendezvous.Register();
     }
     ProtocolFactory.register();
 }
예제 #2
0
        public override object GetSize(TreePathReference reference)
        {
            Path p = GetPath(reference);

            SyncTransfer.Comparison compare = ((SyncTransfer)Transfer).compare(p);
            return(compare.equals(SyncTransfer.COMPARISON_REMOTE_NEWER)
                       ? p.attributes().getSize()
                       : p.getLocal().attributes().getSize());
        }
예제 #3
0
        public override object GetCreateImage(TreePathReference reference)
        {
            Path p = GetPath(reference);

            if (!(p.exists() && p.getLocal().exists()))
            {
                return(IconCache.Instance.IconForName("plus"));
            }
            return(null);
        }
예제 #4
0
        public object GetModified(TreePathReference path)
        {
            long modificationDate = GetPath(path).attributes().getModificationDate();

            if (modificationDate != -1)
            {
                return(UserDefaultsDateFormatter.ConvertJavaMiliSecondToDateTime(modificationDate));
            }
            return(DateTime.MinValue);
        }
예제 #5
0
        public object GetPermission(TreePathReference path)
        {
            Permission permission = GetPath(path).attributes().getPermission();

            if (null == permission)
            {
                return(_unknown);
            }
            return(permission.toString());
        }
예제 #6
0
        protected Path GetPath(TreePathReference path)
        {
            Path result = Transfer.lookup(path);

            if (null == result)
            {
                // cache is being updated
                result = path.Unique;
            }
            return(result);
        }
예제 #7
0
        private AbstractPath GetPath(TreePathReference path)
        {
            AbstractPath result = _controller.getSession().cache().lookup(path);

            if (null == result)
            {
                // cache is being updated
                result = path.Unique;
            }
            return(result);
        }
예제 #8
0
 public override object GetWarningImage(TreePathReference reference)
 {
     Path p = GetPath(reference);
     if (p.attributes().isFile())
     {
         if (p.attributes().getSize() == 0)
         {
             return AlertIcon;
         }
         if (p.attributes().getSize() > p.getLocal().attributes().getSize())
         {
             return AlertIcon;
         }
     }
     return null;
 }
예제 #9
0
        public override object GetWarningImage(TreePathReference reference)
        {
            Path p = GetPath(reference);

            if (p.attributes().isFile())
            {
                if (p.attributes().getSize() == 0)
                {
                    return(AlertIcon);
                }
                if (p.getLocal().attributes().getSize() > p.attributes().getSize())
                {
                    return(AlertIcon);
                }
            }
            return(null);
        }
예제 #10
0
        public override object GetSyncGetter(TreePathReference reference)
        {
            Path p = (reference).Unique;

            if (p.attributes().isDirectory())
            {
                if (p.exists() && p.getLocal().exists())
                {
                    return(null);
                }
            }
            SyncTransfer.Comparison compare = ((SyncTransfer)Transfer).compare(p);
            if (compare.equals(SyncTransfer.COMPARISON_REMOTE_NEWER))
            {
                return(IconCache.Instance.IconForName("arrowDown", 16));
            }
            if (compare.equals(SyncTransfer.COMPARISON_LOCAL_NEWER))
            {
                return(IconCache.Instance.IconForName("arrowUp", 16));
            }
            return(null);
        }
예제 #11
0
 public object GetModified(TreePathReference path)
 {
     long modificationDate = GetPath(path).attributes().getModificationDate();
     if (modificationDate != -1)
     {
         return UserDefaultsDateFormatter.ConvertJavaMiliSecondToDateTime(modificationDate);
     }
     return DateTime.MinValue;
 }
예제 #12
0
 public object GetName(TreePathReference path)
 {
     return GetPath(path).getName();
 }
예제 #13
0
        public override object GetSize(TreePathReference reference)
        {
            Path p = GetPath(reference);

            return(p.attributes().getSize());
        }
예제 #14
0
 public virtual object GetSyncGetter(TreePathReference reference)
 {
     return null;
 }
예제 #15
0
 public void RefreshBrowserObject(TreePathReference reference)
 {
     if (reference != null)
     {
         browser.RefreshObject(reference);
     }
     else
     {
         //browser.ReloadTree();
     }
 }
예제 #16
0
 public bool IsActive(TreePathReference reference)
 {
     return Transfer.isIncluded(GetPath(reference));
 }
예제 #17
0
 public virtual object GetSyncGetter(TreePathReference reference)
 {
     return(null);
 }
예제 #18
0
 private AbstractPath GetPath(TreePathReference path)
 {
     AbstractPath result = _controller.getSession().cache().lookup(path);
     if (null == result)
     {
         // cache is being updated
         result = path.Unique;
     }
     return result;
 }
예제 #19
0
 public abstract object GetWarningImage(TreePathReference reference);
예제 #20
0
 public virtual object GetCreateImage(TreePathReference reference)
 {
     return(null);
 }
예제 #21
0
 public abstract object GetSize(TreePathReference reference);
예제 #22
0
 public object GetName(TreePathReference reference)
 {
     return(GetPath(reference).getName());
 }
예제 #23
0
 protected Path GetPath(TreePathReference path)
 {
     Path result = Transfer.lookup(path);
     if (null == result)
     {
         // cache is being updated
         result = path.Unique;
     }
     return result;
 }
예제 #24
0
 public object GetPermission(TreePathReference path)
 {
     Permission permission = GetPath(path).attributes().getPermission();
     if (null == permission)
     {
         return _unknown;
     }
     return permission.toString();
 }
예제 #25
0
 public bool IsActive(TreePathReference reference)
 {
     return(Transfer.isIncluded(GetPath(reference)));
 }
예제 #26
0
 public object GetSize(TreePathReference path)
 {
     return GetPath(path).attributes().getSize();
 }
예제 #27
0
 public override object GetSize(TreePathReference reference)
 {
     return(GetPath(reference).getLocal().attributes().getSize());
 }
예제 #28
0
 public virtual object GetCreateImage(TreePathReference reference)
 {
     return null;
 }
예제 #29
0
 public object GetName(TreePathReference path)
 {
     return(GetPath(path).getName());
 }
예제 #30
0
 public object GetKind(TreePathReference path)
 {
     return(GetPath(path).kind());
 }
예제 #31
0
 public abstract object GetWarningImage(TreePathReference reference);
예제 #32
0
 public override object GetSize(TreePathReference reference)
 {
     Path p = GetPath(reference);
     return p.attributes().getSize();
 }
예제 #33
0
 public object GetGroup(TreePathReference path)
 {
     return(GetPath(path).attributes().getGroup());
 }
예제 #34
0
 public object GetIcon(TreePathReference path)
 {
     return(IconCache.Instance.IconForPath(GetPath(path) as Path, IconCache.IconSize.Small));
 }
예제 #35
0
 public object GetName(TreePathReference reference)
 {
     return GetPath(reference).getName();
 }
예제 #36
0
 public void RefreshBrowserObject(TreePathReference path)
 {
     browser.RefreshObject(path);
 }
예제 #37
0
 public abstract object GetSize(TreePathReference reference);
예제 #38
0
 public object GetKind(TreePathReference path)
 {
     return GetPath(path).kind();
 }
예제 #39
0
 public object GetIcon(TreePathReference reference)
 {
     return IconCache.Instance.IconForPath(GetPath(reference), IconCache.IconSize.Small);
 }
예제 #40
0
 public bool GetActive(TreePathReference reference)
 {
     return(_controller.IsConnected() && BrowserController.HiddenFilter.accept(GetPath(reference)));
 }
예제 #41
0
 public bool GetActive(TreePathReference reference)
 {
     return _controller.IsConnected() && BrowserController.HiddenFilter.accept(GetPath(reference));
 }
예제 #42
0
 public object GetIcon(TreePathReference path)
 {
     return IconCache.Instance.IconForPath(GetPath(path) as Path, IconCache.IconSize.Small);
 }
예제 #43
0
 public override object GetSize(TreePathReference reference)
 {
     return GetPath(reference).getLocal().attributes().getSize();
 }