|
From: <fr...@us...> - 2009-10-20 18:06:25
|
Revision: 3130
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=3130&view=rev
Author: framug
Date: 2009-10-20 18:06:06 +0000 (Tue, 20 Oct 2009)
Log Message:
-----------
File Explorer V 1.2
- Add default folder for left and right menus.
- XMP for MPE1.
- Indentation 2 instead of 4.
Modified Paths:
--------------
trunk/plugins/File Explorer/Constants.cs
trunk/plugins/File Explorer/DrivesView.cs
trunk/plugins/File Explorer/Language/strings_de.xml
trunk/plugins/File Explorer/Language/strings_en.xml
trunk/plugins/File Explorer/Language/strings_fr.xml
trunk/plugins/File Explorer/Properties/AssemblyInfo.cs
trunk/plugins/File Explorer/Setup.Designer.cs
trunk/plugins/File Explorer/Setup.cs
trunk/plugins/File Explorer/Setup.resx
Added Paths:
-----------
trunk/plugins/File Explorer/File Explorer.xmp
Modified: trunk/plugins/File Explorer/Constants.cs
===================================================================
--- trunk/plugins/File Explorer/Constants.cs 2009-10-20 10:45:52 UTC (rev 3129)
+++ trunk/plugins/File Explorer/Constants.cs 2009-10-20 18:06:06 UTC (rev 3130)
@@ -27,216 +27,219 @@
namespace FileExplorer
{
- #region enum
- /// <summary>
- /// Enumerations of all Localized Messages
- /// </summary>
- public enum LocalizedMessages
+ #region enum
+ /// <summary>
+ /// Enumerations of all Localized Messages
+ /// </summary>
+ public enum LocalizedMessages
+ {
+ //here begin PlugInInfo region
+ PluginName = 0,
+ SetupFormName = 1,
+ Description = 2,
+ //here begin SetupForm region
+ valueName1 = 3,
+ valueName2 = 4,
+ valueName3 = 5,
+ valueName4 = 6,
+ valueName5 = 7,
+ valueDescription1 = 8,
+ valueDescription2 = 9,
+ valueDescription3 = 10,
+ valueDescription4 = 11,
+ valueDescription5 = 12,
+ Apply = 13,
+ Cancel = 14,
+ //here begin Exception region
+ Exception = 15,
+ Unknown = 16,
+ Denied = 17,
+ Compress1 = 18,
+ Compress2 = 19,
+ Cantread1 = 20,
+ Cantread2 = 21,
+ //here begin Dialog region
+ CreateAudio = 22,
+ AddFile = 23,
+ Path = 24,
+ Compress = 25,
+ CompressFile = 26,
+ Copy = 27,
+ File = 28,
+ To = 29,
+ Decrypt = 30,
+ Delete = 31,
+ Encrypt = 32,
+ Hide = 33,
+ Move = 34,
+ SetReadOnly = 35,
+ RemoveReadOnly = 36,
+ Uncompress = 37,
+ Unhide = 38,
+ CreateVideo = 39,
+ AddAudio = 40,
+ ReadFile = 41,
+ AddVideo = 42,
+ //here begin Skin region
+ MenuLeft = 43,
+ MenuRight = 44,
+ //here begin View region
+ Folder = 45,
+ CD = 46,
+ HDD = 47,
+ RamDisk = 48,
+ Network = 49,
+ Removeable = 50,
+ Menu = 51,
+ SelectDrive = 52,
+ Rename = 53,
+ CreateDir = 54,
+ Encrypt2 = 55,
+ Compress3 = 56,
+ HideUnhide = 57,
+ AddReadOnly = 58,
+ CreateAudioDir = 59,
+ CreateVideoDir = 60,
+ CreateAudioSel = 61,
+ CreateVideoSel = 62,
+ AddAudioSel = 63,
+ AddVideoSel = 64,
+ SelectAll = 65,
+ DisableSel = 66,
+ DisableSelMode = 67,
+ EnableSelMode = 68,
+ FilePreview = 69,
+ NoPreview = 70,
+ OpenText = 71,
+ Attributes = 72,
+ Hidden = 73,
+ ReadOnly = 74,
+ SystemFile = 75,
+ Compressed = 76,
+ Encrypted = 77,
+ None = 78,
+ Created = 79,
+ Accessed = 80,
+ Written = 81,
+ SystemDir = 82,
+ //here begin Operation region
+ CopyFile = 83,
+ From = 84,
+ CopyDir = 85,
+ CopyingFile = 86,
+ TheFile = 87,
+ AlreadyExist = 88,
+ Overwrite = 89,
+ MoveFile = 90,
+ MoveDir = 91,
+ MovingFile = 92,
+ MovingDir = 93,
+ TheDir = 94,
+ DeleteDir = 95,
+ WantDelete = 96,
+ AfterDelete = 97,
+ DeleteFile = 98,
+ Error = 99,
+ CantRenameDir = 100,
+ CantRenameFile = 101,
+ NewFolder = 102,
+ CantCreateDir = 103,
+ EncryptDecrypt = 104,
+ ChangeEncrypt = 105,
+ AllSubdir = 106,
+ CurrentFolder = 107,
+ ChangeCompress = 108,
+ HideUnhideSelect = 109,
+ HideSelect = 110,
+ UnhideSelect = 111,
+ ChangeHide = 112,
+ SetRemoveFlags = 113,
+ SetFlags = 114,
+ RemoveFlags = 115,
+ SetRemoveFlag = 116,
+ ChangeFlag = 117,
+ //here begin Playlist region
+ NewAudioPlaylist = 118,
+ IncludeAudioFiles = 119,
+ CurrentFolderSubdir = 120,
+ NoAudioFilesFound = 121,
+ NewVideoPlaylist = 122,
+ IncludeVideoFiles = 123,
+ NoVideoFilesFound = 124,
+ NoPlaylist = 125,
+ NoPlaylistDir = 126,
+ SelectPlaylist = 127,
+ DefaultFolderLeft = 128,
+ DefaultFolderRight = 129,
+ Browse = 130
+
+ }
+ #endregion
+
+ /// <summary>
+ /// Description of Constants.
+ /// </summary>
+ public static class Constants
+ {
+ #region PlugIn Info constants
+ public struct PlugInInfo
{
- //here begin PlugInInfo region
- PluginName = 0,
- SetupFormName = 1,
- Description = 2,
- //here begin SetupForm region
- valueName1 = 3,
- valueName2 = 4,
- valueName3 = 5,
- valueName4 = 6,
- valueName5 = 7,
- valueDescription1 = 8,
- valueDescription2 = 9,
- valueDescription3 = 10,
- valueDescription4 = 11,
- valueDescription5 = 12,
- Apply = 13,
- Cancel = 14,
- //here begin Exception region
- Exception = 15,
- Unknown = 16,
- Denied = 17,
- Compress1 = 18,
- Compress2 = 19,
- Cantread1 = 20,
- Cantread2 = 21,
- //here begin Dialog region
- CreateAudio = 22,
- AddFile = 23,
- Path = 24,
- Compress = 25,
- CompressFile = 26,
- Copy = 27,
- File = 28,
- To = 29,
- Decrypt = 30,
- Delete = 31,
- Encrypt = 32,
- Hide = 33,
- Move = 34,
- SetReadOnly = 35,
- RemoveReadOnly = 36,
- Uncompress = 37,
- Unhide = 38,
- CreateVideo = 39,
- AddAudio = 40,
- ReadFile = 41,
- AddVideo = 42,
- //here begin Skin region
- MenuLeft = 43,
- MenuRight = 44,
- //here begin View region
- Folder = 45,
- CD = 46,
- HDD = 47,
- RamDisk = 48,
- Network = 49,
- Removeable = 50,
- Menu = 51,
- SelectDrive = 52,
- Rename = 53,
- CreateDir = 54,
- Encrypt2 = 55,
- Compress3 = 56,
- HideUnhide = 57,
- AddReadOnly = 58,
- CreateAudioDir = 59,
- CreateVideoDir = 60,
- CreateAudioSel = 61,
- CreateVideoSel = 62,
- AddAudioSel = 63,
- AddVideoSel = 64,
- SelectAll = 65,
- DisableSel = 66,
- DisableSelMode = 67,
- EnableSelMode = 68,
- FilePreview = 69,
- NoPreview = 70,
- OpenText = 71,
- Attributes = 72,
- Hidden = 73,
- ReadOnly = 74,
- SystemFile = 75,
- Compressed = 76,
- Encrypted = 77,
- None = 78,
- Created = 79,
- Accessed = 80,
- Written = 81,
- SystemDir = 82,
- //here begin Operation region
- CopyFile = 83,
- From = 84,
- CopyDir = 85,
- CopyingFile = 86,
- TheFile = 87,
- AlreadyExist = 88,
- Overwrite = 89,
- MoveFile = 90,
- MoveDir = 91,
- MovingFile = 92,
- MovingDir = 93,
- TheDir = 94,
- DeleteDir = 95,
- WantDelete = 96,
- AfterDelete = 97,
- DeleteFile = 98,
- Error = 99,
- CantRenameDir = 100,
- CantRenameFile = 101,
- NewFolder = 102,
- CantCreateDir = 103,
- EncryptDecrypt = 104,
- ChangeEncrypt = 105,
- AllSubdir = 106,
- CurrentFolder = 107,
- ChangeCompress = 108,
- HideUnhideSelect = 109,
- HideSelect = 110,
- UnhideSelect = 111,
- ChangeHide = 112,
- SetRemoveFlags = 113,
- SetFlags = 114,
- RemoveFlags = 115,
- SetRemoveFlag = 116,
- ChangeFlag = 117,
- //here begin Playlist region
- NewAudioPlaylist = 118,
- IncludeAudioFiles = 119,
- CurrentFolderSubdir = 120,
- NoAudioFilesFound = 121,
- NewVideoPlaylist = 122,
- IncludeVideoFiles = 123,
- NoVideoFilesFound = 124,
- NoPlaylist = 125,
- NoPlaylistDir = 126,
- SelectPlaylist = 127
+ /// <summary>
+ /// Name of PlugIn.
+ /// </summary>
+ // public static readonly string NAME = "File Explorer";
+ public static readonly string NAME = LocalizeStrings.Get((int)LocalizedMessages.PluginName);
- }
+ /// <summary>
+ /// Description of PlugIn.
+ /// </summary>
+ // public static readonly string DESCRIPTION = "File Explorer";
+ public static readonly string DESCRIPTION = LocalizeStrings.Get((int)LocalizedMessages.Description);
+
+ public static readonly string SETUPFORMNAME = LocalizeStrings.Get((int)LocalizedMessages.SetupFormName);
+
+ /// <summary>
+ /// Author of PlugIn.
+ /// </summary>
+ public static readonly string AUTHOR = "Andreas Groß, framug, -ltb- (gfx)";
+ }
#endregion
- /// <summary>
- /// Description of Constants.
- /// </summary>
- public static class Constants
- {
- #region PlugIn Info constants
- public struct PlugInInfo
- {
- /// <summary>
- /// Name of PlugIn.
- /// </summary>
-// public static readonly string NAME = "File Explorer";
- public static readonly string NAME = LocalizeStrings.Get((int)LocalizedMessages.PluginName);
+ #region Window IDs
+ public struct WindowIDs
+ {
+ /// <summary>
+ /// The main windows id.
+ /// </summary>
+ public static readonly int MAIN = 557311;
+ public static readonly int TEXTVIEWER = 557312;
+ public static readonly int MUSICVIEWER = 557313;
+ public static readonly int STREAMINGVIEWER = 557314;
+ public static readonly int PICTUREVIEWER = 557315;
+ public static readonly int DIALOGOPERATION = 557316;
+ }
+ #endregion
- /// <summary>
- /// Description of PlugIn.
- /// </summary>
-// public static readonly string DESCRIPTION = "File Explorer";
- public static readonly string DESCRIPTION = LocalizeStrings.Get((int)LocalizedMessages.Description);
+ #region ControlIDs
+ public struct ControlIDs
+ {
+ public static readonly int LISTBOX_LEFT = 3;
+ public static readonly int LISTBOX_RIGHT = 4;
+ }
+ #endregion
- public static readonly string SETUPFORMNAME = LocalizeStrings.Get((int)LocalizedMessages.SetupFormName);
-
- /// <summary>
- /// Author of PlugIn.
- /// </summary>
- public static readonly string AUTHOR = "Andreas Groß, framug, -ltb- (gfx)";
- }
- #endregion
-
- #region Window IDs
- public struct WindowIDs
- {
- /// <summary>
- /// The main windows id.
- /// </summary>
- public static readonly int MAIN = 557311;
- public static readonly int TEXTVIEWER = 557312;
- public static readonly int MUSICVIEWER = 557313;
- public static readonly int STREAMINGVIEWER = 557314;
- public static readonly int PICTUREVIEWER = 557315;
- public static readonly int DIALOGOPERATION = 557316;
- }
- #endregion
-
- #region ControlIDs
- public struct ControlIDs
- {
- public static readonly int LISTBOX_LEFT = 3;
- public static readonly int LISTBOX_RIGHT = 4;
- }
- #endregion
-
- #region SetupForm
- public struct SetupForm
- {
- public static readonly string[] valueNames =
+ #region SetupForm
+ public struct SetupForm
+ {
+ public static readonly string[] valueNames =
// {"Extensions", "Trashbin", "AllFiles", "SystemFiles", "SystemDirs"};
{
LocalizeStrings.Get((int)LocalizedMessages.valueName1), LocalizeStrings.Get((int)LocalizedMessages.valueName2),
LocalizeStrings.Get((int)LocalizedMessages.valueName3), LocalizeStrings.Get((int)LocalizedMessages.valueName4),
LocalizeStrings.Get((int)LocalizedMessages.valueName5)
};
-
- public static readonly string[] valueDescriptions =
+
+ public static readonly string[] valueDescriptions =
// {"Show file extensions", "Copy files to trashcan instead of deleting them",
// "Show all files", "Show system files", "Show system directories" };
{
@@ -244,179 +247,184 @@
LocalizeStrings.Get((int)LocalizedMessages.valueDescription3), LocalizeStrings.Get((int)LocalizedMessages.valueDescription4),
LocalizeStrings.Get((int)LocalizedMessages.valueDescription5)
};
- public static readonly string APPLY = LocalizeStrings.Get((int)LocalizedMessages.Apply);
- public static readonly string CANCEL = LocalizeStrings.Get((int)LocalizedMessages.Cancel);
-
- public static readonly bool[] valueStandards = {true, true, false, false, false};
- }
- #endregion
-
- #region DriveTypes
- public struct DriveTypes
- {
- public static readonly int REMOVEABLE = 2;
- public static readonly int FIXED = 3;
- public static readonly int REMOTEDISK = 4;
- public static readonly int CD_DVD = 5;
- public static readonly int RAMDISK = 6;
- }
- #endregion
-
- #region ViewerExtensions
- public struct ViewerExtensions
- {
- public static readonly string[] TextPreviewExtensions = {".txt", ".ini", ".inf", ".bat", ".cs", ".cpp", ".xml", ".h", ".hpp", ".bas", ".vb", ".asm"};
- }
- #endregion
+ public static readonly string DEFAULTFOLDERLEFT = LocalizeStrings.Get((int)LocalizedMessages.DefaultFolderLeft);
+ public static readonly string DEFAULTFOLDERRIGHT = LocalizeStrings.Get((int)LocalizedMessages.DefaultFolderRight);
+ public static readonly string BROWSE = LocalizeStrings.Get((int)LocalizedMessages.Browse);
- #region Exceptions
- public struct Exceptions
- {
- public static readonly string EXCEPTION = LocalizeStrings.Get((int)LocalizedMessages.Exception);
- public static readonly string UNKNOWN = LocalizeStrings.Get((int)LocalizedMessages.Unknown);
- public static readonly string DENIED = LocalizeStrings.Get((int)LocalizedMessages.Denied);
- public static readonly string COMPRESS1 = LocalizeStrings.Get((int)LocalizedMessages.Compress1);
- public static readonly string COMPRESS2 = LocalizeStrings.Get((int)LocalizedMessages.Compress2);
- public static readonly string CANTREAD1 = LocalizeStrings.Get((int)LocalizedMessages.Cantread1);
- public static readonly string CANTREAD2 = LocalizeStrings.Get((int)LocalizedMessages.Cantread2);
- }
- #endregion
+ public static readonly string APPLY = LocalizeStrings.Get((int)LocalizedMessages.Apply);
+ public static readonly string CANCEL = LocalizeStrings.Get((int)LocalizedMessages.Cancel);
- #region Dialog
- public struct Dialog
- {
- public static readonly string CREATEAUDIO = LocalizeStrings.Get((int)LocalizedMessages.CreateAudio);
- public static readonly string ADDFILE = LocalizeStrings.Get((int)LocalizedMessages.AddFile);
- public static readonly string PATH = LocalizeStrings.Get((int)LocalizedMessages.Path);
- public static readonly string COMPRESS = LocalizeStrings.Get((int)LocalizedMessages.Compress);
- public static readonly string COMPRESSFILE = LocalizeStrings.Get((int)LocalizedMessages.CompressFile);
- public static readonly string COPY = LocalizeStrings.Get((int)LocalizedMessages.Copy);
- public static readonly string FILE = LocalizeStrings.Get((int)LocalizedMessages.File);
- public static readonly string TO = LocalizeStrings.Get((int)LocalizedMessages.To);
- public static readonly string DECRYPT = LocalizeStrings.Get((int)LocalizedMessages.Decrypt);
- public static readonly string DELETE = LocalizeStrings.Get((int)LocalizedMessages.Delete);
- public static readonly string ENCRYPT = LocalizeStrings.Get((int)LocalizedMessages.Encrypt);
- public static readonly string HIDE = LocalizeStrings.Get((int)LocalizedMessages.Hide);
- public static readonly string MOVE = LocalizeStrings.Get((int)LocalizedMessages.Move);
- public static readonly string SETREADONLY = LocalizeStrings.Get((int)LocalizedMessages.SetReadOnly);
- public static readonly string REMOVEREADONLY = LocalizeStrings.Get((int)LocalizedMessages.RemoveReadOnly);
- public static readonly string UNCOMPRESS = LocalizeStrings.Get((int)LocalizedMessages.Uncompress);
- public static readonly string UNHIDE = LocalizeStrings.Get((int)LocalizedMessages.Unhide);
- public static readonly string CREATEVIDEO = LocalizeStrings.Get((int)LocalizedMessages.CreateVideo);
- public static readonly string ADDAUDIO = LocalizeStrings.Get((int)LocalizedMessages.AddAudio);
- public static readonly string READFILE = LocalizeStrings.Get((int)LocalizedMessages.ReadFile);
- public static readonly string ADDVIDEO = LocalizeStrings.Get((int)LocalizedMessages.AddVideo);
- }
- #endregion
+ public static readonly bool[] valueStandards = { true, true, false, false, false };
- #region Skin
- public struct Skin
- {
- public static readonly string MENULEFT = LocalizeStrings.Get((int)LocalizedMessages.MenuLeft);
- public static readonly string MENURIGHT = LocalizeStrings.Get((int)LocalizedMessages.MenuRight);
- }
- #endregion
+ }
+ #endregion
- #region View
- public struct View
- {
- public static readonly string FOLDER = LocalizeStrings.Get((int)LocalizedMessages.Folder);
- public static readonly string CD = LocalizeStrings.Get((int)LocalizedMessages.CD);
- public static readonly string HDD = LocalizeStrings.Get((int)LocalizedMessages.HDD);
- public static readonly string RAMDISK = LocalizeStrings.Get((int)LocalizedMessages.RamDisk);
- public static readonly string NETWORK = LocalizeStrings.Get((int)LocalizedMessages.Network);
- public static readonly string REMOVEABLE = LocalizeStrings.Get((int)LocalizedMessages.Removeable);
- public static readonly string MENU = LocalizeStrings.Get((int)LocalizedMessages.Menu);
- public static readonly string SELECTDRIVE = LocalizeStrings.Get((int)LocalizedMessages.SelectDrive);
- public static readonly string RENAME = LocalizeStrings.Get((int)LocalizedMessages.Rename);
- public static readonly string CREATEDIR = LocalizeStrings.Get((int)LocalizedMessages.CreateDir);
- public static readonly string ENCRYPT2 = LocalizeStrings.Get((int)LocalizedMessages.Encrypt2);
- public static readonly string COMPRESS3 = LocalizeStrings.Get((int)LocalizedMessages.Compress3);
- public static readonly string HIDEUNHIDE = LocalizeStrings.Get((int)LocalizedMessages.HideUnhide);
- public static readonly string ADDREADONLY = LocalizeStrings.Get((int)LocalizedMessages.AddReadOnly);
- public static readonly string CREATEAUDIODIR = LocalizeStrings.Get((int)LocalizedMessages.CreateAudioDir);
- public static readonly string CREATEVIDEODIR = LocalizeStrings.Get((int)LocalizedMessages.CreateVideoDir);
- public static readonly string CREATEAUDIOSEL = LocalizeStrings.Get((int)LocalizedMessages.CreateAudioSel);
- public static readonly string CREATEVIDEOSEL = LocalizeStrings.Get((int)LocalizedMessages.CreateVideoSel);
- public static readonly string ADDAUDIOSEL = LocalizeStrings.Get((int)LocalizedMessages.AddAudioSel);
- public static readonly string ADDVIDEOSEL = LocalizeStrings.Get((int)LocalizedMessages.AddVideoSel);
- public static readonly string SELECTALL = LocalizeStrings.Get((int)LocalizedMessages.SelectAll);
- public static readonly string DISABLESEL = LocalizeStrings.Get((int)LocalizedMessages.DisableSel);
- public static readonly string DISABLESELMODE = LocalizeStrings.Get((int)LocalizedMessages.DisableSelMode);
- public static readonly string ENABLESELMODE = LocalizeStrings.Get((int)LocalizedMessages.EnableSelMode);
- public static readonly string FILEPREVIEW = LocalizeStrings.Get((int)LocalizedMessages.FilePreview);
- public static readonly string NOPREVIEW = LocalizeStrings.Get((int)LocalizedMessages.NoPreview);
- public static readonly string OPENTEXT = LocalizeStrings.Get((int)LocalizedMessages.OpenText);
- public static readonly string ATTRIBUTES = LocalizeStrings.Get((int)LocalizedMessages.Attributes);
- public static readonly string HIDDEN = LocalizeStrings.Get((int)LocalizedMessages.Hidden);
- public static readonly string READONLY = LocalizeStrings.Get((int)LocalizedMessages.ReadOnly);
- public static readonly string SYSTEMFILE = LocalizeStrings.Get((int)LocalizedMessages.SystemFile);
- public static readonly string COMPRESSED = LocalizeStrings.Get((int)LocalizedMessages.Compressed);
- public static readonly string ENCRYPTED = LocalizeStrings.Get((int)LocalizedMessages.Encrypted);
- public static readonly string NONE = LocalizeStrings.Get((int)LocalizedMessages.None);
- public static readonly string CREATED = LocalizeStrings.Get((int)LocalizedMessages.Created);
- public static readonly string ACCESSED = LocalizeStrings.Get((int)LocalizedMessages.Accessed);
- public static readonly string WRITTEN = LocalizeStrings.Get((int)LocalizedMessages.Written);
- public static readonly string SYSTEMDIR = LocalizeStrings.Get((int)LocalizedMessages.SystemDir);
- }
- #endregion
+ #region DriveTypes
+ public struct DriveTypes
+ {
+ public static readonly int REMOVEABLE = 2;
+ public static readonly int FIXED = 3;
+ public static readonly int REMOTEDISK = 4;
+ public static readonly int CD_DVD = 5;
+ public static readonly int RAMDISK = 6;
+ }
+ #endregion
- #region Operation
- public struct Operation
- {
- public static readonly string COPYFILE = LocalizeStrings.Get((int)LocalizedMessages.CopyFile);
- public static readonly string FROM = LocalizeStrings.Get((int)LocalizedMessages.From);
- public static readonly string COPYDIR = LocalizeStrings.Get((int)LocalizedMessages.CopyDir);
- public static readonly string COPYINGFILE = LocalizeStrings.Get((int)LocalizedMessages.CopyingFile);
- public static readonly string THEFILE = LocalizeStrings.Get((int)LocalizedMessages.TheFile);
- public static readonly string ALREADYEXIST = LocalizeStrings.Get((int)LocalizedMessages.AlreadyExist);
- public static readonly string OVERWRITE = LocalizeStrings.Get((int)LocalizedMessages.Overwrite);
- public static readonly string MOVEFILE = LocalizeStrings.Get((int)LocalizedMessages.MoveFile);
- public static readonly string MOVEDIR = LocalizeStrings.Get((int)LocalizedMessages.MoveDir);
- public static readonly string MOVINGFILE = LocalizeStrings.Get((int)LocalizedMessages.MovingFile);
- public static readonly string MOVINGDIR = LocalizeStrings.Get((int)LocalizedMessages.MovingDir);
- public static readonly string THEDIR = LocalizeStrings.Get((int)LocalizedMessages.TheDir);
- public static readonly string DELETEDIR = LocalizeStrings.Get((int)LocalizedMessages.DeleteDir);
- public static readonly string WANTDELETE = LocalizeStrings.Get((int)LocalizedMessages.WantDelete);
- public static readonly string AFTERDELETE = LocalizeStrings.Get((int)LocalizedMessages.AfterDelete);
- public static readonly string DELETEFILE = LocalizeStrings.Get((int)LocalizedMessages.DeleteFile);
- public static readonly string ERROR = LocalizeStrings.Get((int)LocalizedMessages.Error);
- public static readonly string CANTRENAMEDIR = LocalizeStrings.Get((int)LocalizedMessages.CantRenameDir);
- public static readonly string CANTRENAMEFILE = LocalizeStrings.Get((int)LocalizedMessages.CantRenameFile);
- public static readonly string NEWFOLDER = LocalizeStrings.Get((int)LocalizedMessages.NewFolder);
- public static readonly string CANTCREATEDIR = LocalizeStrings.Get((int)LocalizedMessages.CantCreateDir);
- public static readonly string ENCRYPTDECRYPT = LocalizeStrings.Get((int)LocalizedMessages.EncryptDecrypt);
- public static readonly string CHANGEENCRYPT = LocalizeStrings.Get((int)LocalizedMessages.ChangeEncrypt);
- public static readonly string ALLSUBDIR = LocalizeStrings.Get((int)LocalizedMessages.AllSubdir);
- public static readonly string CURRENTFOLDER = LocalizeStrings.Get((int)LocalizedMessages.CurrentFolder);
- public static readonly string CHANGECOMPRESS = LocalizeStrings.Get((int)LocalizedMessages.ChangeCompress);
- public static readonly string HIDEUNHIDESELECT = LocalizeStrings.Get((int)LocalizedMessages.HideUnhideSelect);
- public static readonly string HIDESELECT = LocalizeStrings.Get((int)LocalizedMessages.HideSelect);
- public static readonly string UNHIDESELECT = LocalizeStrings.Get((int)LocalizedMessages.UnhideSelect);
- public static readonly string CHANGEHIDE = LocalizeStrings.Get((int)LocalizedMessages.ChangeHide);
- public static readonly string SETREMOVEFLAGS = LocalizeStrings.Get((int)LocalizedMessages.SetRemoveFlags);
- public static readonly string SETFLAGS = LocalizeStrings.Get((int)LocalizedMessages.SetFlags);
- public static readonly string REMOVEFLAGS = LocalizeStrings.Get((int)LocalizedMessages.RemoveFlags);
- public static readonly string SETREMOVEFLAG = LocalizeStrings.Get((int)LocalizedMessages.SetRemoveFlag);
- public static readonly string CHANGEFLAG = LocalizeStrings.Get((int)LocalizedMessages.ChangeFlag);
- }
- #endregion
-
- #region Playlist
- public struct Playlist
- {
- public static readonly string NEWAUDIOPLAYLIST = LocalizeStrings.Get((int)LocalizedMessages.NewAudioPlaylist);
- public static readonly string INCLUDEAUDIOFILES = LocalizeStrings.Get((int)LocalizedMessages.IncludeAudioFiles);
- public static readonly string CURRENTFOLDERSUBDIR = LocalizeStrings.Get((int)LocalizedMessages.CurrentFolderSubdir);
- public static readonly string NOAUDIOFILESFOUND = LocalizeStrings.Get((int)LocalizedMessages.NoAudioFilesFound);
- public static readonly string NEWVIDEOPLAYLIST = LocalizeStrings.Get((int)LocalizedMessages.NewVideoPlaylist);
- public static readonly string INCLUDEVIDEOFILES = LocalizeStrings.Get((int)LocalizedMessages.IncludeVideoFiles);
- public static readonly string NOVIDEOFILESFOUND = LocalizeStrings.Get((int)LocalizedMessages.NoVideoFilesFound);
- public static readonly string NOPLAYLIST = LocalizeStrings.Get((int)LocalizedMessages.NoPlaylist);
- public static readonly string NOPLAYLISTDIR = LocalizeStrings.Get((int)LocalizedMessages.NoPlaylistDir);
- public static readonly string SELECTPLAYLIST = LocalizeStrings.Get((int)LocalizedMessages.SelectPlaylist);
- }
- #endregion
+ #region ViewerExtensions
+ public struct ViewerExtensions
+ {
+ public static readonly string[] TextPreviewExtensions = { ".txt", ".ini", ".inf", ".bat", ".cs", ".cpp", ".xml", ".h", ".hpp", ".bas", ".vb", ".asm" };
}
+ #endregion
+
+ #region Exceptions
+ public struct Exceptions
+ {
+ public static readonly string EXCEPTION = LocalizeStrings.Get((int)LocalizedMessages.Exception);
+ public static readonly string UNKNOWN = LocalizeStrings.Get((int)LocalizedMessages.Unknown);
+ public static readonly string DENIED = LocalizeStrings.Get((int)LocalizedMessages.Denied);
+ public static readonly string COMPRESS1 = LocalizeStrings.Get((int)LocalizedMessages.Compress1);
+ public static readonly string COMPRESS2 = LocalizeStrings.Get((int)LocalizedMessages.Compress2);
+ public static readonly string CANTREAD1 = LocalizeStrings.Get((int)LocalizedMessages.Cantread1);
+ public static readonly string CANTREAD2 = LocalizeStrings.Get((int)LocalizedMessages.Cantread2);
+ }
+ #endregion
+
+ #region Dialog
+ public struct Dialog
+ {
+ public static readonly string CREATEAUDIO = LocalizeStrings.Get((int)LocalizedMessages.CreateAudio);
+ public static readonly string ADDFILE = LocalizeStrings.Get((int)LocalizedMessages.AddFile);
+ public static readonly string PATH = LocalizeStrings.Get((int)LocalizedMessages.Path);
+ public static readonly string COMPRESS = LocalizeStrings.Get((int)LocalizedMessages.Compress);
+ public static readonly string COMPRESSFILE = LocalizeStrings.Get((int)LocalizedMessages.CompressFile);
+ public static readonly string COPY = LocalizeStrings.Get((int)LocalizedMessages.Copy);
+ public static readonly string FILE = LocalizeStrings.Get((int)LocalizedMessages.File);
+ public static readonly string TO = LocalizeStrings.Get((int)LocalizedMessages.To);
+ public static readonly string DECRYPT = LocalizeStrings.Get((int)LocalizedMessages.Decrypt);
+ public static readonly string DELETE = LocalizeStrings.Get((int)LocalizedMessages.Delete);
+ public static readonly string ENCRYPT = LocalizeStrings.Get((int)LocalizedMessages.Encrypt);
+ public static readonly string HIDE = LocalizeStrings.Get((int)LocalizedMessages.Hide);
+ public static readonly string MOVE = LocalizeStrings.Get((int)LocalizedMessages.Move);
+ public static readonly string SETREADONLY = LocalizeStrings.Get((int)LocalizedMessages.SetReadOnly);
+ public static readonly string REMOVEREADONLY = LocalizeStrings.Get((int)LocalizedMessages.RemoveReadOnly);
+ public static readonly string UNCOMPRESS = LocalizeStrings.Get((int)LocalizedMessages.Uncompress);
+ public static readonly string UNHIDE = LocalizeStrings.Get((int)LocalizedMessages.Unhide);
+ public static readonly string CREATEVIDEO = LocalizeStrings.Get((int)LocalizedMessages.CreateVideo);
+ public static readonly string ADDAUDIO = LocalizeStrings.Get((int)LocalizedMessages.AddAudio);
+ public static readonly string READFILE = LocalizeStrings.Get((int)LocalizedMessages.ReadFile);
+ public static readonly string ADDVIDEO = LocalizeStrings.Get((int)LocalizedMessages.AddVideo);
+ }
+ #endregion
+
+ #region Skin
+ public struct Skin
+ {
+ public static readonly string MENULEFT = LocalizeStrings.Get((int)LocalizedMessages.MenuLeft);
+ public static readonly string MENURIGHT = LocalizeStrings.Get((int)LocalizedMessages.MenuRight);
+ }
+ #endregion
+
+ #region View
+ public struct View
+ {
+ public static readonly string FOLDER = LocalizeStrings.Get((int)LocalizedMessages.Folder);
+ public static readonly string CD = LocalizeStrings.Get((int)LocalizedMessages.CD);
+ public static readonly string HDD = LocalizeStrings.Get((int)LocalizedMessages.HDD);
+ public static readonly string RAMDISK = LocalizeStrings.Get((int)LocalizedMessages.RamDisk);
+ public static readonly string NETWORK = LocalizeStrings.Get((int)LocalizedMessages.Network);
+ public static readonly string REMOVEABLE = LocalizeStrings.Get((int)LocalizedMessages.Removeable);
+ public static readonly string MENU = LocalizeStrings.Get((int)LocalizedMessages.Menu);
+ public static readonly string SELECTDRIVE = LocalizeStrings.Get((int)LocalizedMessages.SelectDrive);
+ public static readonly string RENAME = LocalizeStrings.Get((int)LocalizedMessages.Rename);
+ public static readonly string CREATEDIR = LocalizeStrings.Get((int)LocalizedMessages.CreateDir);
+ public static readonly string ENCRYPT2 = LocalizeStrings.Get((int)LocalizedMessages.Encrypt2);
+ public static readonly string COMPRESS3 = LocalizeStrings.Get((int)LocalizedMessages.Compress3);
+ public static readonly string HIDEUNHIDE = LocalizeStrings.Get((int)LocalizedMessages.HideUnhide);
+ public static readonly string ADDREADONLY = LocalizeStrings.Get((int)LocalizedMessages.AddReadOnly);
+ public static readonly string CREATEAUDIODIR = LocalizeStrings.Get((int)LocalizedMessages.CreateAudioDir);
+ public static readonly string CREATEVIDEODIR = LocalizeStrings.Get((int)LocalizedMessages.CreateVideoDir);
+ public static readonly string CREATEAUDIOSEL = LocalizeStrings.Get((int)LocalizedMessages.CreateAudioSel);
+ public static readonly string CREATEVIDEOSEL = LocalizeStrings.Get((int)LocalizedMessages.CreateVideoSel);
+ public static readonly string ADDAUDIOSEL = LocalizeStrings.Get((int)LocalizedMessages.AddAudioSel);
+ public static readonly string ADDVIDEOSEL = LocalizeStrings.Get((int)LocalizedMessages.AddVideoSel);
+ public static readonly string SELECTALL = LocalizeStrings.Get((int)LocalizedMessages.SelectAll);
+ public static readonly string DISABLESEL = LocalizeStrings.Get((int)LocalizedMessages.DisableSel);
+ public static readonly string DISABLESELMODE = LocalizeStrings.Get((int)LocalizedMessages.DisableSelMode);
+ public static readonly string ENABLESELMODE = LocalizeStrings.Get((int)LocalizedMessages.EnableSelMode);
+ public static readonly string FILEPREVIEW = LocalizeStrings.Get((int)LocalizedMessages.FilePreview);
+ public static readonly string NOPREVIEW = LocalizeStrings.Get((int)LocalizedMessages.NoPreview);
+ public static readonly string OPENTEXT = LocalizeStrings.Get((int)LocalizedMessages.OpenText);
+ public static readonly string ATTRIBUTES = LocalizeStrings.Get((int)LocalizedMessages.Attributes);
+ public static readonly string HIDDEN = LocalizeStrings.Get((int)LocalizedMessages.Hidden);
+ public static readonly string READONLY = LocalizeStrings.Get((int)LocalizedMessages.ReadOnly);
+ public static readonly string SYSTEMFILE = LocalizeStrings.Get((int)LocalizedMessages.SystemFile);
+ public static readonly string COMPRESSED = LocalizeStrings.Get((int)LocalizedMessages.Compressed);
+ public static readonly string ENCRYPTED = LocalizeStrings.Get((int)LocalizedMessages.Encrypted);
+ public static readonly string NONE = LocalizeStrings.Get((int)LocalizedMessages.None);
+ public static readonly string CREATED = LocalizeStrings.Get((int)LocalizedMessages.Created);
+ public static readonly string ACCESSED = LocalizeStrings.Get((int)LocalizedMessages.Accessed);
+ public static readonly string WRITTEN = LocalizeStrings.Get((int)LocalizedMessages.Written);
+ public static readonly string SYSTEMDIR = LocalizeStrings.Get((int)LocalizedMessages.SystemDir);
+ }
+ #endregion
+
+ #region Operation
+ public struct Operation
+ {
+ public static readonly string COPYFILE = LocalizeStrings.Get((int)LocalizedMessages.CopyFile);
+ public static readonly string FROM = LocalizeStrings.Get((int)LocalizedMessages.From);
+ public static readonly string COPYDIR = LocalizeStrings.Get((int)LocalizedMessages.CopyDir);
+ public static readonly string COPYINGFILE = LocalizeStrings.Get((int)LocalizedMessages.CopyingFile);
+ public static readonly string THEFILE = LocalizeStrings.Get((int)LocalizedMessages.TheFile);
+ public static readonly string ALREADYEXIST = LocalizeStrings.Get((int)LocalizedMessages.AlreadyExist);
+ public static readonly string OVERWRITE = LocalizeStrings.Get((int)LocalizedMessages.Overwrite);
+ public static readonly string MOVEFILE = LocalizeStrings.Get((int)LocalizedMessages.MoveFile);
+ public static readonly string MOVEDIR = LocalizeStrings.Get((int)LocalizedMessages.MoveDir);
+ public static readonly string MOVINGFILE = LocalizeStrings.Get((int)LocalizedMessages.MovingFile);
+ public static readonly string MOVINGDIR = LocalizeStrings.Get((int)LocalizedMessages.MovingDir);
+ public static readonly string THEDIR = LocalizeStrings.Get((int)LocalizedMessages.TheDir);
+ public static readonly string DELETEDIR = LocalizeStrings.Get((int)LocalizedMessages.DeleteDir);
+ public static readonly string WANTDELETE = LocalizeStrings.Get((int)LocalizedMessages.WantDelete);
+ public static readonly string AFTERDELETE = LocalizeStrings.Get((int)LocalizedMessages.AfterDelete);
+ public static readonly string DELETEFILE = LocalizeStrings.Get((int)LocalizedMessages.DeleteFile);
+ public static readonly string ERROR = LocalizeStrings.Get((int)LocalizedMessages.Error);
+ public static readonly string CANTRENAMEDIR = LocalizeStrings.Get((int)LocalizedMessages.CantRenameDir);
+ public static readonly string CANTRENAMEFILE = LocalizeStrings.Get((int)LocalizedMessages.CantRenameFile);
+ public static readonly string NEWFOLDER = LocalizeStrings.Get((int)LocalizedMessages.NewFolder);
+ public static readonly string CANTCREATEDIR = LocalizeStrings.Get((int)LocalizedMessages.CantCreateDir);
+ public static readonly string ENCRYPTDECRYPT = LocalizeStrings.Get((int)LocalizedMessages.EncryptDecrypt);
+ public static readonly string CHANGEENCRYPT = LocalizeStrings.Get((int)LocalizedMessages.ChangeEncrypt);
+ public static readonly string ALLSUBDIR = LocalizeStrings.Get((int)LocalizedMessages.AllSubdir);
+ public static readonly string CURRENTFOLDER = LocalizeStrings.Get((int)LocalizedMessages.CurrentFolder);
+ public static readonly string CHANGECOMPRESS = LocalizeStrings.Get((int)LocalizedMessages.ChangeCompress);
+ public static readonly string HIDEUNHIDESELECT = LocalizeStrings.Get((int)LocalizedMessages.HideUnhideSelect);
+ public static readonly string HIDESELECT = LocalizeStrings.Get((int)LocalizedMessages.HideSelect);
+ public static readonly string UNHIDESELECT = LocalizeStrings.Get((int)LocalizedMessages.UnhideSelect);
+ public static readonly string CHANGEHIDE = LocalizeStrings.Get((int)LocalizedMessages.ChangeHide);
+ public static readonly string SETREMOVEFLAGS = LocalizeStrings.Get((int)LocalizedMessages.SetRemoveFlags);
+ public static readonly string SETFLAGS = LocalizeStrings.Get((int)LocalizedMessages.SetFlags);
+ public static readonly string REMOVEFLAGS = LocalizeStrings.Get((int)LocalizedMessages.RemoveFlags);
+ public static readonly string SETREMOVEFLAG = LocalizeStrings.Get((int)LocalizedMessages.SetRemoveFlag);
+ public static readonly string CHANGEFLAG = LocalizeStrings.Get((int)LocalizedMessages.ChangeFlag);
+ }
+ #endregion
+
+ #region Playlist
+ public struct Playlist
+ {
+ public static readonly string NEWAUDIOPLAYLIST = LocalizeStrings.Get((int)LocalizedMessages.NewAudioPlaylist);
+ public static readonly string INCLUDEAUDIOFILES = LocalizeStrings.Get((int)LocalizedMessages.IncludeAudioFiles);
+ public static readonly string CURRENTFOLDERSUBDIR = LocalizeStrings.Get((int)LocalizedMessages.CurrentFolderSubdir);
+ public static readonly string NOAUDIOFILESFOUND = LocalizeStrings.Get((int)LocalizedMessages.NoAudioFilesFound);
+ public static readonly string NEWVIDEOPLAYLIST = LocalizeStrings.Get((int)LocalizedMessages.NewVideoPlaylist);
+ public static readonly string INCLUDEVIDEOFILES = LocalizeStrings.Get((int)LocalizedMessages.IncludeVideoFiles);
+ public static readonly string NOVIDEOFILESFOUND = LocalizeStrings.Get((int)LocalizedMessages.NoVideoFilesFound);
+ public static readonly string NOPLAYLIST = LocalizeStrings.Get((int)LocalizedMessages.NoPlaylist);
+ public static readonly string NOPLAYLISTDIR = LocalizeStrings.Get((int)LocalizedMessages.NoPlaylistDir);
+ public static readonly string SELECTPLAYLIST = LocalizeStrings.Get((int)LocalizedMessages.SelectPlaylist);
+ }
+ #endregion
+ }
}
Modified: trunk/plugins/File Explorer/DrivesView.cs
===================================================================
--- trunk/plugins/File Explorer/DrivesView.cs 2009-10-20 10:45:52 UTC (rev 3129)
+++ trunk/plugins/File Explorer/DrivesView.cs 2009-10-20 18:06:06 UTC (rev 3130)
@@ -36,3021 +36,3043 @@
namespace FileExplorer
{
- #region Structs
- public struct Drive
- {
- public string Path;
- public string TypeDescription;
- public int Type;
- }
-
- public struct FileInfo
- {
- public string Path;
- public string Name;
- public float SizeInByte;
- public float SizeInKB;
- public float SizeInMB;
- public float SizeInGB;
- public string LastChanged;
- public string CreatedOn;
- public string LastRead;
- public bool ReadOnly;
- public bool Hidden;
- public bool SystemFile;
- public bool Encrypted;
- public bool Compressed;
- }
-
- public struct PathInfo
- {
- public string Name;
- public string Path;
- public string CreatedOn;
- public string LastChanged;
- public string LastRead;
- public bool ReadOnly;
- public bool Hidden;
- public bool SystemFile;
- public bool Encrypted;
- public bool Compressed;
- }
-
- public struct Info
- {
- public FileInfo File;
- public PathInfo Path;
- public bool IsPath;
-
- public bool IsFile
- {
- get { return !IsPath; }
- set { IsPath = !value; }
- }
- }
- #endregion
-
- /// <summary>
- /// Description of DrivesView.
- /// </summary>
- public class DrivesView
- {
- #region static members
- [DllImport(".\\Plugins\\Windows\\Compression.dll")]
- private static extern bool CompressFile(string file);
-
- [DllImport(".\\Plugins\\Windows\\Compression.dll")]
- private static extern bool UncompressFile(string file);
-
- [DllImport("kernel32.dll")]
- private static extern int SetFileAttributes(string filename, System.UInt32 dwFileAttributes);
-
- private static readonly System.UInt32 FILE_ATTRIBUTE_NORMAL = 0x00000080;
- private static readonly System.UInt32 FILE_ATTRIBUTE_HIDDEN = 0x00000002;
- private static readonly System.UInt32 FILE_ATTRIBUTE_READONLY = 0x00000001;
- private static readonly System.UInt32 FILE_ATTRIBUTE_SYSTEM = 0x00000004;
- #endregion
-
- #region vars
- private int lstId;
- private int winId;
- private int lblId;
- private int lblDirId;
-
- private string currentPath = null;
- private string currentDrive = null;
- private ArrayList drives = null;
- private ArrayList currentPathList = null;
-
- private ArrayList selectedList = null;
-
- private bool showExtensions;
- private bool trashcan;
- private bool showAllFiles;
- private bool showSystemFiles;
- private bool showSystemDirs;
- private bool selectionMode = false;
-
- private DrivesView secondView = null;
-
- private ArrayList lstFiles = null;
-
- private GUIDialogOperation dlgOp = null;
-
- #endregion
-
- #region ctor
- public DrivesView(int windowID, int guiListViewControlID, int infoLabelID, int dirLabelID)
- {
- this.lstId = guiListViewControlID;
- this.winId = windowID;
- this.lblId = infoLabelID;
- this.lblDirId = dirLabelID;
-
- CreateDrivesList();
- SetStandardValues();
- LoadPath();
- FillListControl();
- }
- #endregion
-
- #region private members
- private void CreateDrivesList()
- {
- drives = new ArrayList();
-
- foreach (string d in Environment.GetLogicalDrives())
- {
- Drive drv = new Drive();
- drv.Path = d;
- drv.Type = Utils.getDriveType(d);
-
- if (drv.Type == Constants.DriveTypes.CD_DVD)
- {
-// drv.TypeDescription = "CD/DVD Drive";
- drv.TypeDescription = Constants.View.CD;
+ #region Structs
+ public struct Drive
+ {
+ public string Path;
+ public string TypeDescription;
+ public int Type;
+ }
+
+ public struct FileInfo
+ {
+ public string Path;
+ public string Name;
+ public float SizeInByte;
+ public float SizeInKB;
+ public float SizeInMB;
+ public float SizeInGB;
+ public string LastChanged;
+ public string CreatedOn;
+ public string LastRead;
+ public bool ReadOnly;
+ public bool Hidden;
+ public bool SystemFile;
+ public bool Encrypted;
+ public bool Compressed;
+ }
+
+ public struct PathInfo
+ {
+ public string Name;
+ public string Path;
+ public string CreatedOn;
+ public string LastChanged;
+ public string LastRead;
+ public bool ReadOnly;
+ public bool Hidden;
+ public bool SystemFile;
+ public bool Encrypted;
+ public bool Compressed;
+ }
+
+ public struct Info
+ {
+ public FileInfo File;
+ public PathInfo Path;
+ public bool IsPath;
+
+ public bool IsFile
+ {
+ get { return !IsPath; }
+ set { IsPath = !value; }
+ }
+ }
+ #endregion
+
+ /// <summary>
+ /// Description of DrivesView.
+ /// </summary>
+ public class DrivesView
+ {
+ #region static members
+ [DllImport(".\\Plugins\\Windows\\Compression.dll")]
+ private static extern bool CompressFile(string file);
+
+ [DllImport(".\\Plugins\\Windows\\Compression.dll")]
+ private static extern bool UncompressFile(string file);
+
+ [DllImport("kernel32.dll")]
+ private static extern int SetFileAttributes(string filename, System.UInt32 dwFileAttributes);
+
+ private static readonly System.UInt32 FILE_ATTRIBUTE_NORMAL = 0x00000080;
+ private static readonly System.UInt32 FILE_ATTRIBUTE_HIDDEN = 0x00000002;
+ private static readonly System.UInt32 FILE_ATTRIBUTE_READONLY = 0x00000001;
+ private static readonly System.UInt32 FILE_ATTRIBUTE_SYSTEM = 0x00000004;
+ #endregion
+
+ #region vars
+ private int lstId;
+ private int winId;
+ private int lblId;
+ private int lblDirId;
+
+ private string currentPath = null;
+ private string currentDrive = null;
+ private ArrayList drives = null;
+ private ArrayList currentPathList = null;
+
+ private ArrayList selectedList = null;
+
+ private bool showExtensions;
+ private bool trashcan;
+ private bool showAllFiles;
+ private bool showSystemFiles;
+ private bool showSystemDirs;
+ private bool selectionMode = false;
+
+ private DrivesView secondView = null;
+
+ private ArrayList lstFiles = null;
+
+ private GUIDialogOperation dlgOp = null;
+
+ #endregion
+
+ #region ctor
+ public DrivesView(int windowID, int guiListViewControlID, int infoLabelID, int dirLabelID)
+ {
+ this.lstId = guiListViewControlID;
+ this.winId = windowID;
+ this.lblId = infoLabelID;
+ this.lblDirId = dirLabelID;
+
+ CreateDrivesList();
+ // SetStandardValues();
+ SetStandardValues(this.lstId);
+ LoadPath();
+ FillListControl();
+ }
+ #endregion
+
+ #region private members
+ private void CreateDrivesList()
+ {
+ drives = new ArrayList();
+
+ foreach (string d in Environment.GetLogicalDrives())
+ {
+ Drive drv = new Drive();
+ drv.Path = d;
+ drv.Type = Utils.getDriveType(d);
+
+ if (drv.Type == Constants.DriveTypes.CD_DVD)
+ {
+ // drv.TypeDescription = "CD/DVD Drive";
+ drv.TypeDescription = Constants.View.CD;
+ }
+ else if (drv.Type == Constants.DriveTypes.FIXED)
+ {
+ // drv.TypeDescription = "HDD";
+ drv.TypeDescription = Constants.View.HDD;
+ }
+ else if (drv.Type == Constants.DriveTypes.RAMDISK)
+ {
+ // drv.TypeDescription = "RamDisk";
+ drv.TypeDescription = Constants.View.RAMDISK;
+ }
+ else if (drv.Type == Constants.DriveTypes.REMOTEDISK)
+ {
+ // drv.TypeDescription = "Network Drive";
+ drv.TypeDescription = Constants.View.NETWORK;
+ }
+ else if (drv.Type == Constants.DriveTypes.REMOVEABLE)
+ {
+ // drv.TypeDescription = "Removeable";
+ drv.TypeDescription = Constants.View.REMOVEABLE;
+ }
+
+ drives.Add(drv);
+ }
+ }
+
+ private void SetStandardValues(int lstId)
+ {
+ SetStandardValues();
+ string DefaultPath = String.Empty;
+ XmlConfig XmlConfig = new XmlConfig();
+ if (lstId == Constants.ControlIDs.LISTBOX_LEFT)
+ {
+ DefaultPath = XmlConfig.ReadXmlConfig("File Explorer", "explorer", Constants.SetupForm.DEFAULTFOLDERLEFT, String.Empty);
+ }
+ else
+ {
+ DefaultPath = XmlConfig.ReadXmlConfig("File Explorer", "explorer", Constants.SetupForm.DEFAULTFOLDERRIGHT, String.Empty);
+ }
+ if (DefaultPath != String.Empty)
+ {
+ currentPath = DefaultPath;
+ }
+ }
+
+ private void SetStandardValues()
+ {
+ foreach (Drive d in drives)
+ {
+ if (d.Type == Constants.DriveTypes.FIXED)
+ {
+ currentDrive = d.Path;
+ currentPath = d.Path;
+
+ break;
+ }
+ }
+
+ showExtensions = Constants.SetupForm.valueStandards[0];
+ trashcan = Constants.SetupForm.valueStandards[1];
+ showAllFiles = Constants.SetupForm.valueStandards[2];
+ showSystemFiles = Constants.SetupForm.valueStandards[3];
+ showSystemDirs = Constants.SetupForm.valueStandards[4];
+ selectionMode = false;
+ }
+
+ private bool LoadPath()
+ {
+ selectedList = null;
+ string[] files = null;
+ try
+ {
+ files = System.IO.Directory.GetFileSystemEntries(currentPath);
+ }
+ catch (Exception e)
+ {
+ ExceptionViewer.ShowException(e);
+ return false;
+ }
+
+ currentPathList = new ArrayList();
+
+ foreach (string s in files)
+ {
+ Info info = new Info();
+
+ if (System.IO.File.Exists(s))
+ {
+ System.IO.FileInfo fi = new System.IO.FileInfo(s);
+
+ info.IsFile = true;
+ info.File.Name = GetFilename(s);
+ info.File.Path = GetPath(s);
+ info.File.CreatedOn = fi.CreationTime.ToString();
+ info.File.LastChanged = fi.LastWriteTime.ToString();
+ info.File.LastRead = fi.LastAccessTime.ToString();
+ info.File.SizeInByte = (float)fi.Length;
+ info.File.SizeInKB = info.File.SizeInByte / 1024;
+ info.File.SizeInMB = info.File.SizeInKB / 1024;
+ info.File.SizeInGB = info.File.SizeInMB / 1024;
+
+ info.File.Hidden = this.IsHiddenAttribute(fi.Attributes);
+ info.File.ReadOnly = this.IsReadOnlyAttribute(fi.Attributes);
+ info.File.SystemFile = this.IsSystemAttribute(fi.Attributes);
+ info.File.Compressed = this.IsCompressedAttribute(fi.Attributes);
+ info.File.Encrypted = this.IsEncryptedAttribute(fi.Attributes);
+ }
+ else
+ {
+ System.IO.DirectoryInfo di = new System.IO.DirectoryInfo(s);
+
+ info.IsPath = true;
+ info.Path.Name = GetFilename(s);
+ info.Path.Path = s;
+ info.Path.CreatedOn = di.CreationTime.ToString();
+ info.Path.LastChanged = di.LastWriteTime.ToString();
+ info.Path.LastRead = di.LastAccessTime.ToString();
+ info.Path.Hidden = this.IsHiddenAttribute(di.Attributes);
+ info.Path.ReadOnly = this.IsReadOnlyAttribute(di.Attributes);
+ info.Path.SystemFile = this.IsSystemAttribute(di.Attributes);
+ info.Path.Compressed = this.IsCompressedAttribute(di.Attributes);
+ info.Path.Encrypted = this.IsEncryptedAttribute(di.Attributes);
+ }
+
+ currentPathList.Add(info);
+ }
+
+ return true;
+ }
+
+ private void FillListControl()
+ {
+ GUIControl.ClearControl(winId, lstId);
+ string path = Utils.RemoveTrailingSlash(currentPath);
+
+ if (!currentPath.Equals(currentDrive))
+ {
+ GUIListItem item = new GUIListItem("..");
+ item.Path = GetPath(currentPath);
+
+ Utils.SetDefaultIcons(item);
+ GUIControl.AddListItemControl(winId, lstId, item);
+ }
+
+ foreach (Info info in currentPathList)
+ {
+ if (info.IsPath)
+ {
+ bool b = true;
+
+ if ((!this.showAllFiles) && (info.Path.Hidden))
+ {
+ b = false;
+ }
+
+ if ((!this.showSystemDirs) && (info.Path.SystemFile))
+ {
+ b = false;
+ }
+
+ if (b)
+ {
+ GUIListItem item = new GUIListItem(info.Path.Name);
+ item.IsFolder = true;
+ item.Path = info.Path.Path;
+
+ Utils.SetDefaultIcons(item);
+ GUIControl.AddListItemControl(winId, lstId, item);
+ }
+ }
+ }
+
+ foreach (Info info in currentPathList)
+ {
+ if (info.IsFile)
+ {
+ bool b = true;
+
+ if ((!this.showAllFiles) && (info.File.Hidden))
+ {
+ b = false;
+ }
+
+ if ((!this.showSystemFiles) && (info.File.SystemFile))
+ {
+ b = false;
+ }
+
+ if (b)
+ {
+ GUIListItem item = new GUIListItem(info.File.Name);
+ item.IsFolder = false;
+ item.Path = info.File.Path;
+ item.Label2 = Utils.GetSize((long)info.File.SizeInByte);
+
+ GUIControl.AddListItemControl(winId, lstId, item);
+ }
+ }
+ }
+
+ // string cf = "Folder: ";
+ string cf = Constants.View.FOLDER;
+ if (currentPath.Length > 50)
+ {
+ cf += currentDrive + "..\\" + GetFilename(currentPath);
+ }
+ else
+ {
+ cf += currentPath;
+ }
+ GUIControl.SetControlLabel(winId, lblDirId, cf);
+ }
+ #endregion
+
+ #region public members
+ public void Update()
+ {
+ LoadPath();
+ FillListControl();
+ }
+
+ #region menu id constants
+ private struct MenuIDs
+ {
+ public const int SelectDrive = 0;
+ public const int Copy = 1;
+ public const int Move = 2;
+ public const int Delete = 3;
+ public const int Rename = 4;
+ public const int CreateDirectory = 5;
+ public const int EncryptDecrypt = 6;
+ public const int CompressUncomopress = 7;
+ public const int HideUnhide = 8;
+ public const int ReadOnlyFlag = 9;
+ public const int AudioPlaylist = 10;
+ public const int VideoPlayList = 11;
+ public const int AddToAudioPlaylist = 12;
+ public const int AddToVideoPlaylist = 13;
+ public const int SelectAll = 14;
+ public const int DisableSelections = 15;
+ public const int SelectionMode = 16;
+ }
+ #endregion
+
+ public void ShowMenu()
+ {
+ GUIDialogMenu mnu = (GUIDialogMenu)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_MENU);
+ mnu.Reset();
+ /* mnu.SetHeading("Menu");
+ mnu.Add("Select Drive");
+ mnu.Add("Copy");
+ mnu.Add("Move");
+ mnu.Add("Delete");
+ mnu.Add("Rename");
+ mnu.Add("Create directory");
+ mnu.Add("Encrypt/Decrypt (NTFS only)");
+ mnu.Add("Compress/Uncompress (NTFS only)");
+ mnu.Add("Hide/Unhide");
+ mnu.Add("Add/Remove readonly flag"); */
+ mnu.SetHeading(Constants.View.MENU);
+ mnu.Add(Constants.View.SELECTDRIVE);
+ mnu.Add(Constants.Dialog.COPY); // was already defined in Dialog
+ mnu.Add(Constants.Dialog.MOVE); // was already defined in Dialog
+ mnu.Add(Constants.Dialog.DELETE); // was already defined in Dialog
+ mnu.Add(Constants.View.RENAME);
+ mnu.Add(Constants.View.CREATEDIR);
+ mnu.Add(Constants.View.ENCRYPT2);
+ mnu.Add(Constants.View.COMPRESS3);
+ mnu.Add(Constants.View.HIDEUNHIDE);
+ mnu.Add(Constants.View.ADDREADONLY);
+
+ if (selectedList == null)
+ {
+ /* mnu.Add("Create Audioplaylist from Directory");
+ mnu.Add("Create Videoplaylist from Directory");
+ mnu.Add("Add to Audioplaylist");
+ mnu.Add("Add to Videoplaylist"); */
+ mnu.Add(Constants.View.CREATEAUDIODIR);
+ mnu.Add(Constants.View.CREATEVIDEODIR);
+ mnu.Add(Constants.Dialog.ADDAUDIO); // was already defined in Dialog
+ mnu.Add(Constants.Dialog.ADDVIDEO); // was already defined in Dialog
+ }
+ else
+ {
+ /* mnu.Add("Create Audioplaylist from selected files/directories");
+ mnu.Add("Create Videoplaylist from selected files/directories");
+ mnu.Add("Add selected files/directories to Audioplaylist");
+ mnu.Add("Add selected files/directories to Videoplaylist"); */
+ mnu.Add(Constants.View.CREATEAUDIOSEL);
+ mnu.Add(Constants.View.CREATEVIDEOSEL);
+ mnu.Add(Constants.View.ADDAUDIOSEL);
+ mnu.Add(Constants.View.ADDVIDEOSEL);
+ }
+
+ // mnu.Add("Select All");
+ // mnu.Add("Disable selections");
+ mnu.Add(Constants.View.SELECTALL);
+ mnu.Add(Constants.View.DISABLESEL);
+
+ if (selectionMode)
+ {
+ // mnu.Add("Disable selection mode");
+ mnu.Add(Constants.View.DISABLESELMODE);
+ }
+ else
+ {
+ // mnu.Add("Enable selection mode");
+ mnu.Add(Constants.View.ENABLESELMODE);
+ }
+
+ mnu.DoModal(GUIWindowManager.ActiveWindow);
+
+ switch (mnu.SelectedLabel)
+ {
+ case MenuIDs.SelectDrive:
+ {
+ SelectDrive();
+ break;
+ }
+ case MenuIDs.Copy:
+ {
+ Copy();
+ break;
+ }
+ case MenuIDs.Move:
+ {
+ Move();
+ break;
+ }
+ case MenuIDs.Delete:
+ {
+ Delete();
+ break;
+ }
+ case MenuIDs.Rename:
+ {
+ Rename();
+ break;
+ }
+ case MenuIDs.CreateDirectory:
+ {
+ CreateDirectory();
+ break;
+ }
+ case MenuIDs.EncryptDecrypt:
+ {
+ EncryptDecrypt();
+ break;
+ }
+ case MenuIDs.CompressUncomopress:
+ {
+ CompressUncompress();
+ break;
+ }
+ case MenuIDs.HideUnhide:
+ {
+ HideUnhide();
+ break;
+ }
+ case MenuIDs.ReadOnlyFlag:
+ {
+ SetRemoveReadOnlyFlag();
+ break;
+ }
+ case MenuIDs.AudioPlaylist:
+ {
+ if (selectedList == null)
+ {
+ CreateAudioPlaylist();
+ }
+ else
+ {
+ CreateAudioPlaylistFromSelectedFiles();
+ }
+ break;
+ }
+ case MenuIDs.VideoPlayList:
+ {
+ if (selectedList == null)
+ {
+ CreateVideoPlaylist();
+ }
+ else
+ {
+ CreateVideoPlaylistFromSelectedFiles();
+ }
+ break;
+ }
+ case MenuIDs.AddToAudioPlaylist:
+ {
+ if (selectedList == null)
+ {
+ AddToAudioPlaylist();
+ ...
[truncated message content] |