aboutsummaryrefslogtreecommitdiffstatsci
path: root/Templates/FileDialog.template
blob: 8305dfc93bccae8ca91d9653f55e4f0ec1de8429 (plain)
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
<?xml version="1.0"?>
<Border BorderWidth="1" Foreground="White" CornerRadius="{./CornerRadius}"
				Background="{./Background}"
				MouseEnter="./onBorderMouseEnter"
				MouseLeave="./onBorderMouseLeave">
	<VerticalStack Spacing="0">
		<HorizontalStack Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9"
				Name="hs" Margin="2" Spacing="0" Height="Fit">
			<GraphicObject Width="5"/>
			<Image Margin="1" Width="12" Height="12" Path="{./Icon}"/>
			<Label Width="Stretched" Foreground="White" Margin="1" TextAlignment="Center" Text="{./Caption}" />
			<Border CornerRadius="0" BorderWidth="1" Foreground="Transparent"  Height="12" Width="12"
				MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
				<Image Focusable="true" Name="Image" Margin="0" Width="Stretched" Height="Stretched" Path="#Crow.Images.Icons.exit2.svg"
					 MouseClick="./butQuitPress"/>
			</Border>
			<GraphicObject Width="5"/>
		</HorizontalStack>
		<Container Name="Content" MinimumSize="50,50" Background="Onyx">
			<VerticalStack Margin="1">
				<HorizontalStack Height="Fit">
					<Button Fit="true" Caption="Up" MouseClick="./goUpDirClick">
						<Image Margin="2" Width="14" Height="14"
							Path="#Crow.Icons.level-up.svg"/>
					</Button>
					<TextBox Text="{²./CurrentDirectory}"/>
				</HorizontalStack>
				<DirectoryView ShowFiles="true" Name="fv" CurrentDirectory="{./CurrentDirectory}" SelectedItemChanged="./onFVSelectedItemChanged"
						Width="100%" Margin="0" MouseDoubleClick="./onFileSelect">
						<Template>
							<ListBox Name="fileView" Data="{./FileSystemEntries}" SelectedItemChanged="./onSelectedItemChanged">
								<Template>
									<HorizontalStack>
										<Scroller ScrollX="{../scrollbar1.Value}"  Name="scroller1"
											VerticalScrolling="true" HorizontalScrolling="false">
											<VerticalStack Height="Fit" VerticalAlignment="Top"
												Name="ItemsContainer" Margin="0" Spacing="1"/>
										</Scroller>
										<ScrollBar Name="scrollbar1" Value="{²../scroller1.ScrollY}"
											Maximum="{../scroller1.MaximumScroll}" Orientation="Vertical"
											Width="14" />
									</HorizontalStack>
								</Template>
								<ItemTemplate DataType="System.IO.FileInfo">
									<HorizontalStack Focusable="true"  Height="Fit">
										<Image Margin="2" Width="16" Height="16"
											Path="#Crow.Icons.file.svg"/>
											<Label Text="{Name}" Width="Stretched"
												MouseEnter="{Background=BlueCrayola}"
												MouseLeave="{Background=Transparent}"/>
									</HorizontalStack>
								</ItemTemplate>
								<ItemTemplate DataType="System.IO.DirectoryInfo">
									<Border Foreground="Transparent" Focusable="true" Height="Fit">
										<HorizontalStack
												MouseEnter="{Background=BlueCrayola}"
												MouseLeave="{Background=Transparent}">
											<Image Margin="2" Width="16" Height="16"
												Path="#Crow.Icons.folder.svg"/>
											<Label Text="{Name}" Width="Stretched"/>
											<Label Text="{LastAccessTime}" />
										</HorizontalStack>
									</Border>
								</ItemTemplate>
							</ListBox>
						</Template>
					</DirectoryView>
				<TextBox Text="{./SelectedDirectory}"/>
				<TextBox Text="{²./SelectedFile}"/>
				<HorizontalStack Fit="true" HorizontalAlignment="Right">
					<Button Caption="Ok" MouseClick="./onFileSelect"/>
					<Button Caption="Cancel" MouseClick="./onCancel"/>
				</HorizontalStack>
			</VerticalStack>
		</Container>
	</VerticalStack>
</Border>