@@ -38,6 +38,7 @@ private DynamicInputPackViewModel InputPack
3838 set
3939 {
4040 value . CheckImagePaths ( ) ;
41+ _edit_host_devices_window ? . Close ( ) ;
4142 DataContext = value ;
4243 ( ( PanZoomViewModel ) PanZoom . DataContext ) . InputPack = value ;
4344 UnsavedChanges = false ;
@@ -48,6 +49,7 @@ private DynamicInputPackViewModel InputPack
4849
4950 private Window _edit_emulated_devices_window ;
5051 private Window _edit_default_host_devices_window ;
52+ private Window _edit_host_devices_window ;
5153 private Window _edit_metadata_window ;
5254
5355 private void ExportToLocation_Click ( object sender , RoutedEventArgs e )
@@ -84,6 +86,29 @@ private void EditDefaultHostDevices_Click(object sender, RoutedEventArgs e)
8486 _edit_default_host_devices_window . Show ( ) ;
8587 }
8688
89+ public ICommand EditHostDevicesCommand => new ViewModels . Commands . RelayCommand < Data . DynamicInputTexture > ( EditHostDevicesS ) ;
90+
91+ private void EditHostDevicesS ( Data . DynamicInputTexture texture )
92+ {
93+ _edit_host_devices_window ? . Close ( ) ;
94+
95+ var user_control = new HostDeviceKeyViewModel { HostDevices = new ViewModels . Commands . UICollection < Data . HostDevice > ( texture . HostDevices ) } ;
96+ texture . HostDevices = user_control . HostDevices ;
97+
98+ _edit_host_devices_window = new Window
99+ {
100+ Title = "Editing Host Devices of " + texture . TextureHash ,
101+ ResizeMode = ResizeMode . CanResize ,
102+ SizeToContent = SizeToContent . Manual ,
103+ Owner = Application . Current . MainWindow ,
104+ Top = this . Top + 50 , Left = this . Left + 70 ,
105+ Width = 620 , Height = 550 , MinWidth = 500 , MinHeight = 400 ,
106+ Content = new Controls . EditHostDevices { DataContext = user_control }
107+ } ;
108+
109+ _edit_host_devices_window . Show ( ) ;
110+ }
111+
87112 private void EditEmulatedDevices_Click ( object sender , RoutedEventArgs e )
88113 {
89114 _edit_emulated_devices_window ? . Close ( ) ;
0 commit comments