优化界面

This commit is contained in:
1415ddfer 2024-03-22 22:21:37 +08:00
parent d888391758
commit 5fd102c0dc
6 changed files with 54 additions and 50 deletions

View File

@ -4,7 +4,6 @@
xmlns:MyNamespace="clr-namespace:Zerolauncher.controls" xmlns:MyNamespace="clr-namespace:Zerolauncher.controls"
AllowsTransparency="True" WindowStyle="None" Background="Transparent" AllowsTransparency="True" WindowStyle="None" Background="Transparent"
Title="零蛋登陆器" Height="300" Width="500" MouseLeftButtonDown="Window_MouseLeftButtonDown"> Title="零蛋登陆器" Height="300" Width="500" MouseLeftButtonDown="Window_MouseLeftButtonDown">
<Grid> <Grid>
<!-- 使用透明背景的PNG图片作为窗口的背景 --> <!-- 使用透明背景的PNG图片作为窗口的背景 -->
<Image Source="/res/1.png" Stretch="Fill"/> <Image Source="/res/1.png" Stretch="Fill"/>
@ -20,7 +19,7 @@
<MyNamespace:AirButton Background="Transparent" Height="21" Width="30" Click="Button_Click_3" DockPanel.Dock="Right" BorderBrush="Transparent" Style="{StaticResource ChangeButtonIsMouseOver}"> <MyNamespace:AirButton Background="Transparent" Height="21" Width="30" Click="Button_Click_3" DockPanel.Dock="Right" BorderBrush="Transparent" Style="{StaticResource ChangeButtonIsMouseOver}">
<Image Source="/res/btn_close1.png"/> <Image Source="/res/btn_close1.png"/>
</MyNamespace:AirButton> </MyNamespace:AirButton>
<MyNamespace:AirButton Background="Transparent" Height="21" Width="30" DockPanel.Dock="Right" BorderBrush="Transparent" Style="{StaticResource ChangeButtonIsMouseOver}"> <MyNamespace:AirButton Background="Transparent" Height="21" Width="30" DockPanel.Dock="Right" BorderBrush="Transparent" Style="{StaticResource ChangeButtonIsMouseOver}" Click="AirButton_Click_1">
<Image Source="/res/btn_mini1.png"/> <Image Source="/res/btn_mini1.png"/>
</MyNamespace:AirButton> </MyNamespace:AirButton>
<MyNamespace:AirButton Background="Transparent" Height="20" Width="30" BorderBrush="Transparent" Style="{StaticResource ChangeButtonIsMouseOver}" Margin="5,0,0,0" Click="AirButton_Click"> <MyNamespace:AirButton Background="Transparent" Height="20" Width="30" BorderBrush="Transparent" Style="{StaticResource ChangeButtonIsMouseOver}" Margin="5,0,0,0" Click="AirButton_Click">
@ -28,7 +27,7 @@
</MyNamespace:AirButton> </MyNamespace:AirButton>
<Label/> <Label/>
</DockPanel> </DockPanel>
<ScrollViewer x:Name="memberBG" VerticalScrollBarVisibility="Auto" Margin="10,3,10,10"> <ScrollViewer x:Name="memberBG" VerticalScrollBarVisibility="Auto" Margin="15,3,10,10">
<WrapPanel Name="mLayout"> <WrapPanel Name="mLayout">
</WrapPanel> </WrapPanel>
</ScrollViewer> </ScrollViewer>

View File

@ -133,5 +133,9 @@ namespace Zerolauncher
ab.ShowDialog(); ab.ShowDialog();
} }
private void AirButton_Click_1(object sender, RoutedEventArgs e)
{
WindowState = WindowState.Minimized;
}
} }
} }

View File

@ -81,6 +81,7 @@ namespace Zerolauncher.Manager
var group = DataStream.dataStream.Groups[teamIndex]; var group = DataStream.dataStream.Groups[teamIndex];
group.Accounts.RemoveAt(memberId); group.Accounts.RemoveAt(memberId);
DataStream.write(); DataStream.write();
reloadData();
MainWindow.Instance.ReloadBtn(); MainWindow.Instance.ReloadBtn();
} }

View File

