mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Added INotifyPropertyChanged interface and target kind to reference.
This commit is contained in:
@ -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;
|
||||
|
@ -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";
|
||||
}
|
||||
|
Reference in New Issue
Block a user