@@ -58,7 +58,7 @@ public static DynamicDialog GetFor_ShortcutNotFound(string targetPath)
58
58
return dialog ;
59
59
}
60
60
61
- public static DynamicDialog GetFor_RenameDialog ( )
61
+ public static DynamicDialog GetFor_CreateItemDialog ( string itemType )
62
62
{
63
63
DynamicDialog ? dialog = null ;
64
64
TextBox inputText = new ( )
@@ -70,7 +70,7 @@ public static DynamicDialog GetFor_RenameDialog()
70
70
{
71
71
Title = "InvalidFilename/Text" . GetLocalizedResource ( ) ,
72
72
PreferredPlacement = TeachingTipPlacementMode . Bottom ,
73
- DataContext = new RenameDialogViewModel ( ) ,
73
+ DataContext = new CreateItemDialogViewModel ( ) ,
74
74
} ;
75
75
76
76
warning . SetBinding ( TeachingTip . TargetProperty , new Binding ( )
@@ -88,7 +88,7 @@ public static DynamicDialog GetFor_RenameDialog()
88
88
inputText . TextChanged += ( textBox , args ) =>
89
89
{
90
90
var isInputValid = FilesystemHelpers . IsValidForFilename ( inputText . Text ) ;
91
- ( ( RenameDialogViewModel ) warning . DataContext ) . IsNameInvalid = ! string . IsNullOrEmpty ( inputText . Text ) && ! isInputValid ;
91
+ ( ( CreateItemDialogViewModel ) warning . DataContext ) . IsNameInvalid = ! string . IsNullOrEmpty ( inputText . Text ) && ! isInputValid ;
92
92
dialog ! . ViewModel . DynamicButtonsEnabled = isInputValid
93
93
? DynamicDialogButtons . Primary | DynamicDialogButtons . Cancel
94
94
: DynamicDialogButtons . Cancel ;
@@ -104,7 +104,7 @@ public static DynamicDialog GetFor_RenameDialog()
104
104
105
105
dialog = new DynamicDialog ( new DynamicDialogViewModel ( )
106
106
{
107
- TitleText = "EnterAnItemName ". GetLocalizedResource ( ) ,
107
+ TitleText = string . Format ( "CreateNewItemTitle ". GetLocalizedResource ( ) , itemType ) ,
108
108
SubtitleText = null ,
109
109
DisplayControl = new Grid ( )
110
110
{
@@ -118,7 +118,7 @@ public static DynamicDialog GetFor_RenameDialog()
118
118
{
119
119
vm . HideDialog ( ) ; // Rename successful
120
120
} ,
121
- PrimaryButtonText = "RenameDialog/PrimaryButtonText " . GetLocalizedResource ( ) ,
121
+ PrimaryButtonText = "Create " . GetLocalizedResource ( ) ,
122
122
CloseButtonText = "Cancel" . GetLocalizedResource ( ) ,
123
123
DynamicButtonsEnabled = DynamicDialogButtons . Cancel ,
124
124
DynamicButtons = DynamicDialogButtons . Primary | DynamicDialogButtons . Cancel
0 commit comments