Skip to content

Commit 6140864

Browse files
committed
Delete unused images. Styles for context menu images.
1 parent ca3cd6d commit 6140864

28 files changed

+59
-194
lines changed
-822 Bytes
Binary file not shown.
Binary file not shown.
-487 Bytes
Binary file not shown.
-556 Bytes
Binary file not shown.
-10.1 KB
Binary file not shown.
-7.69 KB
Binary file not shown.
-502 Bytes
Binary file not shown.
-622 Bytes
Binary file not shown.
-487 Bytes
Binary file not shown.
-2.35 KB
Binary file not shown.
-590 Bytes
Binary file not shown.
-590 Bytes
Binary file not shown.
-813 Bytes
Binary file not shown.
-3.8 KB
Binary file not shown.
-8.9 KB
Binary file not shown.
-653 Bytes
Binary file not shown.
-385 Bytes
Binary file not shown.
-842 Bytes
Binary file not shown.
-916 Bytes
Binary file not shown.

src/Stratis.VS.StratisEVM/Stratis.VS.StratisEVM.csproj

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -92,75 +92,15 @@
9292
<Compile Include="VSUtil.cs" />
9393
</ItemGroup>
9494
<ItemGroup>
95-
<Content Include="Images3\Add.png">
96-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
97-
<IncludeInVSIX>true</IncludeInVSIX>
98-
</Content>
99-
<Content Include="Images3\Book.png">
100-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
101-
<IncludeInVSIX>true</IncludeInVSIX>
102-
</Content>
103-
<Content Include="Images\AddNetwork.png">
104-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
105-
<IncludeInVSIX>true</IncludeInVSIX>
106-
</Content>
107-
<Content Include="Images\BlockchainNetwork.png">
108-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
109-
<IncludeInVSIX>true</IncludeInVSIX>
110-
</Content>
111-
<Content Include="Images\FolderClosed.png">
112-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
113-
<IncludeInVSIX>true</IncludeInVSIX>
114-
</Content>
115-
<Content Include="Images3\FolderLogo.png">
116-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
117-
<IncludeInVSIX>true</IncludeInVSIX>
118-
</Content>
119-
<Content Include="Images\FolderOpen.png">
120-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
121-
<IncludeInVSIX>true</IncludeInVSIX>
122-
</Content>
12395
<Content Include="Images\FolderSelected.png">
12496
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
12597
<IncludeInVSIX>true</IncludeInVSIX>
12698
</Content>
127-
<Content Include="Images3\Home.png">
128-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
129-
<IncludeInVSIX>true</IncludeInVSIX>
130-
</Content>
131-
<Content Include="Images3\Info.png">
132-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
133-
<IncludeInVSIX>true</IncludeInVSIX>
134-
</Content>
135-
<Content Include="Images3\Logo.png">
136-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
137-
<IncludeInVSIX>true</IncludeInVSIX>
138-
</Content>
139-
<Content Include="Images3\Movie.png">
140-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
141-
<IncludeInVSIX>true</IncludeInVSIX>
142-
</Content>
143-
<Content Include="Images3\Music.png">
144-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
145-
<IncludeInVSIX>true</IncludeInVSIX>
146-
</Content>
147-
<Content Include="Images3\Remove.png">
148-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
149-
<IncludeInVSIX>true</IncludeInVSIX>
150-
</Content>
151-
<Content Include="Images3\Star.png">
152-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
153-
<IncludeInVSIX>true</IncludeInVSIX>
154-
</Content>
15599
<Resource Include="Images\SolidityProjectProjectIcon.png" />
156100
<Resource Include="Images\SoliditySourceFileIcon.png" />
157101
<Content Include="BuildSystem\version.txt">
158102
<IncludeInVSIX>true</IncludeInVSIX>
159103
</Content>
160-
<Content Include="Images\Globe.png">
161-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
162-
<IncludeInVSIX>true</IncludeInVSIX>
163-
</Content>
164104
<Content Include="Images\StratisHeader.jpg">
165105
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
166106
<IncludeInVSIX>true</IncludeInVSIX>
@@ -169,10 +109,6 @@
169109
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
170110
<IncludeInVSIX>true</IncludeInVSIX>
171111
</Content>
172-
<Content Include="Images\Url.png">
173-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
174-
<IncludeInVSIX>true</IncludeInVSIX>
175-
</Content>
176112
<Content Include="LICENSE.txt">
177113
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
178114
<IncludeInVSIX>true</IncludeInVSIX>

