将以往的代码复制到代码库

This commit is contained in:
于智纯
2025-08-30 17:19:57 +08:00
parent da46e0242d
commit 20ea70bf64
198 changed files with 10075 additions and 0 deletions

View File

@@ -0,0 +1,154 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Future.Contract">
<Style TargetType="{x:Type local:FutureDrawer}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:FutureDrawer}">
<Border
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Margin="{TemplateBinding Padding}">
<DockPanel x:Name="DrawerRoot" LastChildFill="True">
<Border x:Name="ContentView" DockPanel.Dock="{TemplateBinding Dock}" Background="{TemplateBinding Background}">
<ContentPresenter/>
</Border>
<Border x:Name="TitleBorder" Background="{TemplateBinding Background}" Height="{TemplateBinding TitleHeight}" DockPanel.Dock="Top" HorizontalAlignment="Stretch" BorderThickness="0">
<TextBlock Margin="6"
Text="{TemplateBinding Title}"
FontSize="{TemplateBinding FontSize}"
Foreground="{TemplateBinding Foreground}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
</Border>
<Button x:Name="CloseHandle" FontSize="13" Opacity="0.5" Background="{TemplateBinding Background}" BorderThickness="0" Margin="0">
<Button.Template>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}">
<ContentPresenter/>
</Border>
</ControlTemplate>
</Button.Template>
<Button.Content>
<Grid VerticalAlignment="Center" HorizontalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Viewbox Width="60" Height="60" Stretch="Uniform" HorizontalAlignment="Center" VerticalAlignment="Center">
<Path Width="1194" Height="1194" Fill="{TemplateBinding Foreground}" Stroke="{TemplateBinding Foreground}">
<Path.Data>
<GeometryGroup>
<PathGeometry Figures="M1121.52381 1024H73.142857c-41.447619 0-73.142857-31.695238-73.142857-73.142857V73.142857c0-41.447619 31.695238-73.142857 73.142857-73.142857h1048.380953c41.447619 0 73.142857 31.695238 73.142857 73.142857v877.714286c0 41.447619-31.695238 73.142857-73.142857 73.142857zM73.142857 48.761905c-14.628571 0-24.380952 9.752381-24.380952 24.380952v877.714286c0 14.628571 9.752381 24.380952 24.380952 24.380952h1048.380953c14.628571 0 24.380952-9.752381 24.380952-24.380952V73.142857c0-14.628571-9.752381-24.380952-24.380952-24.380952H73.142857z"/>
<PathGeometry Figures="M219.428571 292.571429h633.904762c14.628571 0 24.380952 9.752381 24.380953 24.380952s-9.752381 24.380952-24.380953 24.380952H219.428571c-14.628571 0-24.380952-9.752381-24.380952-24.380952s9.752381-24.380952 24.380952-24.380952z m0 219.428571h414.476191c14.628571 0 24.380952 9.752381 24.380952 24.380952s-9.752381 24.380952-24.380952 24.380953H219.428571c-14.628571 0-24.380952-9.752381-24.380952-24.380953s9.752381-24.380952 24.380952-24.380952zM967.92381 763.12381L936.228571 731.428571l104.838096-104.838095c9.752381-9.752381 9.752381-24.380952 0-34.133333-9.752381-9.752381-24.380952-9.752381-34.133334 0L902.095238 697.295238l-102.4-102.4c-9.752381-9.752381-24.380952-9.752381-34.133333 0-9.752381 9.752381-9.752381 24.380952 0 34.133333l102.4 102.4-104.838095 104.838096c-9.752381 9.752381-9.752381 24.380952 0 34.133333 9.752381 9.752381 24.380952 9.752381 34.133333 0l104.838095-104.838095 102.4 102.4c9.752381 9.752381 24.380952 9.752381 34.133333 0 9.752381-9.752381 9.752381-24.380952 0-34.133334l-70.704761-70.704761z"/>
</GeometryGroup>
</Path.Data>
</Path>
</Viewbox>
<TextBlock Grid.Row="1" Foreground="{TemplateBinding Foreground}" TextTrimming="CharacterEllipsis" Text="点击此处关闭"/>
</Grid>
</Button.Content>
</Button>
</DockPanel>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="Dock" Value="Top">
<Setter TargetName="TitleBorder" Property="Visibility" Value="Collapsed"/>
</Trigger>
<Trigger Property="Dock" Value="Bottom">
<Setter TargetName="TitleBorder" Property="Visibility" Value="Collapsed"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type local:BubbleWindow}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:BubbleWindow}">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type local:DrawerTemplate}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:DrawerTemplate}">
<Border BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}">
<DockPanel LastChildFill="True">
<Border DockPanel.Dock="{TemplateBinding Dock}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
<ContentPresenter/>
</Border>
<Border x:Name="partTitleBar" Background="{TemplateBinding Background}" DockPanel.Dock="Top" Height="{TemplateBinding TitleHeight}" HorizontalAlignment="Stretch" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
<Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
<Border VerticalAlignment="Stretch" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Width="3" Background="{TemplateBinding Foreground}"/>
<TextBlock Margin="15,0,15,0"
VerticalAlignment="Center"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Text="{TemplateBinding Title}"
FontSize="{TemplateBinding FontSize}"
FontStyle="{TemplateBinding FontStyle}"
FontWeight="{TemplateBinding FontWeight}"
FontFamily="{TemplateBinding FontFamily}"
FontStretch="{TemplateBinding FontStretch}"
Foreground="{TemplateBinding Foreground}" />
</Grid>
</Border>
<Grid>
<Border Background="{TemplateBinding Background}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Opacity="0.50" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}"/>
<Button x:Name="CloseHandle" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Visibility="{TemplateBinding HandleVisibility}" Background="#01FFFFFF">
<Button.Template>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}">
<ContentPresenter/>
</Border>
</ControlTemplate>
</Button.Template>
<Button.Content>
<Grid VerticalAlignment="Center" HorizontalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Viewbox Width="60" Height="60" Stretch="Uniform" HorizontalAlignment="Center" VerticalAlignment="Center">
<Path Width="1194" Height="1194" Fill="{TemplateBinding Foreground}" Stroke="{TemplateBinding Foreground}">
<Path.Data>
<GeometryGroup>
<PathGeometry Figures="M1121.52381 1024H73.142857c-41.447619 0-73.142857-31.695238-73.142857-73.142857V73.142857c0-41.447619 31.695238-73.142857 73.142857-73.142857h1048.380953c41.447619 0 73.142857 31.695238 73.142857 73.142857v877.714286c0 41.447619-31.695238 73.142857-73.142857 73.142857zM73.142857 48.761905c-14.628571 0-24.380952 9.752381-24.380952 24.380952v877.714286c0 14.628571 9.752381 24.380952 24.380952 24.380952h1048.380953c14.628571 0 24.380952-9.752381 24.380952-24.380952V73.142857c0-14.628571-9.752381-24.380952-24.380952-24.380952H73.142857z"/>
<PathGeometry Figures="M219.428571 292.571429h633.904762c14.628571 0 24.380952 9.752381 24.380953 24.380952s-9.752381 24.380952-24.380953 24.380952H219.428571c-14.628571 0-24.380952-9.752381-24.380952-24.380952s9.752381-24.380952 24.380952-24.380952z m0 219.428571h414.476191c14.628571 0 24.380952 9.752381 24.380952 24.380952s-9.752381 24.380952-24.380952 24.380953H219.428571c-14.628571 0-24.380952-9.752381-24.380952-24.380953s9.752381-24.380952 24.380952-24.380952zM967.92381 763.12381L936.228571 731.428571l104.838096-104.838095c9.752381-9.752381 9.752381-24.380952 0-34.133333-9.752381-9.752381-24.380952-9.752381-34.133334 0L902.095238 697.295238l-102.4-102.4c-9.752381-9.752381-24.380952-9.752381-34.133333 0-9.752381 9.752381-9.752381 24.380952 0 34.133333l102.4 102.4-104.838095 104.838096c-9.752381 9.752381-9.752381 24.380952 0 34.133333 9.752381 9.752381 24.380952 9.752381 34.133333 0l104.838095-104.838095 102.4 102.4c9.752381 9.752381 24.380952 9.752381 34.133333 0 9.752381-9.752381 9.752381-24.380952 0-34.133334l-70.704761-70.704761z"/>
</GeometryGroup>
</Path.Data>
</Path>
</Viewbox>
<TextBlock Grid.Row="1" Foreground="{TemplateBinding Foreground}" TextTrimming="CharacterEllipsis" Text="点击此处关闭."/>
</Grid>
</Button.Content>
</Button>
</Grid>
</DockPanel>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="Dock" Value="Top">
<Setter Property="Visibility" Value="Collapsed" TargetName="partTitleBar"/>
</Trigger>
<Trigger Property="Dock" Value="Bottom">
<Setter Property="Visibility" Value="Collapsed" TargetName="partTitleBar"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>