@@ -30,6 +30,7 @@ private DynamicInputPackViewModel InputPack
3030 return ;
3131
3232 value . CheckImagePaths ( ) ;
33+ _edit_host_devices_window ? . Close ( ) ;
3334 DataContext = value ;
3435 ( ( PanZoomViewModel ) PanZoom . DataContext ) . InputPack = value ;
3536 UnsavedChanges = false ;
@@ -40,6 +41,7 @@ private DynamicInputPackViewModel InputPack
4041
4142 private Window _edit_emulated_devices_window ;
4243 private Window _edit_default_host_devices_window ;
44+ private Window _edit_host_devices_window ;
4345 private Window _edit_metadata_window ;
4446 private Window _edit_tags_window ;
4547
@@ -67,6 +69,29 @@ private void EditDefaultHostDevices_Click(object sender, RoutedEventArgs e)
6769 _edit_default_host_devices_window . Show ( ) ;
6870 }
6971
72+ public ICommand EditHostDevicesCommand => new ViewModels . Commands . RelayCommand < DynamicInputTexture > ( EditHostDevicesS ) ;
73+
74+ private void EditHostDevicesS ( DynamicInputTexture texture )
75+ {
76+ _edit_host_devices_window ? . Close ( ) ;
77+
78+ var user_control = new HostDeviceKeyViewModel { HostDevices = new ViewModels . Commands . UICollection < HostDevice > ( texture . HostDevices ) } ;
79+ texture . HostDevices = user_control . HostDevices ;
80+
81+ _edit_host_devices_window = new Window
82+ {
83+ Title = "Editing Host Devices of " + texture . TextureHash ,
84+ ResizeMode = ResizeMode . CanResize ,
85+ SizeToContent = SizeToContent . Manual ,
86+ Owner = Application . Current . MainWindow ,
87+ Top = this . Top + 50 , Left = this . Left + 70 ,
88+ Width = 620 , Height = 550 , MinWidth = 500 , MinHeight = 400 ,
89+ Content = new Controls . EditHostDevices { DataContext = user_control }
90+ } ;
91+
92+ _edit_host_devices_window . Show ( ) ;
93+ }
94+
7095 private void EditEmulatedDevices_Click ( object sender , RoutedEventArgs e )
7196 {
7297 _edit_emulated_devices_window ? . Close ( ) ;
0 commit comments