-
Notifications
You must be signed in to change notification settings - Fork 0
/
ViewLicensesToAdd.xaml
147 lines (142 loc) · 8.24 KB
/
ViewLicensesToAdd.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<Window x:Class="LicenseMe.ViewLicensesToAdd"
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:local="clr-namespace:LicenseMe"
mc:Ignorable="d"
Title="Add license to repository" Height="550" Width="700">
<Grid Margin="10,10,10,13">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" MinWidth="258" />
<ColumnDefinition Width="Auto" MinWidth="514" />
</Grid.ColumnDefinitions>
<GroupBox Header="Available Licensenses" Margin="10,10,10,10">
<ListBox x:Name="LicenseView" Margin="0,0,-2,0" Height="352" VerticalAlignment="Top" SelectionChanged="LicenseViewSelection">
<ListBox.Resources>
<local:BasicLicense x:Key="BasicLicense" />
</ListBox.Resources>
<ListBox.DataContext>
<Binding Source="{StaticResource BasicLicense}"></Binding>
</ListBox.DataContext>
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name }"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</GroupBox>
<TextBlock HorizontalAlignment="Center" Height="60" Margin="0,403,0,0" TextWrapping="Wrap" Width="240"
VerticalAlignment="Top">
<Run Text="Information:" /><LineBreak /><Run Text="Select a license in the list to view the Details " />
<LineBreak /><Run Text="shown at the right of this license." />
</TextBlock>
<GroupBox Grid.Column="1" Header="Basic Information" Margin="10,10,155,378">
<Grid HorizontalAlignment="Center" Height="72" VerticalAlignment="Top" Width="269" UseLayoutRounding="True"
Grid.IsSharedSizeScope="True">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="71*" />
<ColumnDefinition Width="198*" />
</Grid.ColumnDefinitions>
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Height="16" Width="29"
FontWeight="Bold">
Key
</TextBlock>
<TextBlock x:Name="KeyText" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center"
Text="Placeholder" Height="16" Width="178" TextAlignment="Center" />
<TextBlock Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" Height="16" Width="40"
FontWeight="Bold">
Name
</TextBlock>
<TextBlock x:Name="NameText" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Center"
VerticalAlignment="Center" Text="Placeholder" Height="16" Width="178" TextAlignment="Center">
</TextBlock>
<TextBlock Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center" Height="16" Width="49"
FontWeight="Bold">
SPDX ID
</TextBlock>
<TextBlock x:Name="SpdxIdText" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Center"
VerticalAlignment="Center" Text="Placeholder" Height="16" Width="178" TextAlignment="Center">
</TextBlock>
<TextBlock Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center" Height="16" Width="52"
FontWeight="Bold">
Node ID
</TextBlock>
<TextBlock x:Name="NodeIdText" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Center"
VerticalAlignment="Center" Text="Placeholder" Height="16" Width="178" TextAlignment="Center">
</TextBlock>
</Grid>
</GroupBox>
<GroupBox Grid.Column="1" Header="Advanced Information" Margin="10,120,155,85">
<Grid>
<Grid.Resources>
<local:AdvancedLicense x:Key="AdvancedLicense"></local:AdvancedLicense>
</Grid.Resources>
<Grid.DataContext>
<Binding Source="{StaticResource AdvancedLicense}"></Binding>
</Grid.DataContext>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" Text="License URL" FontWeight="Bold"
HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBlock Grid.Row="0" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<Hyperlink x:Name="LicenseUrlLink" >
<TextBlock x:Name="HyperlinkText" Text="~" Width="195" TextAlignment="Center" TextWrapping="Wrap"/>
<Hyperlink.ToolTip>
<ToolTip>
<TextBlock Text="{Binding HtmlUrl}"/>
</ToolTip>
</Hyperlink.ToolTip>
</Hyperlink>
</TextBlock>
<TextBlock Grid.Row="1" Grid.Column="0" Text="Description" FontWeight="Bold"
HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBlock x:Name="LicenseDescription" Grid.Row="2" Grid.Column="0" Grid.RowSpan="3" Grid.ColumnSpan="2"
HorizontalAlignment="Center" VerticalAlignment="Center" MaxWidth="280" MinWidth="280" MinHeight="50" MaxHeight="50" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" UseLayoutRounding="True" TextWrapping="Wrap" TextAlignment="Center" />
<TextBlock Grid.Row="5" Grid.Column="0" FontWeight="Bold" HorizontalAlignment="Center"
VerticalAlignment="Center" Text="Permissions" />
<ListView x:Name="PermsList" Grid.Row="5" Grid.Column="1" Grid.RowSpan="3"></ListView>
<TextBlock Grid.Row="8" Grid.Column="0" FontWeight="Bold" HorizontalAlignment="Center"
VerticalAlignment="Center" Text="Conditions" />
<ListView x:Name="CondList" Grid.Row="8" Grid.Column="1" Grid.RowSpan="3"></ListView>
<TextBlock Grid.Row="11" Grid.Column="0" FontWeight="Bold" HorizontalAlignment="Center"
VerticalAlignment="Center" Text="Limitations" />
<ListView x:Name="LimsList" Grid.Row="11" Grid.Column="1" Grid.RowSpan="3"></ListView>
</Grid>
</GroupBox>
<GroupBox Grid.Column="1" Header="Actions" Margin="10,413,155,10">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Button Grid.Column="0" Content="Choose" HorizontalAlignment="Center" Height="20" Width="104" Click="ChosenLicenseClick"/>
<Button Grid.Column="1" Content="Abort" HorizontalAlignment="Center" Height="20" Width="77" Click="AbortLicensingClick"/>
</Grid>
</GroupBox>
</Grid>
</Window>