fix double click ui when no cam found

This commit is contained in:
Kwimbee
2024-02-18 21:30:19 +01:00
parent 0bdc646973
commit c26bbc55da
2 changed files with 11 additions and 2 deletions

View File

@@ -118,8 +118,11 @@ namespace robospot_camera_finder
private void lbMain_MouseDoubleClick(object sender, MouseEventArgs e)
{
Form viewer = new StreamViewer(lbMain.GetItemText(lbMain.SelectedItem), lbMain.SelectedValue.ToString());
viewer.Show();
if (lbMain.SelectedItem != null)
{
Form viewer = new StreamViewer(lbMain.GetItemText(lbMain.SelectedItem), lbMain.SelectedValue.ToString());
viewer.Show();
}
}
}
}

View File

@@ -7,8 +7,14 @@
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
<StartupObject>robospot_camera_finder.Program</StartupObject>
<ApplicationIcon>favicon.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Content Include="favicon.ico" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Haukcode.sACN" Version="2.0.19" />
<PackageReference Include="LibVLCSharp" Version="3.8.2" />