src/Stratis.VS.StratisEVM/UI/BlockchainExplorer/BlockchainExplorerTree.cs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,6 @@ public class BlockchainExplorerTree : TreeViewBase<BlockchainInfo>
1818

1919
public static RoutedCommand NewEndpointCmd { get; } = new RoutedCommand();
2020

21-
public static BitmapImage FolderClosedIcon { get; } = new BitmapImage(new Uri(Runtime.AssemblyLocation.CombinePath("Images", "FolderClosed.png")));
22-
23-
public static BitmapImage FolderOpenIcon { get; } = new BitmapImage(new Uri(Runtime.AssemblyLocation.CombinePath("Images", "FolderOpen.png")));
24-
25-
public static BitmapImage FolderSelectedIcon { get; } = new BitmapImage(new Uri(Runtime.AssemblyLocation.CombinePath("Images", "FolderOpen.png")));
26-
27-
public static BitmapImage NetworkIcon { get; } = new BitmapImage(new Uri(Runtime.AssemblyLocation.CombinePath("Images", "BlockChainNetwork.png")));
28-
29-
public static BitmapImage StratisMainnetIcon { get; } = new BitmapImage(new Uri(Runtime.AssemblyLocation.CombinePath("Images", "StratisLogo64x64.png")));
30-
31-
public static BitmapImage StratisIcon { get; } = new BitmapImage(new Uri(Runtime.AssemblyLocation.CombinePath("Images", "StratisIcon.png")));
32-
33-
public static BitmapImage GlobeIcon { get; } = new BitmapImage(new Uri(Runtime.AssemblyLocation.CombinePath("Images", "Globe.png")));
34-
35-
public static BitmapImage UrlIcon { get; } = new BitmapImage(new Uri(Runtime.AssemblyLocation.CombinePath("Images", "Url.png")));
36-
37-
public static BitmapImage AddNetworkIcon { get; } = new BitmapImage(new Uri(Runtime.AssemblyLocation.CombinePath("Images", "AddNetwork.png")));
38-
3921
#endregion
4022

4123
#region Methods

tests/Stratis.DevEx.Wpf.Test/BlockchainExplorer/BlockchainExplorerToolWindowControl.xaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,9 @@
2929
<StackPanel Orientation="Vertical" Grid.Row="0">
3030
<stratisui:BlockchainExplorerTree x:Name="BlockchainExplorerTree"
3131
Items="{Binding Source={StaticResource Blockchains}, Path=Objects}"
32-
RootNode="{StaticResource RootNode}"
3332
TreeNodeStyle="{StaticResource TreeViewItemStyle}"
3433
TreeStyle="{StaticResource TreeViewStyle}"
3534
NodeSortDescriptions="{StaticResource AscendingNames}"
36-
NodeContextMenu="{StaticResource TreeMenu}"
3735
SelectNodesOnRightClick="True"
3836
SelectedItemChanged="OnSelectedItemChanged"
3937
IsLazyLoading="False"

