-
Notifications
You must be signed in to change notification settings - Fork 2
/
MainWindow.xaml
54 lines (49 loc) · 3.59 KB
/
MainWindow.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
<Window x:Class="ImageCompressor.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ImageCompressor"
Name="Main"
Title="MainWindow" WindowStyle="None" Margin="0" WindowStartupLocation="CenterScreen" Width="800" Height="400" ResizeMode="NoResize">
<Window.Background>
<ImageBrush ImageSource="Images/back.jpg" />
</Window.Background>
<DockPanel>
<StackPanel Orientation="Horizontal" Height="30" HorizontalAlignment="Right" DockPanel.Dock="Top">
<Button Name="btnClose" Background="Black" Foreground="White" Width="40" Style="{Binding No}" Click="btnClose_Click">X</Button>
</StackPanel>
<Canvas DockPanel.Dock="Top">
<!-- TextBoxes -->
<TextBox x:Name="txtFolder" Height="30" Canvas.Left="160" Canvas.Top="79" Width="270"/>
<TextBox x:Name="txtSizeKb" Height="30" Canvas.Left="535" Text="" Canvas.Top="80" Width="60"/>
<!-- DataGrids -->
<DataGrid x:Name="dgAll" Canvas.Left="35" Canvas.Top="180" Height="135" Width="350" AutoGenerateColumns="False" CanUserAddRows="False" IsReadOnly="True">
<DataGrid.Columns>
<DataGridTextColumn Width="1*" Header="File Name" Binding="{Binding FileName}" />
<DataGridTextColumn Width="1*" Header="Type" Binding="{Binding Extension}" />
<DataGridTextColumn Width="1*" Header="Size (KB)" Binding="{Binding SizeKb}" />
</DataGrid.Columns>
</DataGrid>
<DataGrid x:Name="dgCompressable" Canvas.Left="390" Canvas.Top="180" Height="135" Width="350" AutoGenerateColumns="False" CanUserAddRows="False" IsReadOnly="True">
<DataGrid.Columns>
<DataGridTextColumn Width="1*" Header="File Name" Binding="{Binding FileName}" />
<DataGridTextColumn Width="1*" Header="Type" Binding="{Binding Extension}" />
<DataGridTextColumn Width="1*" Header="Size (KB)" Binding="{Binding SizeKb}" />
</DataGrid.Columns>
</DataGrid>
<!-- Buttons -->
<Button x:Name="btnSelect" Content="Select Folder" Canvas.Left="35" Canvas.Top="79" Height="30" Width="120" Click="btnSelect_Click"/>
<Button x:Name="btnCompress" Content="Compress" Canvas.Left="620" Canvas.Top="135" Height="30" Width="120" Click="btnCompress_Click"/>
<Button x:Name="btnFilter" Content="Filter" Canvas.Left="620" Canvas.Top="80" Height="30" Width="120" Click="btnFilter_Click"/>
<Label Content="Size Limit (KB)" Canvas.Left="435" Canvas.Top="83"/>
<!-- Labels -->
<Label Name="lblImagesCount" Content="" Canvas.Left="165" Canvas.Top="123" Width="125"/>
<Label Content="Images Found" Canvas.Left="35" Canvas.Top="123" Width="125"/>
<Label Content="Original Image List" Canvas.Left="35" Canvas.Top="149" Width="140"/>
<Label Content="Compressed File List" Canvas.Left="390" Canvas.Top="149" Width="148"/>
<Label x:Name="lblMessage" Content="" Foreground="White" Canvas.Left="35" Canvas.Top="340" Width="350"/>
<Button x:Name="btnShowCompressed" Content="Show Compressed Files" Canvas.Left="535" Canvas.Top="330" Height="30" Width="205" Click="btnShowCompressed_Click"/>
</Canvas>
</DockPanel>
</Window>