Skip to content

Commit b6a99f4

Browse files
committed
More accurate channel names, add selected entries to clipboard, use 64bit build
1 parent ee67a62 commit b6a99f4

File tree

4 files changed

+35
-8
lines changed

4 files changed

+35
-8
lines changed

wv2util/AppOverrideUi.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
<Button x:Name="RuntimesReload" Content="&#x1F504;" Click="RuntimesReload_Click"/>
6363
</StackPanel>
6464
</TabItem.Header>
65-
<ListView x:Name="RuntimeList" ItemsSource="{Binding}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" SelectionChanged="ListView_SelectionChanged">
65+
<ListView x:Name="RuntimeList" ItemsSource="{Binding}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" SelectionChanged="RuntimeListViewSelectionChanged">
6666
<ListView.View>
6767
<GridView>
6868
<GridViewColumn Header="Path" DisplayMemberBinding="{Binding RuntimeLocation}"/>
@@ -79,7 +79,7 @@
7979
<Button x:Name="HostAppsReload" Content="&#x1F504;" Click="HostAppsReload_Click"/>
8080
</StackPanel>
8181
</TabItem.Header>
82-
<ListView x:Name="HostAppListView" ItemsSource="{Binding}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
82+
<ListView x:Name="HostAppListView" ItemsSource="{Binding}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" SelectionChanged="HostAppListViewSelectionChanged">
8383
<ListView.View>
8484
<GridView>
8585
<GridViewColumn Header="Executable" DisplayMemberBinding="{Binding ExecutableName}"/>

wv2util/AppOverrideUi.xaml.cs

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,43 @@ private void Reload_Click(object sender, RoutedEventArgs e)
5656
AppOverrideListData.FromRegistry();
5757
}
5858

59-
private void ListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
59+
private void RuntimeListViewSelectionChanged(object sender, SelectionChangedEventArgs e)
6060
{
6161
if (RuntimeList.SelectedIndex >= 0)
6262
{
6363
RuntimeEntry selection = (RuntimeEntry)RuntimeList.SelectedItem;
6464
try
6565
{
66-
Clipboard.SetText(selection.RuntimeLocation);
66+
Clipboard.SetText(selection.RuntimeLocation + "\t" +
67+
selection.Version + "\t" +
68+
selection.Channel);
6769
}
6870
catch (System.Runtime.InteropServices.COMException)
6971
{
7072
// We might fail to open clipboard. Just ignore
7173
}
7274
}
7375
}
76+
private void HostAppListViewSelectionChanged(object sender, SelectionChangedEventArgs e)
77+
{
78+
if (HostAppListView.SelectedIndex >= 0)
79+
{
80+
HostAppEntry selection = (HostAppEntry)HostAppListView.SelectedItem;
81+
try
82+
{
83+
Clipboard.SetText(selection.ExecutableName + "\t" +
84+
selection.Runtime.RuntimeLocation + "\t" +
85+
selection.Runtime.Version + "\t" +
86+
selection.Runtime.Channel + "\t" +
87+
selection.UserDataPath + "\t" +
88+
selection.ExecutablePath);
89+
}
90+
catch (System.Runtime.InteropServices.COMException)
91+
{
92+
// We might fail to open clipboard. Just ignore
93+
}
94+
}
95+
}
7496

7597
private void AppOverrideRuntimePathButton_Click(object sender, RoutedEventArgs e)
7698
{

wv2util/RuntimeList.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,26 @@ public string Channel
3636
{
3737
get
3838
{
39-
if (ExePath.ToLower().Contains("sxs"))
39+
if (ExePath.ToLower().Contains("\\edge sxs\\"))
4040
{
4141
return "Canary";
4242
}
43-
else if (ExePath.ToLower().Contains("beta"))
43+
else if (ExePath.ToLower().Contains("\\edge beta\\"))
4444
{
4545
return "Beta";
4646
}
47-
else if (ExePath.ToLower().Contains("dev"))
47+
else if (ExePath.ToLower().Contains("\\edge dev\\"))
4848
{
4949
return "Dev";
5050
}
51-
else
51+
else if (ExePath.ToLower().Contains("\\edge\\"))
5252
{
5353
return "Stable";
5454
}
55+
else
56+
{
57+
return "Unknown";
58+
}
5559
}
5660
}
5761

wv2util/wv2util.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<DefineConstants>DEBUG;TRACE</DefineConstants>
2525
<ErrorReport>prompt</ErrorReport>
2626
<WarningLevel>2</WarningLevel>
27+
<Prefer32Bit>false</Prefer32Bit>
2728
</PropertyGroup>
2829
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
2930
<PlatformTarget>AnyCPU</PlatformTarget>

0 commit comments

Comments
 (0)