mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-18 18:20:39 +08:00
chore: 调整启动后ReleaseNote弹窗的显示顺序、替换wpf控件以获得更好的显示效果 (#4393)
This commit is contained in:
@@ -39,33 +39,9 @@ namespace MaaWpfGui.Main
|
||||
public class Bootstrapper : Bootstrapper<RootViewModel>
|
||||
{
|
||||
private static SettingsViewModel _settingsViewModel;
|
||||
private static TrayIcon _trayIconInSettingsViewModel;
|
||||
|
||||
private static readonly FieldInfo _settingsViewModelIContainerFiled =
|
||||
typeof(SettingsViewModel).GetField("_container", BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
|
||||
private static TrayIcon _trayIcon;
|
||||
private static ILogger _logger = Logger.None;
|
||||
|
||||
/// <summary>
|
||||
/// Sets tray icon in <see cref="SettingsViewModel"/>.
|
||||
/// </summary>
|
||||
/// <param name="settingsViewModel">The <see cref="SettingsViewModel"/> instance.</param>
|
||||
/// <remarks>
|
||||
/// 应当只能是 <see cref="SettingsViewModel"/> 在构造时调用这个函数。用反射拿 <see cref="SettingsViewModel._container"/> 只是为了不额外修改 <see cref="SettingsViewModel"/> 的定义,
|
||||
/// 并顺便检查传入的 <see cref="SettingsViewModel._container"/> 不为空(即不是随便 <see langword="new"/> 出来的一个 <see cref="SettingsViewModel"/>)。
|
||||
/// </remarks>
|
||||
internal static void SetTrayIconInSettingsViewModel(SettingsViewModel settingsViewModel)
|
||||
{
|
||||
_settingsViewModel = settingsViewModel;
|
||||
var container = (IContainer)_settingsViewModelIContainerFiled.GetValue(settingsViewModel);
|
||||
if (container != null)
|
||||
{
|
||||
_trayIconInSettingsViewModel = container.Get<TrayIcon>();
|
||||
}
|
||||
|
||||
// TODO:出现不符合要求的settingsViewModel应当Log一下,等一个有缘人
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
/// <remarks>初始化些啥自己加。</remarks>
|
||||
protected override void OnStart()
|
||||
@@ -164,10 +140,21 @@ namespace MaaWpfGui.Main
|
||||
/// <inheritdoc/>
|
||||
protected override void DisplayRootView(object rootViewModel)
|
||||
{
|
||||
var windowManager = (Helper.WindowManager)GetInstance(typeof(Helper.WindowManager));
|
||||
var windowManager = (IWindowManager)GetInstance(typeof(Helper.WindowManager));
|
||||
windowManager.ShowWindow(rootViewModel);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
protected override void OnLaunch()
|
||||
{
|
||||
var versionUpdateViewModel = (VersionUpdateViewModel)GetInstance(typeof(VersionUpdateViewModel));
|
||||
versionUpdateViewModel.ShowUpdateOrDownload();
|
||||
|
||||
// TrayIcon应该在显示rootViewModel之后再加载
|
||||
_trayIcon = (TrayIcon)GetInstance(typeof(TrayIcon));
|
||||
_settingsViewModel = (SettingsViewModel)GetInstance(typeof(SettingsViewModel));
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
/// <remarks>退出时执行啥自己加。</remarks>
|
||||
protected override void OnExit(ExitEventArgs e)
|
||||
@@ -183,7 +170,7 @@ namespace MaaWpfGui.Main
|
||||
}
|
||||
|
||||
// 注销任务栏图标
|
||||
_trayIconInSettingsViewModel.Close();
|
||||
_trayIcon.Close();
|
||||
ConfigurationHelper.Release();
|
||||
|
||||
_logger.Information("MaaAssistantArknights GUI exited");
|
||||
|
||||
@@ -356,10 +356,10 @@
|
||||
<!-- Logs -->
|
||||
<!-- Farming -->
|
||||
|
||||
<system:String x:Key="IdentificationTool">Identification tool</system:String>
|
||||
<system:String x:Key="IdentificationTool">Identification Tool</system:String>
|
||||
|
||||
<!-- Recruitment Recognition -->
|
||||
<system:String x:Key="RecruitmentRecognition">Recruit tool</system:String>
|
||||
<system:String x:Key="RecruitmentRecognition">Recruit Tool</system:String>
|
||||
<system:String x:Key="RecruitmentRecognitionTip">Tip: This recognition is independent from main tab (Farming); need open up in game recruit tag selection screen then begin ~</system:String>
|
||||
<system:String x:Key="AutoSettingTime">Auto setting time</system:String>
|
||||
<system:String x:Key="AutoSelectLevel3Tags">Auto select 3 ★ Tags</system:String>
|
||||
@@ -370,7 +370,7 @@
|
||||
<!-- Recruitment Recognition -->
|
||||
|
||||
<!-- Depot Recognition -->
|
||||
<system:String x:Key="DepotRecognition">Depot tool beta</system:String>
|
||||
<system:String x:Key="DepotRecognition">Depot Tool</system:String>
|
||||
<system:String x:Key="DepotRecognitionTip">This function is still a test version, please check if the recognition result is correct before using it. If there is an error, please submit the issue by compressing the debug/depot folder in the working path.</system:String>
|
||||
<system:String x:Key="BeganToDepotRecognition">Start to identify</system:String>
|
||||
<system:String x:Key="ExportToArkplanner">Export to Arkplanner</system:String>
|
||||
|
||||
@@ -371,7 +371,7 @@
|
||||
<!-- 公開求人認識 -->
|
||||
|
||||
<!-- 倉庫アイテム認識 -->
|
||||
<system:String x:Key="DepotRecognition">倉庫アイテム認識 beta</system:String>
|
||||
<system:String x:Key="DepotRecognition">倉庫アイテム認識</system:String>
|
||||
<system:String x:Key="DepotRecognitionTip">この機能はまだテスト版です。倉庫を開いた後、素材のタブを選択してから認識を行い、結果が正しいかどうか確認してください。エラーが発生した場合は、debug/depotフォルダを作業パスに圧縮して、issueを提出してください。</system:String>
|
||||
<system:String x:Key="BeganToDepotRecognition">認識開始</system:String>
|
||||
<system:String x:Key="ExportToArkplanner">Arkplannerへ出力</system:String>
|
||||
|
||||
@@ -351,7 +351,7 @@
|
||||
<!-- 공개모집 인식 -->
|
||||
|
||||
<!-- 창고 정리 -->
|
||||
<system:String x:Key="DepotRecognition">창고 정리 beta</system:String>
|
||||
<system:String x:Key="DepotRecognition">창고 정리</system:String>
|
||||
<system:String x:Key="DepotRecognitionTip">이 기능은 현재 테스트 중입니다. 인식 결과가 맞는지 확인 후에 사용해 주세요. 만약 오류가 있다면 debug/depot 폴더를 압축해서 이슈로 보내 주세요.</system:String>
|
||||
<system:String x:Key="BeganToDepotRecognition">식별 시작</system:String>
|
||||
<system:String x:Key="ExportToArkplanner">Arkplanner로 내보내기</system:String>
|
||||
|
||||
@@ -373,7 +373,7 @@
|
||||
<!-- 公招识别 -->
|
||||
|
||||
<!-- 仓库识别 -->
|
||||
<system:String x:Key="DepotRecognition">仓库识别 beta</system:String>
|
||||
<system:String x:Key="DepotRecognition">仓库识别</system:String>
|
||||
<system:String x:Key="DepotRecognitionTip">该功能尚处于测试阶段,请检查结果是否准确再行使用。若有误,欢迎打包 debug/depot 文件夹后向我们提交 issue ~</system:String>
|
||||
<system:String x:Key="BeganToDepotRecognition">开始识别</system:String>
|
||||
<system:String x:Key="ExportToArkplanner">导出至企鹅物流刷图规划</system:String>
|
||||
|
||||
@@ -305,7 +305,7 @@
|
||||
<!-- 公招辨識 -->
|
||||
|
||||
<!-- 倉庫識別 -->
|
||||
<system:String x:Key="DepotRecognition">倉庫識別 beta</system:String>
|
||||
<system:String x:Key="DepotRecognition">倉庫識別</system:String>
|
||||
<system:String x:Key="DepotRecognitionTip">該功能尚處於測試階段,請檢查結果是否準確再行使用。若有誤,歡迎打包 debug/depot 文件夾後向我們提交 issue ~</system:String>
|
||||
<system:String x:Key="BeganToDepotRecognition">開始識別</system:String>
|
||||
<system:String x:Key="ExportToArkplanner">導出至企鵝物流刷圖規劃</system:String>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
<SolidColorBrush x:Key="PallasBrush" Color="#CDD1FF" />
|
||||
<SolidColorBrush x:Key="ErrorViewBackgroundBrush" Color="#2d2d30" />
|
||||
<SolidColorBrush x:Key="VersionUpdateViewBackgroundBrush" Color="#2d2d30" />
|
||||
|
||||
<!-- 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/ -->
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<SolidColorBrush x:Key="PallasBrush" Color="#6A6AAB" />
|
||||
<SolidColorBrush x:Key="ErrorViewBackgroundBrush" Color="#E6E6E6" />
|
||||
<SolidColorBrush x:Key="SecondaryRegionBrush" Color="#ffffff" />
|
||||
<SolidColorBrush x:Key="VersionUpdateViewBackgroundBrush" Color="#ffffff" />
|
||||
|
||||
<!-- UiLogColor -->
|
||||
<SolidColorBrush x:Key="ErrorLogBrush" Color="DarkRed" />
|
||||
|
||||
@@ -53,24 +53,6 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
_asstProxy = _container.Get<AsstProxy>();
|
||||
}
|
||||
|
||||
private int _displayId = 0;
|
||||
|
||||
public int DisplayId
|
||||
{
|
||||
get => _displayId;
|
||||
set => SetAndNotify(ref _displayId, value);
|
||||
}
|
||||
|
||||
public void ChangeButtenRecruit()
|
||||
{
|
||||
DisplayId = 0;
|
||||
}
|
||||
|
||||
public void ChangeButtenDepot()
|
||||
{
|
||||
DisplayId = 1;
|
||||
}
|
||||
|
||||
#region Recruit
|
||||
private string _recruitInfo = LocalizationHelper.GetString("RecruitmentRecognitionTip");
|
||||
|
||||
|
||||
@@ -24,8 +24,6 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
/// </summary>
|
||||
public class RootViewModel : Conductor<Screen>.Collection.OneActive
|
||||
{
|
||||
private readonly IWindowManager _windowManager;
|
||||
|
||||
private readonly AsstProxy _asstProxy;
|
||||
private readonly TaskQueueViewModel _taskQueueViewModel;
|
||||
private readonly RecognizerViewModel _recognizerViewModel;
|
||||
@@ -39,8 +37,6 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
/// <param name="container">The IoC container.</param>
|
||||
public RootViewModel(IContainer container)
|
||||
{
|
||||
_windowManager = container.Get<Helper.WindowManager>();
|
||||
|
||||
_asstProxy = container.Get<AsstProxy>();
|
||||
_taskQueueViewModel = container.Get<TaskQueueViewModel>();
|
||||
_recognizerViewModel = container.Get<RecognizerViewModel>();
|
||||
@@ -55,7 +51,6 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
CheckAndUpdateNow();
|
||||
InitViewModels();
|
||||
InitProxy();
|
||||
ShowUpdateOrDownload();
|
||||
}
|
||||
|
||||
private async void InitProxy()
|
||||
@@ -79,24 +74,6 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
return _versionUpdateViewModel.CheckAndUpdateNow();
|
||||
}
|
||||
|
||||
private async void ShowUpdateOrDownload()
|
||||
{
|
||||
if (_versionUpdateViewModel.IsFirstBootAfterUpdate)
|
||||
{
|
||||
_versionUpdateViewModel.IsFirstBootAfterUpdate = false;
|
||||
_windowManager.ShowWindow(_versionUpdateViewModel);
|
||||
}
|
||||
else
|
||||
{
|
||||
var ret = await _versionUpdateViewModel.CheckAndDownloadUpdate();
|
||||
|
||||
if (ret == VersionUpdateViewModel.CheckUpdateRetT.OK)
|
||||
{
|
||||
_versionUpdateViewModel.AskToRestart();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private string _windowTitle = "MAA";
|
||||
|
||||
/// <summary>
|
||||
@@ -111,9 +88,6 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
protected override void OnInitialActivate()
|
||||
{
|
||||
base.OnInitialActivate();
|
||||
|
||||
// TrayIcon应该在显示rootViewModel之后再加载
|
||||
Bootstrapper.SetTrayIconInSettingsViewModel(_settingsViewModel);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
||||
@@ -43,6 +43,7 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
/// </summary>
|
||||
public class VersionUpdateViewModel : Screen
|
||||
{
|
||||
private readonly IWindowManager _windowManager;
|
||||
private readonly SettingsViewModel _settingsViewModel;
|
||||
private readonly TaskQueueViewModel _taskQueueViewModel;
|
||||
private readonly IHttpService _httpService;
|
||||
@@ -53,6 +54,7 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
/// <param name="container">The IoC container.</param>
|
||||
public VersionUpdateViewModel(IContainer container)
|
||||
{
|
||||
_windowManager = container.Get<Helper.WindowManager>();
|
||||
_settingsViewModel = container.Get<SettingsViewModel>();
|
||||
_taskQueueViewModel = container.Get<TaskQueueViewModel>();
|
||||
_httpService = container.Get<IHttpService>();
|
||||
@@ -353,6 +355,26 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
Native,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 如果是在更新后第一次启动,显示ReleaseNote弹窗,否则检查更新并下载更新包。
|
||||
/// </summary>
|
||||
public async void ShowUpdateOrDownload()
|
||||
{
|
||||
if (IsFirstBootAfterUpdate)
|
||||
{
|
||||
IsFirstBootAfterUpdate = false;
|
||||
_windowManager.ShowWindow(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
var ret = await CheckAndDownloadUpdate();
|
||||
if (ret == CheckUpdateRetT.OK)
|
||||
{
|
||||
AskToRestart();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 检查更新,并下载更新包。
|
||||
/// </summary>
|
||||
|
||||
@@ -118,9 +118,10 @@
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<ScrollViewer
|
||||
<hc:ScrollViewer
|
||||
Width="360"
|
||||
Margin="0,10"
|
||||
IsInertiaEnabled="True"
|
||||
properties:AutoScroll.AutoScroll="True"
|
||||
HorizontalScrollBarVisibility="Disabled">
|
||||
<ItemsControl ItemsSource="{Binding Path=LogItemViewModels}">
|
||||
@@ -138,7 +139,7 @@
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
</hc:ScrollViewer>
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
HorizontalAlignment="Center"
|
||||
|
||||
@@ -11,180 +11,170 @@
|
||||
xmlns:ui="clr-namespace:MaaWpfGui.ViewModels.UI"
|
||||
xmlns:viewModels="clr-namespace:MaaWpfGui.ViewModels"
|
||||
xmlns:vm="clr-namespace:MaaWpfGui"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
d:DataContext="{d:DesignInstance {x:Type ui:RecognizerViewModel}}"
|
||||
d:DesignHeight="1200"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<StackPanel>
|
||||
<StackPanel
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Top"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
Width="150"
|
||||
Height="30"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Command="{s:Action ChangeButtenRecruit}"
|
||||
Content="{DynamicResource RecruitmentRecognition}" />
|
||||
<Button
|
||||
Width="150"
|
||||
Height="30"
|
||||
Command="{s:Action ChangeButtenDepot}"
|
||||
Content="{DynamicResource DepotRecognition}" />
|
||||
</StackPanel>
|
||||
<Grid
|
||||
Height="500"
|
||||
Margin="20,0,20,20"
|
||||
Visibility="{c:Binding 'DisplayId==0'}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="150" />
|
||||
</Grid.RowDefinitions>
|
||||
<ScrollViewer
|
||||
Grid.Row="0"
|
||||
Margin="10,0"
|
||||
VerticalAlignment="Top">
|
||||
<StackPanel>
|
||||
<controls:TextBlock
|
||||
Height="36"
|
||||
Margin="10"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top"
|
||||
FontSize="14"
|
||||
Style="{StaticResource TextBlockDefaultBold}"
|
||||
Text="{Binding RecruitInfo}"
|
||||
TextWrapping="Wrap" />
|
||||
<controls:TextBlock
|
||||
Margin="10"
|
||||
HorizontalAlignment="Left"
|
||||
FontSize="14"
|
||||
Text="{Binding RecruitResult}"
|
||||
TextWrapping="Wrap" />
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Margin="27,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<StackPanel Margin="40,0,40,0" VerticalAlignment="Center">
|
||||
<CheckBox
|
||||
Margin="5"
|
||||
Content="{DynamicResource AutoSettingTime}"
|
||||
IsChecked="{Binding AutoSetTime}" />
|
||||
<CheckBox
|
||||
MaxWidth="170"
|
||||
Margin="5"
|
||||
HorizontalAlignment="Left"
|
||||
IsChecked="{Binding IsLevel3UseShortTime}"
|
||||
ToolTip="{DynamicResource Level3UseShortTimeTip}">
|
||||
<controls:TextBlock Text="{DynamicResource Level3UseShortTime}" TextWrapping="Wrap" />
|
||||
</CheckBox>
|
||||
</StackPanel>
|
||||
<TabControl
|
||||
SelectedIndex="3"
|
||||
Margin="0,10"
|
||||
BorderThickness="0"
|
||||
Style="{StaticResource TabControlSliding}">
|
||||
<TabItem Header="{DynamicResource RecruitmentRecognition}">
|
||||
<Grid
|
||||
Margin="20,0,20,20">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="150" />
|
||||
</Grid.RowDefinitions>
|
||||
<hc:ScrollViewer
|
||||
Grid.Row="0"
|
||||
Margin="10,0"
|
||||
IsInertiaEnabled="True"
|
||||
VerticalAlignment="Top">
|
||||
<StackPanel>
|
||||
<controls:TextBlock
|
||||
Height="36"
|
||||
Margin="10"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top"
|
||||
FontSize="14"
|
||||
Style="{StaticResource TextBlockDefaultBold}"
|
||||
Text="{Binding RecruitInfo}"
|
||||
TextWrapping="Wrap" />
|
||||
<controls:TextBlock
|
||||
Margin="10"
|
||||
HorizontalAlignment="Left"
|
||||
FontSize="14"
|
||||
Text="{Binding RecruitResult}"
|
||||
TextWrapping="Wrap" />
|
||||
</StackPanel>
|
||||
</hc:ScrollViewer>
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Margin="27,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<StackPanel Margin="40,0,40,0" VerticalAlignment="Center">
|
||||
<CheckBox
|
||||
Margin="5"
|
||||
Content="{DynamicResource AutoSettingTime}"
|
||||
IsChecked="{Binding AutoSetTime}" />
|
||||
<CheckBox
|
||||
MaxWidth="170"
|
||||
Margin="5"
|
||||
HorizontalAlignment="Left"
|
||||
IsChecked="{Binding IsLevel3UseShortTime}"
|
||||
ToolTip="{DynamicResource Level3UseShortTimeTip}">
|
||||
<controls:TextBlock Text="{DynamicResource Level3UseShortTime}" TextWrapping="Wrap" />
|
||||
</CheckBox>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Margin="40,0,40,0" VerticalAlignment="Center">
|
||||
<CheckBox
|
||||
Margin="0,2"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Bottom"
|
||||
Content="{DynamicResource AutoSelectLevel3Tags}"
|
||||
IsChecked="{Binding ChooseLevel3}" />
|
||||
<CheckBox
|
||||
Margin="0,2"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Bottom"
|
||||
Content="{DynamicResource AutoSelectLevel4Tags}"
|
||||
IsChecked="{Binding ChooseLevel4}" />
|
||||
<CheckBox
|
||||
Margin="0,2"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Bottom"
|
||||
Content="{DynamicResource AutoSelectLevel5Tags}"
|
||||
IsChecked="{Binding ChooseLevel5}" />
|
||||
<CheckBox
|
||||
Margin="0,2"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Bottom"
|
||||
Content="{DynamicResource AutoSelectLevel6Tags}"
|
||||
IsChecked="{Binding ChooseLevel6}" />
|
||||
<StackPanel Margin="40,0,40,0" VerticalAlignment="Center">
|
||||
<CheckBox
|
||||
Margin="0,2"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Bottom"
|
||||
Content="{DynamicResource AutoSelectLevel3Tags}"
|
||||
IsChecked="{Binding ChooseLevel3}" />
|
||||
<CheckBox
|
||||
Margin="0,2"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Bottom"
|
||||
Content="{DynamicResource AutoSelectLevel4Tags}"
|
||||
IsChecked="{Binding ChooseLevel4}" />
|
||||
<CheckBox
|
||||
Margin="0,2"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Bottom"
|
||||
Content="{DynamicResource AutoSelectLevel5Tags}"
|
||||
IsChecked="{Binding ChooseLevel5}" />
|
||||
<CheckBox
|
||||
Margin="0,2"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Bottom"
|
||||
Content="{DynamicResource AutoSelectLevel6Tags}"
|
||||
IsChecked="{Binding ChooseLevel6}" />
|
||||
</StackPanel>
|
||||
<!-- <Label x:Name="prompt" Content="提示:本辅助仅会帮你选择最优Tags,
但是不会帮你点击确定按钮!!!
请自行检查辅助选择的是否正确,
若辅助出现识别错误,遗漏了高星干员,
作者概不负责哦__(:з」∠)_" -->
|
||||
<!-- HorizontalAlignment="Center" VerticalAlignment="Center" Height="121" Width="292" FontSize="16" /> -->
|
||||
<Button
|
||||
Width="180"
|
||||
Height="70"
|
||||
Margin="30"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Command="{s:Action RecruitStartCalc}"
|
||||
Content="{DynamicResource BeganToRecruit}" />
|
||||
</StackPanel>
|
||||
<!-- <Label x:Name="prompt" Content="提示:本辅助仅会帮你选择最优Tags,
但是不会帮你点击确定按钮!!!
请自行检查辅助选择的是否正确,
若辅助出现识别错误,遗漏了高星干员,
作者概不负责哦__(:з」∠)_" -->
|
||||
<!-- HorizontalAlignment="Center" VerticalAlignment="Center" Height="121" Width="292" FontSize="16" /> -->
|
||||
<Button
|
||||
Width="180"
|
||||
Height="70"
|
||||
Margin="30"
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="{DynamicResource DepotRecognition}">
|
||||
<Grid
|
||||
Margin="20,0,20,20">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="150" />
|
||||
</Grid.RowDefinitions>
|
||||
<hc:ScrollViewer
|
||||
Grid.Row="0"
|
||||
Margin="10,0"
|
||||
IsInertiaEnabled="True"
|
||||
VerticalAlignment="Top">
|
||||
<StackPanel>
|
||||
<controls:TextBlock
|
||||
Height="36"
|
||||
Margin="10"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top"
|
||||
FontSize="14"
|
||||
Style="{StaticResource TextBlockDefaultBold}"
|
||||
Text="{Binding DepotInfo}"
|
||||
TextWrapping="Wrap" />
|
||||
<controls:TextBlock
|
||||
Margin="10"
|
||||
HorizontalAlignment="Left"
|
||||
FontSize="14"
|
||||
Text="{Binding DepotResult}"
|
||||
TextWrapping="Wrap" />
|
||||
</StackPanel>
|
||||
</hc:ScrollViewer>
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Margin="27,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Command="{s:Action RecruitStartCalc}"
|
||||
Content="{DynamicResource BeganToRecruit}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<Grid
|
||||
Height="500"
|
||||
Margin="20,0,20,20"
|
||||
Visibility="{c:Binding 'DisplayId==1'}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="150" />
|
||||
</Grid.RowDefinitions>
|
||||
<ScrollViewer
|
||||
Grid.Row="0"
|
||||
Margin="10,0"
|
||||
VerticalAlignment="Top">
|
||||
<StackPanel>
|
||||
<controls:TextBlock
|
||||
Height="36"
|
||||
Margin="10"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top"
|
||||
FontSize="14"
|
||||
Style="{StaticResource TextBlockDefaultBold}"
|
||||
Text="{Binding DepotInfo}"
|
||||
TextWrapping="Wrap" />
|
||||
<controls:TextBlock
|
||||
Margin="10"
|
||||
HorizontalAlignment="Left"
|
||||
FontSize="14"
|
||||
Text="{Binding DepotResult}"
|
||||
TextWrapping="Wrap" />
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
Width="180"
|
||||
Height="70"
|
||||
Margin="30"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Command="{s:Action ExportToArkplanner}"
|
||||
Content="{DynamicResource ExportToArkplanner}"
|
||||
IsEnabled="{Binding DepotDone}" />
|
||||
<Button
|
||||
Width="180"
|
||||
Height="70"
|
||||
Margin="30"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Command="{s:Action ExportToLolicon}"
|
||||
Content="{DynamicResource ExportToLolicon}"
|
||||
IsEnabled="{Binding DepotDone}" />
|
||||
<Button
|
||||
Width="180"
|
||||
Height="70"
|
||||
Margin="30"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Command="{s:Action Start}"
|
||||
Content="{DynamicResource BeganToDepotRecognition}" />
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Margin="27,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
Width="180"
|
||||
Height="70"
|
||||
Margin="30"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Command="{s:Action ExportToArkplanner}"
|
||||
Content="{DynamicResource ExportToArkplanner}"
|
||||
IsEnabled="{Binding DepotDone}" />
|
||||
<Button
|
||||
Width="180"
|
||||
Height="70"
|
||||
Margin="30"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Command="{s:Action ExportToLolicon}"
|
||||
Content="{DynamicResource ExportToLolicon}"
|
||||
IsEnabled="{Binding DepotDone}" />
|
||||
<Button
|
||||
Width="180"
|
||||
Height="70"
|
||||
Margin="30"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Command="{s:Action Start}"
|
||||
Content="{DynamicResource BeganToDepotRecognition}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</UserControl>
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
xmlns:styles="clr-namespace:MaaWpfGui.Styles"
|
||||
xmlns:properties="clr-namespace:MaaWpfGui.Styles.Properties"
|
||||
xmlns:controls="clr-namespace:MaaWpfGui.Styles.Controls"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
d:DataContext="{d:DesignInstance {x:Type ui:SettingsViewModel}}"
|
||||
d:DesignHeight="3000"
|
||||
d:DesignWidth="800"
|
||||
@@ -32,9 +33,10 @@
|
||||
ItemsSource="{Binding ListTitle}"
|
||||
SelectedIndex="{Binding SelectedIndex}" />
|
||||
|
||||
<ScrollViewer
|
||||
<hc:ScrollViewer
|
||||
Grid.Column="1"
|
||||
Margin="20,10"
|
||||
IsInertiaEnabled="True"
|
||||
HorizontalAlignment="Stretch"
|
||||
properties:ScrollViewerBinding.ExtentHeight="{Binding ScrollExtentHeight}"
|
||||
properties:ScrollViewerBinding.RectangleVerticalOffsetList="{Binding RectangleVerticalOffsetList}"
|
||||
@@ -207,6 +209,6 @@
|
||||
<userControl:AboutUserControl Margin="20" HorizontalAlignment="Center" />
|
||||
<!--<Rectangle HorizontalAlignment="Stretch" Fill="{DynamicResource BorderBrush}" Height="1" />-->
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</hc:ScrollViewer>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -187,9 +187,10 @@
|
||||
|
||||
<!--<GridSplitter Grid.Column="2" Width="5" HorizontalAlignment="Stretch" />-->
|
||||
<!--<Rectangle Grid.Column="2" VerticalAlignment="Stretch" Fill="{DynamicResource BorderBrush}" Width="4" />-->
|
||||
<ScrollViewer
|
||||
<hc:ScrollViewer
|
||||
Grid.Column="2"
|
||||
Margin="10"
|
||||
IsInertiaEnabled="True"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Top"
|
||||
properties:AutoScroll.AutoScroll="True"
|
||||
@@ -220,6 +221,6 @@
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
</hc:ScrollViewer>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
Height="500"
|
||||
d:DataContext="{d:DesignInstance {x:Type ui:VersionUpdateViewModel}}"
|
||||
mc:Ignorable="d">
|
||||
<Grid>
|
||||
<Grid Background="{DynamicResource VersionUpdateViewBackgroundBrush}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="50" />
|
||||
<RowDefinition Height="*" />
|
||||
@@ -57,7 +57,10 @@
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
Focusable="False">
|
||||
<ScrollViewer x:Name="PART_ContentHost" />
|
||||
|
||||
<hc:ScrollViewer
|
||||
x:Name="PART_ContentHost"
|
||||
IsInertiaEnabled="True"/>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</FlowDocumentScrollViewer.Template>
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
d:DataContext="{d:DesignInstance {x:Type ui:TaskQueueViewModel}}"
|
||||
d:DesignWidth="250"
|
||||
mc:Ignorable="d">
|
||||
<ScrollViewer>
|
||||
<hc:ScrollViewer
|
||||
IsInertiaEnabled="True">
|
||||
<Grid Width="220" Margin="0,0,5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
@@ -294,5 +295,5 @@
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</hc:ScrollViewer>
|
||||
</UserControl>
|
||||
|
||||
Reference in New Issue
Block a user