-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
204 lines (187 loc) · 10.5 KB
/
MainWindow.xaml
File metadata and controls
204 lines (187 loc) · 10.5 KB
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
<Window x:Class="SkyCopy.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="SkyCopy - Skydive Video Organizer"
Icon="app.ico"
Width="900" Height="650"
MinWidth="750" MinHeight="550"
WindowStartupLocation="CenterScreen"
Background="#F0F0F0">
<Window.Resources>
<BooleanToVisibilityConverter x:Key="BoolToVis"/>
<Style x:Key="HeaderLabel" TargetType="TextBlock">
<Setter Property="FontSize" Value="14"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Margin" Value="0,0,0,4"/>
</Style>
<Style x:Key="FieldBox" TargetType="TextBox">
<Setter Property="FontSize" Value="14"/>
<Setter Property="Padding" Value="6,4"/>
<Setter Property="Height" Value="32"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
<Style x:Key="ComboFieldBox" TargetType="ComboBox">
<Setter Property="FontSize" Value="14"/>
<Setter Property="Padding" Value="6,4"/>
<Setter Property="Height" Value="32"/>
<Setter Property="IsEditable" Value="True"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
<Style x:Key="ActionButton" TargetType="Button">
<Setter Property="FontSize" Value="14"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="Padding" Value="20,8"/>
<Setter Property="Cursor" Value="Hand"/>
</Style>
</Window.Resources>
<Grid Margin="16">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- Title bar -->
<Grid Grid.Row="0" Margin="0,0,0,12">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal">
<TextBlock Text="✈ SkyCopy" FontSize="22" FontWeight="Bold" Foreground="#2D6DA4"/>
<TextBlock Text=" — From Kapowsin to the World" FontSize="14" VerticalAlignment="Bottom" Margin="4,0,0,3" Foreground="#666"/>
</StackPanel>
<Button Grid.Column="1" Content="❓ Help" VerticalAlignment="Center"
FontSize="12" Padding="10,4" Background="#E0E0E0" BorderThickness="0" Cursor="Hand"
Click="HelpButton_Click" ToolTip="How to use SkyCopy"/>
</Grid>
<!-- Input fields -->
<Grid Grid.Row="1" Margin="0,0,0,12">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="16"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="16"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="16"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0">
<TextBlock Text="Date" Style="{StaticResource HeaderLabel}"/>
<TextBox x:Name="DateField" Style="{StaticResource FieldBox}"/>
</StackPanel>
<StackPanel Grid.Column="2">
<TextBlock Text="Jump Number" Style="{StaticResource HeaderLabel}"/>
<TextBox x:Name="JumpNumberField" Style="{StaticResource FieldBox}"/>
</StackPanel>
<StackPanel Grid.Column="4">
<TextBlock Text="Diver" Style="{StaticResource HeaderLabel}"/>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<ComboBox x:Name="DiverField" Grid.Column="0" Style="{StaticResource ComboFieldBox}"/>
<Button x:Name="RemoveDiverButton" Grid.Column="1" Content="✕"
Width="24" Height="24" Margin="4,0,0,0"
FontSize="12" Padding="0" VerticalAlignment="Center"
ToolTip="Remove selected diver from presets"
Click="RemoveDiverButton_Click" Background="#E0E0E0" BorderThickness="0" Cursor="Hand"/>
</Grid>
</StackPanel>
<Button Grid.Column="6" Content="⟳ Refresh" VerticalAlignment="Bottom"
Style="{StaticResource ActionButton}"
Click="RefreshButton_Click" Height="32" Background="#E0E0E0"/>
</Grid>
<!-- File browser -->
<Border Grid.Row="2" BorderBrush="#CCC" BorderThickness="1" CornerRadius="4" Background="White">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TreeView x:Name="FileTree" Grid.Column="0" BorderThickness="0" FontSize="13"
SelectedItemChanged="FileTree_SelectedItemChanged">
<TreeView.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding Children}">
<StackPanel Orientation="Horizontal" Margin="2">
<Image Source="{Binding Thumbnail}" Width="32" Height="32" Margin="0,0,6,0"
Visibility="{Binding HasThumbnail, Converter={StaticResource BoolToVis}}"
Stretch="Uniform" RenderOptions.BitmapScalingMode="HighQuality"/>
<TextBlock Text="{Binding Icon}" Margin="0,0,6,0" FontSize="14" VerticalAlignment="Center">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Style.Triggers>
<DataTrigger Binding="{Binding HasThumbnail}" Value="True">
<Setter Property="Visibility" Value="Collapsed"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<StackPanel VerticalAlignment="Center">
<TextBlock Text="{Binding Name}"/>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding SizeText}" Foreground="#999" FontSize="11"/>
<TextBlock Text="{Binding CreatedTime}" Foreground="#BBB" FontSize="11" Margin="8,0,0,0"/>
</StackPanel>
</StackPanel>
</StackPanel>
</HierarchicalDataTemplate>
</TreeView.ItemTemplate>
</TreeView>
<!-- Thumbnail preview panel -->
<Border x:Name="PreviewPanel" Grid.Column="1" Width="180" BorderBrush="#DDD" BorderThickness="1,0,0,0"
Background="#FAFAFA" Visibility="Collapsed">
<StackPanel Margin="8" VerticalAlignment="Center" HorizontalAlignment="Center">
<Image x:Name="PreviewImage" Width="160" Height="120" Stretch="Uniform"
RenderOptions.BitmapScalingMode="HighQuality" Margin="0,0,0,8"/>
<TextBlock x:Name="PreviewFileName" TextWrapping="Wrap" FontSize="11"
Foreground="#555" HorizontalAlignment="Center" TextAlignment="Center"/>
<TextBlock x:Name="PreviewFileInfo" FontSize="10" Foreground="#999"
HorizontalAlignment="Center" Margin="0,4,0,0"/>
</StackPanel>
</Border>
<TextBlock x:Name="NoSdCardMessage" Grid.ColumnSpan="2"
Text="No SD card detected. Please insert an SD card and click Refresh."
HorizontalAlignment="Center" VerticalAlignment="Center"
FontSize="14" Foreground="#999"
Visibility="Visible"/>
</Grid>
</Border>
<!-- Status bar & selected file -->
<Grid Grid.Row="3" Margin="0,8,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="Selected: " FontWeight="SemiBold" VerticalAlignment="Center"/>
<TextBlock x:Name="SelectedFileText" Grid.Column="1" Text="(none)"
Foreground="#555" VerticalAlignment="Center" TextTrimming="CharacterEllipsis"/>
</Grid>
<!-- Download button & progress -->
<Grid Grid.Row="4" Margin="0,10,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" VerticalAlignment="Center">
<ProgressBar x:Name="CopyProgress" Height="18" Visibility="Collapsed" Margin="0,0,16,0"/>
<TextBlock x:Name="StatusText" Text="" Foreground="#2D6DA4" FontSize="12" Margin="0,4,0,0"/>
</StackPanel>
<Button x:Name="DownloadButton" Grid.Column="1"
Content="📥 Download"
Style="{StaticResource ActionButton}"
Background="#2D6DA4" Foreground="White"
Click="DownloadButton_Click"
IsEnabled="False"
Height="40" MinWidth="140"/>
</Grid>
<!-- Footer credit -->
<TextBlock Grid.Row="5" Text="by @gecaso based on @outcoldman original idea, credit to Denis"
HorizontalAlignment="Right" Margin="0,8,0,0"
FontSize="11" Foreground="#999"/>
</Grid>
</Window>