コード例 #1
0
    static public void Watch(object target, bool shouldShowNonPublic, string targetName)
    {
        if (target == null)
        {
            return;
        }

        if (targetName == null)
        {
            if (target is Type)
            {
                targetName = (target as Type).Name;
            }
            else
            {
                targetName = target.GetType().Name;
            }
        }

        if (_instance == null)
        {
            _instance = new FWatcher();
        }

        _instance.DoWatch(target, targetName, shouldShowNonPublic);
    }
コード例 #2
0
 public void Close(Program program)
 {
                 #if USEWATCHERS
     if (FWatcher != null)
     {
         FWatcher.Changed -= new FileSystemEventHandler(DirectoryChanged);
         FWatcher.Created -= new FileSystemEventHandler(DirectoryChanged);
         FWatcher.Deleted -= new FileSystemEventHandler(DirectoryChanged);
         FWatcher.Renamed -= new RenamedEventHandler(DirectoryRenamed);
         FWatcher.Dispose();
         FWatcher = null;
     }
                 #endif
 }
コード例 #3
0
    public static void Watch(object target, bool shouldShowNonPublic, string targetName)
    {
        if(target == null) return;

        if(targetName == null)
        {
            if(target is Type)
            {
                targetName = (target as Type).Name;
            }
            else
            {
                targetName = target.GetType().Name;
            }
        }

        if(_instance == null)
        {
            _instance = new FWatcher();
        }

        _instance.DoWatch(target, targetName, shouldShowNonPublic);
    }
コード例 #4
0
 private void Destroy()
 {
     UnityEngine.Object.Destroy(gameObject);
     FWatcher.RemoveWatcherLink(this);
 }
コード例 #5
0
ファイル: FWatcher.cs プロジェクト: MrPhil/Futile
 private static void Init()
 {
     _instance = new FWatcher();
 }