From: <fr...@us...> - 2008-08-22 17:50:29
|
Revision: 2072 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=2072&view=rev Author: framug Date: 2008-08-22 17:50:25 +0000 (Fri, 22 Aug 2008) Log Message: ----------- File Explorer V1.1 (Part 1) : Localization Modified Paths: -------------- trunk/plugins/File Explorer/Constants.cs trunk/plugins/File Explorer/Dialogs/GUIDialogOperation.cs trunk/plugins/File Explorer/DrivesView.cs trunk/plugins/File Explorer/ExceptionViewer.cs trunk/plugins/File Explorer/File Explorer.cs trunk/plugins/File Explorer/File Explorer.csproj trunk/plugins/File Explorer/File Explorer.csproj.user trunk/plugins/File Explorer/Properties/AssemblyInfo.cs trunk/plugins/File Explorer/Setup.cs Added Paths: ----------- trunk/plugins/File Explorer/Language/ trunk/plugins/File Explorer/Language/strings_en.xml trunk/plugins/File Explorer/Language/strings_fr.xml trunk/plugins/File Explorer/LocalizeStrings.cs Modified: trunk/plugins/File Explorer/Constants.cs =================================================================== --- trunk/plugins/File Explorer/Constants.cs 2008-08-22 16:50:40 UTC (rev 2071) +++ trunk/plugins/File Explorer/Constants.cs 2008-08-22 17:50:25 UTC (rev 2072) @@ -27,7 +27,153 @@ namespace FileExplorer { - /// <summary> + #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 + + } + #endregion + + /// <summary> /// Description of Constants. /// </summary> public static class Constants @@ -38,17 +184,21 @@ /// <summary> /// Name of PlugIn. /// </summary> - public static readonly string NAME = "File Explorer"; +// 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"; - - /// <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ß"; + public static readonly string AUTHOR = "Andreas Groß, framug"; } #endregion @@ -67,7 +217,7 @@ } #endregion - #region CotnrolIDs + #region ControlIDs public struct ControlIDs { public static readonly int LISTBOX_LEFT = 3; @@ -79,13 +229,26 @@ public struct SetupForm { public static readonly string[] valueNames = - {"Extensions", "Trashbin", "AllFiles", "SystemFiles", "SystemDirs"}; +// {"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 = - {"Show file extensions", "Copy files to trashcan instead of deleting them", - "Show all files", "Show system files", "Show system directories" }; +// {"Show file extensions", "Copy files to trashcan instead of deleting them", +// "Show all files", "Show system files", "Show system directories" }; + { + LocalizeStrings.Get((int)LocalizedMessages.valueDescription1), LocalizeStrings.Get((int)LocalizedMessages.valueDescription2), + 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 @@ -106,5 +269,154 @@ 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/Dialogs/GUIDialogOperation.cs =================================================================== --- trunk/plugins/File Explorer/Dialogs/GUIDialogOperation.cs 2008-08-22 16:50:40 UTC (rev 2071) +++ trunk/plugins/File Explorer/Dialogs/GUIDialogOperation.cs 2008-08-22 17:50:25 UTC (rev 2072) @@ -158,80 +158,123 @@ switch (type) { case DialogType.AUDIO_PLAYLIST_CREATE: - lblHeading.Label = "Create Audio Playlist"; - lblText1.Label = "Adding File: "; - lblText2.Label = "Path: "; +// lblHeading.Label = "Create Audio Playlist"; +// lblText1.Label = "Adding File: "; +// lblText2.Label = "Path: "; + lblHeading.Label = Constants.Dialog.CREATEAUDIO; + lblText1.Label = Constants.Dialog.ADDFILE; + lblText2.Label = Constants.Dialog.PATH; break; case DialogType.COMPRESS: - lblHeading.Label = "Compressing"; - lblText1.Label = "Compressing File: "; - lblText2.Label = "Path: "; - break; +// lblHeading.Label = "Compressing"; +// lblText1.Label = "Compressing File: "; +// lblText2.Label = "Path: "; + lblHeading.Label = Constants.Dialog.COMPRESS; + lblText1.Label = Constants.Dialog.COMPRESSFILE; + lblText2.Label = Constants.Dialog.PATH; + break; case DialogType.COPY: - lblHeading.Label = "Copy"; - lblText1.Label = "File: "; - lblText2.Label = "To: "; - break; +// lblHeading.Label = "Copy"; +// lblText1.Label = "File: "; +// lblText2.Label = "To: "; + lblHeading.Label = Constants.Dialog.COPY; + lblText1.Label = Constants.Dialog.FILE; + lblText2.Label = Constants.Dialog.TO; + break; case DialogType.DECRYPT: - lblHeading.Label = "Decrypting"; - lblText1.Label = "File: "; - lblText2.Label = "Path: "; - break; +// lblHeading.Label = "Decrypting"; +// lblText1.Label = "File: "; +// lblText2.Label = "Path: "; + lblHeading.Label = Constants.Dialog.DECRYPT; + lblText1.Label = Constants.Dialog.FILE; + lblText2.Label = Constants.Dialog.PATH; + break; case DialogType.DELETE: - lblHeading.Label = "Delete"; - lblText1.Label = "File: "; - lblText2.Label = "Path: "; - break; +// lblHeading.Label = "Delete"; +// lblText1.Label = "File: "; +// lblText2.Label = "Path: "; + lblHeading.Label = Constants.Dialog.DELETE; + lblText1.Label = Constants.Dialog.FILE; + lblText2.Label = Constants.Dialog.PATH; + break; case DialogType.ENCRYPT: - lblHeading.Label = "Encrypting"; - lblText1.Label = "File: "; - lblText2.Label = "Path: "; - break; +// lblHeading.Label = "Encrypting"; +// lblText1.Label = "File: "; +// lblText2.Label = "Path: "; + lblHeading.Label = Constants.Dialog.ENCRYPT; + lblText1.Label = Constants.Dialog.FILE; + lblText2.Label = Constants.Dialog.PATH; + break; case DialogType.HIDE: - lblHeading.Label = "Hide"; - lblText1.Label = "File: "; - lblText2.Label = "Path: "; - break; +// lblHeading.Label = "Hide"; +// lblText1.Label = "File: "; +// lblText2.Label = "Path: "; + lblHeading.Label = Constants.Dialog.HIDE; + lblText1.Label = Constants.Dialog.FILE; + lblText2.Label = Constants.Dialog.PATH; + break; case DialogType.MOVE: - lblHeading.Label = "Move"; - lblText1.Label = "File: "; - lblText2.Label = "To: "; - break; +// lblHeading.Label = "Move"; +// lblText1.Label = "File: "; +// lblText2.Label = "To: "; + lblHeading.Label = Constants.Dialog.MOVE; + lblText1.Label = Constants.Dialog.FILE; + lblText2.Label = Constants.Dialog.TO; + break; case DialogType.READONLY_FLAG_ADD: - lblHeading.Label = "Set readonly flag"; - lblText1.Label = "File: "; - lblText2.Label = "Path: "; - break; +// lblHeading.Label = "Set readonly flag"; +// lblText1.Label = "File: "; +// lblText2.Label = "Path: "; + lblHeading.Label = Constants.Dialog.SETREADONLY; + lblText1.Label = Constants.Dialog.FILE; + lblText2.Label = Constants.Dialog.PATH; + break; case DialogType.READONLY_FLAG_REMOVE: - lblHeading.Label = "Remove readonly flag"; - lblText1.Label = "File: "; - lblText2.Label = "Path: "; - break; +// lblHeading.Label = "Remove readonly flag"; +// lblText1.Label = "File: "; +// lblText2.Label = "Path: "; + lblHeading.Label = Constants.Dialog.REMOVEREADONLY; + lblText1.Label = Constants.Dialog.FILE; + lblText2.Label = Constants.Dialog.PATH; + break; case DialogType.UNCOMPRESS: - lblHeading.Label = "Uncompressing"; - lblText1.Label = "File: "; - lblText2.Label = "Path: "; - break; +// lblHeading.Label = "Uncompressing"; +// lblText1.Label = "File: "; +// lblText2.Label = "Path: "; + lblHeading.Label = Constants.Dialog.UNCOMPRESS; + lblText1.Label = Constants.Dialog.FILE; + lblText2.Label = Constants.Dialog.PATH; + break; case DialogType.UNHIDE: - lblHeading.Label = "Unhide"; - lblText1.Label = "File: "; - lblText2.Label = "Path: "; - break; +// lblHeading.Label = "Unhide"; +// lblText1.Label = "File: "; +// lblText2.Label = "Path: "; + lblHeading.Label = Constants.Dialog.UNHIDE; + lblText1.Label = Constants.Dialog.FILE; + lblText2.Label = Constants.Dialog.PATH; + break; case DialogType.VIDEO_PLAYLIST_CREATE: - lblHeading.Label = "Create Video Playlist"; - lblText1.Label = "Adding File: "; - lblText2.Label = "Path: "; - break; +// lblHeading.Label = "Create Video Playlist"; +// lblText1.Label = "Adding File: "; +// lblText2.Label = "Path: "; + lblHeading.Label = Constants.Dialog.CREATEVIDEO; + lblText1.Label = Constants.Dialog.ADDFILE; + lblText2.Label = Constants.Dialog.PATH; + break; case DialogType.AUDIO_PLAYLIST_ADD: - lblHeading.Label = "Add to Audio Playlist"; - lblText1.Label = "Reading files . . . "; - lblText2.Label = string.Empty; - break; +// lblHeading.Label = "Add to Audio Playlist"; +// lblText1.Label = "Reading files . . . "; + lblHeading.Label = Constants.Dialog.ADDAUDIO; + lblText1.Label = Constants.Dialog.READFILE; + lblText2.Label = string.Empty; + break; case DialogType.VIDEO_PLAYLIST_ADD: - lblHeading.Label = "Add to Video Playlist"; - lblText1.Label = "Reading files . . . "; - lblText2.Label = string.Empty; - break; +// lblHeading.Label = "Add to Video Playlist"; +// lblText1.Label = "Reading files . . . "; + lblHeading.Label = Constants.Dialog.ADDVIDEO; + lblText1.Label = Constants.Dialog.READFILE; + lblText2.Label = string.Empty; + break; } } @@ -239,8 +282,9 @@ { SuspendThread(); this.file = file; - lblText1.Label = "File: " + file; - ResumeThread(); +// lblText1.Label = "File: " + file; + lblText1.Label = Constants.Dialog.FILE + file; + ResumeThread(); } public void SetToPath(string path) @@ -251,8 +295,9 @@ path = path.Substring(0, 3) + "..\\" + GetFilename(path); } this.to = path; - lblText2.Label = "To: " + path; - ResumeThread(); +// lblText2.Label = "To: " + path; + lblText2.Label = Constants.Dialog.TO + path; + ResumeThread(); } public void SetPath(string path) @@ -262,8 +307,9 @@ { path = path.Substring(0, 3) + "..\\" + GetFilename(path); } - lblText2.Label = "Path: " + path; - ResumeThread(); +// lblText2.Label = "Path: " + path; + lblText2.Label = Constants.Dialog.PATH + path; + ResumeThread(); } /// <summary> Modified: trunk/plugins/File Explorer/DrivesView.cs =================================================================== --- trunk/plugins/File Explorer/DrivesView.cs 2008-08-22 16:50:40 UTC (rev 2071) +++ trunk/plugins/File Explorer/DrivesView.cs 2008-08-22 17:50:25 UTC (rev 2072) @@ -96,10 +96,10 @@ public class DrivesView { #region static members - [DllImport(".\\Plugins\\Windows\\File Explorer\\Compression.dll")] + [DllImport(".\\Plugins\\Windows\\Compression.dll")] private static extern bool CompressFile(string file); - [DllImport(".\\Plugins\\Windows\\File Explorer\\Compression.dll")] + [DllImport(".\\Plugins\\Windows\\Compression.dll")] private static extern bool UncompressFile(string file); [DllImport("kernel32.dll")] @@ -167,24 +167,29 @@ if (drv.Type == Constants.DriveTypes.CD_DVD) { - drv.TypeDescription = "CD/DVD Drive"; - } +// drv.TypeDescription = "CD/DVD Drive"; + drv.TypeDescription = Constants.View.CD; + } else if (drv.Type == Constants.DriveTypes.FIXED) { - drv.TypeDescription = "HDD"; - } +// drv.TypeDescription = "HDD"; + drv.TypeDescription = Constants.View.HDD; + } else if (drv.Type == Constants.DriveTypes.RAMDISK) { - drv.TypeDescription = "RamDisk"; - } +// drv.TypeDescription = "RamDisk"; + drv.TypeDescription = Constants.View.RAMDISK; + } else if (drv.Type == Constants.DriveTypes.REMOTEDISK) { - drv.TypeDescription = "Network Drive"; - } +// drv.TypeDescription = "Network Drive"; + drv.TypeDescription = Constants.View.NETWORK; + } else if (drv.Type == Constants.DriveTypes.REMOVEABLE) { - drv.TypeDescription = "Removeable"; - } +// drv.TypeDescription = "Removeable"; + drv.TypeDescription = Constants.View.REMOVEABLE; + } drives.Add(drv); } @@ -345,8 +350,9 @@ } } - string cf = "Folder: "; - if (currentPath.Length > 50) +// string cf = "Folder: "; + string cf = Constants.View.FOLDER; + if (currentPath.Length > 50) { cf += currentDrive + "..\\" + GetFilename(currentPath); } @@ -392,7 +398,7 @@ { GUIDialogMenu mnu = (GUIDialogMenu)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_MENU); mnu.Reset(); - mnu.SetHeading("Menu"); +/* mnu.SetHeading("Menu"); mnu.Add("Select Drive"); mnu.Add("Copy"); mnu.Add("Move"); @@ -402,34 +408,57 @@ mnu.Add("Encrypt/Decrypt (NTFS only)"); mnu.Add("Compress/Uncompress (NTFS only)"); mnu.Add("Hide/Unhide"); - mnu.Add("Add/Remove readonly flag"); + 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 Audioplaylist from Directory"); mnu.Add("Create Videoplaylist from Directory"); mnu.Add("Add to Audioplaylist"); - mnu.Add("Add to Videoplaylist"); - } + 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 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("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("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("Disable selection mode"); + mnu.Add(Constants.View.DISABLESELMODE); + } else { - mnu.Add("Enable selection mode"); - } +// mnu.Add("Enable selection mode"); + mnu.Add(Constants.View.ENABLESELMODE); + } mnu.DoModal(GUIWindowManager.ActiveWindow); @@ -558,7 +587,8 @@ { GUIDialogMenu mnu = (GUIDialogMenu)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_MENU); mnu.Reset(); - mnu.SetHeading("Select drive"); +// mnu.SetHeading("Select drive"); + mnu.SetHeading(Constants.View.SELECTDRIVE); foreach (Drive d in drives) { @@ -597,10 +627,13 @@ if (!item.IsFolder) { - dlg.SetHeading("Copy File \"" + item.Label + "\""); - dlg.SetLine(2, "From: " + item.Path); - dlg.SetLine(3, "To: " + secondView.Path); - dlg.DoModal(GUIWindowManager.ActiveWindow); +// dlg.SetHeading("Copy File \"" + item.Label + "\""); + dlg.SetHeading(Constants.Operation.COPYFILE + "\"" + item.Label + "\""); +// dlg.SetLine(2, "From: " + item.Path); + dlg.SetLine(2, Constants.Operation.FROM + item.Path); +// dlg.SetLine(3, "To: " + secondView.Path); + dlg.SetLine(3, Constants.Dialog.TO + secondView.Path); // already defined in Dialog + dlg.DoModal(GUIWindowManager.ActiveWindow); if (dlg.IsConfirmed) { @@ -610,9 +643,11 @@ } else { - dlg.SetHeading("Copy Directory \"" + item.Label + "\""); - dlg.SetLine(2, "To: " + secondView.Path); - dlg.DoModal(GUIWindowManager.ActiveWindow); +// dlg.SetHeading("Copy Directory \"" + item.Label + "\""); + dlg.SetHeading(Constants.Operation.COPYDIR + "\"" + item.Label + "\""); +// dlg.SetLine(2, "To: " + secondView.Path); + dlg.SetLine(2, Constants.Dialog.TO + secondView.Path); // already defined in Dialog + dlg.DoModal(GUIWindowManager.ActiveWindow); if (dlg.IsConfirmed) { @@ -653,11 +688,15 @@ if (System.IO.File.Exists(dest)) { GUIDialogYesNo dlg = (GUIDialogYesNo)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_YES_NO); - dlg.SetHeading("Copying file"); - dlg.SetLine(1, "The file \"" + GetFilename(src) + "\""); - dlg.SetLine(2, "alread exists!"); - dlg.SetLine(3, "Do you want to overwrite it?"); - dlg.DoModal(GUIWindowManager.ActiveWindow); +// dlg.SetHeading("Copying file"); + dlg.SetHeading(Constants.Operation.COPYINGFILE); +// dlg.SetLine(1, "The file \"" + GetFilename(src) + "\""); + dlg.SetLine(1, Constants.Operation.THEFILE + "\"" + GetFilename(src) + "\""); +// dlg.SetLine(2, "alread exists!"); + dlg.SetLine(2, Constants.Operation.ALREADYEXIST); +// dlg.SetLine(3, "Do you want to overwrite it?"); + dlg.SetLine(3, Constants.Operation.OVERWRITE); + dlg.DoModal(GUIWindowManager.ActiveWindow); if (!dlg.IsConfirmed) { @@ -726,10 +765,13 @@ if (!item.IsFolder) { - dlg.SetHeading("Move File \"" + item.Label + "\""); - dlg.SetLine(2, "From: " + item.Path); - dlg.SetLine(3, "To: " + secondView.Path); - dlg.DoModal(GUIWindowManager.ActiveWindow); +// dlg.SetHeading("Move File \"" + item.Label + "\""); + dlg.SetHeading(Constants.Operation.MOVEFILE + "\"" + item.Label + "\""); + // dlg.SetLine(2, "From: " + item.Path); + dlg.SetLine(2, Constants.Operation.FROM + item.Path); +// dlg.SetLine(3, "To: " + secondView.Path); + dlg.SetLine(3, Constants.Dialog.TO + secondView.Path); // already defined in Dialog + dlg.DoModal(GUIWindowManager.ActiveWindow); if (dlg.IsConfirmed) { @@ -740,9 +782,11 @@ } else { - dlg.SetHeading("Move Directory \"" + item.Label + "\""); - dlg.SetLine(2, "To: " + secondView.Path); - dlg.DoModal(GUIWindowManager.ActiveWindow); +// dlg.SetHeading("Move Directory \"" + item.Label + "\""); + dlg.SetHeading(Constants.Operation.MOVEDIR + "\"" + item.Label + "\""); +// dlg.SetLine(2, "To: " + secondView.Path); + dlg.SetLine(2, Constants.Dialog.TO + secondView.Path); // already defined in Dialog + dlg.DoModal(GUIWindowManager.ActiveWindow); if (dlg.IsConfirmed) { @@ -779,11 +823,15 @@ if (System.IO.File.Exists(dest)) { GUIDialogYesNo dlg = (GUIDialogYesNo)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_YES_NO); - dlg.SetHeading("Moving file"); +/* dlg.SetHeading("Moving file"); dlg.SetLine(1, "The file \"" + GetFilename(src) + "\""); dlg.SetLine(2, "alread exists!"); - dlg.SetLine(3, "Do you want to overwrite it?"); - dlg.DoModal(GUIWindowManager.ActiveWindow); + dlg.SetLine(3, "Do you want to overwrite it?"); */ + dlg.SetHeading(Constants.Operation.MOVINGFILE); + dlg.SetLine(1, Constants.Operation.THEFILE + "\"" + GetFilename(src) + "\""); + dlg.SetLine(2, Constants.Operation.ALREADYEXIST); + dlg.SetLine(3, Constants.Operation.OVERWRITE); + dlg.DoModal(GUIWindowManager.ActiveWindow); if (!dlg.IsConfirmed) { @@ -806,11 +854,15 @@ if (System.IO.Directory.Exists(dest)) { GUIDialogYesNo dlg = (GUIDialogYesNo)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_YES_NO); - dlg.SetHeading("Moving directory"); +/* dlg.SetHeading("Moving directory"); dlg.SetLine(1, "The directory \"" + GetFilename(dest) + "\""); dlg.SetLine(2, "alread exists!"); - dlg.SetLine(3, "Do you want to overwrite it?"); - dlg.DoModal(GUIWindowManager.ActiveWindow); + dlg.SetLine(3, "Do you want to overwrite it?"); */ + dlg.SetHeading(Constants.Operation.MOVINGDIR); + dlg.SetLine(1, Constants.Operation.THEDIR + "\"" + GetFilename(dest) + "\""); + dlg.SetLine(2, Constants.Operation.ALREADYEXIST); + dlg.SetLine(3, Constants.Operation.OVERWRITE); + dlg.DoModal(GUIWindowManager.ActiveWindow); if (!dlg.IsConfirmed) { @@ -872,10 +924,13 @@ if (item.IsFolder) { GUIDialogYesNo dlg = (GUIDialogYesNo)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_YES_NO); - dlg.SetHeading("Delete directory"); +/* dlg.SetHeading("Delete directory"); dlg.SetLine(1, "Do you really want to delete"); - dlg.SetLine(2, "the directory \"" + item.Label + "\"?"); - dlg.SetLine(3, " "); + dlg.SetLine(2, "the directory \"" + item.Label + "\"?"); */ + dlg.SetHeading(Constants.Operation.DELETEDIR); + dlg.SetLine(1, Constants.Operation.WANTDELETE); + dlg.SetLine(2, Constants.Operation.THEDIR + "\"" + item.Label + "\"?"); + dlg.SetLine(3, " "); dlg.DoModal(GUIWindowManager.ActiveWindow); bool b = dlg.IsConfirmed; @@ -883,11 +938,15 @@ if ((b) && (!this.DeleteFilesToTrashcan)) { dlg = (GUIDialogYesNo)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_YES_NO); - dlg.SetHeading("Delete directory"); +/* dlg.SetHeading("Delete directory"); dlg.SetLine(1, "Do you really want to delete"); dlg.SetLine(2, "the directory \"" + item.Label + "\"?"); - dlg.SetLine(3, "After deleting the directory CANNOT BE RESTORED!"); - dlg.DoModal(GUIWindowManager.ActiveWindow); + dlg.SetLine(3, "After deleting the directory CANNOT BE RESTORED!"); */ + dlg.SetHeading(Constants.Operation.DELETEDIR); + dlg.SetLine(1, Constants.Operation.WANTDELETE); + dlg.SetLine(2, Constants.Operation.THEDIR + "\"" + item.Label + "\"?"); + dlg.SetLine(3, Constants.Operation.AFTERDELETE); + dlg.DoModal(GUIWindowManager.ActiveWindow); b = dlg.IsConfirmed; } @@ -904,10 +963,13 @@ else { GUIDialogYesNo dlg = (GUIDialogYesNo)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_YES_NO); - dlg.SetHeading("Delete file"); +/* dlg.SetHeading("Delete file"); dlg.SetLine(1, "Do you really want to delete"); - dlg.SetLine(2, "the file \"" + item.Label + "\"?"); - dlg.SetLine(3, " "); + dlg.SetLine(2, "the file \"" + item.Label + "\"?"); */ + dlg.SetHeading(Constants.Operation.DELETEFILE); + dlg.SetLine(1, Constants.Operation.WANTDELETE); + dlg.SetLine(2, Constants.Operation.THEFILE + "\"" + item.Label + "\"?"); + dlg.SetLine(3, " "); dlg.DoModal(GUIWindowManager.ActiveWindow); bool b = dlg.IsConfirmed; @@ -915,11 +977,15 @@ if ((b) && (!this.DeleteFilesToTrashcan)) { dlg = (GUIDialogYesNo)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_YES_NO); - dlg.SetHeading("Delete file"); +/* dlg.SetHeading("Delete file"); dlg.SetLine(1, "Do you really want to delete"); dlg.SetLine(2, "the file \"" + item.Label + "\"?"); - dlg.SetLine(3, "After deleting the file CANNOT BE RESTORED!"); - dlg.DoModal(GUIWindowManager.ActiveWindow); + dlg.SetLine(3, "After deleting the file CANNOT BE RESTORED!"); */ + dlg.SetHeading(Constants.Operation.DELETEFILE); + dlg.SetLine(1, Constants.Operation.WANTDELETE); + dlg.SetLine(2, Constants.Operation.THEFILE + "\"" + item.Label + "\"?"); + dlg.SetLine(3, Constants.Operation.AFTERDELETE); + dlg.DoModal(GUIWindowManager.ActiveWindow); b = dlg.IsConfirmed; } @@ -1056,9 +1122,11 @@ catch (Exception) { GUIDialogOK dlg = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK); - dlg.SetHeading("Error"); - dlg.SetLine(2, "Cannot rename directory \"" + item.Label + "\"!"); - dlg.DoModal(GUIWindowManager.ActiveWindow); +// dlg.SetHeading("Error"); +// dlg.SetLine(2, "Cannot rename directory \"" + item.Label + "\"!"); + dlg.SetHeading(Constants.Operation.ERROR); + dlg.SetLine(2, Constants.Operation.CANTRENAMEDIR + "\"" + item.Label + "\"!"); + dlg.DoModal(GUIWindowManager.ActiveWindow); } Update(); @@ -1078,9 +1146,11 @@ catch (Exception) { GUIDialogOK dlg = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK); - dlg.SetHeading("Error"); - dlg.SetLine(2, "Cannot rename file \"" + item.Label + "\"!"); - dlg.DoModal(GUIWindowManager.ActiveWindow); +// dlg.SetHeading("Error"); +// dlg.SetLine(2, "Cannot rename file \"" + item.Label + "\"!"); + dlg.SetHeading(Constants.Operation.ERROR); + dlg.SetLine(2, Constants.Operation.CANTRENAMEFILE + "\"" + item.Label + "\"!"); + dlg.DoModal(GUIWindowManager.ActiveWindow); } Update(); @@ -1097,8 +1167,9 @@ { VirtualKeyboard keyboard = (VirtualKeyboard)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_VIRTUAL_KEYBOARD); keyboard.Reset(); - keyboard.Text = "New Folder"; - keyboard.DoModal(GUIWindowManager.ActiveWindow); +// keyboard.Text = "New Folder"; + keyboard.Text = Constants.Operation.NEWFOLDER; + keyboard.DoModal(GUIWindowManager.ActiveWindow); if (keyboard.IsConfirmed) { @@ -1110,9 +1181,11 @@ catch (Exception) { GUIDialogOK dlg = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK); - dlg.SetHeading("Error"); - dlg.SetLine(2, "Cannot create the directory \"" + keyboard.Text + "\"!"); - dlg.DoModal(GUIWindowManager.ActiveWindow); +// dlg.SetHeading("Error"); +// dlg.SetLine(2, "Cannot create the directory \"" + keyboard.Text + "\"!"); + dlg.SetHeading(Constants.Operation.ERROR); + dlg.SetLine(2, Constants.Operation.CANTCREATEDIR + "\"" + keyboard.Text + "\"!"); + dlg.DoModal(GUIWindowManager.ActiveWindow); } } } @@ -1245,11 +1318,15 @@ if (info.Path.Name.Equals(item.Label)) { GUIDialogYesNo dlg = (GUIDialogYesNo)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_YES_NO); - dlg.SetHeading("Encrypton/Decryption"); +/* dlg.SetHeading("Encrypton/Decryption"); dlg.SetLine(1, "Do you wish to change the encryption status"); dlg.SetLine(2, "for all subdirectories and files in current"); - dlg.SetLine(3, "folder?"); - dlg.DoModal(GUIWindowManager.ActiveWindow); + dlg.SetLine(3, "folder?"); */ + dlg.SetHeading(Constants.Operation.ENCRYPTDECRYPT); + dlg.SetLine(1, Constants.Operation.CHANGEENCRYPT); + dlg.SetLine(2, Constants.Operation.ALLSUBDIR); + dlg.SetLine(3, Constants.Operation.CURRENTFOLDER); + dlg.DoModal(GUIWindowManager.ActiveWindow); if (dlg.IsConfirmed) { @@ -1374,8 +1451,9 @@ if (!b) { - ExceptionViewer.ShowDialog("You cannot compress a file or directory", "on an non NTFS drive."); - return; +// ExceptionViewer.ShowDialog("You cannot compress a file or directory", "on an non NTFS drive."); + ExceptionViewer.ShowDialog(Constants.Exceptions.COMPRESS1, Constants.Exceptions.COMPRESS2); + return; } Update(); @@ -1393,11 +1471,15 @@ if (info.Path.Name.Equals(item.Label)) { GUIDialogYesNo dlg = (GUIDialogYesNo)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_YES_NO); - dlg.SetHeading("Compress/Uncompress"); +/* dlg.SetHeading("Compress/Uncompress"); dlg.SetLine(1, "Do you wish to change the compression status"); dlg.SetLine(2, "for all subdirectories and files in current"); - dlg.SetLine(3, "folder?"); - dlg.DoModal(GUIWindowManager.ActiveWindow); + dlg.SetLine(3, "folder?"); */ + dlg.SetHeading(Constants.View.COMPRESS3); + dlg.SetLine(1, Constants.Operation.CHANGECOMPRESS); + dlg.SetLine(2, Constants.Operation.ALLSUBDIR); + dlg.SetLine(3, Constants.Operation.CURRENTFOLDER); + dlg.DoModal(GUIWindowManager.ActiveWindow); if (dlg.IsConfirmed) { @@ -1456,11 +1538,15 @@ { GUIDialogMenu mnu = (GUIDialogMenu)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_MENU); mnu.Reset(); - mnu.SetHeading("Hide/Unhide selected files/directories"); +/* mnu.SetHeading("Hide/Unhide selected files/directories"); mnu.Add("Hide selected files"); mnu.Add("Unhide selected files"); - mnu.Add("Cancel"); - mnu.DoModal(winId); + mnu.Add("Cancel"); */ + mnu.SetHeading(Constants.Operation.HIDEUNHIDESELECT); + mnu.Add(Constants.Operation.HIDESELECT); + mnu.Add(Constants.Operation.UNHIDESELECT); + mnu.Add(Constants.SetupForm.CANCEL); + mnu.DoModal(winId); bool hide; int type; @@ -1528,11 +1614,15 @@ if (info.Path.Name.Equals(item.Label)) { GUIDialogYesNo dlg = (GUIDialogYesNo)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_YES_NO); - dlg.SetHeading("Hide/Unhide"); +/* dlg.SetHeading("Hide/Unhide"); dlg.SetLine(1, "Do you wish to change the hide status"); dlg.SetLine(2, "for all subdirectories and files in current"); - dlg.SetLine(3, "folder?"); - dlg.DoModal(GUIWindowManager.ActiveWindow); + dlg.SetLine(3, "folder?"); */ + dlg.SetHeading(Constants.View.HIDEUNHIDE); + dlg.SetLine(1, Constants.Operation.CHANGEHIDE); + dlg.SetLine(2, Constants.Operation.ALLSUBDIR); + dlg.SetLine(3, Constants.Operation.CURRENTFOLDER); + dlg.DoModal(GUIWindowManager.ActiveWindow); if (dlg.IsConfirmed) { @@ -1602,11 +1692,15 @@ { GUIDialogMenu mnu = (GUIDialogMenu)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_MENU); mnu.Reset(); - mnu.SetHeading("Set/Remove readonly flags from selected files/directories"); +/* mnu.SetHeading("Set/Remove readonly flags from selected files/directories"); mnu.Add("Set readonly flags"); mnu.Add("Remove readonly flags"); - mnu.Add("Cancel"); - mnu.DoModal(winId); + mnu.Add("Cancel"); */ + mnu.SetHeading(Constants.Operation.SETREMOVEFLAGS); + mnu.Add(Constants.Operation.SETFLAGS); + mnu.Add(Constants.Operation.REMOVEFLAGS); + mnu.Add(Constants.SetupForm.CANCEL); + mnu.DoModal(winId); bool readOnly; int type; @@ -1674,11 +1768,15 @@ if (info.Path.Name.Equals(item.Label)) { GUIDialogYesNo dlg = (GUIDialogYesNo)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_YES_NO); - dlg.SetHeading("Set/Remove readonly flag"); +/* dlg.SetHeading("Set/Remove readonly flag"); dlg.SetLine(1, "Do you wish to change the readonly flag"); dlg.SetLine(2, "for all subdirectories and files in current"); - dlg.SetLine(3, "folder?"); - dlg.DoModal(GUIWindowManager.ActiveWindow); + dlg.SetLine(3, "folder?"); */ + dlg.SetHeading(Constants.Operation.SETREMOVEFLAG); + dlg.SetLine(1, Constants.Operation.CHANGEFLAG); + dlg.SetLine(2, Constants.Operation.ALLSUBDIR); + dlg.SetLine(3, Constants.Operation.CURRENTFOLDER); + dlg.DoModal(GUIWindowManager.ActiveWindow); if (dlg.IsConfirmed) { @@ -1742,18 +1840,22 @@ { VirtualKeyboard keyboard = (VirtualKeyboard)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_VIRTUAL_KEYBOARD); keyboard.Reset(); - keyboard.Text = "New Audio Playlist"; - keyboard.DoModal(GUIWindowManager.ActiveWindow); +// keyboard.Text = "New Audio Playlist"; + keyboard.Text = Constants.Playlist.NEWAUDIOPLAYLIST; + keyboard.DoModal(GUIWindowManager.ActiveWindow); if (keyboard.IsConfirmed) { GUIListItem item = GUIControl.GetSelectedListItem(winId, lstId); GUIDialogYesNo dlg = (GUIDialogYesNo)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_YES_NO); - dlg.SetHeading("Create Audio Playlist"); +/* dlg.SetHeading("Create Audio Playlist"); dlg.SetLine(1, "Would you like to include all audio files of"); - dlg.SetLine(2, "the current folder's subdirectories?"); - if (item.IsFolder) + dlg.SetLine(2, "the current folder's subdirectories?"); */ + dlg.SetHeading(Constants.Dialog.CREATEAUDIO); + dlg.SetLine(1, Constants.Playlist.INCLUDEAUDIOFILES); + dlg.SetLine(2, Constants.Playlist.CURRENTFOLDERSUBDIR); + if (item.IsFolder) { dlg.SetLine(3, "(" + currentDrive + "..\\" + item.Label + ")"); } @@ -1787,15 +1889,18 @@ { /*ArrayList*/ lstFiles = new ArrayList(); //dlgOp.SetCurrentFile(GetFilename("Reading files . . .")); - dlgOp.SetText("Reading files . . ."); - ReadDirectories(path, subfolders, Utils.AudioExtensions/*, lstFiles*/); +// dlgOp.SetText("Reading files . . ."); + dlgOp.SetText(Constants.Dialog.READFILE); + ReadDirectories(path, subfolders, Utils.AudioExtensions/*, lstFiles*/); if (lstFiles.Count == 0) { GUIDialogOK dlg = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK); - dlg.SetHeading("Create Audio Playlist"); - dlg.SetLine(1, "No audio files found!"); - dlg.DoModal(GUIWindowManager.ActiveWindow); +/* dlg.SetHeading("Create Audio Playlist"); + dlg.SetLine(1, "No audio files found!"); */ + dlg.SetHeading(Constants.Dialog.CREATEAUDIO); + dlg.SetLine(1, Constants.Playlist.NOAUDIOFILESFOUND); + dlg.DoModal(GUIWindowManager.ActiveWindow); } else { @@ -1821,15 +1926,17 @@ { VirtualKeyboard keyboard = (VirtualKeyboard)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_VIRTUAL_KEYBOARD); keyboard.Reset(); - keyboard.Text = "New Audio Playlist"; - keyboard.DoModal(GUIWindowManager.ActiveWindow); +// keyboard.Text = "New Audio Playlist"; + keyboard.Text = Constants.Playlist.NEWAUDIOPLAYLIST; + keyboard.DoModal(GUIWindowManager.ActiveWindow); if (!keyboard.IsConfirmed) return; lstFiles = new ArrayList(); ShowDialogOperation(GUIDialogOperation.DialogType.AUDIO_PLAYLIST_CREATE); - dlgOp.SetText("Reading files . . ."); +// dlgOp.SetText("Reading files . . ."); + dlgOp.SetText(Constants.Dialog.READFILE); foreach (Info info in selectedList) { @@ -1855,9 +1962,11 @@ if (lstFiles.Count == 0) { GUIDialogOK dlg = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK); - dlg.SetHeading("Create Audio Playlist"); - dlg.SetLine(1, "No audio files found!"); - dlg.DoModal(GUIWindowManager.ActiveWindow); +/* dlg.SetHeading("Create Audio Playlist"); + dlg.SetLine(1, "No audio files found!"); */ + dlg.SetHeading(Constants.Dialog.CREATEAUDIO); + dlg.SetLine(1, Constants.Playlist.NOAUDIOFILESFOUND); + dlg.DoModal(GUIWindowManager.ActiveWindow); } else { @@ -1881,18 +1990,22 @@ { VirtualKeyboard keyboard = (VirtualKeyboard)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_VIRTUAL_KEYBOARD); keyboard.Reset(); - keyboard.Text = "New Video Playlist"; - keyboard.DoModal(GUIWindowManager.ActiveWindow); +// keyboard.Text = "New Video Playlist"; + keyboard.Text = Constants.Playlist.NEWVIDEOPLAYLIST; + keyboard.DoModal(GUIWindowManager.ActiveWindow); if (keyboard.IsConfirmed) { GUIListItem item = GUIControl.GetSelectedListItem(winId, lstId); GUIDialogYesNo dlg = (GUIDialogYesNo)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_YES_NO); - dlg.SetHeading("Create Video Playlist"); +/* dlg.SetHeading("Create Video Playlist"); dlg.SetLine(1, "Would you like to include all video files of"); - dlg.SetLine(2, "the current folder's subdirectories?"); - if (item.IsFolder) + dlg.SetLine(2, "the current folder's subdirectories?"); */ + dlg.SetHeading(Constants.Dialog.CREATEVIDEO); + dlg.SetLine(1, Constants.Playlist.INCLUDEVIDEOFILES); + dlg.SetLine(2, Constants.Playlist.CURRENTFOLDERSUBDIR); + if (item.IsFolder) { dlg.SetLine(3, "(" + currentDrive + "..\\" + item.Label + ")"); } @@ -1926,15 +2039,18 @@ { /*ArrayList*/ lstFiles = new ArrayList(); //dlgOp.SetCurrentFile("Reading files . . ."); - dlgOp.SetText("Reading files . . ."); - ReadDirectories(path, subfolders, Utils.VideoExtensions/*, lstFiles*/); +// dlgOp.SetText("Reading files . . ."); + dlgOp.SetText(Constants.Dialog.READFILE); + ReadDirectories(path, subfolders, Utils.VideoExtensions/*, lstFiles*/); if (lstFiles.Count == 0) { GUIDialogOK dlg = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK); - dlg.SetHeading("Create Video Playlist"); - dlg.SetLine(1, "No video files found!"); - dlg.DoModal(GUIWindowManager.ActiveWindow); +/* dlg.SetHeading("Create Video Playlist"); + dlg.SetLine(1, "N... [truncated message content] |