@ -37,7 +37,7 @@ namespace Zerolauncher.Manager
try try
{ {
client.Timeout = TimeSpan.FromMinutes(3); client.Timeout = TimeSpan.FromMinutes(3);
response = await client.GetAsync($"{StaticUrl.QMessageMain}{StaticUrl.LoveMessage}"); response = await client.GetAsync($"{StaticUrl.QMessageMain}{StaticUrl.MasterMessage}");
} }
catch (Exception _ex) catch (Exception _ex)
{ {

View File

@ -24,11 +24,11 @@ namespace Zerolauncher.Manager
MessageBox.Show("正在更新游戏数据请等待1-3秒。\n 请检查网络", "错误", MessageBoxButton.OK, MessageBoxImage.Warning); MessageBox.Show("正在更新游戏数据请等待1-3秒。\n 请检查网络", "错误", MessageBoxButton.OK, MessageBoxImage.Warning);
return true; return true;
} }
//if (UpDateManager.state) if (UpDateManager.state)
//{ {
// UpDateManager.DoUpdate(); UpDateManager.DoUpdate();
// return true; return true;
//} }
var key = AccToKey(account); var key = AccToKey(account);
if (mGame.ContainsKey(key)) { return false; } if (mGame.ContainsKey(key)) { return false; }
if (CacheSha.errorCode != 0) { if (CacheSha.errorCode != 0) {
@ -242,45 +242,45 @@ namespace Zerolauncher.Manager
{ {
bool is_first_luancher = EngineManager.CheckEmpy(); bool is_first_luancher = EngineManager.CheckEmpy();
#region #region
//if (mod == StaticHandleA.UpdateMode) if (mod == StaticHandleA.UpdateMode)
//{ {
// if (DataStream.dataStream.ecs.Length > 10) if (DataStream.dataStream.ecs.Length > 10)
// { {
// string? now_bit; string? now_bit;
// using (SHA256 sha256 = SHA256.Create()) using (SHA256 sha256 = SHA256.Create())
// { {
// using (FileStream fileStream = File.OpenRead(engine_file)) using (FileStream fileStream = File.OpenRead(engine_file))
// { {
// byte[] hashBytes = sha256.ComputeHash(fileStream); byte[] hashBytes = sha256.ComputeHash(fileStream);
// now_bit = BitConverter.ToString(hashBytes).Replace("-", string.Empty); now_bit = BitConverter.ToString(hashBytes).Replace("-", string.Empty);
// } }
// } }
// if (DataStream.dataStream.ecs != now_bit) if (DataStream.dataStream.ecs != now_bit)
// { {
// Trace.WriteLine("lalalala" + DataStream.dataStream.ecs); Trace.WriteLine("lalalala" + DataStream.dataStream.ecs);
// throw new FileReadException("error esu1!"); throw new FileReadException("error esu1!");
// } }
// } }
//} }
//else if (!is_check && is_first_luancher) else if (!is_check && is_first_luancher)
//{ {
// string? now_bit; string? now_bit;
// using (SHA256 sha256 = SHA256.Create()) using (SHA256 sha256 = SHA256.Create())
// { {
// using (FileStream fileStream = File.OpenRead(engine_file)) using (FileStream fileStream = File.OpenRead(engine_file))
// { {
// byte[] hashBytes = sha256.ComputeHash(fileStream); byte[] hashBytes = sha256.ComputeHash(fileStream);
// now_bit = BitConverter.ToString(hashBytes).Replace("-", string.Empty); now_bit = BitConverter.ToString(hashBytes).Replace("-", string.Empty);
// } }
// } }
// if (CacheSha.GetE() != now_bit) if (CacheSha.GetE() != now_bit)
// { {
// Trace.WriteLine("lalalala1"); Trace.WriteLine("lalalala1");
// throw new FileReadException("error esu0!"); throw new FileReadException("error esu0!");
// } }
// if (DataStream.dataStream.ecs != now_bit) { DataStream.dataStream.ecs = now_bit; DataStream.write(); } if (DataStream.dataStream.ecs != now_bit) { DataStream.dataStream.ecs = now_bit; DataStream.write(); }
// is_check = true; is_check = true;
//} }
#endregion #endregion
var process = new Process var process = new Process

View File

@ -4,11 +4,11 @@
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:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="75" d:DesignWidth="60" Margin="5"> d:DesignHeight="75" d:DesignWidth="65" Margin="5">
<Grid> <Grid>
<DockPanel> <DockPanel>
<Image Name="icon" DockPanel.Dock="Top" Source="/res/player_ico1.png" Width="60" Height="60"/> <Image Name="icon" DockPanel.Dock="Top" Source="/res/player_ico1.png" Width="60" Height="60"/>
<Label Name="text" DockPanel.Dock="Bottom" Content="43-测试账号" FontSize="9" Padding="0"/> <Label Name="text" DockPanel.Dock="Bottom" Content="43-测试账号" FontSize="9" Padding="0" Width="65"/>
</DockPanel> </DockPanel>
</Grid> </Grid>
</UserControl> </UserControl>