tests/Stratis.DevEx.Wpf.Test/BlockchainExplorer/BlockchainExplorerToolWindowControl.xaml.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,10 @@ private async void NewNetworkCmdExecuted(object sender, ExecutedRoutedEventArgs
132132
{
133133
return;
134134
}
135-
tree.Items.First().AddChild(BlockchainInfoKind.Network, name.Text);
135+
var n = new Network(rpcurl.Text, BigInteger.Parse(chainid.Text));
136+
var t = tree.SelectedItem.AddChild(BlockchainInfoKind.Network, name.Text, n);
137+
var endpoints = t.AddChild(BlockchainInfoKind.Folder, "Endpoints");
138+
endpoints.AddChild(BlockchainInfoKind.Endpoint, rpcurl.Text);
136139
}
137140
catch (Exception ex)
138141
{

tests/Stratis.DevEx.Wpf.Test/BlockchainExplorer/BlockchainExplorerTree.cs

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,6 @@ public class BlockchainExplorerTree : TreeViewBase<BlockchainInfo>
1717
public static RoutedCommand NewNetworkCmd { get; } = new RoutedCommand();
1818

1919
public static RoutedCommand NewEndpointCmd { get; } = new RoutedCommand();
20-
21-
public static BitmapImage FolderClosedIcon { get; } = new BitmapImage(new Uri(Runtime.AssemblyLocation.CombinePath("Images", "FolderClosed.png")));
22-
23-
public static BitmapImage FolderOpenIcon { get; } = new BitmapImage(new Uri(Runtime.AssemblyLocation.CombinePath("Images", "FolderOpen.png")));
24-
25-
public static BitmapImage FolderSelectedIcon { get; } = new BitmapImage(new Uri(Runtime.AssemblyLocation.CombinePath("Images", "FolderOpen.png")));
26-
27-
public static BitmapImage NetworkIcon { get; } = new BitmapImage(new Uri(Runtime.AssemblyLocation.CombinePath("Images", "BlockChainNetwork.png")));
28-
29-
public static BitmapImage StratisMainnetIcon { get; } = new BitmapImage(new Uri(Runtime.AssemblyLocation.CombinePath("Images", "StratisLogo64x64.png")));
30-
31-
public static BitmapImage StratisIcon { get; } = new BitmapImage(new Uri(Runtime.AssemblyLocation.CombinePath("Images", "StratisIcon.png")));
32-
33-
public static BitmapImage GlobeIcon { get; } = new BitmapImage(new Uri(Runtime.AssemblyLocation.CombinePath("Images", "Globe.png")));
34-
35-
public static BitmapImage UrlIcon { get; } = new BitmapImage(new Uri(Runtime.AssemblyLocation.CombinePath("Images", "Url.png")));
36-
37-
public static BitmapImage AddNetworkIcon { get; } = new BitmapImage(new Uri(Runtime.AssemblyLocation.CombinePath("Images", "AddNetwork.png")));
38-
3920
#endregion
4021

4122
#region Methods
@@ -48,7 +29,11 @@ public class BlockchainExplorerTree : TreeViewBase<BlockchainInfo>
4829
protected override TreeViewItem CreateTreeViewItem(BlockchainInfo data)
4930
{
5031
var item = base.CreateTreeViewItem(data);
51-
if (data.Kind == BlockchainInfoKind.Network)
32+
if (data.Kind == BlockchainInfoKind.Folder && data.Name == "EVM Networks")
33+
{
34+
item.ContextMenu = (ContextMenu)TryFindResource("RootContextMenu");
35+
}
36+
else if (data.Kind == BlockchainInfoKind.Network)
5237
{
5338
item.ContextMenu = (ContextMenu)TryFindResource("NetworkContextMenu");
5439
}

tests/Stratis.DevEx.Wpf.Test/BlockchainExplorer/BlockchainExplorerTreeResources.xaml

Lines changed: 46 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -101,17 +101,10 @@
101101
<DataTemplate.Triggers>
102102
<MultiDataTrigger>
103103
<MultiDataTrigger.Conditions>
104-
<Condition Binding="{Binding Path=Kind}" Value="UserFolder" />
105-
<Condition Binding="{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Value="True" />
106-
</MultiDataTrigger.Conditions>
107-
<Setter TargetName="NodeImage" Property="Source" Value="{StaticResource FolderOpenDrawingImage}" />
108-
</MultiDataTrigger>
109-
<MultiDataTrigger>
110-
<MultiDataTrigger.Conditions>
111-
<Condition Binding="{Binding Path=Kind}" Value="UserFolder" />
112-
<Condition Binding="{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Value="False" />
104+
<Condition Binding="{Binding Path=Kind}" Value="Folder" />
105+
<Condition Binding="{Binding Path=Name}" Value="EVM Networks" />
113106
</MultiDataTrigger.Conditions>
114-
<Setter TargetName="NodeImage" Property="Source" Value="{StaticResource FolderDrawingImage}" />
107+
<Setter TargetName="NodeImage" Property="Source" Value="{StaticResource BlockchainNetworkDrawingImage}" />
115108
</MultiDataTrigger>
116109
<MultiDataTrigger>
117110
<MultiDataTrigger.Conditions>
@@ -120,18 +113,30 @@
120113
</MultiDataTrigger.Conditions>
121114
<Setter TargetName="NodeImage" Property="Source" Value="{StaticResource GlobeDrawingImage}" />
122115
</MultiDataTrigger>
123-
124116
<DataTrigger Binding="{Binding Path=Kind}" Value="Endpoint">
125117
<Setter TargetName="NodeImage" Property="Source" Value="{StaticResource UrlDrawingImage}" />
126118
</DataTrigger>
127-
128119
<MultiDataTrigger>
129120
<MultiDataTrigger.Conditions>
130121
<Condition Binding="{Binding Path=Kind}" Value="Network" />
131122
<Condition Binding="{Binding Path=Name}" Value="Stratis Mainnet" />
132123
</MultiDataTrigger.Conditions>
133124
<Setter TargetName="NodeImage" Property="Source" Value="{StaticResource StratisIconDrawingImage}" />
134125
</MultiDataTrigger>
126+
<MultiDataTrigger>
127+
<MultiDataTrigger.Conditions>
128+
<Condition Binding="{Binding Path=Kind}" Value="UserFolder" />
129+
<Condition Binding="{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Value="True" />
130+
</MultiDataTrigger.Conditions>
131+
<Setter TargetName="NodeImage" Property="Source" Value="{StaticResource FolderOpenDrawingImage}" />
132+
</MultiDataTrigger>
133+
<MultiDataTrigger>
134+
<MultiDataTrigger.Conditions>
135+
<Condition Binding="{Binding Path=Kind}" Value="UserFolder" />
136+
<Condition Binding="{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Value="False" />
137+
</MultiDataTrigger.Conditions>
138+
<Setter TargetName="NodeImage" Property="Source" Value="{StaticResource FolderDrawingImage}" />
139+
</MultiDataTrigger>
135140
</DataTemplate.Triggers>
136141
</DataTemplate>
137142

@@ -150,29 +155,36 @@
150155
<Style x:Key="ContextMenuStyle" TargetType="{x:Type ContextMenu}">
151156
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}"/>
152157
<Setter Property="Background" Value="{DynamicResource ApplicationBackgroundBrush}"/>
158+
<Style.Resources>
159+
<Style TargetType="{x:Type Image}">
160+
<Setter Property="Height" Value="16" />
161+
<Setter Property="Width" Value="16" />
162+
<Setter Property="Margin" Value="-8,2,8,0" />
163+
</Style>
164+
</Style.Resources>
153165
</Style>
154166

155167
<!-- Context Menus -->
156168
<ContextMenu x:Key="NetworkContextMenu" Style="{DynamicResource ContextMenuStyle}">
157169
<MenuItem Header="Add Endpoint..." Command="{x:Static stratisui:BlockchainExplorerTree.NewEndpointCmd}">
158170
<MenuItem.Icon>
159-
<Image Source="{StaticResource GlobeDrawingImage}" Width="16" Height="16" />
171+
<Image Source="{StaticResource GlobeDrawingImage}" />
160172
</MenuItem.Icon>
161173
</MenuItem>
162174
</ContextMenu>
163175

164176
<ContextMenu x:Key="StratisNetworkContextMenu" Style="{DynamicResource ContextMenuStyle}">
165177
<MenuItem Header="Statistics" Command="{x:Static stratisui:BlockchainExplorerTree.NewEndpointCmd}">
166178
<MenuItem.Icon>
167-
<Image Source="{StaticResource GlobeDrawingImage}" Width="16" Height="16" />
179+
<Image Source="{StaticResource GlobeDrawingImage}" />
168180
</MenuItem.Icon>
169181
</MenuItem>
170182
</ContextMenu>
171183

172-
<ContextMenu x:Key="TreeMenu" Style="{DynamicResource ContextMenuStyle}">
184+
<ContextMenu x:Key="RootContextMenu" Style="{DynamicResource ContextMenuStyle}">
173185
<MenuItem Header="Add Network..." Command="{x:Static stratisui:BlockchainExplorerTree.NewNetworkCmd}">
174186
<MenuItem.Icon>
175-
<Image Source="{DynamicResource AddNetworkDrawingImage}" Width="16" Height="16" />
187+
<Image Source="{DynamicResource AddNetworkDrawingImage}" />
176188
</MenuItem.Icon>
177189
</MenuItem>
178190
</ContextMenu>
@@ -188,29 +200,24 @@
188200
<cm:SortDescription PropertyName="Header.CategoryName" Direction="Descending" />
189201
</cm:SortDescriptionCollection>
190202

191-
<!-- The root node for the tree -->
192-
<TreeViewItem x:Key="RootNode"
193-
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
194-
Background="{DynamicResource TextBackgroundBrush}">
195-
<TreeViewItem.Header>
196-
<StackPanel Orientation="Horizontal" Margin="0,2,0,2">
197-
<Image x:Name="RootNodeImage" Source="{DynamicResource BlockchainNetworkDrawingImage}" Width="16" Height="16" />
198-
<TextBlock Text="EVM Networks" Margin="4,0,0,0" />
199-
</StackPanel>
200-
</TreeViewItem.Header>
201-
<TreeViewItem.ContextMenu>
202-
<ContextMenu Style="{StaticResource ContextMenuStyle}">
203-
<MenuItem Header="Add Network..." Command="{x:Static stratisui:BlockchainExplorerTree.NewNetworkCmd}">
204-
<MenuItem.Icon>
205-
<Image Source="{StaticResource BlockchainNetworkDrawingImage}" Width="16" Height="16" VerticalAlignment="Center" HorizontalAlignment="Center" />
206-
</MenuItem.Icon>
207-
</MenuItem>
208-
</ContextMenu>
209-
</TreeViewItem.ContextMenu>
210-
</TreeViewItem>
203+
<!-- Dialog style -->
204+
<Style x:Key="DialogStyle" TargetType="{x:Type StackPanel}">
205+
<Style.Resources>
206+
<Style TargetType="{x:Type ui:TextBox}">
207+
<Setter Property="FontSize" Value="12" />
208+
</Style>
209+
<Style TargetType="{x:Type ui:NumberBox}">
210+
<Setter Property="FontSize" Value="12" />
211+
<Setter Property="HorizontalContentAlignment" Value="Right" />
212+
</Style>
213+
<Style TargetType="{x:Type ui:TextBlock}">
214+
<Setter Property="FontSize" Value="12" />
215+
</Style>
216+
</Style.Resources>
217+
</Style>
211218

212219
<!-- Dialogs -->
213-
<StackPanel x:Key="AddNetworkDialog" Orientation="Vertical" VerticalAlignment="Top">
220+
<StackPanel x:Key="AddNetworkDialog" Orientation="Vertical" VerticalAlignment="Top" Style="{DynamicResource DialogStyle}">
214221
<StackPanel Orientation="Vertical">
215222
<ui:TextBlock Text="Enter the network name:" VerticalAlignment="Center" Margin="1,0,0,2" />
216223
<ui:TextBox x:Name="NetworkNameTextBox" Width="150" Margin="0,2,10,4" VerticalAlignment="Center"/>
@@ -226,39 +233,19 @@
226233
<StackPanel Orientation="Vertical">
227234
<Grid>
228235
<ui:TextBlock Name = "AddNetworkDialogValidationErrors" Grid.Row="0" Foreground="Red" Visibility="Hidden" VerticalAlignment="Center" TextWrapping="WrapWithOverflow"
229-
ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.CanContentScroll="True"/>
236+
ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.CanContentScroll="True"/>
230237
<ui:ProgressRing Name="AddNetworkDialogProgressRing" IsIndeterminate="True" IsEnabled="True" Width="20" Height="20" Visibility="Hidden" />
231238
</Grid>
232239
</StackPanel>
233-
<StackPanel.Resources>
234-
<Style TargetType="{x:Type ui:TextBox}">
235-
<Setter Property="FontSize" Value="12" />
236-
</Style>
237-
<Style TargetType="{x:Type ui:NumberBox}">
238-
<Setter Property="FontSize" Value="12" />
239-
<Setter Property="HorizontalContentAlignment" Value="Right" />
240-
</Style>
241-
<Style TargetType="{x:Type ui:TextBlock}">
242-
<Setter Property="FontSize" Value="12" />
243-
</Style>
244-
</StackPanel.Resources>
245240
</StackPanel>
246241

247-
<StackPanel x:Key="AddEndpointDialog" Orientation="Vertical" VerticalAlignment="Top">
242+
<StackPanel x:Key="AddEndpointDialog" Orientation="Vertical" VerticalAlignment="Top" Style="{DynamicResource DialogStyle}">
248243
<StackPanel Orientation="Vertical" >
249244
<ui:TextBlock Text="JSON-RPC Url:" VerticalAlignment="Center" Margin="1,0,0,2" />
250245
<ui:TextBox x:Name="EndpointRpcUrlTextBox" Width="150" Margin="0,2,10,4" VerticalAlignment="Center" />
251246
</StackPanel>
252247
<StackPanel Orientation="Vertical">
253248
<ui:TextBlock Name = "AddEndpointDialogValidationErrors" Foreground="Red" Visibility="Hidden" VerticalAlignment="Center" TextWrapping="WrapWithOverflow" />
254249
</StackPanel>
255-
<StackPanel.Resources>
256-
<Style TargetType="{x:Type ui:TextBox}">
257-
<Setter Property="FontSize" Value="12" />
258-
</Style>
259-
<Style TargetType="{x:Type ui:TextBlock}">
260-
<Setter Property="FontSize" Value="12" />
261-
</Style>
262-
</StackPanel.Resources>
263250
</StackPanel>
264251
</ResourceDictionary>

0 commit comments

Comments
 (0)