Added INotifyPropertyChanged interface and target kind to reference.

This commit is contained in:
2014-09-12 18:22:24 +03:00
parent f0071e552f
commit 0090059531
7 changed files with 204 additions and 51 deletions

View File

@ -210,7 +210,7 @@ namespace RainmeterStudio.UI.Controller
/// </summary>
public bool Save(IDocumentEditor editor)
{
if (editor.AttachedDocument.Reference.IsOnStorage())
if (editor.AttachedDocument.Reference != null)
{
DocumentManager.Save(editor.AttachedDocument);
return true;

View File

@ -33,7 +33,7 @@ namespace RainmeterStudio.UI.Controller
string key = "ProjectItem";
// Is a file?
if (File.Exists(item.StoragePath))
if (item.TargetKind == Reference.ReferenceTargetKind.File || item.TargetKind == Reference.ReferenceTargetKind.Project)
{
if (String.IsNullOrEmpty(Path.GetExtension(item.StoragePath)))
key += "Unknown";
@ -43,7 +43,7 @@ namespace RainmeterStudio.UI.Controller
}
// Not a file, try to figure out if a directory
else if (item.Count > 0 || Directory.Exists(item.StoragePath))
else if (item.TargetKind == Reference.ReferenceTargetKind.Directory)
{
key += "Directory";
}