Пример #1
0
 private void ValidatePathToTarget(IThemeListLoader loader, ThemeListNode themeList)
 {
     IsInitialized = false;
     Target = loader.LoadedNode(themeList, PathToNode);
     IsInitialized = true;
     if (Target == null)
     {
         State = ShortcutState.Broken;
         loader.ShortcutIsBroken(this);
     }
     else
     {
         State = ShortcutState.Verified;
     }
 }
Пример #2
0
        public ShortcutNode(string name, string path, IThemeListLoader loader)
            : this()
        {
            if (path == null)
                throw new ArgumentNullException("path");
            if (path == null)
                throw new ArgumentNullException("loader");

            IsInitialized = false;
            Name = name;
            PathToTarget = path;
            ThemeListNode themeList = loader.LoadedThemeList(PathToThemeList);
            if (themeList == null)
                WaitForThemeList(loader);
            else
                ValidatePathToTarget(loader, themeList);
            IsInitialized = true;
        }
Пример #3
0
 private void WaitForThemeList(IThemeListLoader loader)
 {
     State = ShortcutState.WaitingForThemeList;
     loader.ThemeListLoadedEvent += ValidatePathToTarget;
 }