aboutsummaryrefslogtreecommitdiffstatsci
path: root/Templates/FileDialog.template
blob: db145f0fc065649420e3879417f26477cd693308 (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
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
<?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="{./Title}" />
			<Border CornerRadius="6" 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="5">
				<TextBox Text="{²./CurrentDirectory}"/>
				<HorizontalStack>
					<DirectoryView ShowFiles="false" Name="dv" CurrentDirectory="{²./CurrentDirectory}" SelectedItemChanged="./Tv_SelectedItemChanged"
						Width="50%" Margin="1">
						<Template>
							<TreeView IsRoot="true" Name="treeView" Data="{./FileSystemEntries}"
									SelectedItemChanged="./onSelectedItemChanged">
								<ItemTemplate DataType="System.IO.FileInfo">
									<HorizontalStack Focusable="true"  Height="Fit" Width="Stretched" Background="{../Background}" >
										<Image Margin="2" Width="14" Height="14"
											Path="#Crow.Images.Icons.file.svg"/>
										<Label Text="{Name}" Width="Stretched"
											MouseEnter="{Background=hgradient|0:BlueCrayola|1:Transparent}"
											MouseLeave="{Background=Transparent}"/>
									</HorizontalStack>
								</ItemTemplate>
								<ItemTemplate DataType="System.IO.DirectoryInfo" Data="GetDirectories">
									<Expandable Caption="{Name}" >
										<Template>
											<VerticalStack>
												<HorizontalStack Spacing="1" Height="Fit" MouseDoubleClick="./onClickForExpand"
														MouseEnter="{Background=hgradient|0:BlueCrayola|1:Transparent}"
														MouseLeave="{Background=Transparent}">
													<Container Margin="1" Width="10" Height="10" Focusable="true" MouseClick="./onClickForExpand"
														MouseEnter="{Background=LightGray}"
														MouseLeave="{Background=Transparent}">
														<Image
															Path="{./Image}"
															Visible="{./IsExpandable}"
															SvgSub="{./IsExpanded}"/>
													</Container>
													<Image Margin="2" Width="14" Height="14"
														Path="#Crow.Images.Icons.folder.svg"/>
													<Label Text="{./Caption}"/>
												</HorizontalStack>
												<Container Name="Content" Visible="false"/>
											</VerticalStack>
										</Template>
										<HorizontalStack Height="Fit">
											<GraphicObject Width="12" Height="10"/>
											<TreeView Name="List" Height="Fit"
												Template="#Crow.Templates.treeList.crow" />
										</HorizontalStack>
									</Expandable>
								</ItemTemplate>
							</TreeView>
						</Template>
					</DirectoryView>
					<Splitter/>
					<DirectoryView ShowFiles="true" Name="dv" CurrentDirectory="{../dv.SelectedItem}" 
						Width="50%" Margin="1">
						<Template>
							<ListBox Name="fileView" Data="{./FileSystemEntries}">
								<Template>
									<Border BorderWidth="1" Margin="1" MinimumSize="10,10">
										<Scroller  Name="scroller1" Margin="1" VerticalScrolling="true">
											<Wrapper Orientation="Horizontal" Height="Fit"
												Name="ItemsContainer" Margin="0" VerticalAlignment="Top"/>
										</Scroller>
									</Border>
								</Template>
								<ItemTemplate DataType="System.IO.FileInfo">
									<HorizontalStack Focusable="true"  Height="Fit"   >
										<Image Margin="2" Width="14" Height="14"
											Path="#Crow.Images.Icons.file.svg"/>
										<Label Text="{Name}"
											MouseEnter="{Background=BlueCrayola}"
											MouseLeave="{Background=Transparent}"/>
									</HorizontalStack>
								</ItemTemplate>
								<ItemTemplate DataType="System.IO.DirectoryInfo">
									<HorizontalStack Focusable="true"  Height="Fit" >
										<Image Margin="2" Width="14" Height="14"
											Path="#Crow.Images.Icons.folder.svg"/>
										<Label Text="{Name}"
											MouseEnter="{Background=BlueCrayola}"
											MouseLeave="{Background=Transparent}"/>
									</HorizontalStack>
								</ItemTemplate>
							</ListBox>
						</Template>
					</DirectoryView>
				</HorizontalStack>
				<TextBox Text="{../../dv.SelectedItem}"/>
				<HorizontalStack Fit="true" HorizontalAlignment="Right">
					<Button Caption="Ok" MouseClick="onFileSelect"/>
					<Button Caption="Cancel"/>
				</HorizontalStack>
			</VerticalStack>
		</Container>
	</VerticalStack>
</Border>