mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
支持删除多开存档功能
This commit is contained in:
parent
95715df65b
commit
5addd3e301
@ -428,7 +428,7 @@
|
|||||||
Click="btn_muti_open_click" />
|
Click="btn_muti_open_click" />
|
||||||
<Button x:Name="btn_mutidel" Grid.Row="1" Grid.Column="3" Margin="5" Padding="1" pu:ButtonHelper.CornerRadius="4"
|
<Button x:Name="btn_mutidel" Grid.Row="1" Grid.Column="3" Margin="5" Padding="1" pu:ButtonHelper.CornerRadius="4"
|
||||||
Background="{DynamicResource SecondaryLight}" Content="{ll:Str 删除}"
|
Background="{DynamicResource SecondaryLight}" Content="{ll:Str 删除}"
|
||||||
ToolTip="{ll:Str 删除当前选择的多开存档}" VerticalAlignment="Bottom" Height="25" />
|
ToolTip="{ll:Str 删除当前选择的多开存档}" VerticalAlignment="Bottom" Height="25" Click="btn_mutidel_Click" />
|
||||||
<ListBox x:Name="LBHave" Grid.Row="1" Grid.Column="2" Margin="1,2,1,2"
|
<ListBox x:Name="LBHave" Grid.Row="1" Grid.Column="2" Margin="1,2,1,2"
|
||||||
pu:ListBoxHelper.CornerRadius="4" BorderBrush="{DynamicResource DARKPrimary}"
|
pu:ListBoxHelper.CornerRadius="4" BorderBrush="{DynamicResource DARKPrimary}"
|
||||||
BorderThickness="2" MinHeight="66"
|
BorderThickness="2" MinHeight="66"
|
||||||
|
@ -90,15 +90,7 @@ namespace VPet_Simulator.Windows
|
|||||||
|
|
||||||
swAutoCal.IsChecked = !mw.Set["gameconfig"].GetBool("noAutoCal");
|
swAutoCal.IsChecked = !mw.Set["gameconfig"].GetBool("noAutoCal");
|
||||||
|
|
||||||
foreach (var str in App.MutiSaves)
|
LoadMutiUI();
|
||||||
{
|
|
||||||
var rn = str;
|
|
||||||
if (str == "")
|
|
||||||
rn = "默认存档".Translate();
|
|
||||||
if (str == mw.PrefixSave.Trim('-'))
|
|
||||||
rn += ' ' + "(当前存档)".Translate();
|
|
||||||
LBHave.Items.Add(rn);
|
|
||||||
}
|
|
||||||
|
|
||||||
LanguageBox.Items.Add("null");
|
LanguageBox.Items.Add("null");
|
||||||
foreach (string v in LocalizeCore.AvailableCultures)
|
foreach (string v in LocalizeCore.AvailableCultures)
|
||||||
@ -965,6 +957,19 @@ namespace VPet_Simulator.Windows
|
|||||||
PetBox.SelectedIndex = petboxbef;
|
PetBox.SelectedIndex = petboxbef;
|
||||||
AllowChange = true;
|
AllowChange = true;
|
||||||
}
|
}
|
||||||
|
private void LoadMutiUI()
|
||||||
|
{
|
||||||
|
LBHave.Items.Clear();
|
||||||
|
foreach (var str in App.MutiSaves)
|
||||||
|
{
|
||||||
|
var rn = str;
|
||||||
|
if (str == "")
|
||||||
|
rn = "默认存档".Translate();
|
||||||
|
if (str == mw.PrefixSave.Trim('-'))
|
||||||
|
rn += " (" + "当前存档".Translate() + ')';
|
||||||
|
LBHave.Items.Add(rn);
|
||||||
|
}
|
||||||
|
}
|
||||||
private void PetBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void PetBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if (!AllowChange)
|
if (!AllowChange)
|
||||||
@ -1415,7 +1420,7 @@ namespace VPet_Simulator.Windows
|
|||||||
|
|
||||||
private void restart_click(object sender, RoutedEventArgs e)
|
private void restart_click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (MessageBoxX.Show("是否重置游戏数据重新开始?\n该操作无法撤回".Translate(), "重新开始".Translate(), MessageBoxButton.YesNo) == MessageBoxResult.Yes)
|
if (MessageBoxX.Show("是否重置游戏数据重新开始?".Translate(), "重新开始".Translate(), MessageBoxButton.YesNo) == MessageBoxResult.Yes)
|
||||||
{
|
{
|
||||||
var oldsave = mw.GameSavesData;
|
var oldsave = mw.GameSavesData;
|
||||||
mw.GameSavesData = new GameSave_v2(mw.Core.Save.Name);
|
mw.GameSavesData = new GameSave_v2(mw.Core.Save.Name);
|
||||||
@ -1444,11 +1449,11 @@ namespace VPet_Simulator.Windows
|
|||||||
if (LBHave.SelectedIndex == -1)
|
if (LBHave.SelectedIndex == -1)
|
||||||
return;
|
return;
|
||||||
var str = LBHave.SelectedItem as string;
|
var str = LBHave.SelectedItem as string;
|
||||||
if (str == "默认存档")
|
if (str == "默认存档".Translate())
|
||||||
{
|
{
|
||||||
str = string.Empty;
|
str = string.Empty;
|
||||||
}
|
}
|
||||||
if (str.EndsWith("(当前存档)".Translate()) || App.MainWindows.FirstOrDefault(x => x.PrefixSave.Trim('-') == str) != null)
|
if (str.EndsWith(")") || App.MainWindows.FirstOrDefault(x => x.PrefixSave.Trim('-') == str) != null)
|
||||||
{
|
{
|
||||||
MessageBoxX.Show("当前多开已经加载".Translate());
|
MessageBoxX.Show("当前多开已经加载".Translate());
|
||||||
return;
|
return;
|
||||||
@ -1478,7 +1483,33 @@ namespace VPet_Simulator.Windows
|
|||||||
new MainWindow(savename).Show();
|
new MainWindow(savename).Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void btn_mutidel_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (LBHave.SelectedIndex == -1)
|
||||||
|
return;
|
||||||
|
var str = LBHave.SelectedItem as string;
|
||||||
|
if (str == "默认存档".Translate())
|
||||||
|
{
|
||||||
|
MessageBoxX.Show("默认存档无法删除,请使用重新开始功能重新开始游戏".Translate());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (str.EndsWith(")") || App.MainWindows.FirstOrDefault(x => x.PrefixSave.Trim('-') == str) != null)
|
||||||
|
{
|
||||||
|
MessageBoxX.Show("当前多开已经加载,请先关闭改多开后重试".Translate());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!App.MutiSaves.Contains(str))
|
||||||
|
{
|
||||||
|
LoadMutiUI();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (MessageBoxX.Show("是否删除当前选择({0})的多开存档?".Translate(str), "删除前确认".Translate(), MessageBoxButton.YesNo) == MessageBoxResult.Yes)
|
||||||
|
{
|
||||||
|
File.Delete(ExtensionValue.BaseDirectory + @$"\Setting-{str}.lps");
|
||||||
|
App.MutiSaves.Remove(str);
|
||||||
|
LoadMutiUI();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void SwitchHideFromTaskControl_OnChecked(object sender, RoutedEventArgs e)
|
private void SwitchHideFromTaskControl_OnChecked(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
打开#Open:|
|
打开#Open:|
|
||||||
打开当前选择的多开存档#Opens the currently selected Multiple archive.:|
|
打开当前选择的多开存档#Opens the currently selected Multiple archive.:|
|
||||||
删除当前选择的多开存档#Delete the currently selected Multiple archive:|
|
删除当前选择的多开存档#Delete the currently selected Multiple archive:|
|
||||||
(当前存档)#(Current archive):|
|
当前存档#Current archive:|
|
||||||
默认存档#Default archive:|
|
默认存档#Default archive:|
|
||||||
clicktext#Click text:|
|
clicktext#Click text:|
|
||||||
lowtext#Low status text:|
|
lowtext#Low status text:|
|
||||||
@ -22,3 +22,7 @@ selecttext#Options Chat Text:|
|
|||||||
搜索设置#Search settings:|
|
搜索设置#Search settings:|
|
||||||
是否多开一个新的桌宠使用 {0} 皮肤\n各自存档独立保存,互不影响\n支持同时显示多个宠物#Whether to open a new VPet to use {0} skin\nEach archive is saved independently and does not affect each other\nSupports displaying multiple pets at the same time:|
|
是否多开一个新的桌宠使用 {0} 皮肤\n各自存档独立保存,互不影响\n支持同时显示多个宠物#Whether to open a new VPet to use {0} skin\nEach archive is saved independently and does not affect each other\nSupports displaying multiple pets at the same time:|
|
||||||
是否多开#Whether to open multiple:|
|
是否多开#Whether to open multiple:|
|
||||||
|
默认存档无法删除,请使用重新开始功能重新开始游戏#The default archive cannot be deleted, please use the restart function to restart the game:|
|
||||||
|
是否删除当前选择({0})的多开存档?#Whether to delete the current selection ({0}) multiple archive?:|
|
||||||
|
删除前确认#Confirm before deleting:|
|
||||||
|
当前多开已经加载,请先关闭改多开后重试#Multiple currently loaded, please close the multiple before trying again:|
|
@ -30,5 +30,5 @@
|
|||||||
是没有修改过存档/使用超模MOD的玩家专属标志#Is there no modified archive/supermodel MOD player exclusive logo:|
|
是没有修改过存档/使用超模MOD的玩家专属标志#Is there no modified archive/supermodel MOD player exclusive logo:|
|
||||||
重新开始#Restart New Game:|
|
重新开始#Restart New Game:|
|
||||||
重新开始新游戏,重置统计等信息\r对于想要获得脱离超模从而获得成就非常有帮助#Restart a new game, reset statistics and other information\rIt is very helpful for those who want to get out of the supermodel and get achievements.:|
|
重新开始新游戏,重置统计等信息\r对于想要获得脱离超模从而获得成就非常有帮助#Restart a new game, reset statistics and other information\rIt is very helpful for those who want to get out of the supermodel and get achievements.:|
|
||||||
是否重置游戏数据重新开始?\n该操作无法撤回#Reset the game data to restart?\nThis operation can not be revoked:|
|
是否重置游戏数据重新开始?#Reset the game data to restart?:|
|
||||||
重置成功#Reset successfully:|
|
重置成功#Reset successfully:|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
打开#打开:|
|
打开#打开:|
|
||||||
打开当前选择的多开存档#打开当前选择的多开存档:|
|
打开当前选择的多开存档#打开当前选择的多开存档:|
|
||||||
删除当前选择的多开存档#删除当前选择的多开存档:|
|
删除当前选择的多开存档#删除当前选择的多开存档:|
|
||||||
(当前存档)#(当前存档):|
|
当前存档#当前存档:|
|
||||||
默认存档#默认存档:|
|
默认存档#默认存档:|
|
||||||
clicktext#点击文本:|
|
clicktext#点击文本:|
|
||||||
lowtext#低状态文本:|
|
lowtext#低状态文本:|
|
||||||
|
@ -31,5 +31,5 @@
|
|||||||
是没有修改过存档/使用超模MOD的玩家专属标志#是没有修改过存档/使用超模MOD的玩家专属标志:|
|
是没有修改过存档/使用超模MOD的玩家专属标志#是没有修改过存档/使用超模MOD的玩家专属标志:|
|
||||||
重新开始#重新开始:|
|
重新开始#重新开始:|
|
||||||
重新开始新游戏,重置统计等信息\r对于想要获得脱离超模从而获得成就非常有帮助#重新开始新游戏,重置统计等信息\r对于想要获得脱离超模从而获得成就非常有帮助:|
|
重新开始新游戏,重置统计等信息\r对于想要获得脱离超模从而获得成就非常有帮助#重新开始新游戏,重置统计等信息\r对于想要获得脱离超模从而获得成就非常有帮助:|
|
||||||
是否重置游戏数据重新开始?\n该操作无法撤回#是否重置游戏数据重新开始?\n该操作无法撤回:|
|
是否重置游戏数据重新开始?#是否重置游戏数据重新开始?:|
|
||||||
重置成功#重置成功:|
|
重置成功#重置成功:|
|
@ -10,7 +10,7 @@
|
|||||||
打开#打開:|
|
打开#打開:|
|
||||||
打开当前选择的多开存档#打開當前選擇的多開存檔:|
|
打开当前选择的多开存档#打開當前選擇的多開存檔:|
|
||||||
删除当前选择的多开存档#删除當前選擇的多開存檔:|
|
删除当前选择的多开存档#删除當前選擇的多開存檔:|
|
||||||
(当前存档)#(當前存檔):|
|
当前存档#當前存檔:|
|
||||||
默认存档#默認存檔:|
|
默认存档#默認存檔:|
|
||||||
clicktext#點擊文字:|
|
clicktext#點擊文字:|
|
||||||
lowtext#低狀態文字:|
|
lowtext#低狀態文字:|
|
||||||
|
@ -31,5 +31,5 @@
|
|||||||
是没有修改过存档/使用超模MOD的玩家专属标志#是沒有修改過存檔/使用過OP模組的玩家專屬徽章:|
|
是没有修改过存档/使用超模MOD的玩家专属标志#是沒有修改過存檔/使用過OP模組的玩家專屬徽章:|
|
||||||
重新开始#重新開始:|
|
重新开始#重新開始:|
|
||||||
重新开始新游戏,重置统计等信息\r对于想要获得脱离超模从而获得成就非常有帮助#重頭開始遊戲,重置統計等資訊\r對於想要脫離OP數據,以此來獲得成就的人,非常有幫助:|
|
重新开始新游戏,重置统计等信息\r对于想要获得脱离超模从而获得成就非常有帮助#重頭開始遊戲,重置統計等資訊\r對於想要脫離OP數據,以此來獲得成就的人,非常有幫助:|
|
||||||
是否重置游戏数据重新开始?\n该操作无法撤回#是否重置遊戲數據重新開始?\n本行為無法被取消!:|
|
是否重置游戏数据重新开始?#是否重置遊戲數據重新開始?:|
|
||||||
重置成功#重置成功:|
|
重置成功#重置成功:|
|
||||||
|
Loading…
Reference in New Issue
Block a user