Skip to content

Commit

Permalink
关于窗口改版,修复更新检查文本错误
Browse files Browse the repository at this point in the history
  • Loading branch information
zsh2401 committed Aug 9, 2020
1 parent 2d1fb72 commit f1caee4
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ class EAutumnBoxUpdateChecker : LeafExtensionBase
private readonly WebClient webClient = new WebClient() { Encoding = Encoding.UTF8 };

[LMain]
public void EntryPoint(INotificationManager notificationManager, ClassTextReader reader)
public void EntryPoint(INotificationManager notificationManager, ClassTextReader text)
{
notificationManager.Info(reader[STR_KEY_CHECKING_UPDATE]);
notificationManager.Info(text.RxGet(STR_KEY_CHECKING_UPDATE));
Thread.Sleep(5000);
notificationManager.Warn(reader[STR_KEY_FAIL]);
notificationManager.Warn(text.RxGet(STR_KEY_FAIL));
}
}
}
3 changes: 3 additions & 0 deletions src/AutumnBox.GUI/Resources/Languages/zh-CN.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,11 @@


<!--PanelDonte-->
<s:String x:Key="Donate.Title">捐赠秋之盒</s:String>
<s:String x:Key="Donate.PayPal">使用PayPal进行捐赠</s:String>
<s:String x:Key="Donate.Page">捐赠名单</s:String>
<s:String x:Key="Donate.P4W">向冬之盆中投入您对秋之盒的支持</s:String>

<s:String x:Key="Donate.Description">赠人玫瑰,手留余香.
谢谢你对中国软件生态做出的贡献</s:String>

Expand Down
30 changes: 17 additions & 13 deletions src/AutumnBox.GUI/Views/Controls/PanelAbout.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,22 @@
Foreground="{DynamicResource PrimaryTextBrush}"
FontFamily="{DynamicResource AutumnBox.Font}"
xmlns:viewmodel="clr-namespace:AutumnBox.GUI.ViewModels"
d:DesignHeight="450" d:DesignWidth="400">
d:DesignHeight="150" d:DesignWidth="400">
<UserControl.DataContext>
<viewmodel:VMAbout/>
</UserControl.DataContext>
<DockPanel>
<StackPanel DockPanel.Dock="Bottom" Margin="0,0,0,10">
<DockPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<StackPanel DockPanel.Dock="Left">
<StackPanel Margin="10" Orientation="Horizontal">
<Image Source="/Resources/Drawable/Icon.ico" Height="30" Margin="5"/>
<StackPanel>
<TextBlock FontSize="20" Text="{DynamicResource App.NameWithVersion}"/>
<TextBlock Text="{DynamicResource App.Slogan}" Foreground="{DynamicResource SecondaryTextBrush}"/>
</StackPanel>
</StackPanel>

<hc:Shield Command="{Binding OpenUrl}" CommandParameter="mailto:[email protected]" Margin="2" HorizontalAlignment="Center" Subject="{DynamicResource EMail}" Status="[email protected]" Color="#d8624c"/>
<hc:Shield Margin="2" HorizontalAlignment="Center" Subject="{DynamicResource QQGroup}" Status="246177486" Color="#1182c3"/>
<TextBlock HorizontalAlignment="Center" Text="www.atmb.top" TextDecorations="Underline">
<TextBlock.InputBindings>
<MouseBinding MouseAction="LeftClick" Command="{Binding OpenUrl}" CommandParameter="{DynamicResource UrlOfficialWebsite}"/>
Expand All @@ -32,18 +42,12 @@
</TextBlock.InputBindings>
</TextBlock>
</StackPanel>
<StackPanel DockPanel.Dock="Bottom" Margin="0,0,0,10">

</StackPanel>

<StackPanel DockPanel.Dock="Top">
<StackPanel Margin="10" Orientation="Horizontal">
<Image Source="/Resources/Drawable/Icon.ico" Height="30" Margin="5"/>
<StackPanel>
<TextBlock FontSize="20" Text="{DynamicResource App.NameWithVersion}"/>
<TextBlock Text="{DynamicResource App.Slogan}" Foreground="{DynamicResource SecondaryTextBrush}"/>
</StackPanel>
</StackPanel>

<hc:Shield Command="{Binding OpenUrl}" CommandParameter="mailto:[email protected]" Margin="2" HorizontalAlignment="Center" Subject="{DynamicResource EMail}" Status="[email protected]" Color="#d8624c"/>
<hc:Shield Margin="2" HorizontalAlignment="Center" Subject="{DynamicResource QQGroup}" Status="246177486" Color="#1182c3"/>


<DockPanel Margin="30,10,30,0">
<TextBlock DockPanel.Dock="Right" Text="{x:Static util:VersionInfos.GUIString}"/>
Expand Down
12 changes: 7 additions & 5 deletions src/AutumnBox.GUI/Views/Windows/AboutWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
WindowStartupLocation="CenterOwner"
Background="{DynamicResource RegionBrush}"
FontFamily="{DynamicResource AutumnBox.Font}"
Title="{DynamicResource App.Name}" Height="430" Width="700">
<DockPanel >
<panel:PanelAbout Effect="{DynamicResource EffectShadow2}" DockPanel.Dock="Left"/>
<panel:PanelUpdateLogs DockPanel.Dock="Right"/>
</DockPanel>
Width="400"
Height="200"
Title="{DynamicResource App.NameWithVersion}" >
<!--<DockPanel >-->
<panel:PanelAbout Effect="{DynamicResource EffectShadow2}"/>
<!--<panel:PanelUpdateLogs DockPanel.Dock="Right"/>-->
<!--</DockPanel>-->
</custom:NiceWindow>
4 changes: 2 additions & 2 deletions src/AutumnBox.GUI/Views/Windows/DonateWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Background="{DynamicResource RegionBrush}"
ResizeMode="NoResize"
ShowInTaskbar="False"
FontFamily="{DynamicResource AutumnBox.Font}"
Title="{DynamicResource Donate}" Width="550" Height="350">
Title="{DynamicResource Donate.Title}" Width="550" Height="350">
<Window.DataContext>
<mvvm:ViewModelBase/>
</Window.DataContext>
Expand All @@ -23,7 +23,7 @@ Background="{DynamicResource RegionBrush}"
<Image Source="/Resources/Images/donate_pot4winter.png" Width="160" HorizontalAlignment="Center"></Image>

<StackPanel VerticalAlignment="Center" Margin="0,20,0,20">
<TextBlock FontSize="10" VerticalAlignment="Center" HorizontalAlignment="Center">向冬之盆中投入您对秋之盒的支持</TextBlock>
<TextBlock FontSize="10" VerticalAlignment="Center" HorizontalAlignment="Center" Text="{DynamicResource Donate.P4W}"/>
</StackPanel>
<controls:ButtonGroup Orientation="Vertical">
<Button Command="{Binding OpenUrl}" CommandParameter="https://www.paypal.me/zsh2401" Content="{DynamicResource Donate.PayPal}"/>
Expand Down

0 comments on commit f1caee4

Please sign in to comment.