1 // <copyright file="IoC.cs" company="GRNet">
2 // This project is open source. Released under the XYZ license
7 namespace Pithos.ShellExtensions
10 using Pithos.Interfaces;
11 using System.ComponentModel.Composition;
12 using System.Diagnostics;
16 public class FileContext
19 public IPithosSettings Settings { get; set; }
22 public IStatusChecker StatusChecker { get; set; }
24 public string PithosPath { get { return Settings.PithosPath.ToLower(); } }
34 Trace.Write(String.Format("Managed path is {0}\r\n Current Path is {1}", PithosPath, CurrentFile));
35 return CurrentFolder.StartsWith(PithosPath, true, null);
39 public bool IsFolder { get; set; }
40 private string _currentFolder;
41 public string CurrentFolder
43 get { return _currentFolder; }
46 _currentFolder = value.ToLower();
48 _currentFile = _currentFolder;
52 private string _currentFile;
53 public string CurrentFile
55 get { return _currentFile; }
58 _currentFile = value.ToLower();
59 Trace.Write(String.Format("File is {0}", _currentFile));
60 if (Directory.Exists(_currentFile))
62 _currentFolder = _currentFile;
67 _currentFolder = Path.GetDirectoryName(_currentFile);