Added features to FilePropertiesDialog
This commit is contained in:
parent
a523fa737d
commit
6fef5ab680
@ -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;
|
||||
/// <summary>
|
||||
/// The directory or file name of the parent location that contains the file whose properties are to be displayed.
|
||||
/// </summary>
|
||||
public string ParentFileName { get { return mvarParentFileName; } set { mvarParentFileName = value; } }
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user