工作表 未完成

This commit is contained in:
ZouJin 2024-05-19 02:51:38 +08:00
parent dfc799663c
commit 470c0d4361
2 changed files with 183 additions and 122 deletions

View File

@ -8,7 +8,8 @@
Style="{DynamicResource BaseWindowXStyle}" Background="{DynamicResource PrimaryLighter}" Width="650" Style="{DynamicResource BaseWindowXStyle}" Background="{DynamicResource PrimaryLighter}" Width="650"
ResizeMode="CanMinimize" Closed="Window_Closed"> ResizeMode="CanMinimize" Closed="Window_Closed">
<pu:WindowX.Resources> <pu:WindowX.Resources>
<Style x:Key="IconButtonStyle" TargetType="Button" BasedOn="{StaticResource {x:Static pu:StyleKeys.ButtonStyle}}"> <Style x:Key="IconButtonStyle" TargetType="Button"
BasedOn="{StaticResource {x:Static pu:StyleKeys.ButtonStyle}}">
<Setter Property="Background" Value="Transparent" /> <Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="#BABABA" /> <Setter Property="Foreground" Value="#BABABA" />
<Setter Property="FontFamily" Value="{StaticResource RemixIcon}" /> <Setter Property="FontFamily" Value="{StaticResource RemixIcon}" />
@ -41,7 +42,7 @@
</ListBox> </ListBox>
</StackPanel> </StackPanel>
<Grid Grid.Column="1" Margin="15"> <Grid Grid.Column="1" Margin="15">
<Grid x:Name="gdWork"> <Grid x:Name="gdWork" d:Visibility="Collapsed">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition /> <ColumnDefinition />
<ColumnDefinition Width="15" /> <ColumnDefinition Width="15" />
@ -55,7 +56,8 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Text="{ll:Str 工作内容}" <TextBlock Text="{ll:Str 工作内容}"
FontSize="{Binding FontSize, Source={x:Static pu:GlobalSettings.Setting}}" /> FontSize="{Binding FontSize, Source={x:Static pu:GlobalSettings.Setting}}" />
<ComboBox x:Name="detailTypes" Grid.Row="1" Margin="0,3,0,0" Style="{DynamicResource StandardComboBoxStyle}" <ComboBox x:Name="detailTypes" Grid.Row="1" Margin="0,3,0,0"
Style="{DynamicResource StandardComboBoxStyle}"
SelectionChanged="detailTypes_SelectionChanged" /> SelectionChanged="detailTypes_SelectionChanged" />
<Image x:Name="WorkViewImage" RenderOptions.BitmapScalingMode="HighQuality" Grid.Row="2" <Image x:Name="WorkViewImage" RenderOptions.BitmapScalingMode="HighQuality" Grid.Row="2"
Margin="-20,0" Stretch="Uniform" Source="/Res/img/r_singlemoney_1.png" /> Margin="-20,0" Stretch="Uniform" Source="/Res/img/r_singlemoney_1.png" />
@ -142,11 +144,12 @@
</Grid> </Grid>
<Grid x:Name="gdSchedule"> <Grid x:Name="gdSchedule">
<TabControl pu:TabControlHelper.ItemsCornerRadius="4" pu:TabControlHelper.ItemsHeight="NaN" <TabControl pu:TabControlHelper.ItemsCornerRadius="4" pu:TabControlHelper.ItemsHeight="NaN"
pu:TabControlHelper.ItemsHoverBackground="{DynamicResource PrimaryLight}" pu:TabControlHelper.ItemsHoverBackground="{DynamicResource PrimaryLight}"
pu:TabControlHelper.ItemsPadding="10,7" pu:TabControlHelper.ItemsPadding="10,7"
pu:TabControlHelper.ItemsSelectedBackground="{DynamicResource PrimaryDark}" pu:TabControlHelper.ItemsSelectedBackground="{DynamicResource PrimaryDark}"
pu:TabControlHelper.ItemsSelectedForeground="{DynamicResource DARKPrimaryText}" Background="Transparent" pu:TabControlHelper.ItemsSelectedForeground="{DynamicResource DARKPrimaryText}"
BorderThickness="0" Foreground="{DynamicResource PrimaryText}" SelectedIndex="0"> Background="Transparent" BorderThickness="0" Foreground="{DynamicResource PrimaryText}"
SelectedIndex="0">
<TabItem Header="机构签署"> <TabItem Header="机构签署">
<Grid Margin="7"> <Grid Margin="7">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@ -162,23 +165,30 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<UniformGrid Columns="2"> <UniformGrid Columns="2">
<UniformGrid.Resources> <UniformGrid.Resources>
<Style TargetType="ToggleButton" BasedOn="{StaticResource {x:Static pu:StyleKeys.ToggleButtonStyle}}"> <Style TargetType="ToggleButton"
BasedOn="{StaticResource {x:Static pu:StyleKeys.ToggleButtonStyle}}">
<Setter Property="Padding" Value="0,3" /> <Setter Property="Padding" Value="0,3" />
<Setter Property="Background" Value="Transparent" /> <Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="{DynamicResource PrimaryText}" /> <Setter Property="Foreground" Value="{DynamicResource PrimaryText}" />
<Setter Property="BorderBrush" Value="{DynamicResource DARKPrimary}" /> <Setter Property="BorderBrush" Value="{DynamicResource DARKPrimary}" />
<Setter Property="BorderThickness" Value="1.5" /> <Setter Property="BorderThickness" Value="1.5" />
<Setter Property="pu:ToggleButtonHelper.CheckedBackground" Value="{DynamicResource DARKPrimary}" /> <Setter Property="pu:ToggleButtonHelper.CheckedBackground"
<Setter Property="pu:ToggleButtonHelper.CheckedForeground" Value="{DynamicResource DARKPrimaryText}" /> Value="{DynamicResource DARKPrimary}" />
<Setter Property="pu:ToggleButtonHelper.CheckedForeground"
Value="{DynamicResource DARKPrimaryText}" />
</Style> </Style>
</UniformGrid.Resources> </UniformGrid.Resources>
<ToggleButton x:Name="tbtnAgencyJob" pu:ToggleButtonHelper.CornerRadius="4,0,0,4" Content="工作中介" IsChecked="True" <ToggleButton x:Name="tbtnAgencyJob"
Checked="tbtn_Agency_CheckChanged" PreviewMouseLeftButtonDown="tbtnAgency_PreviewMouseLeftButtonDown"/> pu:ToggleButtonHelper.CornerRadius="4,0,0,4" Content="工作中介"
<ToggleButton x:Name="tbtnAgencyTraning" pu:ToggleButtonHelper.CornerRadius="0,4,4,0" Content="培训机构" IsChecked="True" Checked="tbtn_Agency_CheckChanged"
Checked="tbtn_Agency_CheckChanged" PreviewMouseLeftButtonDown="tbtnAgency_PreviewMouseLeftButtonDown"/> PreviewMouseLeftButtonDown="tbtnAgency_PreviewMouseLeftButtonDown" />
<ToggleButton x:Name="tbtnAgencyTraning"
pu:ToggleButtonHelper.CornerRadius="0,4,4,0" Content="培训机构"
Checked="tbtn_Agency_CheckChanged"
PreviewMouseLeftButtonDown="tbtnAgency_PreviewMouseLeftButtonDown" />
</UniformGrid> </UniformGrid>
<Image x:Name="imgAgency" RenderOptions.BitmapScalingMode="HighQuality" Grid.Row="2" <Image x:Name="imgAgency" RenderOptions.BitmapScalingMode="HighQuality" Grid.Row="2"
Margin="-20,0" Stretch="Uniform" Source="/Res/img/r_agency_job.png" /> Margin="-20,0" Stretch="Uniform" Source="/Res/img/r_agency_job.png" />
</Grid> </Grid>
<Border Grid.Column="2" Background="White" CornerRadius="4" /> <Border Grid.Column="2" Background="White" CornerRadius="4" />
<Grid Grid.Column="2" Margin="15"> <Grid Grid.Column="2" Margin="15">
@ -191,45 +201,53 @@
<RowDefinition /> <RowDefinition />
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<ComboBox Margin="0,3,0,0" Style="{DynamicResource StandardComboBoxStyle}" <ComboBox x:Name="combTaskType" Margin="0,3,0,0"
pu:ComboBoxHelper.Watermark="--请选择套餐--" SelectionChanged="detailTypes_SelectionChanged" /> Style="{DynamicResource StandardComboBoxStyle}"
<TextBlock Grid.Row="1" Margin="0,7,0,0" VerticalAlignment="Bottom" Text="{ll:Str 选择等级}"/> pu:ComboBoxHelper.Watermark="--请选择套餐--" />
<TextBlock Grid.Row="1" Margin="0,7,0,0" FontSize="16" HorizontalAlignment="Right" Foreground="{DynamicResource DARKPrimary}" > <TextBlock Grid.Row="1" Margin="0,7,0,0" VerticalAlignment="Bottom"
<Run Text="Lv."/> Text="{ll:Str 选择等级}" />
<Run Text="50"/> <TextBlock Grid.Row="1" Margin="0,7,0,0" FontSize="16" HorizontalAlignment="Right"
Foreground="{DynamicResource DARKPrimary}">
<Run Text="Lv." />
<Run Text="50" />
</TextBlock> </TextBlock>
<Slider Grid.Row="2" pu:SliderHelper.ThumbWidth="10" <Slider Grid.Row="2" pu:SliderHelper.ThumbWidth="10"
pu:SliderHelper.ThumbCornerRadius="2" pu:SliderHelper.ThumbHeight="16" pu:SliderHelper.ThumbCornerRadius="2" pu:SliderHelper.ThumbHeight="16"
pu:SliderHelper.ThumbBorderThickness="2" SmallChange="1" Value="1" Minimum="1" pu:SliderHelper.ThumbBorderThickness="2" SmallChange="1" Value="1"
TickFrequency="1" IsSnapToTickEnabled="True" ValueChanged="wDouble_ValueChanged" Minimum="1" TickFrequency="1" IsSnapToTickEnabled="True" LargeChange="1"
LargeChange="1" Style="{DynamicResource StandardSliderStyle}" TickPlacement="Both"></Slider> Style="{DynamicResource StandardSliderStyle}" TickPlacement="Both"></Slider>
<TextBlock Grid.Row="3" Margin="0,7,0,0">
<Run>抽成</Run>
<Run Foreground="{DynamicResource DARKPrimary}" Text="40%" />
<Run>学费</Run>
<Run Foreground="{DynamicResource DARKPrimary}" Text="20%" />
</TextBlock>
<Grid Grid.Row="4" Margin="0,3,0,0"> <Grid Grid.Row="4" Margin="0,3,0,0">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition /> <RowDefinition />
<RowDefinition Height="5" />
<RowDefinition /> <RowDefinition />
<RowDefinition /> <RowDefinition />
<RowDefinition Height="10"/>
<RowDefinition />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
<ColumnDefinition Width="15" /> <ColumnDefinition Width="35" />
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock>办理费用</TextBlock> <TextBlock x:Name="rTaskType">抽成</TextBlock>
<TextBlock Grid.Column="2" HorizontalAlignment="Right" Foreground="{DynamicResource DARKPrimary}" Text="50000" /> <TextBlock Grid.Column="2" HorizontalAlignment="Right"
<TextBlock Grid.Row="1">等级需求</TextBlock> Foreground="{DynamicResource DARKPrimary}" Text="20%" />
<TextBlock Grid.Row="1" Grid.Column="2" HorizontalAlignment="Right" Foreground="{DynamicResource DARKPrimary}" Text="100" /> <TextBlock Grid.Row="5" Text="{ll:Str '办理费用'}" />
<TextBlock Grid.Row="2">合同持续时间</TextBlock> <TextBlock Grid.Row="5" Grid.Column="2" HorizontalAlignment="Right"
<TextBlock Grid.Row="2" Grid.Column="2" HorizontalAlignment="Right" Foreground="{DynamicResource DARKPrimary}" Text="1周" /> Foreground="{DynamicResource DARKPrimary}" Text="100000"
FontWeight="Bold" FontSize="16" />
<TextBlock Grid.Row="2" Text="{ll:Str '等级需求'}" />
<TextBlock Grid.Row="3" Text="{ll:Str '合同持续时间'}" />
<TextBlock Grid.Row="2" Grid.Column="2" HorizontalAlignment="Right"
Foreground="{DynamicResource DARKPrimary}" Text="Lv 100" />
<TextBlock Grid.Row="3" Grid.Column="2" HorizontalAlignment="Right"
Foreground="{DynamicResource DARKPrimary}" Text="7 天" />
</Grid> </Grid>
<Button x:Name="btnSignAgency" Grid.Row="6" Height="30" Content="{ll:Str 签署}" <Button x:Name="btnSignAgency" Grid.Row="6" Height="30" Content="{ll:Str 签署}"
Style="{DynamicResource ThemedButtonStyle}" Background="{DynamicResource PrimaryDarker}" Style="{DynamicResource ThemedButtonStyle}"
Click="btnSignAgency_Click" FontSize="16" FontWeight="Bold" /> Background="{DynamicResource PrimaryDarker}" Click="btnSignAgency_Click"
FontSize="16" FontWeight="Bold" />
</Grid> </Grid>
</Grid> </Grid>
</TabItem> </TabItem>
@ -237,11 +255,10 @@
<Grid Margin="3"> <Grid Margin="3">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition /> <ColumnDefinition />
<ColumnDefinition Width="140"/> <ColumnDefinition Width="140" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid Margin="0,0,15,0"> <Grid Margin="0,0,15,0">
<Border Background="White" <Border Background="White" CornerRadius="4" />
CornerRadius="4" />
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
@ -251,100 +268,135 @@
<ScrollViewer Grid.Row="1"> <ScrollViewer Grid.Row="1">
<StackPanel Margin="20,7,7,7"> <StackPanel Margin="20,7,7,7">
<ItemsControl x:Name="icSchedule" <ItemsControl x:Name="icSchedule"
ItemTemplateSelector="{StaticResource ScheduleItemTemplateSelector}"> ItemTemplateSelector="{StaticResource ScheduleItemTemplateSelector}">
<ItemsControl.Resources> <ItemsControl.Resources>
<DataTemplate x:Key="WorkScheduleTemplate"> <DataTemplate x:Key="WorkScheduleTemplate">
<StackPanel> <StackPanel>
<Button Margin="-20,-5,0,-5" HorizontalAlignment="Left" Visibility="{Binding IsPreviousIsRest, Converter={x:Static pu:Converters.TrueToCollapseConverter}}" <Button Margin="-20,-5,0,-5" HorizontalAlignment="Left"
Style="{DynamicResource IconButtonStyle}" ToolTip="{ll:Str 添加休息}" Click="btn_addRest_Click">&#xea11;</Button> Visibility="{Binding IsPreviousIsRest, Converter={x:Static pu:Converters.TrueToCollapseConverter}}"
<Border Height="90" CornerRadius="5" Background="{DynamicResource DARKPrimaryTrans4}"> Style="{DynamicResource IconButtonStyle}"
<Grid> ToolTip="{ll:Str 添加休息}"
<Grid.ColumnDefinitions> Click="btn_addRest_Click">&#xea11;</Button>
<ColumnDefinition Width="120" /> <Border Height="90" CornerRadius="5"
<ColumnDefinition /> Background="{DynamicResource DARKPrimaryTrans4}">
<ColumnDefinition Width="Auto" /> <Grid>
</Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<StackPanel Margin="-15,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center"> <ColumnDefinition Width="120" />
<Button Margin="0,0,0,0" Padding="0" <ColumnDefinition />
Style="{DynamicResource IconButtonStyle}" ToolTip="{ll:Str 上移}" Click="btn_scheduleUp_Click">&#xea76;</Button> <ColumnDefinition Width="Auto" />
<Button Margin="0,0,0,0" Padding="0" </Grid.ColumnDefinitions>
Style="{DynamicResource IconButtonStyle}" ToolTip="{ll:Str 下移}" Click="btn_scheduleDown_Click">&#xea4c;</Button> <StackPanel Margin="-15,0,0,0"
</StackPanel> HorizontalAlignment="Left"
<Image Stretch="Uniform" Source="/Res/img/r_autobuy_3.png" /> VerticalAlignment="Center">
<StackPanel Grid.Column="1" VerticalAlignment="Center"> <Button Margin="0,0,0,0" Padding="0"
<TextBlock>工作内容</TextBlock> Style="{DynamicResource IconButtonStyle}"
<TextBlock FontSize="16" Foreground="{DynamicResource DARKPrimary}" Text="{Binding WorkName}"/> ToolTip="{ll:Str 上移}"
Click="btn_scheduleUp_Click">&#xea76;</Button>
<Button Margin="0,0,0,0" Padding="0"
Style="{DynamicResource IconButtonStyle}"
ToolTip="{ll:Str 下移}"
Click="btn_scheduleDown_Click">&#xea4c;</Button>
</StackPanel>
<Image Stretch="Uniform"
Source="/Res/img/r_autobuy_3.png" />
<StackPanel Grid.Column="1"
VerticalAlignment="Center">
<TextBlock>工作内容</TextBlock>
<TextBlock FontSize="16"
Foreground="{DynamicResource DARKPrimary}"
Text="{Binding WorkName}" />
<TextBlock>持续时间</TextBlock> <TextBlock>持续时间</TextBlock>
<TextBlock FontSize="16" Foreground="{DynamicResource DARKPrimary}"> <TextBlock FontSize="16"
<Run Text="{Binding WorkTime}"/> Foreground="{DynamicResource DARKPrimary}">
<Run Text="{Binding WorkTime}" />
<Run>分钟</Run> <Run>分钟</Run>
</TextBlock> </TextBlock>
</StackPanel> </StackPanel>
<Button Grid.Column="2" HorizontalAlignment="Right" <Button Grid.Column="2"
Background="Transparent" Foreground="{DynamicResource DangerBrush}" FontFamily="{StaticResource RemixIcon}" Click="btn_removeSchedule_Click">&#xeb97;</Button> HorizontalAlignment="Right"
</Grid> Background="Transparent"
</Border> Foreground="{DynamicResource DangerBrush}"
</StackPanel> FontFamily="{StaticResource RemixIcon}"
</DataTemplate> Click="btn_removeSchedule_Click">&#xeb97;</Button>
<DataTemplate x:Key="RestScheduleTemplate"> </Grid>
<Border Margin="0,7,0,7" Height="30" CornerRadius="5" Padding="0,3" Background="#F1F2F3"> </Border>
<Grid> </StackPanel>
<Grid.ColumnDefinitions> </DataTemplate>
<ColumnDefinition /> <DataTemplate x:Key="RestScheduleTemplate">
<ColumnDefinition Width="Auto"/> <Border Margin="0,7,0,7" Height="30" CornerRadius="5"
</Grid.ColumnDefinitions> Padding="0,3" Background="#F1F2F3">
<StackPanel Orientation="Horizontal" <Grid>
Margin="7,0"> <Grid.ColumnDefinitions>
<TextBlock VerticalAlignment="Center">休息</TextBlock> <ColumnDefinition />
<pu:NumberInput Minimum="0" Interval="1" IsSnapToIntervalEnabled="True" <ColumnDefinition Width="Auto" />
Background="Transparent" BorderThickness="0" Foreground="{DynamicResource DARKPrimary}" </Grid.ColumnDefinitions>
FontSize="16" Padding="0" Value="{Binding RestTime, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" ValueChanged="NumberInput_ValueChanged"> <StackPanel Orientation="Horizontal" Margin="7,0">
<TextBlock VerticalAlignment="Center">休息</TextBlock>
<pu:NumberInput Minimum="0" Interval="1"
IsSnapToIntervalEnabled="True"
Background="Transparent"
BorderThickness="0"
Foreground="{DynamicResource DARKPrimary}"
FontSize="16" Padding="0"
Value="{Binding RestTime, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
ValueChanged="NumberInput_ValueChanged">
<pu:NumberInput.UpDownButtonStyle> <pu:NumberInput.UpDownButtonStyle>
<Style TargetType="RepeatButton" BasedOn="{StaticResource {x:Static pu:NumberInput.UpDownButtonStyleKey}}"> <Style TargetType="RepeatButton"
<Setter Property="FontSize" Value="10" /> BasedOn="{StaticResource {x:Static pu:NumberInput.UpDownButtonStyleKey}}">
<Setter Property="FontSize"
Value="10" />
</Style> </Style>
</pu:NumberInput.UpDownButtonStyle> </pu:NumberInput.UpDownButtonStyle>
</pu:NumberInput> </pu:NumberInput>
<TextBlock VerticalAlignment="Center" Foreground="{DynamicResource DARKPrimary}" <TextBlock VerticalAlignment="Center"
FontSize="16">分钟</TextBlock> Foreground="{DynamicResource DARKPrimary}"
</StackPanel> FontSize="16">分钟</TextBlock>
<Button Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Center" </StackPanel>
Background="Transparent" Foreground="{DynamicResource DangerBrush}" <Button Grid.Column="2" HorizontalAlignment="Right"
FontFamily="{StaticResource RemixIcon}" Content="&#xeb97;" Click="btn_removeSchedule_Click"/> VerticalAlignment="Center"
</Grid> Background="Transparent"
</Border> Foreground="{DynamicResource DangerBrush}"
</DataTemplate> FontFamily="{StaticResource RemixIcon}"
</ItemsControl.Resources> Content="&#xeb97;"
Click="btn_removeSchedule_Click" />
</Grid>
</Border>
</DataTemplate>
</ItemsControl.Resources>
</ItemsControl> </ItemsControl>
<Button Margin="-20,-5,0,-5" HorizontalAlignment="Left" <Button Margin="-20,-5,0,-5" HorizontalAlignment="Left"
Style="{DynamicResource IconButtonStyle}" Content="&#xea11;" ToolTip="{ll:Str 添加休息}" Click="btn_addRest_Click"/> Style="{DynamicResource IconButtonStyle}" Content="&#xea11;"
ToolTip="{ll:Str 添加休息}" Click="btn_addRest_Click" />
</StackPanel> </StackPanel>
</ScrollViewer> </ScrollViewer>
</Grid> </Grid>
</Grid> </Grid>
<Grid Grid.Column="1" <Grid Grid.Column="1" Margin="0,7,7,7">
Margin="0,7,7,7">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition /> <RowDefinition />
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Text="合计"/> <TextBlock Text="合计" />
<Grid Grid.Row="1" Margin="0,7,0,0"> <Grid Grid.Row="1" Margin="0,7,0,0">
<pu:RingProgressBar x:Name="rpgbSchedule" Height="{Binding ActualWidth, RelativeSource={RelativeSource Self}}" <pu:RingProgressBar x:Name="rpgbSchedule"
IsPercentVisible="False" FontSize="20" Height="{Binding ActualWidth, RelativeSource={RelativeSource Self}}"
Foreground="{DynamicResource DARKPrimary}" BorderBrush="{DynamicResource DARKPrimaryTrans4}" BorderThickness="2" IsPercentVisible="False" FontSize="20"
Minimum="0" Maximum="100" Value="0" /> Foreground="{DynamicResource DARKPrimary}"
BorderBrush="{DynamicResource DARKPrimaryTrans4}" BorderThickness="2"
Minimum="0" Maximum="100" Value="0" />
<Grid HorizontalAlignment="Center" VerticalAlignment="Center"> <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
<StackPanel> <StackPanel>
<TextBlock Opacity="0.5">工作时间</TextBlock> <TextBlock Opacity="0.5">工作时间</TextBlock>
<TextBlock Foreground="{DynamicResource DARKPrimary}" HorizontalAlignment="Right"> <TextBlock Foreground="{DynamicResource DARKPrimary}"
HorizontalAlignment="Right">
<Run x:Name="runScheduleWork" FontSize="22">0</Run> <Run x:Name="runScheduleWork" FontSize="22">0</Run>
<Run>分钟</Run> <Run>分钟</Run>
</TextBlock> </TextBlock>
<TextBlock Opacity="0.5">休息时间</TextBlock> <TextBlock Opacity="0.5">休息时间</TextBlock>
<TextBlock Foreground="{DynamicResource DARKPrimary}" HorizontalAlignment="Right"> <TextBlock Foreground="{DynamicResource DARKPrimary}"
HorizontalAlignment="Right">
<Run x:Name="runScheduleRest" FontSize="22">0</Run> <Run x:Name="runScheduleRest" FontSize="22">0</Run>
<Run>分钟</Run> <Run>分钟</Run>
</TextBlock> </TextBlock>
@ -352,10 +404,10 @@
</Grid> </Grid>
</Grid> </Grid>
<ToggleButton x:Name="btnStartSchedule" Grid.Row="3" <ToggleButton x:Name="btnStartSchedule" Grid.Row="3"
Style="{DynamicResource ThemedToggleButtonStyle}" Height="30" Content="{ll:Str 开始日程}" Style="{DynamicResource ThemedToggleButtonStyle}" Height="30"
Background="{DynamicResource PrimaryDarker}" FontSize="16" FontWeight="Bold" Content="{ll:Str 开始日程}" Background="{DynamicResource PrimaryDarker}"
Click="btnStartSchedule_Click" /> FontSize="16" FontWeight="Bold" Click="btnStartSchedule_Click" />
</Grid> </Grid>
</Grid> </Grid>
</TabItem> </TabItem>

