mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-18 10:10:45 +08:00
style: C# 统一格式化
This commit is contained in:
@@ -2,13 +2,10 @@
|
||||
x:Class="MaaWpfGui.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:MaaWpfGui"
|
||||
xmlns:s="https://github.com/canton7/Stylet"
|
||||
xmlns:main="clr-namespace:MaaWpfGui.Main"
|
||||
xmlns:styles="clr-namespace:MaaWpfGui.Styles"
|
||||
xmlns:resources="clr-namespace:MaaWpfGui.Helper"
|
||||
xmlns:controls="clr-namespace:MaaWpfGui.Styles.Controls"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol">
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:main="clr-namespace:MaaWpfGui.Main"
|
||||
xmlns:s="https://github.com/canton7/Stylet">
|
||||
<Application.Resources>
|
||||
<!--<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
@@ -30,15 +27,20 @@
|
||||
<main:Bootstrapper />
|
||||
</s:ApplicationLoader.Bootstrapper>
|
||||
</s:ApplicationLoader>
|
||||
|
||||
|
||||
<hc:ThemeResources>
|
||||
<hc:ThemeResources.ThemeDictionaries>
|
||||
<ResourceDictionary x:Key="Light" hc:ThemeDictionary.Key="Light" Source="/MAA;component/Res/Themes/Light.xaml" />
|
||||
<ResourceDictionary x:Key="Dark" hc:ThemeDictionary.Key="Dark" Source="/MAA;component/Res/Themes/Dark.xaml" />
|
||||
<ResourceDictionary
|
||||
x:Key="Light"
|
||||
hc:ThemeDictionary.Key="Light"
|
||||
Source="/MAA;component/Res/Themes/Light.xaml" />
|
||||
<ResourceDictionary
|
||||
x:Key="Dark"
|
||||
hc:ThemeDictionary.Key="Dark"
|
||||
Source="/MAA;component/Res/Themes/Dark.xaml" />
|
||||
</hc:ThemeResources.ThemeDictionaries>
|
||||
</hc:ThemeResources>
|
||||
<hc:Theme/>
|
||||
|
||||
<hc:Theme />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<!-- A Style that affects all TextBlocks -->
|
||||
<Style BasedOn="{StaticResource TextBlockDefault}" TargetType="controls:TextBlock" />
|
||||
|
||||
@@ -11,14 +11,9 @@
|
||||
// but WITHOUT ANY WARRANTY
|
||||
// </copyright>
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Documents;
|
||||
using HandyControl.Themes;
|
||||
using MaaWpfGui.Constants;
|
||||
using MaaWpfGui.Helper;
|
||||
using MaaWpfGui.ViewModels.UI;
|
||||
|
||||
namespace MaaWpfGui
|
||||
{
|
||||
|
||||
@@ -38,7 +38,6 @@ namespace MaaWpfGui.Constants
|
||||
|
||||
public const string QQchannel = "https://pd.qq.com/s/4j1ju9z47";
|
||||
|
||||
|
||||
private static string language => ConfigurationHelper.GetValue(ConfigurationKeys.Localization, LocalizationHelper.DefaultLanguage);
|
||||
|
||||
public static string HelpUri => $"https://maa.plus/docs/{_helpUrl[language]}";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// <copyright file="HttpResponseLoggingExtension.cs" company="MaaAssistantArknights">
|
||||
// <copyright file="HttpResponseLoggingExtension.cs" company="MaaAssistantArknights">
|
||||
// MaaWpfGui - A part of the MaaCoreArknights project
|
||||
// Copyright (C) 2021 MistEO and Contributors
|
||||
//
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// <copyright file="ConfigurationHelper.cs" company="MaaAssistantArknights">
|
||||
// <copyright file="ConfigurationHelper.cs" company="MaaAssistantArknights">
|
||||
// MaaWpfGui - A part of the MaaCoreArknights project
|
||||
// Copyright (C) 2021 MistEO and Contributors
|
||||
//
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// <copyright file="ItemListHelper.cs" company="MaaAssistantArknights">
|
||||
// <copyright file="ItemListHelper.cs" company="MaaAssistantArknights">
|
||||
// MaaWpfGui - A part of the MaaCoreArknights project
|
||||
// Copyright (C) 2021 MistEO and Contributors
|
||||
//
|
||||
@@ -26,6 +26,7 @@ namespace MaaWpfGui.Helper
|
||||
public static Dictionary<string, ArkItem> ArkItems { get; }
|
||||
|
||||
private static readonly ILogger _logger = Log.ForContext("SourceContext", "ItemListHelper");
|
||||
|
||||
private static readonly Dictionary<string, string> _clientDirectoryMapper = new Dictionary<string, string>
|
||||
{
|
||||
{ "zh-tw", "txwy" },
|
||||
@@ -43,8 +44,10 @@ namespace MaaWpfGui.Helper
|
||||
case "zh-cn":
|
||||
filename = Path.Combine(Directory.GetCurrentDirectory(), "resource", "item_index.json");
|
||||
break;
|
||||
|
||||
case "pallas":
|
||||
break;
|
||||
|
||||
default:
|
||||
filename = Path.Combine(Directory.GetCurrentDirectory(), "resource", "global", _clientDirectoryMapper[language], "resource", "item_index.json");
|
||||
break;
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#pragma warning disable SA1307
|
||||
#pragma warning disable SA1401
|
||||
#pragma warning disable IDE0051
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Runtime.InteropServices;
|
||||
@@ -94,7 +95,6 @@ namespace MaaWpfGui.Helper
|
||||
private static extern bool SetWindowText(IntPtr hWnd, string lpString);
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
|
||||
public struct CWPRETSTRUCT
|
||||
{
|
||||
public IntPtr lResult;
|
||||
@@ -106,8 +106,10 @@ namespace MaaWpfGui.Helper
|
||||
|
||||
private static readonly HookProc hookProc;
|
||||
private static readonly EnumChildProc enumProc;
|
||||
|
||||
[ThreadStatic]
|
||||
private static IntPtr hHook;
|
||||
|
||||
[ThreadStatic]
|
||||
private static int nButton;
|
||||
|
||||
@@ -266,21 +268,27 @@ namespace MaaWpfGui.Helper
|
||||
case MBOK:
|
||||
SetWindowText(hWnd, OK);
|
||||
break;
|
||||
|
||||
case MBCancel:
|
||||
SetWindowText(hWnd, Cancel);
|
||||
break;
|
||||
|
||||
case MBAbort:
|
||||
SetWindowText(hWnd, Abort);
|
||||
break;
|
||||
|
||||
case MBRetry:
|
||||
SetWindowText(hWnd, Retry);
|
||||
break;
|
||||
|
||||
case MBIgnore:
|
||||
SetWindowText(hWnd, Ignore);
|
||||
break;
|
||||
|
||||
case MBYes:
|
||||
SetWindowText(hWnd, Yes);
|
||||
break;
|
||||
|
||||
case MBNo:
|
||||
SetWindowText(hWnd, No);
|
||||
break;
|
||||
@@ -303,14 +311,17 @@ namespace MaaWpfGui.Helper
|
||||
key = ResourceToken.AskGeometry;
|
||||
brushKey = ResourceToken.AccentBrush;
|
||||
break;
|
||||
|
||||
case MessageBoxImage.Error:
|
||||
key = ResourceToken.ErrorGeometry;
|
||||
brushKey = ResourceToken.DangerBrush;
|
||||
break;
|
||||
|
||||
case MessageBoxImage.Warning:
|
||||
key = ResourceToken.WarningGeometry;
|
||||
brushKey = ResourceToken.WarningBrush;
|
||||
break;
|
||||
|
||||
case MessageBoxImage.Information:
|
||||
key = ResourceToken.InfoGeometry;
|
||||
brushKey = ResourceToken.InfoBrush;
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace MaaWpfGui.Helper
|
||||
SystemEvents.UserPreferenceChanged += SystemEvents_UserPreferenceChanged;
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Swith Theme
|
||||
|
||||
#region Check UiLogColor
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace MaaWpfGui.Helper
|
||||
return (int)(((((512 + rmean) * r * r) >> 8) + (4 * g * g) + (((767 - rmean) * b * b) >> 8)) >> 14);
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Check UiLogColor
|
||||
|
||||
#region Convert
|
||||
|
||||
@@ -142,6 +142,6 @@ namespace MaaWpfGui.Helper
|
||||
return new SolidColorBrush(String2Color(str));
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Convert
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ using System.Media;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Interop;
|
||||
using System.Windows.Media;
|
||||
@@ -567,6 +566,7 @@ namespace MaaWpfGui.Helper
|
||||
/// </summary>
|
||||
public uint dwTimeout;
|
||||
}
|
||||
|
||||
#pragma warning restore SA1307 // Accessible fields should begin with upper-case letter
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// <copyright file="ArkItem.cs" company="MaaAssistantArknights">
|
||||
// <copyright file="ArkItem.cs" company="MaaAssistantArknights">
|
||||
// MaaWpfGui - A part of the MaaCoreArknights project
|
||||
// Copyright (C) 2021 MistEO and Contributors
|
||||
//
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespaces:MaaWpfGui"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:uri="clr-namespace:System;assembly=System.Runtime">
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
<!-- Settings -->
|
||||
<system:String x:Key="Settings">Settings</system:String>
|
||||
<system:String x:Key="GameSettings">Client</system:String>
|
||||
@@ -450,7 +448,7 @@ The video resolution is required to be 16:9, and there are no interference facto
|
||||
<system:String x:Key="ErrorFeedbackLinkText">Create a GitHub issue</system:String>
|
||||
<system:String x:Key="ErrorQqGroupLinkText">Join QQ Group</system:String>
|
||||
<system:String x:Key="CopyErrorMessage">Copy error message</system:String>
|
||||
|
||||
|
||||
<!-- AsstProxy -->
|
||||
<system:String x:Key="ResourceBroken">The resource is damaged, please download the full package again</system:String>
|
||||
<system:String x:Key="ReplaceADBNotExists">ADB File NOT exists</system:String>
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespaces:MaaWpfGui"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:uri="clr-namespace:System;assembly=System.Runtime">
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
<!-- 設定 -->
|
||||
<system:String x:Key="Settings">設定</system:String>
|
||||
<system:String x:Key="GameSettings">対象クライアント</system:String>
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespaces:MaaWpfGui"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:uri="clr-namespace:System;assembly=System.Runtime">
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
<!-- 설정 -->
|
||||
<system:String x:Key="Settings">설정</system:String>
|
||||
<system:String x:Key="GameSettings">클라이언트</system:String>
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespaces:MaaWpfGui"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:uri="clr-namespace:System;assembly=System.Runtime">
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
<!-- 设置 -->
|
||||
<system:String x:Key="Settings">设置</system:String>
|
||||
<system:String x:Key="GameSettings">游戏设置</system:String>
|
||||
@@ -452,7 +450,7 @@
|
||||
<system:String x:Key="ErrorFeedbackLinkText">创建 GitHub issue</system:String>
|
||||
<system:String x:Key="ErrorQqGroupLinkText">加入QQ群反馈问题</system:String>
|
||||
<system:String x:Key="CopyErrorMessage">复制错误信息</system:String>
|
||||
|
||||
|
||||
<!-- AsstProxy -->
|
||||
<system:String x:Key="ResourceBroken">资源损坏,请重新下载完整安装包</system:String>
|
||||
<system:String x:Key="ReplaceADBNotExists">ADB 路径不存在</system:String>
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespaces:MaaWpfGui"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:uri="clr-namespace:System;assembly=System.Runtime">
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
<!-- 設定 -->
|
||||
<system:String x:Key="Settings">設定</system:String>
|
||||
<system:String x:Key="BaseSettings">基建設定</system:String>
|
||||
|
||||
@@ -1,34 +1,32 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<SolidColorBrush x:Key="PallasBrush" Color="#CDD1FF" />
|
||||
<SolidColorBrush x:Key="ErrorViewBackgroundBrush" Color="#2d2d30" />
|
||||
<SolidColorBrush x:Key="VersionUpdateViewBackgroundBrush" Color="#2d2d30" />
|
||||
<SolidColorBrush x:Key="MarkdigCodeBrush" Color="#555" />
|
||||
|
||||
<!-- See https://github.com/ghost1372/HandyControls/blob/v3.4.5/src/Shared/HandyControl_Shared/Themes/Basic/Colors/Dark.xaml -->
|
||||
<!-- Latest Doc https://ghost1372.github.io/handycontrol/basic_xaml/brushes/ -->
|
||||
<!-- 文字颜色 -->
|
||||
<!-- See https://github.com/ghost1372/HandyControls/blob/v3.4.5/src/Shared/HandyControl_Shared/Themes/Basic/Colors/Dark.xaml -->
|
||||
<!-- Latest Doc https://ghost1372.github.io/handycontrol/basic_xaml/brushes/ -->
|
||||
<!-- 文字颜色 -->
|
||||
<SolidColorBrush x:Key="PrimaryTextBrush" Color="#E6E6E6" />
|
||||
<!-- 文字颜色 -->
|
||||
<!-- 文字颜色 -->
|
||||
<SolidColorBrush x:Key="TextIconBrush" Color="#E6E6E6" />
|
||||
|
||||
<!-- 背景颜色 -->
|
||||
<!-- 背景颜色 -->
|
||||
<SolidColorBrush x:Key="RegionBrush" Color="#1c1c1c" />
|
||||
<!-- 背景颜色 没用到(建议和背景颜色一致)-->
|
||||
<!-- 背景颜色 没用到(建议和背景颜色一致) -->
|
||||
<SolidColorBrush x:Key="MainContentBackgroundBrush" Color="#FF1C1C1C" />
|
||||
|
||||
<!-- 发暗的主色调 没用到(DarkMode中亮暗相反)-->
|
||||
<!-- 发暗的主色调 没用到(DarkMode中亮暗相反) -->
|
||||
<SolidColorBrush x:Key="LightPrimaryBrush" Color="#044289" />
|
||||
<!-- 主色调 -->
|
||||
<!-- 主色调 -->
|
||||
<SolidColorBrush x:Key="PrimaryBrush" Color="#326cf3" />
|
||||
<!-- 发亮的主色调 复选框的框框颜色(建议和主题色一致)-->
|
||||
<!-- 发亮的主色调 复选框的框框颜色(建议和主题色一致) -->
|
||||
<SolidColorBrush x:Key="DarkPrimaryBrush" Color="#326cf3" />
|
||||
<!-- 标题背景 没用到(建议和主题色一致)-->
|
||||
<!-- 标题背景 没用到(建议和主题色一致) -->
|
||||
<SolidColorBrush x:Key="TitleBrush" Color="#326cf3" />
|
||||
|
||||
<!-- UiLogColor -->
|
||||
<!-- UiLogColor -->
|
||||
<SolidColorBrush x:Key="ErrorLogBrush" Color="#C80000" />
|
||||
<SolidColorBrush x:Key="WarningLogBrush" Color="Goldenrod" />
|
||||
<SolidColorBrush x:Key="InfoLogBrush" Color="#00C8C8" />
|
||||
@@ -37,5 +35,4 @@
|
||||
<SolidColorBrush x:Key="RareOperatorLogBrush" Color="Orange" />
|
||||
<SolidColorBrush x:Key="RobotOperatorLogBrush" Color="Gray" />
|
||||
<SolidColorBrush x:Key="DownloadLogBrush" Color="Violet" />
|
||||
|
||||
</ResourceDictionary>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,13 +1,11 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<SolidColorBrush x:Key="PallasBrush" Color="#6969AA" />
|
||||
<SolidColorBrush x:Key="ErrorViewBackgroundBrush" Color="#E6E6E6" />
|
||||
<SolidColorBrush x:Key="VersionUpdateViewBackgroundBrush" Color="#ffffff" />
|
||||
<SolidColorBrush x:Key="MarkdigCodeBrush" Color="LightGray" />
|
||||
|
||||
<!-- UiLogColor -->
|
||||
<!-- UiLogColor -->
|
||||
<SolidColorBrush x:Key="ErrorLogBrush" Color="DarkRed" />
|
||||
<SolidColorBrush x:Key="WarningLogBrush" Color="DarkGoldenrod" />
|
||||
<SolidColorBrush x:Key="InfoLogBrush" Color="DarkCyan" />
|
||||
@@ -16,5 +14,4 @@
|
||||
<SolidColorBrush x:Key="RareOperatorLogBrush" Color="DarkOrange" />
|
||||
<SolidColorBrush x:Key="RobotOperatorLogBrush" Color="DarkGray" />
|
||||
<SolidColorBrush x:Key="DownloadLogBrush" Color="BlueViolet" />
|
||||
|
||||
</ResourceDictionary>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:markdig="clr-namespace:Markdig.Wpf;assembly=Markdig.Wpf">
|
||||
<!-- Document styles -->
|
||||
<Style TargetType="{x:Type FlowDocument}" x:Key="{x:Static markdig:Styles.DocumentStyleKey}">
|
||||
<!-- Document styles -->
|
||||
<Style x:Key="{x:Static markdig:Styles.DocumentStyleKey}" TargetType="{x:Type FlowDocument}">
|
||||
<Setter Property="FontFamily" Value="Segoe UI" />
|
||||
<Setter Property="TextAlignment" Value="Left" />
|
||||
</Style>
|
||||
@@ -11,86 +11,86 @@
|
||||
<Setter Property="Margin" Value="40,0,0,0" />
|
||||
<Setter Property="Padding" Value="0,0,0,0" />
|
||||
</Style>
|
||||
<Style TargetType="{x:Type Paragraph}" x:Key="{x:Static markdig:Styles.CodeBlockStyleKey}">
|
||||
<Style x:Key="{x:Static markdig:Styles.CodeBlockStyleKey}" TargetType="{x:Type Paragraph}">
|
||||
<Setter Property="Background" Value="{DynamicResource MarkdigCodeBrush}" />
|
||||
<Setter Property="FontFamily" Value="Consolas, Lucida Sans Typewriter, Courier New" />
|
||||
</Style>
|
||||
<Style TargetType="{x:Type Run}" x:Key="{x:Static markdig:Styles.CodeStyleKey}">
|
||||
<Style x:Key="{x:Static markdig:Styles.CodeStyleKey}" TargetType="{x:Type Run}">
|
||||
<Setter Property="Background" Value="{DynamicResource MarkdigCodeBrush}" />
|
||||
<Setter Property="FontFamily" Value="Consolas, Lucida Sans Typewriter, Courier New" />
|
||||
</Style>
|
||||
<Style TargetType="{x:Type Paragraph}" x:Key="{x:Static markdig:Styles.Heading1StyleKey}">
|
||||
<Style x:Key="{x:Static markdig:Styles.Heading1StyleKey}" TargetType="{x:Type Paragraph}">
|
||||
<Setter Property="FontSize" Value="42" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
|
||||
<Setter Property="FontWeight" Value="Bold" />
|
||||
</Style>
|
||||
<Style TargetType="{x:Type Paragraph}" x:Key="{x:Static markdig:Styles.Heading2StyleKey}">
|
||||
<Style x:Key="{x:Static markdig:Styles.Heading2StyleKey}" TargetType="{x:Type Paragraph}">
|
||||
<Setter Property="FontSize" Value="25" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
|
||||
<Setter Property="FontWeight" Value="Bold" />
|
||||
</Style>
|
||||
<Style TargetType="{x:Type Paragraph}" x:Key="{x:Static markdig:Styles.Heading3StyleKey}">
|
||||
<Style x:Key="{x:Static markdig:Styles.Heading3StyleKey}" TargetType="{x:Type Paragraph}">
|
||||
<Setter Property="FontSize" Value="20" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
|
||||
<Setter Property="FontWeight" Value="Bold" />
|
||||
</Style>
|
||||
<Style TargetType="{x:Type Paragraph}" x:Key="{x:Static markdig:Styles.Heading4StyleKey}">
|
||||
<Style x:Key="{x:Static markdig:Styles.Heading4StyleKey}" TargetType="{x:Type Paragraph}">
|
||||
<Setter Property="FontSize" Value="18" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
|
||||
<Setter Property="FontWeight" Value="Light" />
|
||||
<Setter Property="TextDecorations" Value="Underline" />
|
||||
</Style>
|
||||
<Style TargetType="{x:Type Paragraph}" x:Key="{x:Static markdig:Styles.Heading5StyleKey}">
|
||||
<!-- no changes -->
|
||||
<Style x:Key="{x:Static markdig:Styles.Heading5StyleKey}" TargetType="{x:Type Paragraph}">
|
||||
<!-- no changes -->
|
||||
</Style>
|
||||
<Style TargetType="{x:Type Paragraph}" x:Key="{x:Static markdig:Styles.Heading6StyleKey}">
|
||||
<!-- no changes -->
|
||||
<Style x:Key="{x:Static markdig:Styles.Heading6StyleKey}" TargetType="{x:Type Paragraph}">
|
||||
<!-- no changes -->
|
||||
</Style>
|
||||
<Style TargetType="{x:Type Hyperlink}" x:Key="{x:Static markdig:Styles.HyperlinkStyleKey}">
|
||||
<Style x:Key="{x:Static markdig:Styles.HyperlinkStyleKey}" TargetType="{x:Type Hyperlink}">
|
||||
<Setter Property="TextDecorations" Value="None" />
|
||||
</Style>
|
||||
<Style TargetType="{x:Type Image}" x:Key="{x:Static markdig:Styles.ImageStyleKey}">
|
||||
<Style x:Key="{x:Static markdig:Styles.ImageStyleKey}" TargetType="{x:Type Image}">
|
||||
<Setter Property="MaxHeight" Value="{Binding RelativeSource={RelativeSource Self}, Path=Source.(BitmapSource.PixelHeight)}" />
|
||||
<Setter Property="MaxWidth" Value="{Binding RelativeSource={RelativeSource Self}, Path=Source.(BitmapSource.PixelWidth)}" />
|
||||
</Style>
|
||||
<Style TargetType="{x:Type Section}" x:Key="{x:Static markdig:Styles.QuoteBlockStyleKey}">
|
||||
<Style x:Key="{x:Static markdig:Styles.QuoteBlockStyleKey}" TargetType="{x:Type Section}">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="4,0,0,0" />
|
||||
<Setter Property="Foreground" Value="Gray" />
|
||||
<Setter Property="Padding" Value="16,0,0,0" />
|
||||
</Style>
|
||||
<Style TargetType="{x:Type Table}" x:Key="{x:Static markdig:Styles.TableStyleKey}">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||
<Setter Property="BorderThickness" Value="0,0,1,1"/>
|
||||
<Setter Property="CellSpacing" Value="0"/>
|
||||
<Style x:Key="{x:Static markdig:Styles.TableStyleKey}" TargetType="{x:Type Table}">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryTextBrush}" />
|
||||
<Setter Property="BorderThickness" Value="0,0,1,1" />
|
||||
<Setter Property="CellSpacing" Value="0" />
|
||||
</Style>
|
||||
<Style TargetType="{x:Type TableCell}" x:Key="{x:Static markdig:Styles.TableCellStyleKey}">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||
<Setter Property="BorderThickness" Value="1,1,0,0"/>
|
||||
<Style x:Key="{x:Static markdig:Styles.TableCellStyleKey}" TargetType="{x:Type TableCell}">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryTextBrush}" />
|
||||
<Setter Property="BorderThickness" Value="1,1,0,0" />
|
||||
</Style>
|
||||
<Style TargetType="{x:Type TableRow}" x:Key="{x:Static markdig:Styles.TableHeaderStyleKey}">
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
<Style x:Key="{x:Static markdig:Styles.TableHeaderStyleKey}" TargetType="{x:Type TableRow}">
|
||||
<Setter Property="FontWeight" Value="Bold" />
|
||||
</Style>
|
||||
<Style TargetType="{x:Type CheckBox}" x:Key="{x:Static markdig:Styles.TaskListStyleKey}">
|
||||
<Style x:Key="{x:Static markdig:Styles.TaskListStyleKey}" TargetType="{x:Type CheckBox}">
|
||||
<Setter Property="Margin" Value="0,0,0,-2" />
|
||||
</Style>
|
||||
<Style TargetType="{x:Type Line}" x:Key="{x:Static markdig:Styles.ThematicBreakStyleKey}">
|
||||
<Style x:Key="{x:Static markdig:Styles.ThematicBreakStyleKey}" TargetType="{x:Type Line}">
|
||||
<Setter Property="Stretch" Value="Fill" />
|
||||
<Setter Property="Stroke" Value="{DynamicResource PrimaryTextBrush}" />
|
||||
</Style>
|
||||
<Style TargetType="{x:Type Span}" x:Key="{x:Static markdig:Styles.SubscriptStyleKey}">
|
||||
<Style x:Key="{x:Static markdig:Styles.SubscriptStyleKey}" TargetType="{x:Type Span}">
|
||||
<Setter Property="Typography.Variants" Value="Subscript" />
|
||||
</Style>
|
||||
<Style TargetType="{x:Type Span}" x:Key="{x:Static markdig:Styles.SuperscriptStyleKey}">
|
||||
<Style x:Key="{x:Static markdig:Styles.SuperscriptStyleKey}" TargetType="{x:Type Span}">
|
||||
<Setter Property="Typography.Variants" Value="Superscript" />
|
||||
</Style>
|
||||
<Style TargetType="{x:Type Span}" x:Key="{x:Static markdig:Styles.StrikeThroughStyleKey}">
|
||||
<Style x:Key="{x:Static markdig:Styles.StrikeThroughStyleKey}" TargetType="{x:Type Span}">
|
||||
<Setter Property="TextBlock.TextDecorations" Value="Strikethrough" />
|
||||
</Style>
|
||||
<Style TargetType="{x:Type Span}" x:Key="{x:Static markdig:Styles.InsertedStyleKey}">
|
||||
<Style x:Key="{x:Static markdig:Styles.InsertedStyleKey}" TargetType="{x:Type Span}">
|
||||
<Setter Property="TextBlock.TextDecorations" Value="Underline" />
|
||||
</Style>
|
||||
<Style TargetType="{x:Type Span}" x:Key="{x:Static markdig:Styles.MarkedStyleKey}">
|
||||
<Style x:Key="{x:Static markdig:Styles.MarkedStyleKey}" TargetType="{x:Type Span}">
|
||||
<Setter Property="Background" Value="Yellow" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
||||
@@ -34,9 +34,11 @@ namespace MaaWpfGui.Services.HotKeys
|
||||
case MaaHotKeyAction.ShowGui:
|
||||
HandleShowGui();
|
||||
break;
|
||||
|
||||
case MaaHotKeyAction.LinkStart:
|
||||
HandleLinkStart();
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(nameof(action), action, null);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// <copyright file="IHttpService.cs" company="MaaAssistantArknights">
|
||||
// <copyright file="IHttpService.cs" company="MaaAssistantArknights">
|
||||
// MaaWpfGui - A part of the MaaCoreArknights project
|
||||
// Copyright (C) 2021 MistEO and Contributors
|
||||
//
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// <copyright file="IMaaApiService.cs" company="MaaAssistantArknights">
|
||||
// <copyright file="IMaaApiService.cs" company="MaaAssistantArknights">
|
||||
// MaaWpfGui - A part of the MaaCoreArknights project
|
||||
// Copyright (C) 2021 MistEO and Contributors
|
||||
//
|
||||
|
||||
@@ -32,7 +32,6 @@ using MaaWpfGui.Utilities.ValueType;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Serilog;
|
||||
using Stylet;
|
||||
using StyletIoC;
|
||||
using Application = System.Windows.Application;
|
||||
using ComboBox = System.Windows.Controls.ComboBox;
|
||||
|
||||
@@ -3,19 +3,19 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:c="clr-namespace:CalcBinding;assembly=CalcBinding"
|
||||
xmlns:constants="clr-namespace:MaaWpfGui.Constants"
|
||||
xmlns:controls="clr-namespace:MaaWpfGui.Styles.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:helper="clr-namespace:MaaWpfGui.Helper"
|
||||
xmlns:local="clr-namespace:MaaWpfGui"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:s="https://github.com/canton7/Stylet"
|
||||
xmlns:vm="clr-namespace:MaaWpfGui"
|
||||
xmlns:viewModels="clr-namespace:MaaWpfGui.ViewModels"
|
||||
xmlns:helper="clr-namespace:MaaWpfGui.Helper"
|
||||
xmlns:constants="clr-namespace:MaaWpfGui.Constants"
|
||||
xmlns:ui="clr-namespace:MaaWpfGui.ViewModels.UI"
|
||||
xmlns:styles="clr-namespace:MaaWpfGui.Styles"
|
||||
xmlns:controls="clr-namespace:MaaWpfGui.Styles.Controls"
|
||||
xmlns:properties="clr-namespace:MaaWpfGui.Styles.Properties"
|
||||
xmlns:s="https://github.com/canton7/Stylet"
|
||||
xmlns:styles="clr-namespace:MaaWpfGui.Styles"
|
||||
xmlns:ui="clr-namespace:MaaWpfGui.ViewModels.UI"
|
||||
xmlns:viewModels="clr-namespace:MaaWpfGui.ViewModels"
|
||||
xmlns:vm="clr-namespace:MaaWpfGui"
|
||||
d:DataContext="{d:DesignInstance {x:Type ui:CopilotViewModel}}"
|
||||
d:DesignHeight="550"
|
||||
d:DesignWidth="800"
|
||||
@@ -121,9 +121,9 @@
|
||||
<hc:ScrollViewer
|
||||
Width="360"
|
||||
Margin="0,10"
|
||||
IsInertiaEnabled="True"
|
||||
properties:AutoScroll.AutoScroll="True"
|
||||
HorizontalScrollBarVisibility="Disabled">
|
||||
HorizontalScrollBarVisibility="Disabled"
|
||||
IsInertiaEnabled="True">
|
||||
<ItemsControl ItemsSource="{Binding Path=LogItemViewModels}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
<hc:Window
|
||||
x:Class="MaaWpfGui.Views.UI.ErrorView"
|
||||
x:Name="ErrorViewWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:constants="clr-namespace:MaaWpfGui.Constants"
|
||||
xmlns:controls="clr-namespace:MaaWpfGui.Styles.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:MaaWpfGui"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:helper="clr-namespace:MaaWpfGui.Helper"
|
||||
xmlns:constants="clr-namespace:MaaWpfGui.Constants"
|
||||
xmlns:local="clr-namespace:MaaWpfGui"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:styles="clr-namespace:MaaWpfGui.Styles"
|
||||
xmlns:controls="clr-namespace:MaaWpfGui.Styles.Controls"
|
||||
x:Name="ErrorViewWindow"
|
||||
Title="{DynamicResource Error}"
|
||||
Width="600"
|
||||
Height="480"
|
||||
MinHeight="200"
|
||||
MinWidth="400"
|
||||
MinHeight="200"
|
||||
ResizeMode="CanResize"
|
||||
Topmost="True"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
@@ -23,65 +23,81 @@
|
||||
mc:Ignorable="d">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<RichTextBox x:Name="RichTextBox" Grid.Row="0" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" BorderThickness="0" IsReadOnly="True" hc:BorderElement.CornerRadius="0" Padding="12, 16, 4, 8">
|
||||
<RichTextBox
|
||||
x:Name="RichTextBox"
|
||||
Grid.Row="0"
|
||||
Padding="12,16,4,8"
|
||||
hc:BorderElement.CornerRadius="0"
|
||||
BorderThickness="0"
|
||||
HorizontalScrollBarVisibility="Auto"
|
||||
IsReadOnly="True"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
<RichTextBox.Resources>
|
||||
<!-- This will give us a LARGER scroll bar -->
|
||||
<!-- This will give us a LARGER scroll bar -->
|
||||
<Style TargetType="ScrollViewer">
|
||||
<Setter Property="hc:ScrollViewerAttach.AutoHide" Value="False"/>
|
||||
<Setter Property="hc:ScrollViewerAttach.AutoHide" Value="False" />
|
||||
</Style>
|
||||
</RichTextBox.Resources>
|
||||
<FlowDocument>
|
||||
<Section>
|
||||
<Paragraph>
|
||||
<Run Text="{DynamicResource ErrorProlog}" FontWeight="Bold"/>
|
||||
<Run FontWeight="Bold" Text="{DynamicResource ErrorProlog}" />
|
||||
</Paragraph>
|
||||
<Paragraph Margin="8,0,0,0">
|
||||
<Run x:Name="Error" Text="{Binding ExceptionMessage, ElementName=ErrorViewWindow, Mode=OneWay}"/>
|
||||
<Run x:Name="Error" Text="{Binding ExceptionMessage, ElementName=ErrorViewWindow, Mode=OneWay}" />
|
||||
</Paragraph>
|
||||
</Section>
|
||||
<Section>
|
||||
<Paragraph>
|
||||
<Run Text="{DynamicResource ErrorSolution}" FontWeight="Bold"/>
|
||||
<Run FontWeight="Bold" Text="{DynamicResource ErrorSolution}" />
|
||||
</Paragraph>
|
||||
<Paragraph Margin="8,0,0,0">
|
||||
<Run x:Name="ErrorSolution" Text="{Binding PossibleSolution, ElementName=ErrorViewWindow, Mode=OneWay}"/>
|
||||
<Run x:Name="ErrorSolution" Text="{Binding PossibleSolution, ElementName=ErrorViewWindow, Mode=OneWay}" />
|
||||
</Paragraph>
|
||||
</Section>
|
||||
<Section>
|
||||
<Paragraph>
|
||||
<Run Text="{DynamicResource ErrorDetails}" FontWeight="Bold"/>
|
||||
<Run FontWeight="Bold" Text="{DynamicResource ErrorDetails}" />
|
||||
</Paragraph>
|
||||
<Paragraph Margin="8,0,0,0">
|
||||
<Run x:Name="ErrorDetails" Text="{Binding ExceptionDetails, ElementName=ErrorViewWindow, Mode=OneWay}"/>
|
||||
<Run x:Name="ErrorDetails" Text="{Binding ExceptionDetails, ElementName=ErrorViewWindow, Mode=OneWay}" />
|
||||
</Paragraph>
|
||||
</Section>
|
||||
|
||||
</FlowDocument>
|
||||
</RichTextBox>
|
||||
|
||||
<Border Background="{DynamicResource ErrorViewBackgroundBrush}" Grid.Row="1" Padding="12, 0">
|
||||
<Border
|
||||
Grid.Row="1"
|
||||
Padding="12,0"
|
||||
Background="{DynamicResource ErrorViewBackgroundBrush}">
|
||||
<Grid MinHeight="40">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<controls:TextBlock>
|
||||
<Hyperlink Name="CopyErrorMessage" Click="CopyErrorMessage_Click">
|
||||
<Run Text="{DynamicResource CopyErrorMessage}"/>
|
||||
<Run Text="{DynamicResource CopyErrorMessage}" />
|
||||
</Hyperlink>
|
||||
<hc:Poptip.Instance>
|
||||
<hc:Poptip x:Name="CopiedTip" hc:Poptip.HitMode="None" Content="{DynamicResource CopiedToClipboard}" />
|
||||
<hc:Poptip
|
||||
x:Name="CopiedTip"
|
||||
hc:Poptip.HitMode="None"
|
||||
Content="{DynamicResource CopiedToClipboard}" />
|
||||
</hc:Poptip.Instance>
|
||||
</controls:TextBlock>
|
||||
<WrapPanel Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Right">
|
||||
<WrapPanel
|
||||
Grid.Column="2"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center">
|
||||
<WrapPanel.Resources>
|
||||
<Style TargetType="controls:TextBlock">
|
||||
<Setter Property="Margin" Value="12, 0, 0, 0"/>
|
||||
<Setter Property="Margin" Value="12,0,0,0" />
|
||||
</Style>
|
||||
</WrapPanel.Resources>
|
||||
<controls:TextBlock>
|
||||
|
||||
@@ -19,7 +19,6 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Media;
|
||||
using MaaWpfGui.Constants;
|
||||
using MaaWpfGui.Helper;
|
||||
|
||||
|
||||
@@ -3,19 +3,19 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:s="https://github.com/canton7/Stylet"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:vm="clr-namespace:MaaWpfGui"
|
||||
xmlns:viewModels="clr-namespace:MaaWpfGui.ViewModels"
|
||||
xmlns:ui="clr-namespace:MaaWpfGui.ViewModels.UI"
|
||||
xmlns:viewModels="clr-namespace:MaaWpfGui.ViewModels"
|
||||
xmlns:vm="clr-namespace:MaaWpfGui"
|
||||
Title="{Binding WindowTitle}"
|
||||
Width="800"
|
||||
Height="600"
|
||||
MinWidth="800"
|
||||
MinHeight="600"
|
||||
Icon="../../newlogo.ico"
|
||||
d:DataContext="{d:DesignInstance {x:Type ui:RootViewModel}}"
|
||||
Icon="../../newlogo.ico"
|
||||
mc:Ignorable="d">
|
||||
<DockPanel>
|
||||
<TabControl
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
x:Class="MaaWpfGui.Views.UI.VersionUpdateView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:markdig="clr-namespace:Markdig.Wpf;assembly=Markdig.Wpf"
|
||||
xmlns:s="https://github.com/canton7/Stylet"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:vm="clr-namespace:MaaWpfGui"
|
||||
xmlns:viewModels="clr-namespace:MaaWpfGui.ViewModels"
|
||||
xmlns:ui="clr-namespace:MaaWpfGui.ViewModels.UI"
|
||||
xmlns:styles="clr-namespace:MaaWpfGui.Styles"
|
||||
xmlns:controls="clr-namespace:MaaWpfGui.Styles.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:markdig="clr-namespace:Markdig.Wpf;assembly=Markdig.Wpf"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:s="https://github.com/canton7/Stylet"
|
||||
xmlns:styles="clr-namespace:MaaWpfGui.Styles"
|
||||
xmlns:ui="clr-namespace:MaaWpfGui.ViewModels.UI"
|
||||
xmlns:viewModels="clr-namespace:MaaWpfGui.ViewModels"
|
||||
xmlns:vm="clr-namespace:MaaWpfGui"
|
||||
Title="{DynamicResource VersionUpdated}"
|
||||
Width="600"
|
||||
Height="500"
|
||||
@@ -30,50 +30,50 @@
|
||||
Orientation="Horizontal">
|
||||
<controls:TextBlock
|
||||
Margin="0,10,0,5"
|
||||
VerticalAlignment="Bottom"
|
||||
FontSize="20"
|
||||
Style="{StaticResource TextBlockDefaultBold}"
|
||||
Text="{DynamicResource VersionUpdatedTo}"
|
||||
TextWrapping="Wrap" VerticalAlignment="Bottom" />
|
||||
TextWrapping="Wrap" />
|
||||
<controls:TextBlock
|
||||
Margin="0,10,0,5"
|
||||
VerticalAlignment="Bottom"
|
||||
FontSize="20"
|
||||
Style="{StaticResource TextBlockDefaultBold}"
|
||||
Text="{Binding UpdateTag}"
|
||||
TextWrapping="Wrap" VerticalAlignment="Bottom" />
|
||||
TextWrapping="Wrap" />
|
||||
</StackPanel>
|
||||
|
||||
<FlowDocumentScrollViewer
|
||||
x:Name="UpdateInfoMarkdownDocument"
|
||||
Language="zh-cn"
|
||||
Document="{Binding UpdateInfoDoc}"
|
||||
Grid.Row="1"
|
||||
Margin="16,0"
|
||||
Zoom="90"
|
||||
IsSelectionEnabled="False">
|
||||
Document="{Binding UpdateInfoDoc}"
|
||||
IsSelectionEnabled="False"
|
||||
Language="zh-cn"
|
||||
Zoom="90">
|
||||
|
||||
<FlowDocumentScrollViewer.Template>
|
||||
<ControlTemplate TargetType="FlowDocumentScrollViewer">
|
||||
<Border
|
||||
CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"
|
||||
Focusable="False">
|
||||
|
||||
|
||||
<hc:ScrollViewer
|
||||
x:Name="PART_ContentHost"
|
||||
IsInertiaEnabled="True"
|
||||
CanContentScroll="True"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
CanContentScroll="True"
|
||||
IsInertiaEnabled="True" />
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</FlowDocumentScrollViewer.Template>
|
||||
|
||||
<FlowDocumentScrollViewer.CommandBindings>
|
||||
<CommandBinding
|
||||
Command="{x:Static markdig:Commands.Hyperlink}"
|
||||
Executed="{s:Action OpenHyperlink}" />
|
||||
<CommandBinding Command="{x:Static markdig:Commands.Hyperlink}" Executed="{s:Action OpenHyperlink}" />
|
||||
</FlowDocumentScrollViewer.CommandBindings>
|
||||
</FlowDocumentScrollViewer>
|
||||
</Grid>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<UserControl
|
||||
<UserControl
|
||||
x:Class="MaaWpfGui.Views.UserControl.AutoRecruitSettingsUserControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:MaaWpfGui.Styles.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dd="urn:gong-wpf-dragdrop"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:s="https://github.com/canton7/Stylet"
|
||||
xmlns:vm="clr-namespace:MaaWpfGui"
|
||||
xmlns:viewModels="clr-namespace:MaaWpfGui.ViewModels"
|
||||
xmlns:ui="clr-namespace:MaaWpfGui.ViewModels.UI"
|
||||
xmlns:styles="clr-namespace:MaaWpfGui.Styles"
|
||||
xmlns:controls="clr-namespace:MaaWpfGui.Styles.Controls"
|
||||
xmlns:ui="clr-namespace:MaaWpfGui.ViewModels.UI"
|
||||
xmlns:viewModels="clr-namespace:MaaWpfGui.ViewModels"
|
||||
xmlns:vm="clr-namespace:MaaWpfGui"
|
||||
d:DataContext="{d:DesignInstance {x:Type ui:SettingsViewModel}}"
|
||||
d:DesignWidth="400"
|
||||
mc:Ignorable="d">
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
<UserControl
|
||||
<UserControl
|
||||
x:Class="MaaWpfGui.Views.UserControl.GameClientUserControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:c="clr-namespace:CalcBinding;assembly=CalcBinding"
|
||||
xmlns:constants="clr-namespace:MaaWpfGui.Constants"
|
||||
xmlns:controls="clr-namespace:MaaWpfGui.Styles.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dd="urn:gong-wpf-dragdrop"
|
||||
xmlns:helper="clr-namespace:MaaWpfGui.Helper"
|
||||
xmlns:local="clr-namespace:MaaWpfGui"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:s="https://github.com/canton7/Stylet"
|
||||
xmlns:vm="clr-namespace:MaaWpfGui"
|
||||
xmlns:viewModels="clr-namespace:MaaWpfGui.ViewModels"
|
||||
xmlns:helper="clr-namespace:MaaWpfGui.Helper"
|
||||
xmlns:constants="clr-namespace:MaaWpfGui.Constants"
|
||||
xmlns:ui="clr-namespace:MaaWpfGui.ViewModels.UI"
|
||||
xmlns:styles="clr-namespace:MaaWpfGui.Styles"
|
||||
xmlns:controls="clr-namespace:MaaWpfGui.Styles.Controls"
|
||||
xmlns:ui="clr-namespace:MaaWpfGui.ViewModels.UI"
|
||||
xmlns:viewModels="clr-namespace:MaaWpfGui.ViewModels"
|
||||
xmlns:vm="clr-namespace:MaaWpfGui"
|
||||
d:DataContext="{d:DesignInstance {x:Type ui:SettingsViewModel}}"
|
||||
d:DesignWidth="550"
|
||||
mc:Ignorable="d">
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
<UserControl
|
||||
<UserControl
|
||||
x:Class="MaaWpfGui.Views.UserControl.HotKeySettingsUserControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:c="clr-namespace:CalcBinding;assembly=CalcBinding"
|
||||
xmlns:controls="clr-namespace:MaaWpfGui.Styles.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dd="urn:gong-wpf-dragdrop"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:local="clr-namespace:MaaWpfGui"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:s="https://github.com/canton7/Stylet"
|
||||
xmlns:vm="clr-namespace:MaaWpfGui"
|
||||
xmlns:viewModels="clr-namespace:MaaWpfGui.ViewModels"
|
||||
xmlns:userControl="clr-namespace:MaaWpfGui.Views.UserControl"
|
||||
xmlns:ui="clr-namespace:MaaWpfGui.ViewModels.UI"
|
||||
xmlns:styles="clr-namespace:MaaWpfGui.Styles"
|
||||
xmlns:controls="clr-namespace:MaaWpfGui.Styles.Controls"
|
||||
xmlns:ui="clr-namespace:MaaWpfGui.ViewModels.UI"
|
||||
xmlns:userControl="clr-namespace:MaaWpfGui.Views.UserControl"
|
||||
xmlns:viewModels="clr-namespace:MaaWpfGui.ViewModels"
|
||||
xmlns:vm="clr-namespace:MaaWpfGui"
|
||||
d:DataContext="{d:DesignInstance {x:Type ui:SettingsViewModel}}"
|
||||
mc:Ignorable="d">
|
||||
<StackPanel
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
<UserControl
|
||||
<UserControl
|
||||
x:Class="MaaWpfGui.Views.UserControl.InfrastSettingsUserControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:c="clr-namespace:CalcBinding;assembly=CalcBinding"
|
||||
xmlns:constants="clr-namespace:MaaWpfGui.Constants"
|
||||
xmlns:controls="clr-namespace:MaaWpfGui.Styles.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dd="urn:gong-wpf-dragdrop"
|
||||
xmlns:helper="clr-namespace:MaaWpfGui.Helper"
|
||||
xmlns:local="clr-namespace:MaaWpfGui"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:s="https://github.com/canton7/Stylet"
|
||||
xmlns:vm="clr-namespace:MaaWpfGui"
|
||||
xmlns:viewModels="clr-namespace:MaaWpfGui.ViewModels"
|
||||
xmlns:helper="clr-namespace:MaaWpfGui.Helper"
|
||||
xmlns:constants="clr-namespace:MaaWpfGui.Constants"
|
||||
xmlns:ui="clr-namespace:MaaWpfGui.ViewModels.UI"
|
||||
xmlns:styles="clr-namespace:MaaWpfGui.Styles"
|
||||
xmlns:controls="clr-namespace:MaaWpfGui.Styles.Controls"
|
||||
xmlns:ui="clr-namespace:MaaWpfGui.ViewModels.UI"
|
||||
xmlns:viewModels="clr-namespace:MaaWpfGui.ViewModels"
|
||||
xmlns:vm="clr-namespace:MaaWpfGui"
|
||||
d:DataContext="{d:DesignInstance {x:Type ui:SettingsViewModel}}"
|
||||
d:DesignWidth="550"
|
||||
mc:Ignorable="d">
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<UserControl
|
||||
<UserControl
|
||||
x:Class="MaaWpfGui.Views.UserControl.MallSettingsUserControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:MaaWpfGui.Styles.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dd="urn:gong-wpf-dragdrop"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:s="https://github.com/canton7/Stylet"
|
||||
xmlns:vm="clr-namespace:MaaWpfGui"
|
||||
xmlns:viewModels="clr-namespace:MaaWpfGui.ViewModels"
|
||||
xmlns:ui="clr-namespace:MaaWpfGui.ViewModels.UI"
|
||||
xmlns:styles="clr-namespace:MaaWpfGui.Styles"
|
||||
xmlns:controls="clr-namespace:MaaWpfGui.Styles.Controls"
|
||||
xmlns:ui="clr-namespace:MaaWpfGui.ViewModels.UI"
|
||||
xmlns:viewModels="clr-namespace:MaaWpfGui.ViewModels"
|
||||
xmlns:vm="clr-namespace:MaaWpfGui"
|
||||
d:DataContext="{d:DesignInstance {x:Type ui:SettingsViewModel}}"
|
||||
d:DesignWidth="550"
|
||||
mc:Ignorable="d">
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<UserControl
|
||||
<UserControl
|
||||
x:Class="MaaWpfGui.Views.UserControl.OtherCombatSettingsUserControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:c="clr-namespace:CalcBinding;assembly=CalcBinding"
|
||||
xmlns:controls="clr-namespace:MaaWpfGui.Styles.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dd="urn:gong-wpf-dragdrop"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:s="https://github.com/canton7/Stylet"
|
||||
xmlns:vm="clr-namespace:MaaWpfGui"
|
||||
xmlns:viewModels="clr-namespace:MaaWpfGui.ViewModels"
|
||||
xmlns:ui="clr-namespace:MaaWpfGui.ViewModels.UI"
|
||||
xmlns:styles="clr-namespace:MaaWpfGui.Styles"
|
||||
xmlns:controls="clr-namespace:MaaWpfGui.Styles.Controls"
|
||||
xmlns:ui="clr-namespace:MaaWpfGui.ViewModels.UI"
|
||||
xmlns:viewModels="clr-namespace:MaaWpfGui.ViewModels"
|
||||
xmlns:vm="clr-namespace:MaaWpfGui"
|
||||
d:DataContext="{d:DesignInstance {x:Type ui:SettingsViewModel}}"
|
||||
d:DesignWidth="550"
|
||||
mc:Ignorable="d">
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
x:Class="MaaWpfGui.Views.UserControl.RoguelikeSettingsUserControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:MaaWpfGui.Styles.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dd="urn:gong-wpf-dragdrop"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:s="https://github.com/canton7/Stylet"
|
||||
xmlns:vm="clr-namespace:MaaWpfGui"
|
||||
xmlns:viewModels="clr-namespace:MaaWpfGui.ViewModels"
|
||||
xmlns:ui="clr-namespace:MaaWpfGui.ViewModels.UI"
|
||||
xmlns:styles="clr-namespace:MaaWpfGui.Styles"
|
||||
xmlns:controls="clr-namespace:MaaWpfGui.Styles.Controls"
|
||||
xmlns:ui="clr-namespace:MaaWpfGui.ViewModels.UI"
|
||||
xmlns:viewModels="clr-namespace:MaaWpfGui.ViewModels"
|
||||
xmlns:vm="clr-namespace:MaaWpfGui"
|
||||
d:DataContext="{d:DesignInstance {x:Type ui:SettingsViewModel}}"
|
||||
d:DesignWidth="550"
|
||||
mc:Ignorable="d">
|
||||
@@ -71,7 +71,7 @@
|
||||
<hc:TextBox.Text>
|
||||
<Binding Path="RoguelikeStartsCount">
|
||||
<Binding.ValidationRules>
|
||||
<hc:RegexRule Type="Int"/>
|
||||
<hc:RegexRule Type="Int" />
|
||||
</Binding.ValidationRules>
|
||||
</Binding>
|
||||
</hc:TextBox.Text>
|
||||
@@ -100,7 +100,7 @@
|
||||
<hc:TextBox.Text>
|
||||
<Binding Path="RoguelikeInvestsCount">
|
||||
<Binding.ValidationRules>
|
||||
<hc:RegexRule Type="Int"/>
|
||||
<hc:RegexRule Type="Int" />
|
||||
</Binding.ValidationRules>
|
||||
</Binding>
|
||||
</hc:TextBox.Text>
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<UserControl
|
||||
<UserControl
|
||||
x:Class="MaaWpfGui.Views.UserControl.TimerSettingsUserControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:c="clr-namespace:CalcBinding;assembly=CalcBinding"
|
||||
xmlns:controls="clr-namespace:MaaWpfGui.Styles.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dd="urn:gong-wpf-dragdrop"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:s="https://github.com/canton7/Stylet"
|
||||
xmlns:vm="clr-namespace:MaaWpfGui"
|
||||
xmlns:viewModels="clr-namespace:MaaWpfGui.ViewModels"
|
||||
xmlns:ui="clr-namespace:MaaWpfGui.ViewModels.UI"
|
||||
xmlns:styles="clr-namespace:MaaWpfGui.Styles"
|
||||
xmlns:controls="clr-namespace:MaaWpfGui.Styles.Controls"
|
||||
xmlns:ui="clr-namespace:MaaWpfGui.ViewModels.UI"
|
||||
xmlns:viewModels="clr-namespace:MaaWpfGui.ViewModels"
|
||||
xmlns:vm="clr-namespace:MaaWpfGui"
|
||||
d:DataContext="{d:DesignInstance {x:Type ui:SettingsViewModel}}"
|
||||
d:DesignHeight="300"
|
||||
d:DesignWidth="400"
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
|
||||
"settings": {
|
||||
"documentationRules": {
|
||||
"companyName": "MaaAssistantArknights",
|
||||
"copyrightText": "{projectName} - A part of the {solutionName} project\nCopyright (C) 2021 MistEO and Contributors\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the {licenseName} as published by\nthe Free Software Foundation, either version 3 of the License, or\nany later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY",
|
||||
"variables": {
|
||||
"projectName": "MaaWpfGui",
|
||||
"solutionName": "MaaCoreArknights",
|
||||
"licenseName": "GNU General Public License"
|
||||
}
|
||||
}
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
|
||||
"settings": {
|
||||
"documentationRules": {
|
||||
"companyName": "MaaAssistantArknights",
|
||||
"copyrightText": "{projectName} - A part of the {solutionName} project\nCopyright (C) 2021 MistEO and Contributors\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the {licenseName} as published by\nthe Free Software Foundation, either version 3 of the License, or\nany later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY",
|
||||
"variables": {
|
||||
"projectName": "MaaWpfGui",
|
||||
"solutionName": "MaaCoreArknights",
|
||||
"licenseName": "GNU General Public License"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user