Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
519c1f0b9e |
No files matched your search
@@ -17,6 +17,7 @@
|
||||
|
||||
<FontFamily x:Key="TextThemeFontFamily">/Resources/Fonts/MiSans-Regular.ttf#MiSans</FontFamily>
|
||||
<FontFamily x:Key="DigitalThemeFontFamily">/Resources/Fonts/deluge-led.ttf#Deluge LED</FontFamily>
|
||||
<bgivc:DomainNameToCascadingItemConverter x:Key="DomainNameConverter" />
|
||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
||||
<bgivc:BooleanToVisibilityRevertConverter x:Key="BooleanToVisibilityRevertConverter" />
|
||||
<bgivc:BooleanToEnableTextConverter x:Key="BooleanToEnableTextConverter" />
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
<PackageReference Include="WPF-UI" Version="4.2.0" />
|
||||
<PackageReference Include="WPF-UI.DependencyInjection" Version="4.2.0" />
|
||||
<PackageReference Include="WPF-UI.Tray" Version="4.2.0" />
|
||||
<PackageReference Include="WPF-UI.Violeta" Version="4.2.0.1" />
|
||||
<PackageReference Include="WPF-UI.Violeta" Version="4.2.0.10" />
|
||||
<PackageReference Include="gong-wpf-dragdrop" Version="3.2.1" />
|
||||
<PackageReference Include="YamlDotNet" Version="16.3.0" />
|
||||
<PackageReference Include="YoloSharp" Version="6.0.3" />
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using BetterGenshinImpact.GameTask.Common.Element.Assets;
|
||||
using Wpf.Ui.Violeta.Controls;
|
||||
|
||||
namespace BetterGenshinImpact.Helpers;
|
||||
|
||||
public static class DomainCascadingItems
|
||||
{
|
||||
private static IReadOnlyList<ICascadingItem>? _items;
|
||||
|
||||
public static IReadOnlyList<ICascadingItem> Items =>
|
||||
_items ??= BuildItems();
|
||||
|
||||
private static IReadOnlyList<ICascadingItem> BuildItems()
|
||||
{
|
||||
return MapLazyAssets.Instance.CountryToDomains.Keys
|
||||
.Reverse()
|
||||
.Select(country => (ICascadingItem)new CascadingItem(
|
||||
country,
|
||||
MapLazyAssets.Instance.CountryToDomains[country]
|
||||
.AsEnumerable()
|
||||
.Reverse()
|
||||
.Select(d => (ICascadingItem)new CascadingItem(
|
||||
d.Name! + " | " + string.Join(" ", d.Rewards))
|
||||
{
|
||||
Tag = d.Name
|
||||
})
|
||||
))
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
@@ -1,108 +0,0 @@
|
||||
<UserControl x:Class="BetterGenshinImpact.View.Controls.DomainSelector"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="60" d:DesignWidth="300"
|
||||
Name="Root">
|
||||
<Grid>
|
||||
<ToggleButton x:Name="MainToggle"
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
Padding="12,6"
|
||||
Height="34"
|
||||
Background="{DynamicResource ControlFillColorDefaultBrush}"
|
||||
BorderBrush="{DynamicResource SurfaceStrokeColorDefaultBrush}"
|
||||
BorderThickness="1">
|
||||
<ToggleButton.Template>
|
||||
<ControlTemplate TargetType="ToggleButton">
|
||||
<Border Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="4">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding SelectedDomain, ElementName=Root, TargetNullValue='请选择', FallbackValue='请选择'}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="5,0,0,0"
|
||||
TextTrimming="CharacterEllipsis"/>
|
||||
<ui:SymbolIcon Grid.Column="1" Symbol="ChevronDown24" Margin="0,0,10,0"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</ToggleButton.Template>
|
||||
</ToggleButton>
|
||||
|
||||
<Popup x:Name="MainPopup"
|
||||
IsOpen="{Binding IsChecked, ElementName=MainToggle, Mode=TwoWay}"
|
||||
PlacementTarget="{Binding ElementName=MainToggle}"
|
||||
StaysOpen="False"
|
||||
AllowsTransparency="True"
|
||||
PopupAnimation="Slide"
|
||||
Opened="MainPopup_Opened"
|
||||
Closed="MainPopup_Closed">
|
||||
<Border x:Name="PopupBorder"
|
||||
Background="{DynamicResource ApplicationBackgroundBrush}"
|
||||
BorderBrush="{DynamicResource SurfaceStrokeColorDefaultBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="8"
|
||||
Margin="0,4,0,0"
|
||||
Padding="4"
|
||||
MinHeight="200"
|
||||
MaxHeight="400"
|
||||
Width="350"
|
||||
PreviewMouseWheel="PopupBorder_PreviewMouseWheel">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect BlurRadius="10" ShadowDepth="2" Direction="270" Color="Black" Opacity="0.2"/>
|
||||
</Border.Effect>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="90"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- Countries -->
|
||||
<ui:ListView x:Name="CountriesListView"
|
||||
ItemsSource="{Binding Countries, ElementName=Root}"
|
||||
SelectedItem="{Binding SelectedCountry, ElementName=Root, Mode=TwoWay}"
|
||||
BorderThickness="0"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
ScrollViewer.CanContentScroll="False">
|
||||
<ui:ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Margin="8,4"/>
|
||||
</DataTemplate>
|
||||
</ui:ListView.ItemTemplate>
|
||||
</ui:ListView>
|
||||
|
||||
<!-- Divider -->
|
||||
<Rectangle Grid.Column="1" Width="1" Fill="{DynamicResource SurfaceStrokeColorDefaultBrush}" Margin="2,0"/>
|
||||
|
||||
<!-- Domains -->
|
||||
<ui:ListView Grid.Column="2" x:Name="DomainsListView"
|
||||
ItemsSource="{Binding FilteredDomains, ElementName=Root}"
|
||||
SelectedValue="{Binding SelectedDomain, ElementName=Root, Mode=TwoWay}"
|
||||
SelectedValuePath="Item2.Name"
|
||||
BorderThickness="0"
|
||||
SelectionChanged="DomainListView_SelectionChanged"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
ScrollViewer.CanContentScroll="False">
|
||||
<ui:ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Margin="8,4">
|
||||
<Run Text="{Binding Item1, Mode=OneWay}"/>
|
||||
</TextBlock>
|
||||
</DataTemplate>
|
||||
</ui:ListView.ItemTemplate>
|
||||
</ui:ListView>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Popup>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -1,218 +0,0 @@
|
||||
using System;
|
||||
using BetterGenshinImpact.GameTask.AutoTrackPath.Model;
|
||||
using BetterGenshinImpact.GameTask.Common.Element.Assets;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace BetterGenshinImpact.View.Controls;
|
||||
|
||||
public partial class DomainSelector : UserControl
|
||||
{
|
||||
public DomainSelector()
|
||||
{
|
||||
InitializeComponent();
|
||||
Countries = MapLazyAssets.Instance.CountryToDomains.Keys.Reverse().ToList();
|
||||
Unloaded += OnUnloaded;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 控件卸载时清理事件处理器,防止内存泄漏
|
||||
/// </summary>
|
||||
private void OnUnloaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
RemoveWindowMouseWheelHandler();
|
||||
}
|
||||
|
||||
public List<string> Countries
|
||||
{
|
||||
get { return (List<string>)GetValue(CountriesProperty); }
|
||||
set { SetValue(CountriesProperty, value); }
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty CountriesProperty =
|
||||
DependencyProperty.Register("Countries", typeof(List<string>), typeof(DomainSelector), new PropertyMetadata(null));
|
||||
|
||||
public string SelectedCountry
|
||||
{
|
||||
get { return (string)GetValue(SelectedCountryProperty); }
|
||||
set { SetValue(SelectedCountryProperty, value); }
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty SelectedCountryProperty =
|
||||
DependencyProperty.Register("SelectedCountry", typeof(string), typeof(DomainSelector), new PropertyMetadata(null, OnSelectedCountryChanged));
|
||||
|
||||
private static void OnSelectedCountryChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var control = (DomainSelector)d;
|
||||
var country = (string)e.NewValue;
|
||||
if (string.IsNullOrEmpty(country))
|
||||
{
|
||||
control.FilteredDomains = new List<System.Tuple<string, GiTpPosition>>();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (MapLazyAssets.Instance.CountryToDomains.TryGetValue(country, out var domains))
|
||||
{
|
||||
// Reverse the list for display
|
||||
control.FilteredDomains = domains.Select(i => new System.Tuple<string, GiTpPosition>(i.Name! + " | " + string.Join(" ", i.Rewards), i)).Reverse().ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
control.FilteredDomains = new List<System.Tuple<string, GiTpPosition>>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public List<System.Tuple<string, GiTpPosition>> FilteredDomains
|
||||
{
|
||||
get { return (List<System.Tuple<string, GiTpPosition>>)GetValue(FilteredDomainsProperty); }
|
||||
set { SetValue(FilteredDomainsProperty, value); }
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty FilteredDomainsProperty =
|
||||
DependencyProperty.Register("FilteredDomains", typeof(List<System.Tuple<string, GiTpPosition>>), typeof(DomainSelector), new PropertyMetadata(null));
|
||||
|
||||
public string SelectedDomain
|
||||
{
|
||||
get { return (string)GetValue(SelectedDomainProperty); }
|
||||
set { SetValue(SelectedDomainProperty, value); }
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty SelectedDomainProperty =
|
||||
DependencyProperty.Register("SelectedDomain", typeof(string), typeof(DomainSelector), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnSelectedDomainChanged));
|
||||
|
||||
private static void OnSelectedDomainChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var control = (DomainSelector)d;
|
||||
var domain = (string)e.NewValue;
|
||||
|
||||
if (string.IsNullOrEmpty(domain)) return;
|
||||
|
||||
// Verify if domain matches current country, if not, update country
|
||||
var country = MapLazyAssets.Instance.GetCountryByDomain(domain);
|
||||
if (country != null && country != control.SelectedCountry)
|
||||
{
|
||||
control.SelectedCountry = country;
|
||||
}
|
||||
}
|
||||
|
||||
private void DomainListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
if (MainToggle.IsChecked == true)
|
||||
{
|
||||
MainToggle.IsChecked = false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Popup 打开时添加全局滚轮事件拦截
|
||||
/// </summary>
|
||||
private void MainPopup_Opened(object sender, EventArgs e)
|
||||
{
|
||||
var window = Window.GetWindow(this);
|
||||
if (window != null)
|
||||
{
|
||||
window.PreviewMouseWheel -= Window_PreviewMouseWheel;
|
||||
window.PreviewMouseWheel += Window_PreviewMouseWheel;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Popup 关闭时移除全局滚轮事件拦截
|
||||
/// </summary>
|
||||
private void MainPopup_Closed(object sender, EventArgs e)
|
||||
{
|
||||
RemoveWindowMouseWheelHandler();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 移除窗口级滚轮事件处理器
|
||||
/// </summary>
|
||||
private void RemoveWindowMouseWheelHandler()
|
||||
{
|
||||
var window = Window.GetWindow(this);
|
||||
if (window != null)
|
||||
{
|
||||
window.PreviewMouseWheel -= Window_PreviewMouseWheel;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 全局滚轮事件处理,当 Popup 打开时拦截所有滚轮事件
|
||||
/// </summary>
|
||||
private void Window_PreviewMouseWheel(object sender, MouseWheelEventArgs e)
|
||||
{
|
||||
if (MainPopup.IsOpen)
|
||||
{
|
||||
e.Handled = true;
|
||||
|
||||
var scrollViewer1 = FindScrollViewer(CountriesListView);
|
||||
var scrollViewer2 = FindScrollViewer(DomainsListView);
|
||||
|
||||
if (scrollViewer1 != null && scrollViewer1.IsMouseOver)
|
||||
{
|
||||
scrollViewer1.ScrollToVerticalOffset(scrollViewer1.VerticalOffset - e.Delta / 2.0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (scrollViewer2 != null && scrollViewer2.IsMouseOver)
|
||||
{
|
||||
scrollViewer2.ScrollToVerticalOffset(scrollViewer2.VerticalOffset - e.Delta / 2.0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 处理 Popup 内的鼠标滚轮事件,防止滚动穿透到外部页面
|
||||
/// </summary>
|
||||
private void PopupBorder_PreviewMouseWheel(object sender, MouseWheelEventArgs e)
|
||||
{
|
||||
e.Handled = true;
|
||||
|
||||
var scrollViewer1 = FindScrollViewer(CountriesListView);
|
||||
var scrollViewer2 = FindScrollViewer(DomainsListView);
|
||||
|
||||
if (scrollViewer1 != null && scrollViewer1.IsMouseOver)
|
||||
{
|
||||
scrollViewer1.ScrollToVerticalOffset(scrollViewer1.VerticalOffset - e.Delta / 2.0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (scrollViewer2 != null && scrollViewer2.IsMouseOver)
|
||||
{
|
||||
scrollViewer2.ScrollToVerticalOffset(scrollViewer2.VerticalOffset - e.Delta / 2.0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 在视觉树中查找 ScrollViewer
|
||||
/// </summary>
|
||||
private ScrollViewer? FindScrollViewer(DependencyObject parent)
|
||||
{
|
||||
if (parent == null) return null;
|
||||
|
||||
for (int i = 0; i < VisualTreeHelper.GetChildrenCount(parent); i++)
|
||||
{
|
||||
var child = VisualTreeHelper.GetChild(parent, i);
|
||||
|
||||
if (child is ScrollViewer scrollViewer)
|
||||
{
|
||||
return scrollViewer;
|
||||
}
|
||||
|
||||
var result = FindScrollViewer(child);
|
||||
if (result != null)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Windows.Data;
|
||||
using BetterGenshinImpact.Helpers;
|
||||
using Wpf.Ui.Violeta.Controls;
|
||||
|
||||
namespace BetterGenshinImpact.View.Converters;
|
||||
|
||||
public class DomainNameToCascadingItemConverter : IValueConverter
|
||||
{
|
||||
public object? Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value is string name && !string.IsNullOrEmpty(name))
|
||||
{
|
||||
foreach (var country in DomainCascadingItems.Items)
|
||||
{
|
||||
var found = country.Children?.FirstOrDefault(d => d.Tag as string == name);
|
||||
if (found != null)
|
||||
return found;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public object? ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value is ICascadingItem item)
|
||||
return item.Tag as string;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -5,12 +5,14 @@
|
||||
xmlns:controls="clr-namespace:BetterGenshinImpact.View.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dd="urn:gong-wpf-dragdrop"
|
||||
xmlns:helpers="clr-namespace:BetterGenshinImpact.Helpers"
|
||||
xmlns:local="clr-namespace:BetterGenshinImpact.View.Pages"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:oneDragon="clr-namespace:BetterGenshinImpact.ViewModel.Pages.OneDragon"
|
||||
xmlns:oneDragonView="clr-namespace:BetterGenshinImpact.View.Pages.OneDragon"
|
||||
xmlns:pages="clr-namespace:BetterGenshinImpact.ViewModel.Pages"
|
||||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
||||
xmlns:vio="http://schemas.lepo.co/wpfui/2022/xaml/violeta"
|
||||
d:DataContext="{d:DesignInstance Type=pages:OneDragonFlowViewModel}"
|
||||
d:DesignHeight="1000"
|
||||
d:DesignWidth="800"
|
||||
@@ -444,13 +446,14 @@
|
||||
Text="秘境名称"
|
||||
Width="Auto"
|
||||
TextWrapping="Wrap" />
|
||||
<controls:DomainSelector Grid.Row="0"
|
||||
<vio:CascadingComboBox Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
Grid.Column="1"
|
||||
Width="100"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="10,0,10,0"
|
||||
SelectedDomain="{Binding SelectedConfig.DomainName, Mode=TwoWay}" />
|
||||
ItemsSource="{x:Static helpers:DomainCascadingItems.Items}"
|
||||
SelectedCascadingItem="{Binding SelectedConfig.DomainName, Mode=TwoWay, Converter={StaticResource DomainNameConverter}}" />
|
||||
<ui:TextBlock Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
Margin="10,0,10,0"
|
||||
@@ -550,11 +553,12 @@
|
||||
VerticalAlignment="Center"
|
||||
TextAlignment="Center"
|
||||
PlaceholderText="填写队伍名称 " />
|
||||
<controls:DomainSelector Grid.Row="0"
|
||||
<vio:CascadingComboBox Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
Width="100"
|
||||
Margin="0,0,36,0"
|
||||
SelectedDomain="{Binding SelectedConfig.MondayDomainName, Mode=TwoWay}" />
|
||||
ItemsSource="{x:Static helpers:DomainCascadingItems.Items}"
|
||||
SelectedCascadingItem="{Binding SelectedConfig.MondayDomainName, Mode=TwoWay, Converter={StaticResource DomainNameConverter}}" />
|
||||
</Grid>
|
||||
<Grid Margin="16">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -578,11 +582,12 @@
|
||||
VerticalAlignment="Center"
|
||||
TextAlignment="Center"
|
||||
PlaceholderText="填写队伍名称 " />
|
||||
<controls:DomainSelector Grid.Row="0"
|
||||
<vio:CascadingComboBox Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
Width="100"
|
||||
Margin="0,0,36,0"
|
||||
SelectedDomain="{Binding SelectedConfig.TuesdayDomainName, Mode=TwoWay}" />
|
||||
ItemsSource="{x:Static helpers:DomainCascadingItems.Items}"
|
||||
SelectedCascadingItem="{Binding SelectedConfig.TuesdayDomainName, Mode=TwoWay, Converter={StaticResource DomainNameConverter}}" />
|
||||
</Grid>
|
||||
<Grid Margin="16">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -605,11 +610,12 @@
|
||||
VerticalAlignment="Center"
|
||||
TextAlignment="Center"
|
||||
PlaceholderText="填写队伍名称 " />
|
||||
<controls:DomainSelector Grid.Row="0"
|
||||
<vio:CascadingComboBox Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
Width="100"
|
||||
Margin="0,0,36,0"
|
||||
SelectedDomain="{Binding SelectedConfig.WednesdayDomainName, Mode=TwoWay}" />
|
||||
ItemsSource="{x:Static helpers:DomainCascadingItems.Items}"
|
||||
SelectedCascadingItem="{Binding SelectedConfig.WednesdayDomainName, Mode=TwoWay, Converter={StaticResource DomainNameConverter}}" />
|
||||
|
||||
</Grid>
|
||||
<Grid Margin="16">
|
||||
@@ -633,11 +639,12 @@
|
||||
VerticalAlignment="Center"
|
||||
TextAlignment="Center"
|
||||
PlaceholderText="填写队伍名称 " />
|
||||
<controls:DomainSelector Grid.Row="0"
|
||||
<vio:CascadingComboBox Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
Width="100"
|
||||
Margin="0,0,36,0"
|
||||
SelectedDomain="{Binding SelectedConfig.ThursdayDomainName, Mode=TwoWay}" />
|
||||
ItemsSource="{x:Static helpers:DomainCascadingItems.Items}"
|
||||
SelectedCascadingItem="{Binding SelectedConfig.ThursdayDomainName, Mode=TwoWay, Converter={StaticResource DomainNameConverter}}" />
|
||||
|
||||
</Grid>
|
||||
<Grid Margin="16">
|
||||
@@ -661,11 +668,12 @@
|
||||
VerticalAlignment="Center"
|
||||
TextAlignment="Center"
|
||||
PlaceholderText="填写队伍名称 " />
|
||||
<controls:DomainSelector Grid.Row="0"
|
||||
<vio:CascadingComboBox Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
Width="100"
|
||||
Margin="0,0,36,0"
|
||||
SelectedDomain="{Binding SelectedConfig.FridayDomainName, Mode=TwoWay}" />
|
||||
ItemsSource="{x:Static helpers:DomainCascadingItems.Items}"
|
||||
SelectedCascadingItem="{Binding SelectedConfig.FridayDomainName, Mode=TwoWay, Converter={StaticResource DomainNameConverter}}" />
|
||||
|
||||
|
||||
</Grid>
|
||||
@@ -690,11 +698,12 @@
|
||||
VerticalAlignment="Center"
|
||||
TextAlignment="Center"
|
||||
PlaceholderText="填写队伍名称 " />
|
||||
<controls:DomainSelector Grid.Row="0"
|
||||
<vio:CascadingComboBox Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
Width="100"
|
||||
Margin="0,0,36,0"
|
||||
SelectedDomain="{Binding SelectedConfig.SaturdayDomainName, Mode=TwoWay}" />
|
||||
ItemsSource="{x:Static helpers:DomainCascadingItems.Items}"
|
||||
SelectedCascadingItem="{Binding SelectedConfig.SaturdayDomainName, Mode=TwoWay, Converter={StaticResource DomainNameConverter}}" />
|
||||
|
||||
</Grid>
|
||||
<Grid Margin="16">
|
||||
@@ -723,11 +732,12 @@
|
||||
VerticalAlignment="Center"
|
||||
TextAlignment="Center"
|
||||
PlaceholderText="填写队伍名称 " />
|
||||
<controls:DomainSelector Grid.Row="0"
|
||||
<vio:CascadingComboBox Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
Width="100"
|
||||
Margin="0,0,36,0"
|
||||
SelectedDomain="{Binding SelectedConfig.SundayDomainName, Mode=TwoWay}" />
|
||||
ItemsSource="{x:Static helpers:DomainCascadingItems.Items}"
|
||||
SelectedCascadingItem="{Binding SelectedConfig.SundayDomainName, Mode=TwoWay, Converter={StaticResource DomainNameConverter}}" />
|
||||
<Border Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="3"
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:pages="clr-namespace:BetterGenshinImpact.ViewModel.Pages"
|
||||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
||||
xmlns:vio="http://schemas.lepo.co/wpfui/2022/xaml/violeta"
|
||||
xmlns:emoji="clr-namespace:Emoji.Wpf;assembly=Emoji.Wpf"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
Title="TaskSettingsPage"
|
||||
@@ -1290,12 +1291,13 @@
|
||||
Foreground="{ui:ThemeResource TextFillColorTertiaryBrush}"
|
||||
Text="自动传送到刷取的秘境"
|
||||
TextWrapping="Wrap" />
|
||||
<controls:DomainSelector Grid.Row="0"
|
||||
<vio:CascadingComboBox Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
Grid.Column="1"
|
||||
Width="180"
|
||||
Margin="0,0,36,0"
|
||||
SelectedDomain="{Binding Config.AutoDomainConfig.DomainName, Mode=TwoWay}" />
|
||||
ItemsSource="{x:Static helpers:DomainCascadingItems.Items}"
|
||||
SelectedCascadingItem="{Binding Config.AutoDomainConfig.DomainName, Mode=TwoWay, Converter={StaticResource DomainNameConverter}}" />
|
||||
</Grid>
|
||||
<Grid Margin="16">
|
||||
<Grid.RowDefinitions>
|
||||
|
||||
Reference in new issue
Block a user