Commit dedf11ed by wangonghui

修改组件

parent 8f8fe650
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using System.Windows.Markup;
namespace VIZ.TVP.CBA.Module
{
public class DecimalToConverter : MarkupExtension, IValueConverter
{
object IValueConverter.Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
Type target = parameter as Type;
if (target == null)
return value;
return System.Convert.ChangeType(value, target, culture);
}
object IValueConverter.ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return System.Convert.ToDecimal(value);
}
public override object ProvideValue(IServiceProvider serviceProvider)
{
return this;
}
}
}
......@@ -8,6 +8,8 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:core="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
xmlns:storage="clr-namespace:VIZ.TVP.CBA.Module"
mc:Ignorable="d"
......@@ -15,12 +17,13 @@
<UserControl.Resources>
<!--<local:DemoDataProvider x:Key="DemoDataProvider" />-->
<storage:DecimalToConverter x:Key="decimalConverter" />
<DataTemplate x:Key="clipTemplate">
<Grid Width="7" Height="15" ToolTipService.ToolTip="{Binding}" Background="Transparent">
<!--<Grid Width="7" Height="15" ToolTipService.ToolTip="{Binding}" Background="Transparent">
<Path Stretch="Fill"
Fill="#FF000000"
Data="F1 M 1222.51,786C 1220.9,786.008 1219.72,785.446 1219,784.57C 1218.27,783.699 1218.01,782.58 1218.01,781.501L 1218,771.999L 1219,771.999L 1219.01,781.501C 1219.07,783.357 1219.78,784.96 1222.51,785.001C 1225.24,784.96 1225.95,783.357 1226.01,781.501L 1226,770.502C 1225.93,768.68 1225.32,768.077 1223.5,768C 1221.68,768.077 1221.07,768.68 1221,770.502L 1221,775.502C 1221,775.996 1221.01,776.692 1221.21,777.189C 1221.44,777.682 1221.68,777.976 1222.5,778.001C 1223.32,777.976 1223.56,777.682 1223.79,777.189C 1223.99,776.692 1224,775.996 1224,775.502L 1224,773.126C 1224,772.25 1224,771.999 1224,771.999L 1225,771.999C 1225,771.999 1225,774.5 1225,775.502C 1225,776.005 1225.01,776.81 1224.71,777.562C 1224.44,778.32 1223.68,779.026 1222.5,779C 1221.32,779.026 1220.56,778.32 1220.29,777.562C 1219.99,776.81 1220,776.005 1220,775.502C 1220,774.5 1220,772.502 1220,770.502C 1220,769.424 1220.27,768.521 1220.9,767.897C 1221.52,767.275 1222.42,766.999 1223.5,767.001C 1224.58,766.999 1225.48,767.275 1226.1,767.897C 1226.73,768.521 1227,769.424 1227,770.502L 1227.01,781.501C 1227.01,782.58 1226.74,783.699 1226.02,784.57C 1225.3,785.439 1224.13,786 1222.54,786L 1222.51,786 Z " />
</Grid>
</Grid>-->
</DataTemplate>
<ControlTemplate x:Key="ActiveDisplayTemplateScore">
......@@ -59,7 +62,7 @@
<Border Background="Transparent">
<dxe:ProgressBarEdit EditMode="InplaceInactive"
Minimum="0"
Maximum="{Binding Path=TotalBlocks}"
Maximum="{Binding TotalBlocks,ElementName=editor, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay, Converter={StaticResource decimalConverter}, ConverterParameter={x:Type sys:Double}}"
EditValue="{Binding EditValue, RelativeSource={RelativeSource TemplatedParent}}"
ContentDisplayMode="Value" />
</Border>
......@@ -304,7 +307,7 @@
<dxg:GridColumn FieldName="ShootingGoalP" Header="投篮命中率" Width="*" />
<dxg:GridColumn FieldName="Steals" Header="抢断" Width="*" />
<dxg:GridColumn FieldName="Blocks" Header="盖帽" Width="*" />
<dxg:GridColumn FieldName="TwoShootingGoalP" Header="两分命中率" Width="*" />
......@@ -324,7 +327,7 @@
ShowFilterPanelMode="Never"
AllowColumnFiltering="False"
AllowSorting="False"
AllowEditing="False"
AllowEditing="True"
IsColumnMenuEnabled="False" >
</dxg:TableView>
</dxg:GridControl.View>
......
......@@ -115,6 +115,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Common\AppConfigUtil.cs" />
<Compile Include="Common\DecimalToConverter.cs" />
<Compile Include="Common\JsonHelper.cs" />
<Compile Include="Common\JsonModel.cs" />
<Compile Include="Common\PluginConstant.cs" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment