blob: 389e11f372d72f282d3692a8c46c31efc35e4568 (
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
113
114
115
116
117
118
119
120
|
<?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="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="1">
<HorizontalStack Height="Fit">
<Button Caption="Up" MouseClick="./goUpDirClick"/>
<TextBox Text="{²./CurrentDirectory}"/>
</HorizontalStack>
<HorizontalStack Spacing="1">
<DirectoryView ShowFiles="false" Name="dv" CurrentDirectory="{²./CurrentDirectory}" Width="50%" Margin="0"
SelectedItemChanged="./onFVSelectedItemChanged">
<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.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.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="fv" CurrentDirectory="{./SelectedDirectory}" SelectedItemChanged="./onFVSelectedItemChanged"
Width="100%" Margin="0" MouseDoubleClick="./onFileSelect">
<Template>
<ListBox Name="fileView" Data="{./FileSystemEntries}" SelectedItemChanged="./onSelectedItemChanged">
<Template>
<VerticalStack>
<Scroller ScrollX="{../scrollbar1.Value}" Name="scroller1"
VerticalScrolling="False" HorizontalScrolling="true">
<Wrapper Orientation="Horizontal" Width="Fit" HorizontalAlignment="Left"
Name="ItemsContainer" Margin="0" Spacing="1"/>
</Scroller>
<ScrollBar Name="scrollbar1" Value="{../scroller1.ScrollX}"
Maximum="{../scroller1.MaximumScroll}" Orientation="Horizontal"
Height="14" />
</VerticalStack>
</Template>
<ItemTemplate DataType="System.IO.FileInfo">
<HorizontalStack Focusable="true" Height="Fit" >
<Image Margin="2" Width="14" Height="14"
Path="#Crow.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.Icons.folder.svg"/>
<Label Text="{Name}"
MouseEnter="{Background=BlueCrayola}"
MouseLeave="{Background=Transparent}"/>
</HorizontalStack>
</ItemTemplate>
</ListBox>
</Template>
</DirectoryView>
</HorizontalStack>
<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>
|