@@ -20,15 +20,14 @@ public sealed class DrivesWidgetViewModel : BaseWidgetViewModel, IWidgetViewMode
2020		public  ObservableCollection < WidgetDriveCardItem >  Items  {  get ;  }  =  [ ] ; 
2121
2222		public  string  WidgetName  =>  nameof ( DrivesWidget ) ; 
23- 		public  string  AutomationProperties  =>  " Drives" . GetLocalizedResource ( ) ; 
24- 		public  string  WidgetHeader  =>  " Drives" . GetLocalizedResource ( ) ; 
23+ 		public  string  AutomationProperties  =>  Strings . Drives . GetLocalizedResource ( ) ; 
24+ 		public  string  WidgetHeader  =>  Strings . Drives . GetLocalizedResource ( ) ; 
2525		public  bool  IsWidgetSettingEnabled  =>  UserSettingsService . GeneralSettingsService . ShowDrivesWidget ; 
2626		public  bool  ShowMenuFlyout  =>  false ; 
2727		public  MenuFlyoutItem ?  MenuFlyoutItem  =>  null ; 
2828
2929		// Commands 
3030
31- 		private  ICommand  FormatDriveCommand  {  get ;  }  =  null ! ; 
3231		private  ICommand  EjectDeviceCommand  {  get ;  }  =  null ! ; 
3332		private  ICommand  OpenInNewPaneCommand  {  get ;  }  =  null ! ; 
3433		private  ICommand  DisconnectNetworkDriveCommand  {  get ;  }  =  null ! ; 
@@ -45,7 +44,6 @@ public DrivesWidgetViewModel()
4544			OpenInNewWindowCommand  =  new  AsyncRelayCommand < WidgetCardItem > ( ExecuteOpenInNewWindowCommand ) ; 
4645			PinToSidebarCommand  =  new  AsyncRelayCommand < WidgetCardItem > ( ExecutePinToSidebarCommand ) ; 
4746			UnpinFromSidebarCommand  =  new  AsyncRelayCommand < WidgetCardItem > ( ExecuteUnpinFromSidebarCommand ) ; 
48- 			FormatDriveCommand  =  new  RelayCommand < WidgetDriveCardItem > ( ExecuteFormatDriveCommand ) ; 
4947			EjectDeviceCommand  =  new  RelayCommand < WidgetDriveCardItem > ( ExecuteEjectDeviceCommand ) ; 
5048			OpenInNewPaneCommand  =  new  AsyncRelayCommand < WidgetDriveCardItem > ( ExecuteOpenInNewPaneCommand ) ; 
5149			OpenPropertiesCommand  =  new  RelayCommand < WidgetDriveCardItem > ( ExecuteOpenPropertiesCommand ) ; 
@@ -99,43 +97,43 @@ public override List<ContextMenuFlyoutItemViewModel> GetItemMenuItems(WidgetCard
9997				new  ContextMenuFlyoutItemViewModelBuilder ( CommandManager . OpenInNewPaneFromHomeAction ) . Build ( ) , 
10098				new ( ) 
10199				{ 
102- 					Text  =  " PinFolderToSidebar" . GetLocalizedResource ( ) , 
100+ 					Text  =  Strings . PinFolderToSidebar . GetLocalizedResource ( ) , 
103101					ThemedIconModel  =  new  ThemedIconModel ( )  {  ThemedIconStyle  =  "App.ThemedIcons.FavoritePin"  } , 
104102					Command  =  PinToSidebarCommand , 
105103					CommandParameter  =  item , 
106104					ShowItem  =  ! isPinned 
107105				} , 
108106				new ( ) 
109107				{ 
110- 					Text  =  " UnpinFolderFromSidebar" . GetLocalizedResource ( ) , 
108+ 					Text  =  Strings . UnpinFolderFromSidebar . GetLocalizedResource ( ) , 
111109					ThemedIconModel  =  new  ThemedIconModel ( )  {  ThemedIconStyle  =  "App.ThemedIcons.FavoritePinRemove"  } , 
112110					Command  =  UnpinFromSidebarCommand , 
113111					CommandParameter  =  item , 
114112					ShowItem  =  isPinned 
115113				} , 
116114				new ( ) 
117115				{ 
118- 					Text  =  " Eject" . GetLocalizedResource ( ) , 
116+ 					Text  =  Strings . Eject . GetLocalizedResource ( ) , 
119117					Command  =  EjectDeviceCommand , 
120118					CommandParameter  =  item , 
121119					ShowItem  =  options ? . ShowEjectDevice  ??  false 
122120				} , 
123121				new ( ) 
124122				{ 
125- 					Text  =  " Properties" . GetLocalizedResource ( ) , 
123+ 					Text  =  Strings . Properties . GetLocalizedResource ( ) , 
126124					ThemedIconModel  =  new  ThemedIconModel ( )  {  ThemedIconStyle  =  "App.ThemedIcons.Properties"  } , 
127125					Command  =  OpenPropertiesCommand , 
128126					CommandParameter  =  item 
129127				} , 
130128				new ( ) 
131129				{ 
132- 					Text  =  " TurnOnBitLocker" . GetLocalizedResource ( ) , 
130+ 					Text  =  Strings . TurnOnBitLocker . GetLocalizedResource ( ) , 
133131					Tag  =  "TurnOnBitLockerPlaceholder" , 
134132					IsEnabled  =  false 
135133				} , 
136134				new ( ) 
137135				{ 
138- 					Text  =  " ManageBitLocker" . GetLocalizedResource ( ) , 
136+ 					Text  =  Strings . ManageBitLocker . GetLocalizedResource ( ) , 
139137					Tag  =  "ManageBitLockerPlaceholder" , 
140138					IsEnabled  =  false 
141139				} , 
@@ -144,25 +142,19 @@ public override List<ContextMenuFlyoutItemViewModel> GetItemMenuItems(WidgetCard
144142					ItemType  =  ContextMenuFlyoutItemType . Separator , 
145143					ShowItem  =  CommandManager . OpenTerminalFromHome . IsExecutable  || 
146144						CommandManager . OpenStorageSenseFromHome . IsExecutable  || 
147- 						( options ? . ShowFormatDrive   ??   false ) 
145+ 						CommandManager . FormatDriveFromHome . IsExecutable 
148146				} , 
149147				new  ContextMenuFlyoutItemViewModelBuilder ( CommandManager . OpenTerminalFromHome ) . Build ( ) , 
150148				new  ContextMenuFlyoutItemViewModelBuilder ( CommandManager . OpenStorageSenseFromHome ) . Build ( ) , 
151- 				new ( ) 
152- 				{ 
153- 					Text  =  "FormatDriveText" . GetLocalizedResource ( ) , 
154- 					Command  =  FormatDriveCommand , 
155- 					CommandParameter  =  item , 
156- 					ShowItem  =  options ? . ShowFormatDrive  ??  false 
157- 				} , 
149+ 				new  ContextMenuFlyoutItemViewModelBuilder ( CommandManager . FormatDriveFromHome ) . Build ( ) , 
158150				new ( ) 
159151				{ 
160152					ItemType  =  ContextMenuFlyoutItemType . Separator , 
161153					Tag  =  "OverflowSeparator" , 
162154				} , 
163155				new ( ) 
164156				{ 
165- 					Text  =  " Loading" . GetLocalizedResource ( ) , 
157+ 					Text  =  Strings . Loading . GetLocalizedResource ( ) , 
166158					Glyph  =  "\xE712 " , 
167159					Items  =  [ ] , 
168160					ID  =  "ItemOverflow" , 
@@ -190,11 +182,6 @@ private async Task ExecuteOpenInNewPaneCommand(WidgetDriveCardItem? item)
190182			ContentPageContext . ShellPage ! . PaneHolder ? . OpenSecondaryPane ( item . Item . Path ) ; 
191183		} 
192184
193- 		private  void  ExecuteFormatDriveCommand ( WidgetDriveCardItem ?  item ) 
194- 		{ 
195- 			Win32Helper . OpenFormatDriveDialog ( item ? . Path  ??  string . Empty ) ; 
196- 		} 
197- 
198185		private  void  ExecuteOpenPropertiesCommand ( WidgetDriveCardItem ?  item ) 
199186		{ 
200187			if  ( ! HomePageContext . IsAnyItemRightClicked  ||  item  is  null ) 
0 commit comments