Skip to content

Commit 8f4e0ff

Browse files
committed
允许增删目录,保存目录,修改BUG
1 parent ba9aaf2 commit 8f4e0ff

10 files changed

Lines changed: 747 additions & 36 deletions

.vscode/launch.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
// 使用 IntelliSense 了解相关属性。
3+
// 悬停以查看现有属性的描述。
4+
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": ".NET Core Launch (console)",
9+
"type": "coreclr",
10+
"request": "launch",
11+
"警告01": "*********************************************************************************",
12+
"警告02": "The C# extension was unable to automatically decode projects in the current",
13+
"警告03": "workspace to create a runnable launch.json file. A template launch.json file has",
14+
"警告04": "been created as a placeholder.",
15+
"警告05": "",
16+
"警告06": "If the server is currently unable to load your project, you can attempt to",
17+
"警告07": "resolve this by restoring any missing project dependencies (example: run 'dotnet",
18+
"警告08": "restore') and by fixing any reported errors from building the projects in your",
19+
"警告09": "workspace.",
20+
"警告10": "If this allows the server to now load your project then --",
21+
"警告11": " * Delete this file",
22+
"警告12": " * Open the Visual Studio Code command palette (View->Command Palette)",
23+
"警告13": " * run the command: '.NET: Generate Assets for Build and Debug'.",
24+
"警告14": "",
25+
"警告15": "If your project requires a more complex launch configuration, you may wish to",
26+
"警告16": "delete this configuration and pick a different template using the 'Add",
27+
"警告17": "Configuration...' button at the bottom of this file.",
28+
"警告18": "*********************************************************************************",
29+
"preLaunchTask": "build",
30+
"program": "${workspaceFolder}/bin/Debug/<insert-target-framework-here>/<insert-project-name-here>.dll",
31+
"args": [],
32+
"cwd": "${workspaceFolder}",
33+
"console": "internalConsole",
34+
"stopAtEntry": false
35+
},
36+
{
37+
"name": ".NET Core Attach",
38+
"type": "coreclr",
39+
"request": "attach"
40+
}
41+
]
42+
}

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"dotnet.preferCSharpExtension": true
3+
}

LibVideo/LibVideo2.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<MapFileExtensions>true</MapFileExtensions>
2929
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
3030
<WebPage>publish.htm</WebPage>
31-
<ApplicationRevision>26</ApplicationRevision>
31+
<ApplicationRevision>29</ApplicationRevision>
3232
<ApplicationVersion>1.1.0.%2a</ApplicationVersion>
3333
<UseApplicationTrust>false</UseApplicationTrust>
3434
<PublishWizardCompleted>true</PublishWizardCompleted>

LibVideo/MainWindow - 副本.xaml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<Window x:Class="LibVideo.MainWindow"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6+
xmlns:local="clr-namespace:LibVideo"
7+
mc:Ignorable="d"
8+
Title="我家视频" Height="527.371" Width="800"
9+
WindowState="Normal" ResizeMode="NoResize" >
10+
11+
12+
13+
<Grid>
14+
<TextBox x:Name="dirTxt" HorizontalAlignment="Left" Height="113" Margin="630,10,0,0" TextWrapping="NoWrap" VerticalAlignment="Top" Width="147" TextChanged="dirTextBox_TextChanged"/>
15+
<Button Content="添加视频目录" HorizontalAlignment="Left" Height="27" Margin="664,128,0,0" VerticalAlignment="Top" Width="80" Click="dirButton_Click" IsEnabled="True" IsHitTestVisible="True" Panel.ZIndex="1" Background="LightBlue"/>
16+
17+
18+
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
19+
<DataGrid x:Name="outputGrid" Height="402" Margin="10,43,0,0" Width="611"
20+
AutoGenerateColumns="False" SelectionMode="Single" SelectionUnit="Cell" IsReadOnly="true" HorizontalAlignment="Left">
21+
<DataGrid.Columns>
22+
<DataGridTextColumn Header="编号" Binding="{Binding Id}" />
23+
<DataGridTextColumn Header="视频" Binding="{Binding FullName}">
24+
<DataGridTextColumn.ElementStyle>
25+
<Style TargetType="TextBlock">
26+
<Setter Property="ToolTip" Value="{Binding FullName}" />
27+
</Style>
28+
</DataGridTextColumn.ElementStyle>
29+
</DataGridTextColumn>
30+
</DataGrid.Columns>
31+
32+
<DataGrid.Resources>
33+
<Style TargetType="DataGridRow">
34+
<EventSetter Event="MouseDoubleClick" Handler="Row_DoubleClick"/>
35+
</Style>
36+
</DataGrid.Resources>
37+
38+
<DataGrid.ContextMenu>
39+
<ContextMenu>
40+
<MenuItem Header="播放" Click="PlayOrOpenItem" />
41+
<MenuItem Header="打开文件夹" Click="OpenContainingFolder" />
42+
</ContextMenu>
43+
</DataGrid.ContextMenu>
44+
</DataGrid>
45+
46+
</ScrollViewer>
47+
48+
<TextBox x:Name="keywords" HorizontalAlignment="Left" Height="28" Margin="190,10,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="251" TextChanged="keywords_TextChanged" />
49+
<Image Grid.Column="2" HorizontalAlignment="Left" Height="26" Margin="62.667,297,0,0" VerticalAlignment="Top" Width="113"/>
50+
<Label Content="搜索:" HorizontalAlignment="Left" Height="37" Margin="143,10,0,0" VerticalAlignment="Top" Width="63"/>
51+
52+
<!-- 状态栏 -->
53+
<StatusBar VerticalAlignment="Bottom">
54+
<StatusBarItem>
55+
<TextBlock x:Name="totalItemsText"/>
56+
</StatusBarItem>
57+
<StatusBarItem>
58+
<TextBlock x:Name="itemsAddedLast24HoursText"/>
59+
</StatusBarItem>
60+
</StatusBar>
61+
</Grid>
62+
63+
</Window>

