Skip to content

Commit

Permalink
Default host devices are now named correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
Venomalia committed Oct 17, 2021
1 parent 400381a commit ffce81f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</MenuItem>
<MenuItem Header="_Edit">
<MenuItem Header="_Emulated Devices..." Name="EditEmulatedDevices" Click="EditEmulatedDevices_Click" Icon="{DynamicResource Icon.EmulatedDevices}"/>
<MenuItem Header="_Host Devices..." Name="EditHostDevices" Click="EditHostDevices_Click" Icon="{DynamicResource Icon.HostDevices}"/>
<MenuItem Header="_Host Devices..." Name="EditHostDevices" Click="EditDefaultHostDevices_Click" Icon="{DynamicResource Icon.HostDevices}"/>
<MenuItem Header="_Metadata..." Name="EditMetadata" Click="EditMetadata_Click" Icon="{DynamicResource Icon.Metadata}" />
</MenuItem>
</Menu>
Expand Down
16 changes: 8 additions & 8 deletions MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private DynamicInputPackViewModel InputPack
private string _saved_document = null;

private Window _edit_emulated_devices_window;
private Window _edit_host_devices_window;
private Window _edit_default_host_devices_window;
private Window _edit_metadata_window;

private void ExportToLocation_Click(object sender, RoutedEventArgs e)
Expand All @@ -65,13 +65,13 @@ private void QuitProgram_Click(object sender, RoutedEventArgs e)
this.Close();
}

private void EditHostDevices_Click(object sender, RoutedEventArgs e)
private void EditDefaultHostDevices_Click(object sender, RoutedEventArgs e)
{
_edit_host_devices_window?.Close();
_edit_default_host_devices_window?.Close();

_edit_host_devices_window = new Window
_edit_default_host_devices_window = new Window
{
Title = "Editing Host Devices",
Title = "Editing Default Host Devices",
Icon = (ImageSource)FindResource("Image.HostDevices"),
ResizeMode = ResizeMode.CanResize,
SizeToContent = SizeToContent.Manual,
Expand All @@ -81,7 +81,7 @@ private void EditHostDevices_Click(object sender, RoutedEventArgs e)
};

UpdateEditWindows();
_edit_host_devices_window.Show();
_edit_default_host_devices_window.Show();
}

private void EditEmulatedDevices_Click(object sender, RoutedEventArgs e)
Expand Down Expand Up @@ -255,10 +255,10 @@ private void UpdateEditWindows()
_edit_emulated_devices_window.Content = user_control;
}

if (_edit_host_devices_window != null)
if (_edit_default_host_devices_window != null)
{
var user_control = new Controls.EditHostDevices { DataContext = new HostDeviceKeyViewModel { HostDevices = InputPack.HostDevices } };
_edit_host_devices_window.Content = user_control;
_edit_default_host_devices_window.Content = user_control;
}

if (_edit_metadata_window != null)
Expand Down

0 comments on commit ffce81f

Please sign in to comment.