From 6bf0e89f219d93f0e31e3d5e91efa628e3e906f2 Mon Sep 17 00:00:00 2001 From: morkt Date: Sat, 26 Jul 2014 23:07:06 +0400 Subject: [PATCH] (DirectoryPosition): added constructor from filename. --- ViewModel.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ViewModel.cs b/ViewModel.cs index 6ec735d3..314c2736 100644 --- a/ViewModel.cs +++ b/ViewModel.cs @@ -292,5 +292,13 @@ namespace GARbro.GUI else ArchivePath = ""; } + + public DirectoryPosition (string filename) + { + Path = System.IO.Path.GetDirectoryName (filename); + ArchivePath = ""; + var entry = FormatCatalog.Instance.CreateEntry (filename); + Item = new EntryViewModel (entry, 0); + } } }