View File

@ -86,6 +86,11 @@ public partial class winWorkMenu : WindowX
"学习", "学习",
70 70
)); ));
ComboBoxHelper.SetWatermark(detailTypes, "---" + "请选择".Translate() + "---");
ComboBoxHelper.SetWatermark(combTaskType, "---" + "请选择".Translate() + "套餐".Translate() + "---");
} }
public bool IsWorkStar(Work work) => mw.Set["work_star"].GetBool(work.Name); 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); public void SetWorkStar(Work work, bool setvalue) => mw.Set["work_star"].SetBool(work.Name, setvalue);
@ -174,25 +179,29 @@ public partial class winWorkMenu : WindowX
case 0: case 0:
detailTypes.ItemsSource = _workDetails; detailTypes.ItemsSource = _workDetails;
btnStart.Content = "开始工作".Translate(); btnStart.Content = "开始工作".Translate();
ComboBoxHelper.SetWatermark(detailTypes, "---" + "请选择".Translate() + "工作".Translate() + "---");
break; break;
case 1: case 1:
detailTypes.ItemsSource = _studyDetails; detailTypes.ItemsSource = _studyDetails;
btnStart.Content = "开始学习".Translate(); btnStart.Content = "开始学习".Translate();
ComboBoxHelper.SetWatermark(detailTypes, "---" + "请选择".Translate() + "学习".Translate() + "---");
break; break;
case 2: case 2:
detailTypes.ItemsSource = _playDetails; detailTypes.ItemsSource = _playDetails;
btnStart.Content = "开始玩耍".Translate(); btnStart.Content = "开始玩耍".Translate();
ComboBoxHelper.SetWatermark(detailTypes, "---" + "请选择".Translate() + "玩耍".Translate() + "---");
break; break;
case 3: case 3:
detailTypes.ItemsSource = _starDetails; detailTypes.ItemsSource = _starDetails;
btnStart.Content = "开始工作".Translate(); btnStart.Content = "开始工作".Translate();
ComboBoxHelper.SetWatermark(detailTypes, "---" + "请选择".Translate() + "---");
break; break;
case 4: case 4:
gdWork.Visibility = Visibility.Collapsed; gdWork.Visibility = Visibility.Collapsed;
gdSchedule.Visibility = Visibility.Visible; gdSchedule.Visibility = Visibility.Visible;
return; return;
} }
detailTypes.IsDropDownOpen = true; //detailTypes.IsDropDownOpen = true;
detailTypes_SelectionChanged(null, null); detailTypes_SelectionChanged(null, null);
}, DispatcherPriority.Loaded); }, DispatcherPriority.Loaded);
} }
@ -364,7 +373,7 @@ public partial class winWorkMenu : WindowX
var scheduleItem = button.DataContext as ScheduleItemBase; var scheduleItem = button.DataContext as ScheduleItemBase;
if (scheduleItem == null) if (scheduleItem == null)
{ {
if(_schedules.LastOrDefault() is RestScheduleItem lastRest) if (_schedules.LastOrDefault() is RestScheduleItem lastRest)
{ {
lastRest.RestTime += 30; lastRest.RestTime += 30;
} }
@ -402,7 +411,7 @@ public partial class winWorkMenu : WindowX
var button = sender as Button; var button = sender as Button;
var scheduleItem = button.DataContext as ScheduleItemBase; var scheduleItem = button.DataContext as ScheduleItemBase;
var index = _schedules.IndexOf(scheduleItem); var index = _schedules.IndexOf(scheduleItem);
if(index == 0) if (index == 0)
{ {
return; return;
} }
@ -496,11 +505,11 @@ internal class ScheduleItemTemplateSelector
{ {
var element = container as FrameworkElement; var element = container as FrameworkElement;
if(item is WorkScheduleItem workItem) if (item is WorkScheduleItem workItem)
{ {
return element.FindResource("WorkScheduleTemplate") as DataTemplate; return element.FindResource("WorkScheduleTemplate") as DataTemplate;
} }
else if(item is RestScheduleItem restItem) else if (item is RestScheduleItem restItem)
{ {
return element.FindResource("RestScheduleTemplate") as DataTemplate; return element.FindResource("RestScheduleTemplate") as DataTemplate;
} }