From e81cf31e291eed52ee665e2e4985b43c4934b542 Mon Sep 17 00:00:00 2001 From: "Simon Zhao (BEYONDSOFT CONSULTING INC)" Date: Thu, 11 Jun 2026 10:55:58 +0800 Subject: [PATCH 1/3] Fix issue 14624: [PropertyGrid] FolderNameEditor does not use the modern FolderBrowserDialog --- .../src/PublicAPI.Shipped.txt | 2 +- .../Windows/Forms/Design/FolderNameEditor.cs | 16 ++-- .../Forms/Design/InitialDirectoryEditor.cs | 4 +- .../Forms/Design/SelectedPathEditor.cs | 4 +- .../Forms/Design/FolderNameEditorTests.cs | 73 ++++--------------- .../FolderNameEditorTests.cs | 6 +- 6 files changed, 30 insertions(+), 75 deletions(-) diff --git a/src/System.Windows.Forms.Design/src/PublicAPI.Shipped.txt b/src/System.Windows.Forms.Design/src/PublicAPI.Shipped.txt index 13bdf66e43a..df83d2bef32 100644 --- a/src/System.Windows.Forms.Design/src/PublicAPI.Shipped.txt +++ b/src/System.Windows.Forms.Design/src/PublicAPI.Shipped.txt @@ -1278,7 +1278,7 @@ virtual System.Windows.Forms.Design.DesignerOptions.UseSmartTags.set -> void virtual System.Windows.Forms.Design.DesignerOptions.UseSnapLines.get -> bool virtual System.Windows.Forms.Design.DesignerOptions.UseSnapLines.set -> void virtual System.Windows.Forms.Design.FileNameEditor.InitializeDialog(System.Windows.Forms.OpenFileDialog! openFileDialog) -> void -virtual System.Windows.Forms.Design.FolderNameEditor.InitializeDialog(System.Windows.Forms.Design.FolderNameEditor.FolderBrowser! folderBrowser) -> void +virtual System.Windows.Forms.Design.FolderNameEditor.InitializeDialog(System.Windows.Forms.FolderBrowserDialog! folderBrowserDialog) -> void virtual System.Windows.Forms.Design.MaskDescriptor.Culture.get -> System.Globalization.CultureInfo! virtual System.Windows.Forms.Design.ParentControlDesigner.AllowControlLasso.get -> bool virtual System.Windows.Forms.Design.ParentControlDesigner.AllowGenericDragBox.get -> bool diff --git a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/FolderNameEditor.cs b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/FolderNameEditor.cs index 49c1d937950..0b2ec14f338 100644 --- a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/FolderNameEditor.cs +++ b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/FolderNameEditor.cs @@ -12,19 +12,21 @@ namespace System.Windows.Forms.Design; [CLSCompliant(false)] public partial class FolderNameEditor : UITypeEditor { - private FolderBrowser? _folderBrowser; + private FolderBrowserDialog? _folderBrowserDialog; public override object? EditValue(ITypeDescriptorContext? context, IServiceProvider provider, object? value) { - if (_folderBrowser is null) + if (_folderBrowserDialog is null) { - _folderBrowser = new FolderBrowser(); - InitializeDialog(_folderBrowser); + _folderBrowserDialog = new FolderBrowserDialog(); + InitializeDialog(_folderBrowserDialog); } - if (_folderBrowser.ShowDialog() == DialogResult.OK) + _folderBrowserDialog.SelectedPath = value as string ?? string.Empty; + + if (_folderBrowserDialog.ShowDialog() == DialogResult.OK) { - return _folderBrowser.DirectoryPath; + return _folderBrowserDialog.SelectedPath; } return value; @@ -37,7 +39,7 @@ public partial class FolderNameEditor : UITypeEditor /// Initializes the folder browser dialog when it is created. This gives you an opportunity /// to configure the dialog as you please. The default implementation provides a generic folder browser. /// - protected virtual void InitializeDialog(FolderBrowser folderBrowser) + protected virtual void InitializeDialog(FolderBrowserDialog folderBrowserDialog) { } } diff --git a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/InitialDirectoryEditor.cs b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/InitialDirectoryEditor.cs index 00ab84f5c3c..03d9e74beec 100644 --- a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/InitialDirectoryEditor.cs +++ b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/InitialDirectoryEditor.cs @@ -8,8 +8,8 @@ namespace System.Windows.Forms.Design; /// internal class InitialDirectoryEditor : FolderNameEditor { - protected override void InitializeDialog(FolderBrowser folderBrowser) + protected override void InitializeDialog(FolderBrowserDialog folderBrowserDialog) { - folderBrowser.Description = SR.InitialDirectoryEditorLabel; + folderBrowserDialog.Description = SR.InitialDirectoryEditorLabel; } } diff --git a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/SelectedPathEditor.cs b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/SelectedPathEditor.cs index 037d9f44c42..350805e75e6 100644 --- a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/SelectedPathEditor.cs +++ b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/SelectedPathEditor.cs @@ -8,8 +8,8 @@ namespace System.Windows.Forms.Design; /// internal class SelectedPathEditor : FolderNameEditor { - protected override void InitializeDialog(FolderBrowser folderBrowser) + protected override void InitializeDialog(FolderBrowserDialog folderBrowserDialog) { - folderBrowser.Description = SR.SelectedPathEditorLabel; + folderBrowserDialog.Description = SR.SelectedPathEditorLabel; } } diff --git a/src/System.Windows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/FolderNameEditorTests.cs b/src/System.Windows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/FolderNameEditorTests.cs index cfb9ee97af3..1b7bc3c60cb 100644 --- a/src/System.Windows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/FolderNameEditorTests.cs +++ b/src/System.Windows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/FolderNameEditorTests.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. #nullable disable @@ -38,71 +38,24 @@ public void FolderNameEditor_GetPaintValueSupported_Invoke_ReturnsFalse(ITypeDes public void FolderNameEditor_InitializeDialog_Invoke_Nop() { SubFolderNameEditor editor = new(); - editor.InitializeDialog(); - } - - public class FolderBrowserTests : FolderNameEditor - { - [Fact] - public void FolderBrowser_Ctor_Default() - { - FolderBrowser browser = new(); - Assert.Empty(browser.DirectoryPath); - Assert.Empty(browser.Description); - Assert.Equal(FolderBrowserStyles.RestrictToFilesystem, browser.Style); - Assert.Equal(FolderBrowserFolder.Desktop, browser.StartLocation); - } - - [Theory] - [NormalizedStringData] - public void FolderBrowser_Description_Set_GetReturnsExpected(string value, string expected) - { - FolderBrowser browser = new() - { - Description = value - }; - Assert.Equal(expected, browser.Description); - - // Set same. - browser.Description = value; - Assert.Equal(expected, browser.Description); - } - - [Theory] - [EnumData] - [InvalidEnumData] - protected void FolderBrowser_StartLocation_Set_GetReturnsExpected(FolderBrowserFolder value) - { - FolderBrowser browser = new() - { - StartLocation = value - }; - Assert.Equal(value, browser.StartLocation); + using FolderBrowserDialog dialog = new(); - // Set same. - browser.StartLocation = value; - Assert.Equal(value, browser.StartLocation); - } + // The base implementation is intentionally a no-op; invoking it should not + // throw and should leave the dialog's defaults untouched. + string originalSelectedPath = dialog.SelectedPath; + string originalDescription = dialog.Description; + Environment.SpecialFolder originalRootFolder = dialog.RootFolder; - [Theory] - [EnumData] - [InvalidEnumData] - protected void FolderBrowser_Style_Set_GetReturnsExpected(FolderBrowserStyles value) - { - FolderBrowser browser = new() - { - Style = value - }; - Assert.Equal(value, browser.Style); + editor.InitializeDialog(dialog); - // Set same. - browser.Style = value; - Assert.Equal(value, browser.Style); - } + Assert.Equal(originalSelectedPath, dialog.SelectedPath); + Assert.Equal(originalDescription, dialog.Description); + Assert.Equal(originalRootFolder, dialog.RootFolder); } private class SubFolderNameEditor : FolderNameEditor { - public void InitializeDialog() => base.InitializeDialog(null); + public new void InitializeDialog(FolderBrowserDialog folderBrowserDialog) => + base.InitializeDialog(folderBrowserDialog); } } diff --git a/src/test/integration/UIIntegrationTests/FolderNameEditorTests.cs b/src/test/integration/UIIntegrationTests/FolderNameEditorTests.cs index d39106f790f..f5ac2e2d4d4 100644 --- a/src/test/integration/UIIntegrationTests/FolderNameEditorTests.cs +++ b/src/test/integration/UIIntegrationTests/FolderNameEditorTests.cs @@ -30,7 +30,7 @@ public void FolderNameEditor_EditValue_ReturnsExpected() private class TestFolderNameEditor : FolderNameEditor { - private FolderBrowser? _folderBrowser; + private FolderBrowserDialog? _folderBrowser; public override object? EditValue(ITypeDescriptorContext? context, IServiceProvider provider, object? value) { @@ -38,13 +38,13 @@ private class TestFolderNameEditor : FolderNameEditor if (_folderBrowser is null) { - _folderBrowser = new FolderBrowser(); + _folderBrowser = new FolderBrowserDialog(); InitializeDialog(_folderBrowser); } if (_folderBrowser.ShowDialog(dialogOwnerForm) == DialogResult.OK) { - return _folderBrowser.DirectoryPath; + return _folderBrowser.SelectedPath; } return value; From 1132aa6a917198e9111f0268586348ce8a92fe4b Mon Sep 17 00:00:00 2001 From: "Simon Zhao (BEYONDSOFT CONSULTING INC)" Date: Mon, 15 Jun 2026 13:57:09 +0800 Subject: [PATCH 2/3] Handle feedback --- .../src/PublicAPI.Shipped.txt | 2 +- .../src/PublicAPI.Unshipped.txt | 1 + .../Windows/Forms/Design/FolderNameEditor.cs | 28 ++++++++++++------- .../FolderNameEditorTests.cs | 12 ++++---- 4 files changed, 26 insertions(+), 17 deletions(-) diff --git a/src/System.Windows.Forms.Design/src/PublicAPI.Shipped.txt b/src/System.Windows.Forms.Design/src/PublicAPI.Shipped.txt index df83d2bef32..13bdf66e43a 100644 --- a/src/System.Windows.Forms.Design/src/PublicAPI.Shipped.txt +++ b/src/System.Windows.Forms.Design/src/PublicAPI.Shipped.txt @@ -1278,7 +1278,7 @@ virtual System.Windows.Forms.Design.DesignerOptions.UseSmartTags.set -> void virtual System.Windows.Forms.Design.DesignerOptions.UseSnapLines.get -> bool virtual System.Windows.Forms.Design.DesignerOptions.UseSnapLines.set -> void virtual System.Windows.Forms.Design.FileNameEditor.InitializeDialog(System.Windows.Forms.OpenFileDialog! openFileDialog) -> void -virtual System.Windows.Forms.Design.FolderNameEditor.InitializeDialog(System.Windows.Forms.FolderBrowserDialog! folderBrowserDialog) -> void +virtual System.Windows.Forms.Design.FolderNameEditor.InitializeDialog(System.Windows.Forms.Design.FolderNameEditor.FolderBrowser! folderBrowser) -> void virtual System.Windows.Forms.Design.MaskDescriptor.Culture.get -> System.Globalization.CultureInfo! virtual System.Windows.Forms.Design.ParentControlDesigner.AllowControlLasso.get -> bool virtual System.Windows.Forms.Design.ParentControlDesigner.AllowGenericDragBox.get -> bool diff --git a/src/System.Windows.Forms.Design/src/PublicAPI.Unshipped.txt b/src/System.Windows.Forms.Design/src/PublicAPI.Unshipped.txt index e69de29bb2d..d5929c4099f 100644 --- a/src/System.Windows.Forms.Design/src/PublicAPI.Unshipped.txt +++ b/src/System.Windows.Forms.Design/src/PublicAPI.Unshipped.txt @@ -0,0 +1 @@ +virtual System.Windows.Forms.Design.FolderNameEditor.InitializeDialog(System.Windows.Forms.FolderBrowserDialog! folderBrowserDialog) -> void diff --git a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/FolderNameEditor.cs b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/FolderNameEditor.cs index 0b2ec14f338..aff82a81648 100644 --- a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/FolderNameEditor.cs +++ b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/FolderNameEditor.cs @@ -12,21 +12,19 @@ namespace System.Windows.Forms.Design; [CLSCompliant(false)] public partial class FolderNameEditor : UITypeEditor { - private FolderBrowserDialog? _folderBrowserDialog; - public override object? EditValue(ITypeDescriptorContext? context, IServiceProvider provider, object? value) { - if (_folderBrowserDialog is null) - { - _folderBrowserDialog = new FolderBrowserDialog(); - InitializeDialog(_folderBrowserDialog); - } + // The dialog is created locally and disposed at the end of the call so its + // native resources (Component/CommonDialog state) are released, and no stale + // configuration leaks between successive invocations of EditValue. + using FolderBrowserDialog folderBrowserDialog = new(); + InitializeDialog(folderBrowserDialog); - _folderBrowserDialog.SelectedPath = value as string ?? string.Empty; + folderBrowserDialog.SelectedPath = value as string ?? string.Empty; - if (_folderBrowserDialog.ShowDialog() == DialogResult.OK) + if (folderBrowserDialog.ShowDialog() == DialogResult.OK) { - return _folderBrowserDialog.SelectedPath; + return folderBrowserDialog.SelectedPath; } return value; @@ -35,6 +33,16 @@ public partial class FolderNameEditor : UITypeEditor /// public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext? context) => UITypeEditorEditStyle.Modal; + /// + /// Initializes the folder browser dialog when it is created. This gives you an opportunity + /// to configure the dialog as you please. The default implementation provides a generic folder browser. + /// + [Obsolete] + [EditorBrowsable(EditorBrowsableState.Never)] + protected virtual void InitializeDialog(FolderBrowser folderBrowser) + { + } + /// /// Initializes the folder browser dialog when it is created. This gives you an opportunity /// to configure the dialog as you please. The default implementation provides a generic folder browser. diff --git a/src/test/integration/UIIntegrationTests/FolderNameEditorTests.cs b/src/test/integration/UIIntegrationTests/FolderNameEditorTests.cs index f5ac2e2d4d4..4c2cf105256 100644 --- a/src/test/integration/UIIntegrationTests/FolderNameEditorTests.cs +++ b/src/test/integration/UIIntegrationTests/FolderNameEditorTests.cs @@ -30,21 +30,21 @@ public void FolderNameEditor_EditValue_ReturnsExpected() private class TestFolderNameEditor : FolderNameEditor { - private FolderBrowserDialog? _folderBrowser; + private FolderBrowserDialog? _folderBrowserDialog; public override object? EditValue(ITypeDescriptorContext? context, IServiceProvider provider, object? value) { using DialogHostForm dialogOwnerForm = new(); - if (_folderBrowser is null) + if (_folderBrowserDialog is null) { - _folderBrowser = new FolderBrowserDialog(); - InitializeDialog(_folderBrowser); + _folderBrowserDialog = new FolderBrowserDialog(); + InitializeDialog(_folderBrowserDialog); } - if (_folderBrowser.ShowDialog(dialogOwnerForm) == DialogResult.OK) + if (_folderBrowserDialog.ShowDialog(dialogOwnerForm) == DialogResult.OK) { - return _folderBrowser.SelectedPath; + return _folderBrowserDialog.SelectedPath = value as string ?? string.Empty; } return value; From 42863e8f62c32374f26a50201ec61625972ac524 Mon Sep 17 00:00:00 2001 From: "Simon Zhao (BEYONDSOFT CONSULTING INC)" Date: Tue, 16 Jun 2026 17:59:50 +0800 Subject: [PATCH 3/3] Add title to the Vista FolderBrowseDialog --- src/System.Windows.Forms.Design/src/Resources/SR.resx | 6 ++++++ .../src/Resources/xlf/SR.cs.xlf | 10 ++++++++++ .../src/Resources/xlf/SR.de.xlf | 10 ++++++++++ .../src/Resources/xlf/SR.es.xlf | 10 ++++++++++ .../src/Resources/xlf/SR.fr.xlf | 10 ++++++++++ .../src/Resources/xlf/SR.it.xlf | 10 ++++++++++ .../src/Resources/xlf/SR.ja.xlf | 10 ++++++++++ .../src/Resources/xlf/SR.ko.xlf | 10 ++++++++++ .../src/Resources/xlf/SR.pl.xlf | 10 ++++++++++ .../src/Resources/xlf/SR.pt-BR.xlf | 10 ++++++++++ .../src/Resources/xlf/SR.ru.xlf | 10 ++++++++++ .../src/Resources/xlf/SR.tr.xlf | 10 ++++++++++ .../src/Resources/xlf/SR.zh-Hans.xlf | 10 ++++++++++ .../src/Resources/xlf/SR.zh-Hant.xlf | 10 ++++++++++ .../Windows/Forms/Design/InitialDirectoryEditor.cs | 3 ++- .../System/Windows/Forms/Design/SelectedPathEditor.cs | 3 ++- 16 files changed, 140 insertions(+), 2 deletions(-) diff --git a/src/System.Windows.Forms.Design/src/Resources/SR.resx b/src/System.Windows.Forms.Design/src/Resources/SR.resx index dfb8480fa8c..865de69e44b 100644 --- a/src/System.Windows.Forms.Design/src/Resources/SR.resx +++ b/src/System.Windows.Forms.Design/src/Resources/SR.resx @@ -1179,6 +1179,12 @@ Press Ctrl+Enter to accept Text. Select the directory that will initially be opened in the dialog. + + Initial Directory + + + Selected Path + ActiveX Control diff --git a/src/System.Windows.Forms.Design/src/Resources/xlf/SR.cs.xlf b/src/System.Windows.Forms.Design/src/Resources/xlf/SR.cs.xlf index 2175a956532..3d9f663c85b 100644 --- a/src/System.Windows.Forms.Design/src/Resources/xlf/SR.cs.xlf +++ b/src/System.Windows.Forms.Design/src/Resources/xlf/SR.cs.xlf @@ -1380,6 +1380,11 @@ Vyberte adresář, který se otevře v dialogu jako první. + + Initial Directory + Initial Directory + + '{1}' is not a valid value for '{0}'. Hodnota {1} není platnou hodnotou pro argument {0}. @@ -1717,6 +1722,11 @@ Stisknutím kombinace kláves Ctrl+Enter text přijměte. Vyberte cestu ke složce, která bude standardně vybrána v dialogovém okně FolderBrowserDialog. + + Selected Path + Selected Path + + You cannot create a new session because this serialization manager already has an active serialization session. Nelze vytvořit novou relaci, protože tento správce serializace již obsahuje aktivní relaci serializace. diff --git a/src/System.Windows.Forms.Design/src/Resources/xlf/SR.de.xlf b/src/System.Windows.Forms.Design/src/Resources/xlf/SR.de.xlf index 148b26622ff..64ce3c40648 100644 --- a/src/System.Windows.Forms.Design/src/Resources/xlf/SR.de.xlf +++ b/src/System.Windows.Forms.Design/src/Resources/xlf/SR.de.xlf @@ -1380,6 +1380,11 @@ Wählen Sie das Verzeichnis aus, das anfänglich im Dialogfeld geöffnet wird. + + Initial Directory + Initial Directory + + '{1}' is not a valid value for '{0}'. {1} ist kein gültiger Wert für {0}. @@ -1717,6 +1722,11 @@ Drücken Sie STRG+EINGABETASTE, um Text zu übernehmen. Wählen Sie den Pfad für den Ordner, der zu Beginn in FolderBrowserDialog ausgewählt wird. + + Selected Path + Selected Path + + You cannot create a new session because this serialization manager already has an active serialization session. Sie können keine neue Sitzung erstellen, da dieser Serialisierungs-Manager bereits eine aktive Serialisierungssitzung besitzt. diff --git a/src/System.Windows.Forms.Design/src/Resources/xlf/SR.es.xlf b/src/System.Windows.Forms.Design/src/Resources/xlf/SR.es.xlf index 2f7dde35ffe..8ecb12ab77a 100644 --- a/src/System.Windows.Forms.Design/src/Resources/xlf/SR.es.xlf +++ b/src/System.Windows.Forms.Design/src/Resources/xlf/SR.es.xlf @@ -1380,6 +1380,11 @@ Seleccione el directorio que se abrirá inicialmente en el diálogo. + + Initial Directory + Initial Directory + + '{1}' is not a valid value for '{0}'. '{1}' no es un valor válido para '{0}'. @@ -1717,6 +1722,11 @@ Presione Ctrl+Entrar para aceptar el texto. Seleccione la ruta de acceso a la carpeta que se seleccionará inicialmente en FolderBrowserDialog. + + Selected Path + Selected Path + + You cannot create a new session because this serialization manager already has an active serialization session. No puede crear una nueva sesión porque este administrador de serialización ya tiene una sesión de serialización activa. diff --git a/src/System.Windows.Forms.Design/src/Resources/xlf/SR.fr.xlf b/src/System.Windows.Forms.Design/src/Resources/xlf/SR.fr.xlf index 5cd4e093aac..f7684409461 100644 --- a/src/System.Windows.Forms.Design/src/Resources/xlf/SR.fr.xlf +++ b/src/System.Windows.Forms.Design/src/Resources/xlf/SR.fr.xlf @@ -1380,6 +1380,11 @@ Sélectionnez le répertoire à ouvrir initialement dans la boîte de dialogue. + + Initial Directory + Initial Directory + + '{1}' is not a valid value for '{0}'. '{1}' n'est pas une valeur valide pour '{0}'. @@ -1717,6 +1722,11 @@ Appuyez sur Ctrl+Entrée pour valider le texte. Sélectionnez le chemin du dossier qui sera sélectionné initialement dans FolderBrowserDialog. + + Selected Path + Selected Path + + You cannot create a new session because this serialization manager already has an active serialization session. Vous ne pouvez pas créer une nouvelle session, car ce gestionnaire de sérialisation dispose déjà d'une session de sérialisation active. diff --git a/src/System.Windows.Forms.Design/src/Resources/xlf/SR.it.xlf b/src/System.Windows.Forms.Design/src/Resources/xlf/SR.it.xlf index 8ece198bf04..83872701b16 100644 --- a/src/System.Windows.Forms.Design/src/Resources/xlf/SR.it.xlf +++ b/src/System.Windows.Forms.Design/src/Resources/xlf/SR.it.xlf @@ -1380,6 +1380,11 @@ Consente di selezionare la directory che verrà aperta inizialmente nella finestra di dialogo. + + Initial Directory + Initial Directory + + '{1}' is not a valid value for '{0}'. '{1}' non è un valore valido per '{0}'. @@ -1717,6 +1722,11 @@ Per accettare testo premere CTRL+INVIO. Selezionare il percorso della cartella che dovrà essere selezionata subito in FolderBrowserDialog. + + Selected Path + Selected Path + + You cannot create a new session because this serialization manager already has an active serialization session. Non è possibile creare una nuova sessione perché per questo gestore di serializzazione esiste già una sessione di serializzazione attiva. diff --git a/src/System.Windows.Forms.Design/src/Resources/xlf/SR.ja.xlf b/src/System.Windows.Forms.Design/src/Resources/xlf/SR.ja.xlf index 36d5d8c9b26..a3f4316d721 100644 --- a/src/System.Windows.Forms.Design/src/Resources/xlf/SR.ja.xlf +++ b/src/System.Windows.Forms.Design/src/Resources/xlf/SR.ja.xlf @@ -1380,6 +1380,11 @@ ダイアログで最初に開くディレクトリを選択してください。 + + Initial Directory + Initial Directory + + '{1}' is not a valid value for '{0}'. '{1}' は '{0}' に有効な値ではありません。 @@ -1717,6 +1722,11 @@ Press Ctrl+Enter to accept Text. FolderBrowserDialog で最初に選択されるフォルダーへのパスを選択してください。 + + Selected Path + Selected Path + + You cannot create a new session because this serialization manager already has an active serialization session. このシリアル化マネージャーにはアクティブなシリアル化セッションが既に存在するため、新しいセッションを作成できません。 diff --git a/src/System.Windows.Forms.Design/src/Resources/xlf/SR.ko.xlf b/src/System.Windows.Forms.Design/src/Resources/xlf/SR.ko.xlf index 71df8937656..4d51c9509d1 100644 --- a/src/System.Windows.Forms.Design/src/Resources/xlf/SR.ko.xlf +++ b/src/System.Windows.Forms.Design/src/Resources/xlf/SR.ko.xlf @@ -1380,6 +1380,11 @@ 대화 상자에서 처음에 열 디렉터리를 선택합니다. + + Initial Directory + Initial Directory + + '{1}' is not a valid value for '{0}'. '{1}'은(는) '{0}'에 사용할 수 없는 값입니다. @@ -1717,6 +1722,11 @@ Press Ctrl+Enter to accept Text. FolderBrowserDialog에서 처음 선택되어 표시될 폴더의 경로를 선택합니다. + + Selected Path + Selected Path + + You cannot create a new session because this serialization manager already has an active serialization session. 이 serialization 관리자에 이미 활성 serialization 세션이 있으므로 새 세션을 만들 수 없습니다. diff --git a/src/System.Windows.Forms.Design/src/Resources/xlf/SR.pl.xlf b/src/System.Windows.Forms.Design/src/Resources/xlf/SR.pl.xlf index 1b457df0f66..c421c323141 100644 --- a/src/System.Windows.Forms.Design/src/Resources/xlf/SR.pl.xlf +++ b/src/System.Windows.Forms.Design/src/Resources/xlf/SR.pl.xlf @@ -1380,6 +1380,11 @@ Wybierz katalog, który będzie wstępnie otwierany w oknie dialogowym. + + Initial Directory + Initial Directory + + '{1}' is not a valid value for '{0}'. „{1}” nie jest prawidłową wartością elementu „{0}”. @@ -1717,6 +1722,11 @@ Naciśnij klawisze Ctrl+Enter, aby zaakceptować tekst. Wybierz ścieżkę do folderu, która będzie początkowo wybrana w oknie dialogowym FolderBrowserDialog. + + Selected Path + Selected Path + + You cannot create a new session because this serialization manager already has an active serialization session. Nie można utworzyć nowej sesji, ponieważ jest już aktywna sesja serializacji tego menedżera. diff --git a/src/System.Windows.Forms.Design/src/Resources/xlf/SR.pt-BR.xlf b/src/System.Windows.Forms.Design/src/Resources/xlf/SR.pt-BR.xlf index 41af0a9ebda..089ac6380fc 100644 --- a/src/System.Windows.Forms.Design/src/Resources/xlf/SR.pt-BR.xlf +++ b/src/System.Windows.Forms.Design/src/Resources/xlf/SR.pt-BR.xlf @@ -1380,6 +1380,11 @@ Selecione o diretório que será aberto inicialmente na caixa de diálogo. + + Initial Directory + Initial Directory + + '{1}' is not a valid value for '{0}'. '{1}' não é um valor válido para '{0}'. @@ -1717,6 +1722,11 @@ Pressione Ctrl+Enter para aceitar Texto. Selecione o caminho para a pasta que será selecionada inicialmente no FolderBrowserDialog. + + Selected Path + Selected Path + + You cannot create a new session because this serialization manager already has an active serialization session. Você não pode criar uma nova sessão porque esse gerente de serialização já possui uma sessão de serialização ativa. diff --git a/src/System.Windows.Forms.Design/src/Resources/xlf/SR.ru.xlf b/src/System.Windows.Forms.Design/src/Resources/xlf/SR.ru.xlf index b58af5f8c40..c1b477f6bef 100644 --- a/src/System.Windows.Forms.Design/src/Resources/xlf/SR.ru.xlf +++ b/src/System.Windows.Forms.Design/src/Resources/xlf/SR.ru.xlf @@ -1380,6 +1380,11 @@ Выберите каталог, который будет изначально открываться в диалоговом окне. + + Initial Directory + Initial Directory + + '{1}' is not a valid value for '{0}'. '{1}' не является допустимым значением для '{0}'. @@ -1717,6 +1722,11 @@ Press Ctrl+Enter to accept Text. Выберите путь к папке, которая изначально будет выбираться в FolderBrowserDialog. + + Selected Path + Selected Path + + You cannot create a new session because this serialization manager already has an active serialization session. Вы не можете создать новый сеанс, так как у этого диспетчера сериализации уже есть активный сеанс сериализации. diff --git a/src/System.Windows.Forms.Design/src/Resources/xlf/SR.tr.xlf b/src/System.Windows.Forms.Design/src/Resources/xlf/SR.tr.xlf index 6b53846d44d..5582494d5de 100644 --- a/src/System.Windows.Forms.Design/src/Resources/xlf/SR.tr.xlf +++ b/src/System.Windows.Forms.Design/src/Resources/xlf/SR.tr.xlf @@ -1380,6 +1380,11 @@ Başlangıçta iletişim kutusunda açılacak olan dizini seçin. + + Initial Directory + Initial Directory + + '{1}' is not a valid value for '{0}'. '{1}' değeri '{0}' öğesi için geçerli değil. @@ -1717,6 +1722,11 @@ Metni kabul etmek için Ctrl+Enter tuşlarına basın. FolderBrowserDialog iletişim kutusunda başlangıçta seçili olacak klasörün yolunu seçin. + + Selected Path + Selected Path + + You cannot create a new session because this serialization manager already has an active serialization session. Bu serileştirme yöneticisinin zaten etkin bir serileştirme oturumu bulunduğundan yeni oturum oluşturamazsınız. diff --git a/src/System.Windows.Forms.Design/src/Resources/xlf/SR.zh-Hans.xlf b/src/System.Windows.Forms.Design/src/Resources/xlf/SR.zh-Hans.xlf index 4a3a3443574..45411b88a71 100644 --- a/src/System.Windows.Forms.Design/src/Resources/xlf/SR.zh-Hans.xlf +++ b/src/System.Windows.Forms.Design/src/Resources/xlf/SR.zh-Hans.xlf @@ -1380,6 +1380,11 @@ 选择要最先将在对话框中打开的目录。 + + Initial Directory + Initial Directory + + '{1}' is not a valid value for '{0}'. “{1}”不是“{0}”的有效值。 @@ -1717,6 +1722,11 @@ Press Ctrl+Enter to accept Text. 选择最初会在 FolderBrowserDialog 中被选中的文件夹的路径。 + + Selected Path + Selected Path + + You cannot create a new session because this serialization manager already has an active serialization session. 此序列化管理器已有活动的序列化会话,因此不能创建新的会话。 diff --git a/src/System.Windows.Forms.Design/src/Resources/xlf/SR.zh-Hant.xlf b/src/System.Windows.Forms.Design/src/Resources/xlf/SR.zh-Hant.xlf index 781f6fea826..70e290d9f3f 100644 --- a/src/System.Windows.Forms.Design/src/Resources/xlf/SR.zh-Hant.xlf +++ b/src/System.Windows.Forms.Design/src/Resources/xlf/SR.zh-Hant.xlf @@ -1380,6 +1380,11 @@ 選取一開始要在對話方塊中開啟的目錄。 + + Initial Directory + Initial Directory + + '{1}' is not a valid value for '{0}'. '{1}' 不是 '{0}' 的有效值。 @@ -1717,6 +1722,11 @@ Press Ctrl+Enter to accept Text. 請選取在 FolderBrowserDialog 中一開始就被選取的資料夾的路徑。 + + Selected Path + Selected Path + + You cannot create a new session because this serialization manager already has an active serialization session. 無法建立新工作階段,因為這個序列化管理員已經有使用中的序列化工作階段。 diff --git a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/InitialDirectoryEditor.cs b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/InitialDirectoryEditor.cs index 03d9e74beec..4c4bbb4068e 100644 --- a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/InitialDirectoryEditor.cs +++ b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/InitialDirectoryEditor.cs @@ -10,6 +10,7 @@ internal class InitialDirectoryEditor : FolderNameEditor { protected override void InitializeDialog(FolderBrowserDialog folderBrowserDialog) { - folderBrowserDialog.Description = SR.InitialDirectoryEditorLabel; + folderBrowserDialog.UseDescriptionForTitle = true; + folderBrowserDialog.Description = SR.InitialDirectoryTitle; } } diff --git a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/SelectedPathEditor.cs b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/SelectedPathEditor.cs index 350805e75e6..ab81b8d6b98 100644 --- a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/SelectedPathEditor.cs +++ b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/SelectedPathEditor.cs @@ -10,6 +10,7 @@ internal class SelectedPathEditor : FolderNameEditor { protected override void InitializeDialog(FolderBrowserDialog folderBrowserDialog) { - folderBrowserDialog.Description = SR.SelectedPathEditorLabel; + folderBrowserDialog.UseDescriptionForTitle = true; + folderBrowserDialog.Description = SR.SelectedPathTitle; } }