LibVideo/MainWindow.xaml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Window x:Class="LibVideo.MainWindow"
1+
<Window x:Class="LibVideo.MainWindow"
22
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
@@ -11,8 +11,9 @@
1111

1212

1313
<Grid>
14-
<TextBox x:Name="dirTxt" HorizontalAlignment="Left" Height="113" Margin="630,10,0,0" TextWrapping="NoWrap" VerticalAlignment="Top" Width="147" TextChanged="dirTextBox_TextChanged"/>
15-
<Button Content="添加视频目录" HorizontalAlignment="Left" Height="27" Margin="669,128,0,0" VerticalAlignment="Top" Width="80" Click="dirButton_Click"/>
14+
<ListBox x:Name="dirListUI" HorizontalAlignment="Left" Height="113" Margin="630,10,0,0" VerticalAlignment="Top" Width="147" Panel.ZIndex="1" />
15+
<Button Content="添加视频目录" HorizontalAlignment="Left" Height="27" Margin="630,128,0,0" VerticalAlignment="Top" Width="70" Click="dirButton_Click" IsEnabled="True" IsHitTestVisible="True" Panel.ZIndex="1" Background="LightBlue"/>
16+
<Button x:Name="btnDeleteDir" Content="删除选中" HorizontalAlignment="Left" Height="27" Margin="705,128,0,0" VerticalAlignment="Top" Width="70" Click="btnDeleteDir_Click" Background="#FFFF9999" Panel.ZIndex="1"/>
1617

1718

1819
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
@@ -45,7 +46,9 @@
4546

4647
</ScrollViewer>
4748

48-
<TextBox x:Name="keywords" HorizontalAlignment="Left" Height="28" Margin="190,10,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="251" TextChanged="keywords_TextChanged" />
49+
<ComboBox x:Name="keywords" IsEditable="True" HorizontalAlignment="Left" Height="28" Margin="190,10,0,0" VerticalAlignment="Top" Width="221" TextBoxBase.TextChanged="keywords_TextChanged" KeyDown="keywords_KeyDown" Panel.ZIndex="1"/>
50+
<Button x:Name="btnPrevSearch" Content="&lt;" HorizontalAlignment="Left" Height="28" Margin="415,10,0,0" VerticalAlignment="Top" Width="25" Click="btnPrevSearch_Click" ToolTip="上一个搜索" Panel.ZIndex="1"/>
51+
<Button x:Name="btnNextSearch" Content="&gt;" HorizontalAlignment="Left" Height="28" Margin="445,10,0,0" VerticalAlignment="Top" Width="25" Click="btnNextSearch_Click" ToolTip="下一个搜索" Panel.ZIndex="1"/>
4952
<Image Grid.Column="2" HorizontalAlignment="Left" Height="26" Margin="62.667,297,0,0" VerticalAlignment="Top" Width="113"/>
5053
<Label Content="搜索:" HorizontalAlignment="Left" Height="37" Margin="143,10,0,0" VerticalAlignment="Top" Width="63"/>
5154

@@ -58,6 +61,11 @@
5861
<TextBlock x:Name="itemsAddedLast24HoursText"/>
5962
</StatusBarItem>
6063
</StatusBar>
64+
65+
<!-- Loading Overlay -->
66+
<Grid x:Name="LoadingOverlay" Background="#99000000" Panel.ZIndex="100" Visibility="Collapsed">
67+
<TextBlock Text="正在加载文件,请稍候..." Foreground="White" FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center"/>
68+
</Grid>
6169
</Grid>
6270

6371
</Window>

0 commit comments

Comments
 (0)