mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
UI更新 + 支持移除收藏
This commit is contained in:
parent
540b76009d
commit
9cf2d47c97
@ -41,6 +41,10 @@ namespace VPet_Simulator.Core
|
||||
/// 该消息框的Control
|
||||
/// </summary>
|
||||
Control This { get; }
|
||||
/// <summary>
|
||||
/// 被关闭时事件
|
||||
/// </summary>
|
||||
event Action EndAction;
|
||||
}
|
||||
/// <summary>
|
||||
/// MessageBar.xaml 的交互逻辑
|
||||
@ -120,7 +124,10 @@ namespace VPet_Simulator.Core
|
||||
EndTimer.Start();
|
||||
}
|
||||
}
|
||||
public Action EndAction;
|
||||
/// <summary>
|
||||
/// 被关闭时事件
|
||||
/// </summary>
|
||||
public event Action EndAction;
|
||||
private void EndTimer_Elapsed(object sender, ElapsedEventArgs e)
|
||||
{
|
||||
|
||||
|
@ -1,15 +1,9 @@
|
||||
<Border x:Class="VPet_Simulator.Windows.MPUserControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
||||
<Border x:Class="VPet_Simulator.Windows.MPUserControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
||||
xmlns:ll="clr-namespace:LinePutScript.Localization.WPF;assembly=LinePutScript.Localization.WPF"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:VPet_Simulator.Windows"
|
||||
mc:Ignorable="d"
|
||||
Margin="5"
|
||||
Background="{DynamicResource SecondaryTrans4}"
|
||||
CornerRadius="5">
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:VPet_Simulator.Windows"
|
||||
mc:Ignorable="d" Margin="5" Background="{DynamicResource SecondaryTrans4}" CornerRadius="5">
|
||||
<Grid>
|
||||
<Grid Margin="7">
|
||||
<Grid.ColumnDefinitions>
|
||||
@ -17,49 +11,31 @@
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image x:Name="uimg"
|
||||
Height="50"
|
||||
Source="/Res/TopLogo2019.PNG" />
|
||||
<StackPanel Grid.Column="1"
|
||||
Margin="15,0,0,0">
|
||||
<Image x:Name="uimg" Height="50" Source="/Res/TopLogo2019.PNG" />
|
||||
<StackPanel Grid.Column="1" Margin="15,0,0,0">
|
||||
<TextBlock>
|
||||
<Run x:Name="rPetName"
|
||||
Text="萝莉斯"
|
||||
FontWeight="Bold"
|
||||
FontSize="{Binding FontSize, Converter={x:Static pu:Converters.DoublePlusConverter}, ConverterParameter=2, Source={x:Static pu:GlobalSettings.Setting}}" />
|
||||
<Run x:Name="hostName"
|
||||
Text="XXX"
|
||||
FontSize="{Binding FontSize, Converter={x:Static pu:Converters.DoubleMinusConverter}, ConverterParameter=2, Source={x:Static pu:GlobalSettings.Setting}}" />
|
||||
<Run Text="{ll:Str 访客}"
|
||||
FontSize="{Binding FontSize, Converter={x:Static pu:Converters.DoubleMinusConverter}, ConverterParameter=2, Source={x:Static pu:GlobalSettings.Setting}}" />
|
||||
: <Run x:Name="rPetName" Text="萝莉斯" FontWeight="Bold"
|
||||
FontSize="{Binding FontSize, Converter={x:Static pu:Converters.DoublePlusConverter}, ConverterParameter=2, Source={x:Static pu:GlobalSettings.Setting}}" />
|
||||
</TextBlock>
|
||||
<TextBlock x:Name="info"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="{Binding FontSize, Converter={x:Static pu:Converters.DoubleMinusConverter}, ConverterParameter=2, Source={x:Static pu:GlobalSettings.Setting}}">Lv ??</TextBlock>
|
||||
<StackPanel Margin="0,3,0,0"
|
||||
Orientation="Horizontal"
|
||||
Opacity="0.7">
|
||||
<TextBlock VerticalAlignment="Center"
|
||||
FontSize="{Binding FontSize, Converter={x:Static pu:Converters.DoubleMinusConverter}, ConverterParameter=2, Source={x:Static pu:GlobalSettings.Setting}}">ID:</TextBlock>
|
||||
<TextBox VerticalAlignment="Center"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
FontSize="{Binding FontSize, Converter={x:Static pu:Converters.DoubleMinusConverter}, ConverterParameter=2, Source={x:Static pu:GlobalSettings.Setting}}" />
|
||||
</StackPanel>
|
||||
<TextBlock>
|
||||
<Run Text="{ll:Str 来自}"
|
||||
FontSize="{Binding FontSize, Converter={x:Static pu:Converters.DoubleMinusConverter}, ConverterParameter=2, Source={x:Static pu:GlobalSettings.Setting}}" />
|
||||
: <Run x:Name="hostName" Text="XXX"
|
||||
FontSize="{Binding FontSize, Converter={x:Static pu:Converters.DoubleMinusConverter}, ConverterParameter=2, Source={x:Static pu:GlobalSettings.Setting}}" />
|
||||
</TextBlock>
|
||||
<TextBlock x:Name="info" VerticalAlignment="Center"
|
||||
FontSize="{Binding FontSize, Converter={x:Static pu:Converters.DoubleMinusConverter}, ConverterParameter=2, Source={x:Static pu:GlobalSettings.Setting}}">Lv ??</TextBlock>
|
||||
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="2">
|
||||
<Button Padding="7,5"
|
||||
Style="{DynamicResource ThemedButtonStyle}"
|
||||
Content="{ll:Str 重置位置}"
|
||||
<Button Padding="7,5" Style="{DynamicResource ThemedButtonStyle}" Content="{ll:Str 重置位置}"
|
||||
Click="btn_ReSetLocal" />
|
||||
<Button x:Name="Kick"
|
||||
Padding="7,5"
|
||||
Click="Kick_Click"
|
||||
Visibility="Collapsed"
|
||||
d:Visibility="Visible"
|
||||
HorizontalAlignment="Center"
|
||||
Background="Transparent"
|
||||
<Button x:Name="Kick" Padding="7,5" Click="Kick_Click" Visibility="Collapsed" d:Visibility="Visible"
|
||||
HorizontalAlignment="Center" Background="Transparent"
|
||||
FontSize="{Binding FontSize, Converter={x:Static pu:Converters.DoubleMinusConverter}, ConverterParameter=2, Source={x:Static pu:GlobalSettings.Setting}}">
|
||||
<TextBlock TextDecorations="Underline"
|
||||
Text="{ll:Str 送客}" />
|
||||
<TextBlock TextDecorations="Underline" Text="{ll:Str 送客}" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
@ -1,107 +1,69 @@
|
||||
<pu:WindowX x:Class="VPet_Simulator.Windows.winMutiPlayer"
|
||||
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:local="clr-namespace:VPet_Simulator.Windows"
|
||||
mc:Ignorable="d"
|
||||
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
||||
xmlns:ll="clr-namespace:LinePutScript.Localization.WPF;assembly=LinePutScript.Localization.WPF"
|
||||
Title="{ll:Str 访客表}"
|
||||
MinHeight="400"
|
||||
Height="400"
|
||||
Width="550"
|
||||
Closed="Window_Closed"
|
||||
Style="{DynamicResource BaseWindowXStyle}"
|
||||
Background="{DynamicResource PrimaryLighter}"
|
||||
FontSize="{Binding FontSize, Source={x:Static pu:GlobalSettings.Setting}}"
|
||||
MaxHeight="400"
|
||||
ResizeMode="CanMinimize"
|
||||
Closing="Window_Closing">
|
||||
<TabControl x:Name="tabControl"
|
||||
TabStripPlacement="Left"
|
||||
pu:TabControlHelper.ItemsHorizontalHeaderAlignment="Stretch"
|
||||
pu:TabControlHelper.ItemsWidth="220"
|
||||
pu:TabControlHelper.ItemsPadding="15,8"
|
||||
pu:TabControlHelper.ItemsHeight="34"
|
||||
pu:TabControlHelper.ItemsSelectedBackground="{DynamicResource DARKPrimary}"
|
||||
pu:TabControlHelper.ItemsSelectedForeground="{DynamicResource DARKPrimaryText}">
|
||||
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:local="clr-namespace:VPet_Simulator.Windows" mc:Ignorable="d"
|
||||
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
||||
xmlns:ll="clr-namespace:LinePutScript.Localization.WPF;assembly=LinePutScript.Localization.WPF"
|
||||
Title="{ll:Str 访客表}" MinHeight="400" Height="400" Width="600" Closed="Window_Closed"
|
||||
Style="{DynamicResource BaseWindowXStyle}" Background="{DynamicResource PrimaryLighter}"
|
||||
FontSize="{Binding FontSize, Source={x:Static pu:GlobalSettings.Setting}}" MaxHeight="400"
|
||||
ResizeMode="CanMinimize" Closing="Window_Closing">
|
||||
<TabControl x:Name="tabControl" TabStripPlacement="Left"
|
||||
pu:TabControlHelper.ItemsHorizontalHeaderAlignment="Stretch" pu:TabControlHelper.ItemsWidth="240"
|
||||
pu:TabControlHelper.ItemsPadding="15,8" pu:TabControlHelper.ItemsHeight="34"
|
||||
pu:TabControlHelper.ItemsSelectedBackground="{DynamicResource DARKPrimary}"
|
||||
pu:TabControlHelper.ItemsSelectedForeground="{DynamicResource DARKPrimaryText}">
|
||||
<pu:TabControlHelper.FrontControl>
|
||||
<Grid Margin="7">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border CornerRadius="5"
|
||||
Width="55"
|
||||
Height="55"
|
||||
BorderBrush="LightGray"
|
||||
BorderThickness="1">
|
||||
<Border CornerRadius="5" Width="60" Height="60" BorderBrush="LightGray" BorderThickness="1">
|
||||
<Border.Background>
|
||||
<ImageBrush x:Name="HostHead"
|
||||
ImageSource="/Res/TopLogo2019.PNG" />
|
||||
<ImageBrush x:Name="HostHead" ImageSource="/Res/TopLogo2019.PNG" />
|
||||
</Border.Background>
|
||||
</Border>
|
||||
<StackPanel Grid.Column="1"
|
||||
Margin="7,0,0,0">
|
||||
<StackPanel Grid.Column="1" Margin="7,0,0,0">
|
||||
<TextBlock>
|
||||
<Run x:Name="hostName"
|
||||
Text="萝莉斯"
|
||||
FontWeight="Bold"
|
||||
FontSize="{Binding FontSize, Converter={x:Static pu:Converters.DoublePlusConverter}, ConverterParameter=2, Source={x:Static pu:GlobalSettings.Setting}}" />
|
||||
<Run x:Name="hostPet"
|
||||
Text="XXX"
|
||||
FontSize="{Binding FontSize, Converter={x:Static pu:Converters.DoubleMinusConverter}, ConverterParameter=2, Source={x:Static pu:GlobalSettings.Setting}}" />
|
||||
<Run x:Name="hostPet" Text="萝莉斯" FontWeight="Bold"
|
||||
FontSize="{Binding FontSize, Converter={x:Static pu:Converters.DoublePlusConverter}, ConverterParameter=4, Source={x:Static pu:GlobalSettings.Setting}}" />
|
||||
<Run Text="{ll:Str '的访客表'}"
|
||||
FontSize="{Binding FontSize, Converter={x:Static pu:Converters.DoublePlusConverter}, ConverterParameter=2, Source={x:Static pu:GlobalSettings.Setting}}" />
|
||||
</TextBlock>
|
||||
<StackPanel Orientation="Horizontal"
|
||||
Opacity="0.7">
|
||||
<TextBlock>
|
||||
<Run Text="{ll:Str 主持人}"
|
||||
FontSize="{Binding FontSize, Converter={x:Static pu:Converters.DoublePlusConverter}, ConverterParameter=2, Source={x:Static pu:GlobalSettings.Setting}}" />:
|
||||
<Run x:Name="hostName"
|
||||
FontSize="{Binding FontSize, Converter={x:Static pu:Converters.DoublePlusConverter}, ConverterParameter=2, Source={x:Static pu:GlobalSettings.Setting}}" />
|
||||
</TextBlock>
|
||||
<StackPanel Orientation="Horizontal" Opacity="0.7">
|
||||
<TextBlock VerticalAlignment="Center"
|
||||
FontSize="{Binding FontSize, Converter={x:Static pu:Converters.DoubleMinusConverter}, ConverterParameter=2, Source={x:Static pu:GlobalSettings.Setting}}">ID:</TextBlock>
|
||||
<TextBox x:Name="lbLid"
|
||||
VerticalAlignment="Center"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
FontSize="{Binding FontSize, Converter={x:Static pu:Converters.DoubleMinusConverter}, ConverterParameter=2, Source={x:Static pu:GlobalSettings.Setting}}" />
|
||||
FontSize="{Binding FontSize, Source={x:Static pu:GlobalSettings.Setting}}">ID: </TextBlock>
|
||||
<TextBox x:Name="lbLid" VerticalAlignment="Center"
|
||||
Background="{DynamicResource SecondaryTrans4}" BorderThickness="0"
|
||||
FontSize="{Binding FontSize, Source={x:Static pu:GlobalSettings.Setting}}" />
|
||||
</StackPanel>
|
||||
<Grid Margin="0,2,0,0">
|
||||
<pu:Switch x:Name="swAllowJoin"
|
||||
FontSize="{Binding FontSize, Converter={x:Static pu:Converters.DoubleMinusConverter}, ConverterParameter=2, Source={x:Static pu:GlobalSettings.Setting}}"
|
||||
BorderBrush="#AFAFAF"
|
||||
ToggleBrush="#AFAFAF"
|
||||
Padding="2,0,0,0"
|
||||
BoxHeight="13"
|
||||
BoxWidth="21"
|
||||
Foreground="#AFAFAF"
|
||||
CheckedForeground="{DynamicResource PrimaryText}"
|
||||
CheckedBackground="{DynamicResource PrimaryDarker}"
|
||||
CheckedBorderBrush="{DynamicResource PrimaryDarker}"
|
||||
CheckedContent="{ll:Str 好友加入}"
|
||||
CheckedToggleBrush="{DynamicResource DARKPrimaryText}"
|
||||
ToggleShadowColor="{x:Null}"
|
||||
ToggleSize="9"
|
||||
IsChecked="True"
|
||||
Checked="swAllowJoin_Checked"
|
||||
Unchecked="swAllowJoin_Unchecked" />
|
||||
<pu:Switch x:Name="swAllowTouch"
|
||||
HorizontalAlignment="Right"
|
||||
FontSize="{Binding FontSize, Converter={x:Static pu:Converters.DoubleMinusConverter}, ConverterParameter=2, Source={x:Static pu:GlobalSettings.Setting}}"
|
||||
BorderBrush="#AFAFAF"
|
||||
ToggleBrush="#AFAFAF"
|
||||
Padding="2,0,0,0"
|
||||
BoxHeight="13"
|
||||
BoxWidth="21"
|
||||
Foreground="#AFAFAF"
|
||||
CheckedForeground="{DynamicResource PrimaryText}"
|
||||
CheckedBackground="{DynamicResource PrimaryDarker}"
|
||||
CheckedBorderBrush="{DynamicResource PrimaryDarker}"
|
||||
CheckedContent="{ll:Str 好友交互}"
|
||||
CheckedToggleBrush="{DynamicResource DARKPrimaryText}"
|
||||
ToggleShadowColor="{x:Null}"
|
||||
ToggleSize="9"
|
||||
IsChecked="True"
|
||||
Checked="swAllowTouch_Checked"
|
||||
Unchecked="swAllowTouch_Unchecked" />
|
||||
</Grid>
|
||||
<pu:Switch x:Name="swAllowJoin"
|
||||
FontSize="{Binding FontSize, Converter={x:Static pu:Converters.DoublePlusConverter}, ConverterParameter=2, Source={x:Static pu:GlobalSettings.Setting}}"
|
||||
BorderBrush="#AFAFAF" ToggleBrush="#AFAFAF" Padding="2,0,0,0" BoxHeight="13" BoxWidth="21"
|
||||
Foreground="#AFAFAF" CheckedForeground="{DynamicResource PrimaryText}"
|
||||
CheckedBackground="{DynamicResource PrimaryDarker}"
|
||||
CheckedBorderBrush="{DynamicResource PrimaryDarker}" Content="{ll:Str 允许好友加入}"
|
||||
CheckedToggleBrush="{DynamicResource DARKPrimaryText}" ToggleShadowColor="{x:Null}"
|
||||
ToggleSize="9" IsChecked="True" Checked="swAllowJoin_Checked"
|
||||
Unchecked="swAllowJoin_Unchecked" HorizontalAlignment="Left" />
|
||||
<pu:Switch x:Name="swAllowTouch" HorizontalAlignment="Left"
|
||||
FontSize="{Binding FontSize, Converter={x:Static pu:Converters.DoublePlusConverter}, ConverterParameter=2, Source={x:Static pu:GlobalSettings.Setting}}"
|
||||
BorderBrush="#AFAFAF" ToggleBrush="#AFAFAF" Padding="2,0,0,0" BoxHeight="13" BoxWidth="21"
|
||||
Foreground="#AFAFAF" CheckedForeground="{DynamicResource PrimaryText}"
|
||||
CheckedBackground="{DynamicResource PrimaryDarker}"
|
||||
CheckedBorderBrush="{DynamicResource PrimaryDarker}" Content="{ll:Str 允许好友交互}"
|
||||
CheckedToggleBrush="{DynamicResource DARKPrimaryText}" ToggleShadowColor="{x:Null}"
|
||||
ToggleSize="9" IsChecked="True" Checked="swAllowTouch_Checked"
|
||||
Unchecked="swAllowTouch_Unchecked" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</pu:TabControlHelper.FrontControl>
|
||||
@ -109,15 +71,9 @@
|
||||
<StackPanel x:Name="MUUCList" />
|
||||
</TabItem>
|
||||
<TabItem Header="{ll:Str 消息日志}">
|
||||
<TextBox x:Name="tbLog"
|
||||
Margin="0"
|
||||
Padding="7"
|
||||
VerticalContentAlignment="Stretch"
|
||||
BorderThickness="0"
|
||||
Background="Transparent"
|
||||
Foreground="{DynamicResource DARKPrimaryDarker}"
|
||||
IsReadOnly="True"
|
||||
VerticalScrollBarVisibility="Visible" />
|
||||
<TextBox x:Name="tbLog" Margin="0" Padding="7" VerticalContentAlignment="Stretch" BorderThickness="0"
|
||||
Background="Transparent" Foreground="{DynamicResource DARKPrimaryDarker}" IsReadOnly="True"
|
||||
TextWrapping="Wrap" HorizontalContentAlignment="Left" VerticalScrollBarVisibility="Visible" />
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</pu:WindowX>
|
||||
|
@ -4,16 +4,16 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ll="clr-namespace:LinePutScript.Localization.WPF;assembly=LinePutScript.Localization.WPF"
|
||||
xmlns:local="clr-namespace:VPet_Simulator.Windows" mc:Ignorable="d" Title="{ll:Str 工作面板}" Height="350" Style="{DynamicResource BaseWindowXStyle}"
|
||||
Background="{DynamicResource PrimaryLighter}" Width="580" ResizeMode="CanMinimize" Closed="Window_Closed">
|
||||
Background="{DynamicResource PrimaryLighter}" Width="600" ResizeMode="CanMinimize" Closed="Window_Closed">
|
||||
<Grid>
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="170" />
|
||||
<ColumnDefinition Width="140" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Background="{DynamicResource DARKPrimaryText}" />
|
||||
<StackPanel Margin="12, 10">
|
||||
<TextBlock Text="工作和娱乐"
|
||||
<TextBlock Text="{ll:Str 工作面板}"
|
||||
FontSize="18"
|
||||
Margin="5"
|
||||
Foreground="{DynamicResource DARKPrimary}" />
|
||||
@ -37,7 +37,7 @@
|
||||
<Grid Grid.Column="1"
|
||||
Margin="15">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="150"/>
|
||||
<ColumnDefinition Width="200"/>
|
||||
<ColumnDefinition Width="15"/>
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
@ -56,10 +56,7 @@
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ComboBox x:Name="detailTypes"
|
||||
Style="{DynamicResource StandardComboBoxStyle}" SelectionChanged="detailTypes_SelectionChanged" />
|
||||
<ToggleButton x:Name="tbtn_star" Grid.Column="1" VerticalAlignment="Bottom" HorizontalAlignment="Right"
|
||||
Content="" FontFamily="remixicon" Style="{DynamicResource TextToggleButtonStyle}" FontSize="24"
|
||||
Margin="6" pu:ToggleButtonHelper.CheckedContent="" Click="tbtn_star_Click"/>
|
||||
Style="{DynamicResource StandardComboBoxStyle}" SelectionChanged="detailTypes_SelectionChanged" />
|
||||
</Grid>
|
||||
<Image x:Name="WorkViewImage"
|
||||
RenderOptions.BitmapScalingMode="HighQuality"
|
||||
@ -77,6 +74,10 @@
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<ToggleButton x:Name="tbtn_star" VerticalAlignment="Top" HorizontalAlignment="Right"
|
||||
Content="" FontFamily="remixicon" Style="{DynamicResource TextToggleButtonStyle}"
|
||||
FontSize="24" Margin="6" pu:ToggleButtonHelper.CheckedContent=""
|
||||
Click="tbtn_star_Click" Grid.Column="4" Grid.RowSpan="3" Grid.ColumnSpan="4" />
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
@ -91,11 +92,12 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="75" />
|
||||
<ColumnDefinition Width="70" />
|
||||
<ColumnDefinition Width="15" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock x:Name="tbGain" VerticalAlignment="Bottom" Foreground="{DynamicResource PrimaryDarker}"
|
||||
FontSize="{Binding FontSize, Converter={x:Static pu:Converters.DoublePlusConverter}, ConverterParameter=6, Source={x:Static pu:GlobalSettings.Setting}}">$金钱</TextBlock>
|
||||
<TextBlock x:Name="tbSpeed" Grid.Column="2" VerticalAlignment="Bottom" Foreground="{DynamicResource PrimaryDarker}" Text="+ 4/t"/>
|
||||
@ -117,8 +119,8 @@
|
||||
<TextBlock Grid.Row="8">倍率调整</TextBlock>
|
||||
<TextBlock x:Name="tbRatio" Grid.Row="8" Grid.Column="2" Foreground="{DynamicResource PrimaryDarker}" Text="x2"/>
|
||||
<Slider x:Name="wDouble" pu:SliderHelper.ThumbWidth="10" pu:SliderHelper.ThumbCornerRadius="2" pu:SliderHelper.ThumbHeight="16" pu:SliderHelper.ThumbBorderThickness="2"
|
||||
Grid.Row="9" Grid.Column="2" Grid.ColumnSpan="2"
|
||||
SmallChange="1" Value="1" Minimum="1" IsEnabled="False" TickFrequency="1" IsSnapToTickEnabled="True"
|
||||
Grid.Row="9"
|
||||
Grid.Column="0" Grid.ColumnSpan="4" SmallChange="1" Value="1" Minimum="1" IsEnabled="False" TickFrequency="1" IsSnapToTickEnabled="True"
|
||||
ValueChanged="wDouble_ValueChanged" LargeChange="1" Style="{DynamicResource StandardSliderStyle}" TickPlacement="Both" />
|
||||
</Grid>
|
||||
<Button x:Name="btnStart"
|
||||
|
@ -2,6 +2,7 @@
|
||||
using Panuon.WPF.UI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@ -29,10 +30,10 @@ public partial class winWorkMenu : WindowX
|
||||
List<Work> ss;
|
||||
List<Work> ps;
|
||||
|
||||
private readonly List<string> _workDetails = new List<string>();
|
||||
private readonly List<string> _studyDetails = new List<string>();
|
||||
private readonly List<string> _playDetails = new List<string>();
|
||||
private readonly List<string> _starDetails = new List<string>();
|
||||
private readonly ObservableCollection<string> _workDetails = new ObservableCollection<string>();
|
||||
private readonly ObservableCollection<string> _studyDetails = new ObservableCollection<string>();
|
||||
private readonly ObservableCollection<string> _playDetails = new ObservableCollection<string>();
|
||||
private readonly ObservableCollection<string> _starDetails = new ObservableCollection<string>();
|
||||
|
||||
public void ShowImageDefault(Work.WorkType type)
|
||||
{
|
||||
@ -74,6 +75,7 @@ public partial class winWorkMenu : WindowX
|
||||
}
|
||||
LsbCategory.SelectedIndex = (int)type;
|
||||
ShowImageDefault(type);
|
||||
AllowChange = true;
|
||||
}
|
||||
public bool IsWorkStar(Work work) => mw.Set["work_star"].GetBool(work.Name);
|
||||
public void SetWorkStar(Work work, bool setvalue) => mw.Set["work_star"].SetBool(work.Name, setvalue);
|
||||
@ -114,7 +116,7 @@ public partial class winWorkMenu : WindowX
|
||||
public void ShowWork(Work work)
|
||||
{
|
||||
nowworkdisplay = work;
|
||||
|
||||
|
||||
//显示图像
|
||||
string source = mw.ImageSources.FindSource("work_" + mw.Set.PetGraph + "_" + work.Graph) ?? mw.ImageSources.FindSource("work_" + mw.Set.PetGraph + "_" + work.Name);
|
||||
if (source == null)
|
||||
@ -127,9 +129,9 @@ public partial class winWorkMenu : WindowX
|
||||
WorkViewImage.Source = Interface.ImageResources.NewSafeBitmapImage(source);
|
||||
}
|
||||
if (work.Type == Work.WorkType.Work)
|
||||
tbGain.Text = $"${"金钱".Translate()}";
|
||||
tbGain.Text = "金钱".Translate();
|
||||
else
|
||||
tbGain.Text = $"Exp{"经验".Translate()}";
|
||||
tbGain.Text = "经验".Translate();
|
||||
tbSpeed.Text = "+" + work.Get().ToString("f2");
|
||||
tbFood.Text = "-" + work.StrengthFood.ToString("f2");
|
||||
tbDrink.Text = "-" + work.StrengthDrink.ToString("f2");
|
||||
@ -148,9 +150,9 @@ public partial class winWorkMenu : WindowX
|
||||
{
|
||||
Dispatcher.BeginInvoke(() =>
|
||||
{
|
||||
ShowImageDefault((Work.WorkType)LsbCategory.SelectedIndex);
|
||||
tbtn_star.Visibility = Visibility.Visible;
|
||||
var lastIndex = detailTypes.SelectedIndex;
|
||||
if (LsbCategory.SelectedIndex != 3)
|
||||
ShowImageDefault((Work.WorkType)LsbCategory.SelectedIndex);
|
||||
switch (LsbCategory.SelectedIndex)
|
||||
{
|
||||
case 0:
|
||||
@ -166,20 +168,19 @@ public partial class winWorkMenu : WindowX
|
||||
btnStart.Content = "开始玩耍".Translate();
|
||||
break;
|
||||
case 3:
|
||||
tbtn_star.Visibility = Visibility.Collapsed;
|
||||
detailTypes.ItemsSource = _starDetails;
|
||||
btnStart.Content = "开始工作".Translate();
|
||||
break;
|
||||
}
|
||||
if(detailTypes.SelectedIndex == -1)
|
||||
{
|
||||
detailTypes.SelectedIndex = 0;
|
||||
}
|
||||
else if(detailTypes.SelectedIndex == lastIndex)
|
||||
{
|
||||
detailTypes_SelectionChanged(null, null);
|
||||
}
|
||||
}, System.Windows.Threading.DispatcherPriority.Loaded);
|
||||
//if (detailTypes.SelectedIndex == -1)
|
||||
//{
|
||||
// detailTypes.SelectedIndex = 0;
|
||||
//}
|
||||
//else if (detailTypes.SelectedIndex == lastIndex)
|
||||
//{
|
||||
detailTypes_SelectionChanged(null, null);
|
||||
//}
|
||||
}, DispatcherPriority.Loaded);
|
||||
}
|
||||
|
||||
private void wDouble_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
|
||||
@ -225,7 +226,7 @@ public partial class winWorkMenu : WindowX
|
||||
break;
|
||||
}
|
||||
ShowWork();
|
||||
}, System.Windows.Threading.DispatcherPriority.Loaded);
|
||||
}, DispatcherPriority.Loaded);
|
||||
}
|
||||
|
||||
private void Window_Closed(object sender, EventArgs e)
|
||||
@ -244,6 +245,8 @@ public partial class winWorkMenu : WindowX
|
||||
|
||||
private void tbtn_star_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (nowwork == null)
|
||||
return;
|
||||
SetWorkStar(nowwork, tbtn_star.IsChecked == true);
|
||||
AllowChange = false;
|
||||
_starDetails.Clear();
|
||||
@ -252,17 +255,16 @@ public partial class winWorkMenu : WindowX
|
||||
foreach (var v in mw.WorkStar())
|
||||
{
|
||||
_starDetails.Add(v.NameTrans);
|
||||
var mi = new System.Windows.Controls.MenuItem()
|
||||
var mi = new MenuItem()
|
||||
{
|
||||
Header = nowwork.NameTrans
|
||||
Header = v.NameTrans
|
||||
};
|
||||
mi.Click += (s, e) => mw.Main.ToolBar.StartWork(nowwork.Double(mw.Set["workmenu"].GetInt("double_" + nowwork.Name, 1)));
|
||||
mi.Click += (s, e) => mw.Main.ToolBar.StartWork(v.Double(mw.Set["workmenu"].GetInt("double_" + v.Name, 1)));
|
||||
mw.WorkStarMenu.Items.Add(mi);
|
||||
}
|
||||
if(detailTypes.ItemsSource == _starDetails
|
||||
&& detailTypes.SelectedIndex == -1)
|
||||
if (detailTypes.ItemsSource == _starDetails)
|
||||
{
|
||||
detailTypes.SelectedIndex = 0;
|
||||
detailTypes_SelectionChanged(null, null);
|
||||
}
|
||||
AllowChange = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user