-
Notifications
You must be signed in to change notification settings - Fork 34
/
ConanToolWindowControl.xaml
81 lines (74 loc) · 5 KB
/
ConanToolWindowControl.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<UserControl x:Class="conan_vs_extension.ConanToolWindowControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:vsshell="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.15.0"
Background="{DynamicResource {x:Static vsshell:VsBrushes.WindowKey}}"
Foreground="{DynamicResource {x:Static vsshell:VsBrushes.WindowTextKey}}"
mc:Ignorable="d"
d:DesignHeight="500" d:DesignWidth="800"
Name="ConanToolWindow">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/conan-vs-extension;component/Resources/icons.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBox x:Name="LibrarySearchTextBox" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" Margin="5" Height="24" TextChanged="SearchTextBox_TextChanged"/>
<StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5">
<Button x:Name="ConfigureConanButton" ToolTip="Configure Conan" Click="Configuration_Click" BorderThickness="0" Background="{x:Null}">
<Image Source="{StaticResource ic_fluent_settings_24_regularDrawingImage}" Stretch="None"/>
</Button>
<Button x:Name="UpdateButton" ToolTip="Refresh ConanCenter data" Click="Update_Click" BorderThickness="0" Background="{x:Null}">
<Image Source="{StaticResource ic_fluent_arrow_sync_24_regularDrawingImage}" Stretch="None"/>
</Button>
</StackPanel>
<CheckBox x:Name="ShowPackagesCheckbox" Click="ShowPackagesCheckbox_Click" Content="List only installed libraries" Grid.Row="1" Grid.ColumnSpan="2" Margin="5" />
<ListView x:Name="PackagesListView" SelectionChanged="ListView_SelectionChanged" Grid.Row="2" Grid.ColumnSpan="2" Margin="5" ></ListView>
<StackPanel x:Name="UnsupportedProjectType" Visibility="Collapsed" Grid.Row="3" Grid.ColumnSpan="2" Margin="5">
<TextBlock Margin="5,0,5,5" Visibility="Visible" FontSize="18" FontWeight="Bold">Unsupported Project Type</TextBlock>
<TextBlock Margin="5,0,5,5" TextWrapping="Wrap">
You're using an unsupported project type, or no project has yet been loaded.
The Conan VS Extension only supports projects based on msbuild.
</TextBlock>
</StackPanel>
<StackPanel x:Name="LibraryHeader" Orientation="Vertical" Grid.Row="3" Grid.ColumnSpan="2" Margin="5">
<StackPanel Orientation="Horizontal" Margin="0,0,0,10">
<Label x:Name="LibraryNameLabel" FontSize="18" FontWeight="Bold" VerticalAlignment="Center" Content="Library Name"/>
<ComboBox x:Name="VersionsComboBox" Width="Auto" Margin="5,0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Button x:Name="InstallButton" Content="Add requirement" Margin="5,0" Click="InstallButton_Click" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<Button x:Name="RemoveButton" Content="Remove" Margin="5,0" Click="RemoveButton_Click" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</StackPanel>
<TextBlock x:Name="DescriptionTextBlock" FontSize="14" Margin="5" TextWrapping="Wrap" Text="This is a library that makes one two three..."/>
<TextBlock x:Name="LicenseTextBlock" Margin="5,0,5,5" FontSize="12">
<TextBlock.Inlines>
<Run Text="⚖️ "/>
<Run x:Name="LicenseText" Text="With license GPL"/>
</TextBlock.Inlines>
</TextBlock>
<TextBlock Margin="5,0,5,10">
<Hyperlink x:Name="MoreInfoHyperlink" RequestNavigate="Hyperlink_RequestNavigate">
Check conan.io/center for more info
</Hyperlink>
</TextBlock>
<TextBlock Margin="5,0,5,10">
<Hyperlink x:Name="GitHubRecipeLink" RequestNavigate="Hyperlink_RequestNavigate">
You can also check the Conan recipe in GitHub
</Hyperlink>
</TextBlock>
</StackPanel>
</Grid>
</UserControl>