diff --git a/CSharp/Engines/WindowsForms/Libraries/UniversalEditor.UserInterface.WindowsForms/Dialogs/FileSystem/FilePropertiesDialog.cs b/CSharp/Engines/WindowsForms/Libraries/UniversalEditor.UserInterface.WindowsForms/Dialogs/FileSystem/FilePropertiesDialog.cs index 500afa25..670ca426 100644 --- a/CSharp/Engines/WindowsForms/Libraries/UniversalEditor.UserInterface.WindowsForms/Dialogs/FileSystem/FilePropertiesDialog.cs +++ b/CSharp/Engines/WindowsForms/Libraries/UniversalEditor.UserInterface.WindowsForms/Dialogs/FileSystem/FilePropertiesDialog.cs @@ -18,8 +18,15 @@ namespace UniversalEditor.UserInterface.WindowsForms.Dialogs.FileSystem if (dlg == null) dlg = new Internal.FilePropertiesDialogImpl(); if (dlg.IsDisposed) dlg = new Internal.FilePropertiesDialogImpl(); + dlg.txtGeneralInformationLocation.Text = mvarParentFileName; dlg.SelectedObjects = mvarSelectedObjects; return dlg.ShowDialog(); } + + private string mvarParentFileName = String.Empty; + /// + /// The directory or file name of the parent location that contains the file whose properties are to be displayed. + /// + public string ParentFileName { get { return mvarParentFileName; } set { mvarParentFileName = value; } } } } diff --git a/CSharp/Engines/WindowsForms/Libraries/UniversalEditor.UserInterface.WindowsForms/Dialogs/FileSystem/Internal/FilePropertiesDialogImpl.Designer.cs b/CSharp/Engines/WindowsForms/Libraries/UniversalEditor.UserInterface.WindowsForms/Dialogs/FileSystem/Internal/FilePropertiesDialogImpl.Designer.cs index 53de6f5f..43145e0c 100644 --- a/CSharp/Engines/WindowsForms/Libraries/UniversalEditor.UserInterface.WindowsForms/Dialogs/FileSystem/Internal/FilePropertiesDialogImpl.Designer.cs +++ b/CSharp/Engines/WindowsForms/Libraries/UniversalEditor.UserInterface.WindowsForms/Dialogs/FileSystem/Internal/FilePropertiesDialogImpl.Designer.cs @@ -492,7 +492,7 @@ private System.Windows.Forms.CheckBox chkGeneralAttributesHidden; private System.Windows.Forms.CheckBox chkGeneralAttributesReadOnly; private System.Windows.Forms.TextBox txtGeneralInformationDataFormat; - private System.Windows.Forms.TextBox txtGeneralInformationLocation; + internal System.Windows.Forms.TextBox txtGeneralInformationLocation; private System.Windows.Forms.TextBox txtGeneralInformationSize; private System.Windows.Forms.TextBox txtGeneralInformationDateCreated; private System.Windows.Forms.TextBox txtGeneralInformationDateModified; diff --git a/CSharp/Engines/WindowsForms/Libraries/UniversalEditor.UserInterface.WindowsForms/Dialogs/FileSystem/Internal/FilePropertiesDialogImpl.cs b/CSharp/Engines/WindowsForms/Libraries/UniversalEditor.UserInterface.WindowsForms/Dialogs/FileSystem/Internal/FilePropertiesDialogImpl.cs index 5c07c68e..a8c37291 100644 --- a/CSharp/Engines/WindowsForms/Libraries/UniversalEditor.UserInterface.WindowsForms/Dialogs/FileSystem/Internal/FilePropertiesDialogImpl.cs +++ b/CSharp/Engines/WindowsForms/Libraries/UniversalEditor.UserInterface.WindowsForms/Dialogs/FileSystem/Internal/FilePropertiesDialogImpl.cs @@ -46,14 +46,25 @@ namespace UniversalEditor.UserInterface.WindowsForms.Dialogs.FileSystem.Internal string fileLocation = System.IO.Path.GetDirectoryName(file.Name); txtFileName.Text = fileTitle; - txtGeneralInformationLocation.Text = fileLocation; + if (String.IsNullOrEmpty(txtGeneralInformationLocation.Text)) + { + // only set the General - Location value if it has not already been set + txtGeneralInformationLocation.Text = fileLocation; + } Accessors.MemoryAccessor ma = new Accessors.MemoryAccessor(file.GetDataAsByteArray(), file.Name); Association[] assocs = Association.FromCriteria(new AssociationCriteria() { Accessor = ma }); if (assocs.Length > 0) { DataFormatReference dfr = assocs[0].DataFormats[0]; - txtGeneralInformationDataFormat.Text = dfr.Title; + if (assocs[0].Filters.Count > 0) + { + txtGeneralInformationDataFormat.Text = assocs[0].Filters[0].Title; + } + else + { + txtGeneralInformationDataFormat.Text = dfr.Title; + } ObjectModelReference[] omrs = UniversalEditor.Common.Reflection.GetAvailableObjectModels(dfr); if (omrs.Length > 0)