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

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

View File

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