mirror of
https://github.com/LorisYounger/VPet.ModMaker.git
synced 2024-08-30 18:22:21 +00:00
支持外置时钟
This commit is contained in:
parent
c6a2708e71
commit
ec1ab849b6
Binary file not shown.
@ -49,10 +49,10 @@ namespace VPet.Plugin.DemoClock
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 放置距离设置
|
/// 放置距离设置
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public double PlaceBotton
|
public double PlaceTop
|
||||||
{
|
{
|
||||||
get => GetDouble("placebotton", 100);
|
get => GetDouble("placetop", 400);
|
||||||
set => SetDouble("placebotton", value);
|
set => SetDouble("placetop", value);
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 默认倒计时
|
/// 默认倒计时
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:VPet.Plugin.DemoClock"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:VPet.Plugin.DemoClock"
|
||||||
mc:Ignorable="d" xmlns:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI" MinHeight="100" Height="Auto"
|
mc:Ignorable="d" xmlns:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI" MinHeight="100" Height="Auto"
|
||||||
Width="450" VerticalAlignment="Bottom" HorizontalAlignment="Center">
|
Width="450" VerticalAlignment="Top" HorizontalAlignment="Center">
|
||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
<ResourceDictionary Source="/VPet-Simulator.Windows.Interface;component/ResourceStyle.xaml" />
|
<ResourceDictionary Source="/VPet-Simulator.Windows.Interface;component/ResourceStyle.xaml" />
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
|
@ -56,7 +56,7 @@ namespace VPet.Plugin.DemoClock
|
|||||||
CloseTimer.Elapsed += CloseTimer_Elapsed;
|
CloseTimer.Elapsed += CloseTimer_Elapsed;
|
||||||
|
|
||||||
Opacity = master.Set.Opacity;
|
Opacity = master.Set.Opacity;
|
||||||
Margin = new Thickness(0, 0, 0, master.Set.PlaceBotton);
|
Margin = new Thickness(0, master.Set.PlaceTop, 0, 0);
|
||||||
Master.MW.Main.MouseEnter += UserControl_MouseEnter;
|
Master.MW.Main.MouseEnter += UserControl_MouseEnter;
|
||||||
Master.MW.Main.MouseLeave += UserControl_MouseLeave;
|
Master.MW.Main.MouseLeave += UserControl_MouseLeave;
|
||||||
TimeTimer_Tick();
|
TimeTimer_Tick();
|
||||||
|
@ -44,9 +44,9 @@
|
|||||||
ToggleBrush="{DynamicResource DARKPrimaryDark}" Content="显示时间时启用24小时制"
|
ToggleBrush="{DynamicResource DARKPrimaryDark}" Content="显示时间时启用24小时制"
|
||||||
CheckedToggleBrush="{DynamicResource DARKPrimaryText}" Grid.Column="2"
|
CheckedToggleBrush="{DynamicResource DARKPrimaryText}" Grid.Column="2"
|
||||||
Checked="Switch24h_Checked" Unchecked="Switch24h_Checked" />
|
Checked="Switch24h_Checked" Unchecked="Switch24h_Checked" />
|
||||||
<pu:NumberInput Grid.Row="1" Grid.Column="3" Minimum="0" MaxHeight="350" Margin="5"
|
<pu:NumberInput Grid.Row="1" Grid.Column="3" Minimum="-100" Maximum="600" Margin="5"
|
||||||
Value="{Binding ElementName=PlaceSilder, Path=Value}" CornerRadius="3" />
|
Value="{Binding ElementName=PlaceSilder, Path=Value}" CornerRadius="3" />
|
||||||
<Slider Grid.Row="1" Grid.Column="2" x:Name="PlaceSilder" Minimum="0" Maximum="350" Value="100"
|
<Slider Grid.Row="1" Grid.Column="2" x:Name="PlaceSilder" Minimum="-100" Maximum="600" Value="300"
|
||||||
VerticalAlignment="Center" Background="{DynamicResource DARKPrimaryLighter}"
|
VerticalAlignment="Center" Background="{DynamicResource DARKPrimaryLighter}"
|
||||||
pu:SliderHelper.CoveredBackground="{DynamicResource DARKPrimaryDarker}"
|
pu:SliderHelper.CoveredBackground="{DynamicResource DARKPrimaryDarker}"
|
||||||
ValueChanged="PlaceSilder_ValueChanged" />
|
ValueChanged="PlaceSilder_ValueChanged" />
|
||||||
|
@ -29,7 +29,7 @@ namespace VPet.Plugin.DemoClock
|
|||||||
Master = master;
|
Master = master;
|
||||||
Set = Master.Set;
|
Set = Master.Set;
|
||||||
Switch24h.IsChecked = Set.Hour24;
|
Switch24h.IsChecked = Set.Hour24;
|
||||||
PlaceSilder.Value = Set.PlaceBotton;
|
PlaceSilder.Value = Set.PlaceTop;
|
||||||
OpacitySilder.Value = Set.Opacity * 100;
|
OpacitySilder.Value = Set.Opacity * 100;
|
||||||
SwitchAutoLayer.IsChecked = Set.PlaceAutoBack;
|
SwitchAutoLayer.IsChecked = Set.PlaceAutoBack;
|
||||||
NumTimeDiff.Value = Set.TimeShifting;
|
NumTimeDiff.Value = Set.TimeShifting;
|
||||||
@ -56,8 +56,8 @@ namespace VPet.Plugin.DemoClock
|
|||||||
{
|
{
|
||||||
if (!AllowChange)
|
if (!AllowChange)
|
||||||
return;
|
return;
|
||||||
Set.PlaceBotton = PlaceSilder.Value;
|
Set.PlaceTop = PlaceSilder.Value;
|
||||||
Master.WPFTimeClock.Margin = new Thickness(0, 0, 0, Set.PlaceBotton);
|
Master.WPFTimeClock.Margin = new Thickness(0, Set.PlaceTop, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OpacitySilder_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
|
private void OpacitySilder_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
|
||||||
|
Loading…
Reference in New Issue
Block a user