新增2种开心动画
@ -4,14 +4,15 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:VPet_Simulator.Core"
|
||||
mc:Ignorable="d" d:DesignHeight="250" d:DesignWidth="250">
|
||||
<Viewbox>
|
||||
<Grid x:Name="MainGrid" Width="500" Height="500" MouseLeftButtonDown="MainGrid_MouseLeftButtonDown"
|
||||
<Grid x:Name="MainGrid" Width="500" MouseLeftButtonDown="MainGrid_MouseLeftButtonDown"
|
||||
x:FieldModifier="public" MouseLeftButtonUp="MainGrid_MouseLeftButtonUp"
|
||||
MouseRightButtonDown="MainGrid_MouseRightButtonDown" MouseMove="MainGrid_MouseWave">
|
||||
<MediaElement x:Name="VoicePlayer" LoadedBehavior="Manual" UnloadedBehavior="Stop" />
|
||||
<Grid x:Name="UIGrid_Back" x:FieldModifier="public" />
|
||||
<Border x:Name="PetGrid" VerticalAlignment="Bottom" />
|
||||
<Border x:Name="PetGrid2" VerticalAlignment="Bottom" />
|
||||
<Grid x:Name="UIGrid" x:FieldModifier="public" />
|
||||
<Grid x:Name="UIGrid_Back" x:FieldModifier="public" Height="500" VerticalAlignment="Top" Width="500" />
|
||||
<Border x:Name="PetGrid" Height="500" VerticalAlignment="Top" Width="500" />
|
||||
<Border x:Name="PetGrid2" Height="500" VerticalAlignment="Top" Width="500" />
|
||||
<Grid x:Name="UIGrid" x:FieldModifier="public" Height="500" VerticalAlignment="Top" Width="500" />
|
||||
<Grid x:Name="UIGrid_Botton" x:FieldModifier="public" Width="500" VerticalAlignment="Top" Margin="0,500,0,0" />
|
||||
</Grid>
|
||||
</Viewbox>
|
||||
</pu:ContentControlX>
|
||||
|
@ -245,7 +245,7 @@ namespace VPet_Simulator.Core
|
||||
public void Dispose()
|
||||
{
|
||||
EventTimer.Stop();
|
||||
MoveTimer.Enabled = false; ;
|
||||
MoveTimer.Enabled = false;
|
||||
EventTimer.Dispose();
|
||||
MoveTimer.Dispose();
|
||||
MsgBar.Dispose();
|
||||
|
@ -20,10 +20,8 @@ namespace VPet_Simulator.Tool
|
||||
switch (Console.ReadLine())
|
||||
{
|
||||
case "1":
|
||||
do
|
||||
{
|
||||
Animation();
|
||||
} while (true);
|
||||
Animation();
|
||||
break;
|
||||
default:
|
||||
Console.WriteLine("暂无该功能");
|
||||
goto start;
|
||||
@ -36,40 +34,43 @@ namespace VPet_Simulator.Tool
|
||||
{
|
||||
Console.WriteLine("请输入每张图片的持续时间 (单位: 毫秒)");
|
||||
string timestr = Console.ReadLine();
|
||||
if(!int.TryParse(timestr,out int time))
|
||||
if (!int.TryParse(timestr, out int time))
|
||||
{
|
||||
time = 125;
|
||||
}
|
||||
Console.WriteLine("请输入图片位置");
|
||||
DirectoryInfo directoryInfo = new DirectoryInfo(Console.ReadLine());
|
||||
int id = 0;
|
||||
int rpt = 1;
|
||||
string hash = null;
|
||||
FileInfo lastf = null;
|
||||
foreach (FileInfo fileInfo in directoryInfo.GetFiles())
|
||||
while (true)
|
||||
{
|
||||
if (lastf == null)
|
||||
Console.WriteLine("请输入图片位置");
|
||||
DirectoryInfo directoryInfo = new DirectoryInfo(Console.ReadLine());
|
||||
int id = 0;
|
||||
int rpt = 1;
|
||||
string hash = null;
|
||||
FileInfo lastf = null;
|
||||
foreach (FileInfo fileInfo in directoryInfo.GetFiles())
|
||||
{
|
||||
if (lastf == null)
|
||||
{
|
||||
lastf = fileInfo;
|
||||
hash = GetFileHash(fileInfo);
|
||||
continue;
|
||||
}
|
||||
string filehash = GetFileHash(fileInfo);
|
||||
if (hash.Equals(filehash))
|
||||
{
|
||||
//这个文件和上一个文件的hash值相同,这个上个文件
|
||||
lastf.Delete();
|
||||
lastf = fileInfo;
|
||||
rpt++;
|
||||
continue;
|
||||
}
|
||||
hash = filehash;
|
||||
lastf.MoveTo(Path.Combine(directoryInfo.FullName, $"{lastf.Name.Split('_', '-')[0]}_{id++:D3}_{rpt * time}.png"));
|
||||
rpt = 1;
|
||||
lastf = fileInfo;
|
||||
hash = GetFileHash(fileInfo);
|
||||
continue;
|
||||
}
|
||||
string filehash = GetFileHash(fileInfo);
|
||||
if (hash.Equals(filehash))
|
||||
{
|
||||
//这个文件和上一个文件的hash值相同,这个上个文件
|
||||
lastf.Delete();
|
||||
lastf = fileInfo;
|
||||
rpt++;
|
||||
continue;
|
||||
}
|
||||
hash = filehash;
|
||||
lastf.MoveTo(Path.Combine(directoryInfo.FullName, $"{lastf.Name.Split('_')[0]}_{id++:D3}_{rpt * time}.png"));
|
||||
rpt = 1;
|
||||
lastf = fileInfo;
|
||||
lastf.MoveTo(Path.Combine(directoryInfo.FullName, $"{lastf.Name.Split('_', '-')[0]}_{id++:D3}_{rpt * time}.png"));
|
||||
Console.WriteLine("图片处理已完成");
|
||||
}
|
||||
lastf.MoveTo(Path.Combine(directoryInfo.FullName, $"{lastf.Name.Split('_')[0]}_{id++:D3}_{rpt * time}.png"));
|
||||
Console.WriteLine("图片处理已完成");
|
||||
}
|
||||
public static string GetFileHash(FileInfo fileInfo)
|
||||
{
|
||||
|
@ -43,7 +43,7 @@ namespace VPet_Simulator.Windows
|
||||
public void SetZoomLevel(double zl)
|
||||
{
|
||||
Set.ZoomLevel = zl;
|
||||
this.Height = 500 * zl;
|
||||
//this.Height = 500 * zl;
|
||||
this.Width = 500 * zl;
|
||||
}
|
||||
/// <summary>
|
||||
@ -56,7 +56,8 @@ namespace VPet_Simulator.Windows
|
||||
//游戏存档
|
||||
if (Set != null)
|
||||
{
|
||||
Set.VoiceVolume = Main.PlayVoiceVolume;
|
||||
if (Main != null)
|
||||
Set.VoiceVolume = Main.PlayVoiceVolume;
|
||||
File.WriteAllText(AppDomain.CurrentDomain.BaseDirectory + @"\Setting.lps", Set.ToString());
|
||||
}
|
||||
if (Core != null && Core.Save != null)
|
||||
|
@ -4,8 +4,8 @@
|
||||
xmlns:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" ShowInTaskbar="False"
|
||||
xmlns:local="clr-namespace:VPet_Simulator.Windows" mc:Ignorable="d" WindowStyle="None" Title="MainWindow"
|
||||
Height="250" Width="250" Background="{x:Null}" Topmost="True" Closed="Window_Closed"
|
||||
pu:WindowXCaption.Height="0" >
|
||||
Width="250" Background="{x:Null}" Topmost="True" Closed="Window_Closed" pu:WindowXCaption.Height="0"
|
||||
SizeToContent="Height">
|
||||
<WindowChrome.WindowChrome>
|
||||
<WindowChrome GlassFrameThickness="-1" />
|
||||
</WindowChrome.WindowChrome>
|
||||
|
@ -72,7 +72,7 @@ namespace VPet_Simulator.Windows
|
||||
//this.Height = 450 * ZoomSlider.Value;
|
||||
InitializeComponent();
|
||||
|
||||
this.Height = 500 * Set.ZoomLevel;
|
||||
//this.Height = 500 * Set.ZoomLevel;
|
||||
this.Width = 500 * Set.ZoomLevel;
|
||||
|
||||
if (Set.StartRecordLast)
|
||||
|
After Width: | Height: | Size: 225 KiB |
After Width: | Height: | Size: 230 KiB |
After Width: | Height: | Size: 220 KiB |
After Width: | Height: | Size: 222 KiB |
After Width: | Height: | Size: 230 KiB |
After Width: | Height: | Size: 225 KiB |
After Width: | Height: | Size: 232 KiB |
After Width: | Height: | Size: 235 KiB |
After Width: | Height: | Size: 234 KiB |
After Width: | Height: | Size: 234 KiB |
After Width: | Height: | Size: 234 KiB |
After Width: | Height: | Size: 232 KiB |
After Width: | Height: | Size: 225 KiB |
After Width: | Height: | Size: 225 KiB |
After Width: | Height: | Size: 230 KiB |
After Width: | Height: | Size: 226 KiB |
After Width: | Height: | Size: 228 KiB |
After Width: | Height: | Size: 230 KiB |
After Width: | Height: | Size: 225 KiB |
After Width: | Height: | Size: 232 KiB |
After Width: | Height: | Size: 235 KiB |
After Width: | Height: | Size: 234 KiB |
After Width: | Height: | Size: 234 KiB |
After Width: | Height: | Size: 234 KiB |
After Width: | Height: | Size: 232 KiB |
After Width: | Height: | Size: 225 KiB |
After Width: | Height: | Size: 225 KiB |
After Width: | Height: | Size: 230 KiB |
After Width: | Height: | Size: 224 KiB |
After Width: | Height: | Size: 226 KiB |
After Width: | Height: | Size: 229 KiB |
After Width: | Height: | Size: 224 KiB |
After Width: | Height: | Size: 231 KiB |
After Width: | Height: | Size: 233 KiB |
After Width: | Height: | Size: 233 KiB |
After Width: | Height: | Size: 234 KiB |
After Width: | Height: | Size: 234 KiB |
After Width: | Height: | Size: 232 KiB |
After Width: | Height: | Size: 225 KiB |
Before Width: | Height: | Size: 217 KiB |
Before Width: | Height: | Size: 222 KiB |
Before Width: | Height: | Size: 218 KiB |
Before Width: | Height: | Size: 220 KiB |
Before Width: | Height: | Size: 222 KiB |
Before Width: | Height: | Size: 217 KiB |
Before Width: | Height: | Size: 224 KiB |
Before Width: | Height: | Size: 228 KiB |
Before Width: | Height: | Size: 227 KiB |
Before Width: | Height: | Size: 228 KiB |
Before Width: | Height: | Size: 228 KiB |
Before Width: | Height: | Size: 224 KiB |
Before Width: | Height: | Size: 217 KiB |
Before Width: | Height: | Size: 217 KiB |
Before Width: | Height: | Size: 222 KiB |
Before Width: | Height: | Size: 212 KiB |
Before Width: | Height: | Size: 213 KiB |
Before Width: | Height: | Size: 222 KiB |
Before Width: | Height: | Size: 217 KiB |
Before Width: | Height: | Size: 224 KiB |
Before Width: | Height: | Size: 228 KiB |
Before Width: | Height: | Size: 227 KiB |
Before Width: | Height: | Size: 228 KiB |
Before Width: | Height: | Size: 228 KiB |
Before Width: | Height: | Size: 224 KiB |
Before Width: | Height: | Size: 217 KiB |
After Width: | Height: | Size: 247 KiB |
After Width: | Height: | Size: 224 KiB |
After Width: | Height: | Size: 209 KiB |
After Width: | Height: | Size: 200 KiB |
After Width: | Height: | Size: 194 KiB |
After Width: | Height: | Size: 204 KiB |
After Width: | Height: | Size: 212 KiB |
After Width: | Height: | Size: 200 KiB |
After Width: | Height: | Size: 199 KiB |
After Width: | Height: | Size: 206 KiB |
After Width: | Height: | Size: 199 KiB |
After Width: | Height: | Size: 201 KiB |
After Width: | Height: | Size: 208 KiB |
After Width: | Height: | Size: 201 KiB |
After Width: | Height: | Size: 206 KiB |
After Width: | Height: | Size: 207 KiB |
After Width: | Height: | Size: 205 KiB |
After Width: | Height: | Size: 202 KiB |
After Width: | Height: | Size: 208 KiB |
After Width: | Height: | Size: 204 KiB |
After Width: | Height: | Size: 194 KiB |
After Width: | Height: | Size: 200 KiB |
After Width: | Height: | Size: 209 KiB |
After Width: | Height: | Size: 224 KiB |
After Width: | Height: | Size: 247 KiB |
4
VPet.sln
@ -31,8 +31,8 @@ Global
|
||||
{7BD4CB1D-C8F3-4349-9BF0-CD11789130BA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{7BD4CB1D-C8F3-4349-9BF0-CD11789130BA}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{7BD4CB1D-C8F3-4349-9BF0-CD11789130BA}.Release|x64.Build.0 = Release|Any CPU
|
||||
{7BD4CB1D-C8F3-4349-9BF0-CD11789130BA}.Release|x86.ActiveCfg = Release|x86
|
||||
{7BD4CB1D-C8F3-4349-9BF0-CD11789130BA}.Release|x86.Build.0 = Release|x86
|
||||
{7BD4CB1D-C8F3-4349-9BF0-CD11789130BA}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{7BD4CB1D-C8F3-4349-9BF0-CD11789130BA}.Release|x86.Build.0 = Release|Any CPU
|
||||
{692CE45E-01A9-4500-8B1D-AFC0FE2767FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{692CE45E-01A9-4500-8B1D-AFC0FE2767FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{692CE45E-01A9-4500-8B1D-AFC0FE2767FA}.Debug|x64.ActiveCfg = Debug|x64
|
||||
|