Added File Properties dialog for FileSystemEditor
This commit is contained in:
parent
adb9d49207
commit
da5d3fcdba
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace UniversalEditor
|
||||
{
|
||||
public abstract class Dialog
|
||||
{
|
||||
public abstract DialogResult ShowDialog();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using UniversalEditor.ObjectModels.FileSystem;
|
||||
|
||||
namespace UniversalEditor.UserInterface.WindowsForms.Dialogs.FileSystem
|
||||
{
|
||||
public class FilePropertiesDialog : Dialog
|
||||
{
|
||||
private Internal.FilePropertiesDialogImpl dlg = null;
|
||||
|
||||
private IFileSystemObjectCollection mvarSelectedObjects = new IFileSystemObjectCollection();
|
||||
public IFileSystemObjectCollection SelectedObjects { get { return mvarSelectedObjects; } }
|
||||
|
||||
public override System.Windows.Forms.DialogResult ShowDialog()
|
||||
{
|
||||
if (dlg == null) dlg = new Internal.FilePropertiesDialogImpl();
|
||||
if (dlg.IsDisposed) dlg = new Internal.FilePropertiesDialogImpl();
|
||||
|
||||
dlg.SelectedObjects = mvarSelectedObjects;
|
||||
return dlg.ShowDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,477 @@
|
||||
namespace UniversalEditor.UserInterface.WindowsForms.Dialogs.FileSystem.Internal
|
||||
{
|
||||
partial class FilePropertiesDialogImpl
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("General");
|
||||
this.tv = new System.Windows.Forms.TreeView();
|
||||
this.pnlGeneral = new System.Windows.Forms.Panel();
|
||||
this.fraGeneralInformation = new System.Windows.Forms.GroupBox();
|
||||
this.txtGeneralInformationSize = new System.Windows.Forms.TextBox();
|
||||
this.lblGeneralInformationSize = new System.Windows.Forms.Label();
|
||||
this.lblGeneralInformationDataFormat = new System.Windows.Forms.Label();
|
||||
this.txtGeneralInformationDataFormat = new System.Windows.Forms.TextBox();
|
||||
this.cmdGeneralInformationDataFormatChange = new System.Windows.Forms.Button();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.lblGeneralInformationDateCreated = new System.Windows.Forms.Label();
|
||||
this.lblGeneralInformationDateModified = new System.Windows.Forms.Label();
|
||||
this.lblGeneralInformationDateAccessed = new System.Windows.Forms.Label();
|
||||
this.txtGeneralInformationDateCreated = new System.Windows.Forms.TextBox();
|
||||
this.txtGeneralInformationDateModified = new System.Windows.Forms.TextBox();
|
||||
this.txtGeneralInformationDateAccessed = new System.Windows.Forms.TextBox();
|
||||
this.txtGeneralInformationLocation = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.fraAttributes = new System.Windows.Forms.GroupBox();
|
||||
this.chkGeneralAttributesArchive = new System.Windows.Forms.CheckBox();
|
||||
this.chkGeneralAttributesHidden = new System.Windows.Forms.CheckBox();
|
||||
this.chkGeneralAttributesReadOnly = new System.Windows.Forms.CheckBox();
|
||||
this.txtFileName = new System.Windows.Forms.TextBox();
|
||||
this.picIcon = new System.Windows.Forms.PictureBox();
|
||||
this.sc = new System.Windows.Forms.SplitContainer();
|
||||
this.cmdCancel = new System.Windows.Forms.Button();
|
||||
this.cmdOK = new System.Windows.Forms.Button();
|
||||
this.pnlNoObjectsSelected = new System.Windows.Forms.Panel();
|
||||
this.lblNoObjectsSelected = new System.Windows.Forms.Label();
|
||||
this.txtGeneralInformationObjectModel = new System.Windows.Forms.TextBox();
|
||||
this.lblGeneralInformationObjectModel = new System.Windows.Forms.Label();
|
||||
this.pnlGeneral.SuspendLayout();
|
||||
this.fraGeneralInformation.SuspendLayout();
|
||||
this.fraAttributes.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picIcon)).BeginInit();
|
||||
this.sc.Panel1.SuspendLayout();
|
||||
this.sc.Panel2.SuspendLayout();
|
||||
this.sc.SuspendLayout();
|
||||
this.pnlNoObjectsSelected.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// tv
|
||||
//
|
||||
this.tv.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tv.HideSelection = false;
|
||||
this.tv.Location = new System.Drawing.Point(0, 0);
|
||||
this.tv.Name = "tv";
|
||||
treeNode2.Name = "nodeGeneral";
|
||||
treeNode2.Text = "General";
|
||||
this.tv.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
|
||||
treeNode2});
|
||||
this.tv.Size = new System.Drawing.Size(127, 362);
|
||||
this.tv.TabIndex = 0;
|
||||
//
|
||||
// pnlGeneral
|
||||
//
|
||||
this.pnlGeneral.Controls.Add(this.fraGeneralInformation);
|
||||
this.pnlGeneral.Controls.Add(this.fraAttributes);
|
||||
this.pnlGeneral.Controls.Add(this.txtFileName);
|
||||
this.pnlGeneral.Controls.Add(this.picIcon);
|
||||
this.pnlGeneral.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.pnlGeneral.Location = new System.Drawing.Point(0, 0);
|
||||
this.pnlGeneral.Name = "pnlGeneral";
|
||||
this.pnlGeneral.Size = new System.Drawing.Size(323, 362);
|
||||
this.pnlGeneral.TabIndex = 0;
|
||||
//
|
||||
// fraGeneralInformation
|
||||
//
|
||||
this.fraGeneralInformation.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.fraGeneralInformation.Controls.Add(this.txtGeneralInformationDateAccessed);
|
||||
this.fraGeneralInformation.Controls.Add(this.lblGeneralInformationDateAccessed);
|
||||
this.fraGeneralInformation.Controls.Add(this.lblGeneralInformationDateModified);
|
||||
this.fraGeneralInformation.Controls.Add(this.txtGeneralInformationDateModified);
|
||||
this.fraGeneralInformation.Controls.Add(this.lblGeneralInformationDateCreated);
|
||||
this.fraGeneralInformation.Controls.Add(this.txtGeneralInformationSize);
|
||||
this.fraGeneralInformation.Controls.Add(this.txtGeneralInformationDateCreated);
|
||||
this.fraGeneralInformation.Controls.Add(this.lblGeneralInformationObjectModel);
|
||||
this.fraGeneralInformation.Controls.Add(this.lblGeneralInformationDataFormat);
|
||||
this.fraGeneralInformation.Controls.Add(this.lblGeneralInformationSize);
|
||||
this.fraGeneralInformation.Controls.Add(this.txtGeneralInformationObjectModel);
|
||||
this.fraGeneralInformation.Controls.Add(this.txtGeneralInformationDataFormat);
|
||||
this.fraGeneralInformation.Controls.Add(this.label2);
|
||||
this.fraGeneralInformation.Controls.Add(this.cmdGeneralInformationDataFormatChange);
|
||||
this.fraGeneralInformation.Controls.Add(this.label3);
|
||||
this.fraGeneralInformation.Controls.Add(this.txtGeneralInformationLocation);
|
||||
this.fraGeneralInformation.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.fraGeneralInformation.Location = new System.Drawing.Point(7, 45);
|
||||
this.fraGeneralInformation.Name = "fraGeneralInformation";
|
||||
this.fraGeneralInformation.Size = new System.Drawing.Size(313, 242);
|
||||
this.fraGeneralInformation.TabIndex = 1;
|
||||
this.fraGeneralInformation.TabStop = false;
|
||||
this.fraGeneralInformation.Text = "Information";
|
||||
//
|
||||
// txtGeneralInformationSize
|
||||
//
|
||||
this.txtGeneralInformationSize.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtGeneralInformationSize.Location = new System.Drawing.Point(101, 126);
|
||||
this.txtGeneralInformationSize.Name = "txtGeneralInformationSize";
|
||||
this.txtGeneralInformationSize.ReadOnly = true;
|
||||
this.txtGeneralInformationSize.Size = new System.Drawing.Size(206, 20);
|
||||
this.txtGeneralInformationSize.TabIndex = 6;
|
||||
//
|
||||
// lblGeneralInformationSize
|
||||
//
|
||||
this.lblGeneralInformationSize.AutoSize = true;
|
||||
this.lblGeneralInformationSize.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.lblGeneralInformationSize.Location = new System.Drawing.Point(13, 129);
|
||||
this.lblGeneralInformationSize.Name = "lblGeneralInformationSize";
|
||||
this.lblGeneralInformationSize.Size = new System.Drawing.Size(30, 13);
|
||||
this.lblGeneralInformationSize.TabIndex = 5;
|
||||
this.lblGeneralInformationSize.Text = "Size:";
|
||||
//
|
||||
// lblGeneralInformationDataFormat
|
||||
//
|
||||
this.lblGeneralInformationDataFormat.AutoSize = true;
|
||||
this.lblGeneralInformationDataFormat.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.lblGeneralInformationDataFormat.Location = new System.Drawing.Point(13, 48);
|
||||
this.lblGeneralInformationDataFormat.Name = "lblGeneralInformationDataFormat";
|
||||
this.lblGeneralInformationDataFormat.Size = new System.Drawing.Size(65, 13);
|
||||
this.lblGeneralInformationDataFormat.TabIndex = 0;
|
||||
this.lblGeneralInformationDataFormat.Text = "Data format:";
|
||||
//
|
||||
// txtGeneralInformationDataFormat
|
||||
//
|
||||
this.txtGeneralInformationDataFormat.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtGeneralInformationDataFormat.Location = new System.Drawing.Point(101, 45);
|
||||
this.txtGeneralInformationDataFormat.Name = "txtGeneralInformationDataFormat";
|
||||
this.txtGeneralInformationDataFormat.ReadOnly = true;
|
||||
this.txtGeneralInformationDataFormat.Size = new System.Drawing.Size(206, 20);
|
||||
this.txtGeneralInformationDataFormat.TabIndex = 1;
|
||||
//
|
||||
// cmdGeneralInformationDataFormatChange
|
||||
//
|
||||
this.cmdGeneralInformationDataFormatChange.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cmdGeneralInformationDataFormatChange.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.cmdGeneralInformationDataFormatChange.Location = new System.Drawing.Point(232, 71);
|
||||
this.cmdGeneralInformationDataFormatChange.Name = "cmdGeneralInformationDataFormatChange";
|
||||
this.cmdGeneralInformationDataFormatChange.Size = new System.Drawing.Size(75, 23);
|
||||
this.cmdGeneralInformationDataFormatChange.TabIndex = 2;
|
||||
this.cmdGeneralInformationDataFormatChange.Text = "&Change...";
|
||||
this.cmdGeneralInformationDataFormatChange.UseVisualStyleBackColor = true;
|
||||
this.cmdGeneralInformationDataFormatChange.Click += new System.EventHandler(this.cmdGeneralInformationDataFormatChange_Click);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.label2.Location = new System.Drawing.Point(13, 103);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(51, 13);
|
||||
this.label2.TabIndex = 3;
|
||||
this.label2.Text = "Location:";
|
||||
//
|
||||
// lblGeneralInformationDateCreated
|
||||
//
|
||||
this.lblGeneralInformationDateCreated.AutoSize = true;
|
||||
this.lblGeneralInformationDateCreated.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.lblGeneralInformationDateCreated.Location = new System.Drawing.Point(13, 163);
|
||||
this.lblGeneralInformationDateCreated.Name = "lblGeneralInformationDateCreated";
|
||||
this.lblGeneralInformationDateCreated.Size = new System.Drawing.Size(72, 13);
|
||||
this.lblGeneralInformationDateCreated.TabIndex = 8;
|
||||
this.lblGeneralInformationDateCreated.Text = "Date created:";
|
||||
//
|
||||
// lblGeneralInformationDateModified
|
||||
//
|
||||
this.lblGeneralInformationDateModified.AutoSize = true;
|
||||
this.lblGeneralInformationDateModified.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.lblGeneralInformationDateModified.Location = new System.Drawing.Point(13, 189);
|
||||
this.lblGeneralInformationDateModified.Name = "lblGeneralInformationDateModified";
|
||||
this.lblGeneralInformationDateModified.Size = new System.Drawing.Size(75, 13);
|
||||
this.lblGeneralInformationDateModified.TabIndex = 10;
|
||||
this.lblGeneralInformationDateModified.Text = "Date modified:";
|
||||
//
|
||||
// lblGeneralInformationDateAccessed
|
||||
//
|
||||
this.lblGeneralInformationDateAccessed.AutoSize = true;
|
||||
this.lblGeneralInformationDateAccessed.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.lblGeneralInformationDateAccessed.Location = new System.Drawing.Point(13, 215);
|
||||
this.lblGeneralInformationDateAccessed.Name = "lblGeneralInformationDateAccessed";
|
||||
this.lblGeneralInformationDateAccessed.Size = new System.Drawing.Size(82, 13);
|
||||
this.lblGeneralInformationDateAccessed.TabIndex = 12;
|
||||
this.lblGeneralInformationDateAccessed.Text = "Date accessed:";
|
||||
//
|
||||
// txtGeneralInformationDateCreated
|
||||
//
|
||||
this.txtGeneralInformationDateCreated.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtGeneralInformationDateCreated.Location = new System.Drawing.Point(101, 160);
|
||||
this.txtGeneralInformationDateCreated.Name = "txtGeneralInformationDateCreated";
|
||||
this.txtGeneralInformationDateCreated.ReadOnly = true;
|
||||
this.txtGeneralInformationDateCreated.Size = new System.Drawing.Size(206, 20);
|
||||
this.txtGeneralInformationDateCreated.TabIndex = 9;
|
||||
//
|
||||
// txtGeneralInformationDateModified
|
||||
//
|
||||
this.txtGeneralInformationDateModified.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtGeneralInformationDateModified.Location = new System.Drawing.Point(101, 186);
|
||||
this.txtGeneralInformationDateModified.Name = "txtGeneralInformationDateModified";
|
||||
this.txtGeneralInformationDateModified.ReadOnly = true;
|
||||
this.txtGeneralInformationDateModified.Size = new System.Drawing.Size(206, 20);
|
||||
this.txtGeneralInformationDateModified.TabIndex = 11;
|
||||
//
|
||||
// txtGeneralInformationDateAccessed
|
||||
//
|
||||
this.txtGeneralInformationDateAccessed.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtGeneralInformationDateAccessed.Location = new System.Drawing.Point(101, 212);
|
||||
this.txtGeneralInformationDateAccessed.Name = "txtGeneralInformationDateAccessed";
|
||||
this.txtGeneralInformationDateAccessed.ReadOnly = true;
|
||||
this.txtGeneralInformationDateAccessed.Size = new System.Drawing.Size(206, 20);
|
||||
this.txtGeneralInformationDateAccessed.TabIndex = 13;
|
||||
//
|
||||
// txtGeneralInformationLocation
|
||||
//
|
||||
this.txtGeneralInformationLocation.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtGeneralInformationLocation.Location = new System.Drawing.Point(101, 100);
|
||||
this.txtGeneralInformationLocation.Name = "txtGeneralInformationLocation";
|
||||
this.txtGeneralInformationLocation.ReadOnly = true;
|
||||
this.txtGeneralInformationLocation.Size = new System.Drawing.Size(206, 20);
|
||||
this.txtGeneralInformationLocation.TabIndex = 4;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.label3.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.label3.Location = new System.Drawing.Point(6, 152);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(301, 2);
|
||||
this.label3.TabIndex = 7;
|
||||
//
|
||||
// fraAttributes
|
||||
//
|
||||
this.fraAttributes.Controls.Add(this.chkGeneralAttributesArchive);
|
||||
this.fraAttributes.Controls.Add(this.chkGeneralAttributesHidden);
|
||||
this.fraAttributes.Controls.Add(this.chkGeneralAttributesReadOnly);
|
||||
this.fraAttributes.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.fraAttributes.Location = new System.Drawing.Point(7, 293);
|
||||
this.fraAttributes.Name = "fraAttributes";
|
||||
this.fraAttributes.Size = new System.Drawing.Size(313, 47);
|
||||
this.fraAttributes.TabIndex = 2;
|
||||
this.fraAttributes.TabStop = false;
|
||||
this.fraAttributes.Text = "Attributes";
|
||||
//
|
||||
// chkGeneralAttributesArchive
|
||||
//
|
||||
this.chkGeneralAttributesArchive.AutoSize = true;
|
||||
this.chkGeneralAttributesArchive.Location = new System.Drawing.Point(162, 19);
|
||||
this.chkGeneralAttributesArchive.Name = "chkGeneralAttributesArchive";
|
||||
this.chkGeneralAttributesArchive.Size = new System.Drawing.Size(62, 17);
|
||||
this.chkGeneralAttributesArchive.TabIndex = 2;
|
||||
this.chkGeneralAttributesArchive.Text = "&Archive";
|
||||
this.chkGeneralAttributesArchive.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkGeneralAttributesHidden
|
||||
//
|
||||
this.chkGeneralAttributesHidden.AutoSize = true;
|
||||
this.chkGeneralAttributesHidden.Location = new System.Drawing.Point(96, 19);
|
||||
this.chkGeneralAttributesHidden.Name = "chkGeneralAttributesHidden";
|
||||
this.chkGeneralAttributesHidden.Size = new System.Drawing.Size(60, 17);
|
||||
this.chkGeneralAttributesHidden.TabIndex = 1;
|
||||
this.chkGeneralAttributesHidden.Text = "&Hidden";
|
||||
this.chkGeneralAttributesHidden.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkGeneralAttributesReadOnly
|
||||
//
|
||||
this.chkGeneralAttributesReadOnly.AutoSize = true;
|
||||
this.chkGeneralAttributesReadOnly.Location = new System.Drawing.Point(16, 19);
|
||||
this.chkGeneralAttributesReadOnly.Name = "chkGeneralAttributesReadOnly";
|
||||
this.chkGeneralAttributesReadOnly.Size = new System.Drawing.Size(74, 17);
|
||||
this.chkGeneralAttributesReadOnly.TabIndex = 0;
|
||||
this.chkGeneralAttributesReadOnly.Text = "&Read-only";
|
||||
this.chkGeneralAttributesReadOnly.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// txtFileName
|
||||
//
|
||||
this.txtFileName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtFileName.Location = new System.Drawing.Point(45, 7);
|
||||
this.txtFileName.Name = "txtFileName";
|
||||
this.txtFileName.Size = new System.Drawing.Size(275, 20);
|
||||
this.txtFileName.TabIndex = 0;
|
||||
//
|
||||
// picIcon
|
||||
//
|
||||
this.picIcon.Location = new System.Drawing.Point(7, 7);
|
||||
this.picIcon.Name = "picIcon";
|
||||
this.picIcon.Size = new System.Drawing.Size(32, 32);
|
||||
this.picIcon.TabIndex = 0;
|
||||
this.picIcon.TabStop = false;
|
||||
//
|
||||
// sc
|
||||
//
|
||||
this.sc.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.sc.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
||||
this.sc.Location = new System.Drawing.Point(12, 12);
|
||||
this.sc.Name = "sc";
|
||||
//
|
||||
// sc.Panel1
|
||||
//
|
||||
this.sc.Panel1.Controls.Add(this.tv);
|
||||
//
|
||||
// sc.Panel2
|
||||
//
|
||||
this.sc.Panel2.Controls.Add(this.pnlGeneral);
|
||||
this.sc.Size = new System.Drawing.Size(454, 362);
|
||||
this.sc.SplitterDistance = 127;
|
||||
this.sc.TabIndex = 0;
|
||||
//
|
||||
// cmdCancel
|
||||
//
|
||||
this.cmdCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cmdCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cmdCancel.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.cmdCancel.Location = new System.Drawing.Point(391, 380);
|
||||
this.cmdCancel.Name = "cmdCancel";
|
||||
this.cmdCancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.cmdCancel.TabIndex = 2;
|
||||
this.cmdCancel.Text = "Cancel";
|
||||
this.cmdCancel.UseVisualStyleBackColor = true;
|
||||
this.cmdCancel.Click += new System.EventHandler(this.cmdCancel_Click);
|
||||
//
|
||||
// cmdOK
|
||||
//
|
||||
this.cmdOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cmdOK.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.cmdOK.Location = new System.Drawing.Point(310, 380);
|
||||
this.cmdOK.Name = "cmdOK";
|
||||
this.cmdOK.Size = new System.Drawing.Size(75, 23);
|
||||
this.cmdOK.TabIndex = 1;
|
||||
this.cmdOK.Text = "OK";
|
||||
this.cmdOK.UseVisualStyleBackColor = true;
|
||||
this.cmdOK.Click += new System.EventHandler(this.cmdOK_Click);
|
||||
//
|
||||
// pnlNoObjectsSelected
|
||||
//
|
||||
this.pnlNoObjectsSelected.Controls.Add(this.lblNoObjectsSelected);
|
||||
this.pnlNoObjectsSelected.Location = new System.Drawing.Point(12, 12);
|
||||
this.pnlNoObjectsSelected.Name = "pnlNoObjectsSelected";
|
||||
this.pnlNoObjectsSelected.Size = new System.Drawing.Size(454, 318);
|
||||
this.pnlNoObjectsSelected.TabIndex = 3;
|
||||
this.pnlNoObjectsSelected.Visible = false;
|
||||
//
|
||||
// lblNoObjectsSelected
|
||||
//
|
||||
this.lblNoObjectsSelected.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.lblNoObjectsSelected.AutoSize = true;
|
||||
this.lblNoObjectsSelected.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.lblNoObjectsSelected.Location = new System.Drawing.Point(184, 153);
|
||||
this.lblNoObjectsSelected.Name = "lblNoObjectsSelected";
|
||||
this.lblNoObjectsSelected.Size = new System.Drawing.Size(87, 13);
|
||||
this.lblNoObjectsSelected.TabIndex = 0;
|
||||
this.lblNoObjectsSelected.Text = "Nothing selected";
|
||||
//
|
||||
// txtGeneralInformationObjectModel
|
||||
//
|
||||
this.txtGeneralInformationObjectModel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtGeneralInformationObjectModel.Location = new System.Drawing.Point(101, 19);
|
||||
this.txtGeneralInformationObjectModel.Name = "txtGeneralInformationObjectModel";
|
||||
this.txtGeneralInformationObjectModel.ReadOnly = true;
|
||||
this.txtGeneralInformationObjectModel.Size = new System.Drawing.Size(206, 20);
|
||||
this.txtGeneralInformationObjectModel.TabIndex = 1;
|
||||
//
|
||||
// lblGeneralInformationObjectModel
|
||||
//
|
||||
this.lblGeneralInformationObjectModel.AutoSize = true;
|
||||
this.lblGeneralInformationObjectModel.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.lblGeneralInformationObjectModel.Location = new System.Drawing.Point(13, 22);
|
||||
this.lblGeneralInformationObjectModel.Name = "lblGeneralInformationObjectModel";
|
||||
this.lblGeneralInformationObjectModel.Size = new System.Drawing.Size(72, 13);
|
||||
this.lblGeneralInformationObjectModel.TabIndex = 0;
|
||||
this.lblGeneralInformationObjectModel.Text = "Object model:";
|
||||
//
|
||||
// FilePropertiesDialogImpl
|
||||
//
|
||||
this.AcceptButton = this.cmdOK;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.cmdCancel;
|
||||
this.ClientSize = new System.Drawing.Size(478, 415);
|
||||
this.Controls.Add(this.cmdOK);
|
||||
this.Controls.Add(this.cmdCancel);
|
||||
this.Controls.Add(this.sc);
|
||||
this.Controls.Add(this.pnlNoObjectsSelected);
|
||||
this.Name = "FilePropertiesDialogImpl";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Properties";
|
||||
this.pnlGeneral.ResumeLayout(false);
|
||||
this.pnlGeneral.PerformLayout();
|
||||
this.fraGeneralInformation.ResumeLayout(false);
|
||||
this.fraGeneralInformation.PerformLayout();
|
||||
this.fraAttributes.ResumeLayout(false);
|
||||
this.fraAttributes.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picIcon)).EndInit();
|
||||
this.sc.Panel1.ResumeLayout(false);
|
||||
this.sc.Panel2.ResumeLayout(false);
|
||||
this.sc.ResumeLayout(false);
|
||||
this.pnlNoObjectsSelected.ResumeLayout(false);
|
||||
this.pnlNoObjectsSelected.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TreeView tv;
|
||||
private System.Windows.Forms.Panel pnlGeneral;
|
||||
private System.Windows.Forms.SplitContainer sc;
|
||||
private System.Windows.Forms.Button cmdCancel;
|
||||
private System.Windows.Forms.Button cmdOK;
|
||||
private System.Windows.Forms.GroupBox fraAttributes;
|
||||
private System.Windows.Forms.GroupBox fraGeneralInformation;
|
||||
private System.Windows.Forms.Label lblGeneralInformationDataFormat;
|
||||
private System.Windows.Forms.Button cmdGeneralInformationDataFormatChange;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label lblGeneralInformationSize;
|
||||
private System.Windows.Forms.Label lblGeneralInformationDateCreated;
|
||||
private System.Windows.Forms.Label lblGeneralInformationDateModified;
|
||||
private System.Windows.Forms.Label lblGeneralInformationDateAccessed;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.TextBox txtFileName;
|
||||
private System.Windows.Forms.PictureBox picIcon;
|
||||
private System.Windows.Forms.CheckBox chkGeneralAttributesArchive;
|
||||
private System.Windows.Forms.CheckBox chkGeneralAttributesHidden;
|
||||
private System.Windows.Forms.CheckBox chkGeneralAttributesReadOnly;
|
||||
private System.Windows.Forms.TextBox txtGeneralInformationDataFormat;
|
||||
private System.Windows.Forms.TextBox txtGeneralInformationLocation;
|
||||
private System.Windows.Forms.TextBox txtGeneralInformationSize;
|
||||
private System.Windows.Forms.TextBox txtGeneralInformationDateCreated;
|
||||
private System.Windows.Forms.TextBox txtGeneralInformationDateModified;
|
||||
private System.Windows.Forms.TextBox txtGeneralInformationDateAccessed;
|
||||
private System.Windows.Forms.Panel pnlNoObjectsSelected;
|
||||
private System.Windows.Forms.Label lblNoObjectsSelected;
|
||||
private System.Windows.Forms.TextBox txtGeneralInformationObjectModel;
|
||||
private System.Windows.Forms.Label lblGeneralInformationObjectModel;
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,128 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using UniversalEditor.ObjectModels.FileSystem;
|
||||
|
||||
namespace UniversalEditor.UserInterface.WindowsForms.Dialogs.FileSystem.Internal
|
||||
{
|
||||
internal partial class FilePropertiesDialogImpl : Form
|
||||
{
|
||||
public FilePropertiesDialogImpl()
|
||||
{
|
||||
InitializeComponent();
|
||||
tv.SelectedNode = tv.Nodes[0];
|
||||
|
||||
Font = SystemFonts.MenuFont;
|
||||
}
|
||||
|
||||
protected override void OnShown(EventArgs e)
|
||||
{
|
||||
base.OnShown(e);
|
||||
|
||||
if (mvarSelectedObjects.Count == 0)
|
||||
{
|
||||
sc.Visible = false;
|
||||
sc.Enabled = false;
|
||||
pnlNoObjectsSelected.Enabled = true;
|
||||
pnlNoObjectsSelected.Visible = true;
|
||||
}
|
||||
else if (mvarSelectedObjects.Count == 1)
|
||||
{
|
||||
pnlNoObjectsSelected.Visible = false;
|
||||
pnlNoObjectsSelected.Enabled = false;
|
||||
sc.Enabled = true;
|
||||
sc.Visible = true;
|
||||
|
||||
IFileSystemObject fso = mvarSelectedObjects[0];
|
||||
if (fso is File)
|
||||
{
|
||||
File file = (fso as File);
|
||||
txtFileName.Text = file.Name;
|
||||
txtGeneralInformationSize.Text = PrettyPrintFileSize(file.Size);
|
||||
}
|
||||
else if (fso is Folder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
else if (mvarSelectedObjects.Count > 1)
|
||||
{
|
||||
pnlNoObjectsSelected.Visible = false;
|
||||
pnlNoObjectsSelected.Enabled = false;
|
||||
sc.Enabled = true;
|
||||
sc.Visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
private string PrettyPrintFileSize(long size)
|
||||
{
|
||||
long KB = 1024;
|
||||
long MB = KB * 1024;
|
||||
long GB = MB * 1024;
|
||||
long TB = GB * 1024;
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (size >= TB)
|
||||
{
|
||||
sb.Append(Math.Round(((decimal)size / TB), 2).ToString() + " TB");
|
||||
}
|
||||
else if (size >= GB)
|
||||
{
|
||||
sb.Append(Math.Round(((decimal)size / TB), 2).ToString() + " GB");
|
||||
}
|
||||
else if (size >= MB)
|
||||
{
|
||||
sb.Append(Math.Round(((decimal)size / MB), 2).ToString() + " MB");
|
||||
}
|
||||
else if (size >= KB)
|
||||
{
|
||||
sb.Append(Math.Round(((decimal)size / KB), 2).ToString() + " KB");
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append(Math.Round((decimal)size, 2).ToString() + " bytes");
|
||||
}
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
private void cmdGeneralInformationDataFormatChange_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void cmdOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (mvarSelectedObjects.Count == 1)
|
||||
{
|
||||
IFileSystemObject fso = mvarSelectedObjects[0];
|
||||
if (fso is File)
|
||||
{
|
||||
File file = (fso as File);
|
||||
file.Name = txtFileName.Text;
|
||||
}
|
||||
}
|
||||
|
||||
this.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void cmdCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private IFileSystemObjectCollection mvarSelectedObjects = new IFileSystemObjectCollection();
|
||||
public IFileSystemObjectCollection SelectedObjects
|
||||
{
|
||||
get { return mvarSelectedObjects; }
|
||||
set
|
||||
{
|
||||
if (value != null) mvarSelectedObjects = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@ -764,7 +764,25 @@ namespace UniversalEditor.UserInterface.WindowsForms.Editors
|
||||
|
||||
private void mnuListViewContextProperties_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (lv.SelectedItems.Count == 0)
|
||||
{
|
||||
|
||||
}
|
||||
else if (lv.SelectedItems.Count == 1)
|
||||
{
|
||||
File file = (lv.SelectedItems[0].Data as File);
|
||||
if (file != null)
|
||||
{
|
||||
Dialogs.FileSystem.FilePropertiesDialog dlg = new Dialogs.FileSystem.FilePropertiesDialog();
|
||||
dlg.SelectedObjects.Add(file);
|
||||
|
||||
if (dlg.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
lv.SelectedItems[0].Text = file.Name;
|
||||
lv.Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void tsbExtract_Click(object sender, EventArgs e)
|
||||
|
||||
@ -58,12 +58,20 @@
|
||||
<Compile Include="Controls\ProgressPanel.Designer.cs">
|
||||
<DependentUpon>ProgressPanel.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Dialog.cs" />
|
||||
<Compile Include="Dialogs\FileSystem\CommentDialog.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Dialogs\FileSystem\CommentDialog.Designer.cs">
|
||||
<DependentUpon>CommentDialog.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Dialogs\FileSystem\FilePropertiesDialog.cs" />
|
||||
<Compile Include="Dialogs\FileSystem\Internal\FilePropertiesDialogImpl.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Dialogs\FileSystem\Internal\FilePropertiesDialogImpl.Designer.cs">
|
||||
<DependentUpon>FilePropertiesDialogImpl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Dialogs\PropertyList\PropertyDetailsDialog.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@ -168,6 +176,9 @@
|
||||
<EmbeddedResource Include="Dialogs\FileSystem\CommentDialog.resx">
|
||||
<DependentUpon>CommentDialog.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Dialogs\FileSystem\Internal\FilePropertiesDialogImpl.resx">
|
||||
<DependentUpon>FilePropertiesDialogImpl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Dialogs\PropertyList\PropertyDetailsDialog.resx">
|
||||
<DependentUpon>PropertyDetailsDialog.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user