mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-20 02:55:38 +08:00
修改格式,处理版本,增加复选框限制
This commit is contained in:
@@ -97,7 +97,9 @@
|
||||
<CheckBox
|
||||
x:Name="usesystemnote" Content="使用Windows系统推送通知(支持Win10/Win11)" HorizontalAlignment="Left"
|
||||
Margin="10,0,0,0" VerticalAlignment="Center"
|
||||
IsChecked="{Binding ToastUsingSystem}" Height="20" Width="450"/>
|
||||
IsChecked="{Binding ToastUsingSystem}"
|
||||
IsEnabled="{Binding ToastOS}"
|
||||
Height="20" Width="450"/>
|
||||
</Grid>
|
||||
|
||||
<Button
|
||||
|
||||
@@ -563,7 +563,30 @@ namespace MeoAsstGui
|
||||
//是否使用系统通知
|
||||
private bool _toastUsingSystem = Convert.ToBoolean(ViewStatusStorage.Get("Toast.UsingSystem", bool.FalseString));
|
||||
private bool _toastControl = Convert.ToBoolean(bool.TrueString);
|
||||
|
||||
private bool _toastOS = Convert.ToBoolean(bool.TrueString);
|
||||
public bool toastOScheck()
|
||||
{
|
||||
var os = Environment.OSVersion.Version;
|
||||
if (os.ToString().CompareTo("10.0.0.10240") > 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
ViewStatusStorage.Set("Toast.UsingSystem", bool.FalseString);
|
||||
ToastUsingSystem = false;
|
||||
ToastControl = true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public bool ToastOS
|
||||
{
|
||||
get { return toastOScheck(); }
|
||||
set
|
||||
{
|
||||
SetAndNotify(ref _toastOS, value);
|
||||
}
|
||||
}
|
||||
public bool ToastControl
|
||||
{
|
||||
get { return !_toastUsingSystem; }
|
||||
|
||||
@@ -174,8 +174,8 @@ namespace MeoAsstGui
|
||||
using (var toast = new ToastNotification("更新文件不正确!"))
|
||||
{
|
||||
toast.AppendContentText("文件名: " + UpdatePackageName)
|
||||
.AppendContentText("已将其删除!")
|
||||
.ShowUpdateVersion();
|
||||
.AppendContentText("已将其删除!")
|
||||
.ShowUpdateVersion();
|
||||
}
|
||||
});
|
||||
return false;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
||||
Reference in New Issue
Block a user