mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
修复bug和报错
This commit is contained in:
parent
60598ab292
commit
70c7e02784
@ -231,19 +231,26 @@ namespace VPet_Simulator.Windows
|
|||||||
LocalizeCore.LoadCulture(Set.Language);
|
LocalizeCore.LoadCulture(Set.Language);
|
||||||
|
|
||||||
//旧版本设置兼容
|
//旧版本设置兼容
|
||||||
var cgpteb = Set["CGPT"].Find("enable");
|
var cgpte = Set.FindLine("CGPT");
|
||||||
if (cgpteb != null)
|
if (cgpte != null)
|
||||||
{
|
{
|
||||||
if (Set["CGPT"][(gbol)"enable"])
|
var cgpteb = cgpte.Find("enable");
|
||||||
|
if (cgpteb != null)
|
||||||
{
|
{
|
||||||
Set["CGPT"][(gstr)"type"] = "API";
|
if (Set["CGPT"][(gbol)"enable"])
|
||||||
|
{
|
||||||
|
Set["CGPT"][(gstr)"type"] = "API";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Set["CGPT"][(gstr)"type"] = "LB";
|
||||||
|
}
|
||||||
|
Set["CGPT"].Remove(cgpteb);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
Set["CGPT"][(gstr)"type"] = "LB";
|
|
||||||
}
|
|
||||||
Set["CGPT"].Remove(cgpteb);
|
|
||||||
}
|
}
|
||||||
|
else//新玩家,默认设置为
|
||||||
|
Set["CGPT"][(gstr)"type"] = "LB";
|
||||||
|
|
||||||
if (Directory.Exists(AppDomain.CurrentDomain.BaseDirectory + @"\UserData") && !Directory.Exists(AppDomain.CurrentDomain.BaseDirectory + @"\BackUP"))
|
if (Directory.Exists(AppDomain.CurrentDomain.BaseDirectory + @"\UserData") && !Directory.Exists(AppDomain.CurrentDomain.BaseDirectory + @"\BackUP"))
|
||||||
{
|
{
|
||||||
Directory.Move(AppDomain.CurrentDomain.BaseDirectory + @"\UserData", AppDomain.CurrentDomain.BaseDirectory + @"\BackUP");
|
Directory.Move(AppDomain.CurrentDomain.BaseDirectory + @"\UserData", AppDomain.CurrentDomain.BaseDirectory + @"\BackUP");
|
||||||
|
@ -66,11 +66,17 @@ namespace VPet_Simulator.Windows
|
|||||||
Dispatcher.Invoke(() =>
|
Dispatcher.Invoke(() =>
|
||||||
{
|
{
|
||||||
if (isclick)
|
if (isclick)
|
||||||
{
|
{
|
||||||
isdragmove = Opacity == 0.8;
|
try
|
||||||
Cursor = Cursors.Hand;
|
{
|
||||||
Opacity = 1;
|
DragMove();
|
||||||
DragMove();
|
isdragmove = Opacity == 0.8;
|
||||||
|
Cursor = Cursors.Hand;
|
||||||
|
Opacity = 1;
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -246,8 +246,8 @@ namespace VPet_Simulator.Windows
|
|||||||
var b = mw.Main.FindDisplayBorder(ig);
|
var b = mw.Main.FindDisplayBorder(ig);
|
||||||
ig.Run(b, item.ImageSource, () =>
|
ig.Run(b, item.ImageSource, () =>
|
||||||
{
|
{
|
||||||
mw.Main.EventTimer_Elapsed();
|
|
||||||
mw.Main.DisplayToNomal();
|
mw.Main.DisplayToNomal();
|
||||||
|
mw.Main.EventTimer_Elapsed();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
</TabControl.ContentTemplate>
|
</TabControl.ContentTemplate>
|
||||||
<TabItem Header="{ll:Str 图形}" Foreground="{DynamicResource PrimaryText}"
|
<TabItem Header="{ll:Str 图形}" Foreground="{DynamicResource PrimaryText}"
|
||||||
BorderBrush="{DynamicResource PrimaryDarker}">
|
BorderBrush="{DynamicResource PrimaryDarker}">
|
||||||
<Grid>
|
<Grid Margin="0,0,-5,0">
|
||||||
<ScrollViewer>
|
<ScrollViewer>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@ -135,7 +135,7 @@
|
|||||||
Background="{x:Null}" Grid.Row="1"
|
Background="{x:Null}" Grid.Row="1"
|
||||||
ToolTip="{ll:Str '桌宠图形渲染的分辨率,越高图形越清晰\ 但是高分辨率会占用更多内存\ 重启后生效'}" />
|
ToolTip="{ll:Str '桌宠图形渲染的分辨率,越高图形越清晰\ 但是高分辨率会占用更多内存\ 重启后生效'}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
<TextBlock Grid.Row="5" Text="{ll:Str 分辨率}" VerticalAlignment="Center" Grid.ColumnSpan="2" />
|
<TextBlock Grid.Row="5" Text="{ll:Str 渲染分辨率}" VerticalAlignment="Center" Grid.ColumnSpan="2" />
|
||||||
<TextBlock Grid.Row="6" Text="{ll:Str 主题}" VerticalAlignment="Center" />
|
<TextBlock Grid.Row="6" Text="{ll:Str 主题}" VerticalAlignment="Center" />
|
||||||
<ComboBox x:Name="ThemeBox" Grid.Row="6" Grid.Column="2" Margin="0,3,0,2"
|
<ComboBox x:Name="ThemeBox" Grid.Row="6" Grid.Column="2" Margin="0,3,0,2"
|
||||||
SelectionChanged="ThemeBox_SelectionChanged" IsEnabled="False"
|
SelectionChanged="ThemeBox_SelectionChanged" IsEnabled="False"
|
||||||
@ -627,7 +627,9 @@
|
|||||||
<Button pu:ButtonHelper.CornerRadius="4" Content="{ll:Str 保存设置}" Margin="4" Grid.Column="1"
|
<Button pu:ButtonHelper.CornerRadius="4" Content="{ll:Str 保存设置}" Margin="4" Grid.Column="1"
|
||||||
Background="{DynamicResource SecondaryLight}" Padding="1" Click="DIY_Save_Click" />
|
Background="{DynamicResource SecondaryLight}" Padding="1" Click="DIY_Save_Click" />
|
||||||
</Grid>
|
</Grid>
|
||||||
<StackPanel x:Name="StackDIY" />
|
<ScrollViewer>
|
||||||
|
<StackPanel x:Name="StackDIY" />
|
||||||
|
</ScrollViewer>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
Loading…
Reference in New Issue
Block a user