Commit eefa87ed by liulongfei

问题修复

parent fa5631f1
...@@ -128,7 +128,7 @@ namespace VIZ.TVP.Golf.Module ...@@ -128,7 +128,7 @@ namespace VIZ.TVP.Golf.Module
item["HOLENUMBER"] = hole.HoleID.ToString(); item["HOLENUMBER"] = hole.HoleID.ToString();
item["MAP"] = "IMAGE*/MyTestProject/Scenes/map1-01"; item["MAP"] = "IMAGE*/MyTestProject/Scenes/map1-01";
item["PAR"] = $"PAR {hole.Par}"; item["PAR"] = $"PAR {hole.Par}";
item["HL.active"] = this.HolePickerPanelModel.SelectedHoleInfo.HoleID == hole.HoleID ? "1" : "0"; item["1.active"] = this.HolePickerPanelModel.SelectedHoleInfo.HoleID == hole.HoleID ? "1" : "0";
md_itms.Add(item); md_itms.Add(item);
} }
......
...@@ -82,43 +82,6 @@ ...@@ -82,43 +82,6 @@
</DataGrid> </DataGrid>
</Grid> </Grid>
</GroupBox> </GroupBox>
<!-- 总杆数汇总 -->
<!--<GroupBox Padding="10" Grid.Row="2" Visibility="Collapsed">
<GroupBox.Header>
<TextBlock Text="总杆数汇总" FontSize="18" FontWeight="Bold"></TextBlock>
</GroupBox.Header>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
-->
<!-- 前9洞 -->
<!--
<fcommon:LabelValue Style="{StaticResource LabelValue_Default}" LabelWidth="60"
Label="前9洞:" Text="{Binding Path=FirstHoleStrokes,Mode=TwoWay}"></fcommon:LabelValue>
-->
<!-- 后9洞 -->
<!--
<fcommon:LabelValue Style="{StaticResource LabelValue_Default}" LabelWidth="60"
Label="后9洞:" Text="{Binding Path=SecendHoleStrokes,Mode=TwoWay}" Grid.Column="1"></fcommon:LabelValue>
-->
<!-- 总计 -->
<!--
<fcommon:LabelValue Style="{StaticResource LabelValue_Default}" LabelWidth="60"
Label="总计:" Text="{Binding Path=TotalHoleStrokes,Mode=TwoWay}" Grid.Column="2"></fcommon:LabelValue>
-->
<!-- 计算 -->
<!--
<fcommon:IconButton Style="{StaticResource IconButton_Green}" VerticalAlignment="Center" HorizontalAlignment="Left"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/presets_16x16.png"
Content="汇总计算" Grid.Column="3" Width="80" Height="30" Margin="40,0,0,0"
Command="{Binding SummaryCommand}"></fcommon:IconButton>
</Grid>
</GroupBox>-->
</Grid> </Grid>
</Border> </Border>
<!-- 示意图 --> <!-- 示意图 -->
......
...@@ -136,17 +136,16 @@ namespace VIZ.TVP.Golf.Module ...@@ -136,17 +136,16 @@ namespace VIZ.TVP.Golf.Module
// 当前标准杆 // 当前标准杆
dic["HOLENUM"] = new VizControlObjectsStringValue((this.SelectedHoleInfo.Par - 3).ToString()); dic["HOLENUM"] = new VizControlObjectsStringValue((this.SelectedHoleInfo.Par - 3).ToString());
// 当前杆高亮 // 当前杆高亮
dic["HL1"] = new VizControlObjectsStringValue("0"); dic["HL1.active"] = new VizControlObjectsStringValue("0");
dic["HL2"] = new VizControlObjectsStringValue("0"); dic["HL2.active"] = new VizControlObjectsStringValue("0");
dic["HL3"] = new VizControlObjectsStringValue("0"); dic["HL3.active"] = new VizControlObjectsStringValue("0");
dic["HL4"] = new VizControlObjectsStringValue("0"); dic["HL4.active"] = new VizControlObjectsStringValue("0");
dic["HL5"] = new VizControlObjectsStringValue("0"); dic["HL5.active"] = new VizControlObjectsStringValue("0");
if (this.SelectedCurrentStroke >= 1 && this.SelectedCurrentStroke <= 5) if (this.SelectedCurrentStroke >= 1 && this.SelectedCurrentStroke <= 5)
{ {
dic[$"HL{this.SelectedCurrentStroke}"] = new VizControlObjectsStringValue("1"); dic[$"HL{this.SelectedCurrentStroke}.active"] = new VizControlObjectsStringValue("1");
} }
// 队伍图标 // 队伍图标
PlayerInfoModel info_player = ApplicationDomainEx.PlayerInfos.FirstOrDefault(p => p.PlayerID == this.GroupPickerPanelModel.Player1.PlayerID); PlayerInfoModel info_player = ApplicationDomainEx.PlayerInfos.FirstOrDefault(p => p.PlayerID == this.GroupPickerPanelModel.Player1.PlayerID);
dic["LOGO"] = new VizControlObjectsStringValue(this.resourceService.GetImageName(ResourceType.SHOOL, info_player.TeamInfoModel.Logo)); dic["LOGO"] = new VizControlObjectsStringValue(this.resourceService.GetImageName(ResourceType.SHOOL, info_player.TeamInfoModel.Logo));
......
...@@ -135,6 +135,37 @@ ...@@ -135,6 +135,37 @@
</DataGrid.Columns> </DataGrid.Columns>
</DataGrid> </DataGrid>
</GroupBox> </GroupBox>
<GroupBox Header="当前洞信息" Grid.Row="1" Grid.Column="2" Padding="10" Margin="5,0,0,0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40"></RowDefinition>
<RowDefinition Height="40"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<!-- 当前洞号 -->
<TextBlock Text="当前洞号:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,5,0"></TextBlock>
<ComboBox Grid.Column="1" Height="30" Margin="5,0,5,0" VerticalContentAlignment="Center"
SelectedValue="{Binding Path=SelectedHoleInfo,Mode=TwoWay}" DisplayMemberPath="HoleID"
ItemsSource="{Binding Source={x:Static domain:ApplicationDomainEx.HoleInfos}}"></ComboBox>
<!-- 当前第几杆 -->
<TextBlock Text="当前第几杆:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,5,0" Grid.Row="1"></TextBlock>
<ComboBox Height="30" VerticalContentAlignment="Center" Grid.Column="3"
Margin="5,0,5,0" Grid.Row="1"
SelectedValue="{Binding Path=SelectedCurrentStroke,Mode=TwoWay}"
ItemsSource="{Binding SelectedHoleInfo.ParItems}">
<ComboBox.ItemTemplate>
<DataTemplate>
<Border Height="20">
<TextBlock Text="{Binding .}" VerticalAlignment="Center"></TextBlock>
</Border>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
</GroupBox>
</Grid> </Grid>
</GroupBox> </GroupBox>
</Grid> </Grid>
......
...@@ -82,6 +82,34 @@ namespace VIZ.TVP.Golf.Module ...@@ -82,6 +82,34 @@ namespace VIZ.TVP.Golf.Module
#endregion #endregion
#region SelectedHoleInfo -- 当前选中的洞信息
private HoleInfoModel selectedHoleInfo;
/// <summary>
/// 当前选中的洞信息
/// </summary>
public HoleInfoModel SelectedHoleInfo
{
get { return selectedHoleInfo; }
set { selectedHoleInfo = value; this.RaisePropertyChanged(nameof(SelectedHoleInfo)); }
}
#endregion
#region SelectedCurrentStroke -- 选中的当前杆
private int? selectedCurrentStroke;
/// <summary>
/// 选中的当前杆
/// </summary>
public int? SelectedCurrentStroke
{
get { return selectedCurrentStroke; }
set { selectedCurrentStroke = value; this.RaisePropertyChanged(nameof(SelectedCurrentStroke)); }
}
#endregion
// =================================================================================== // ===================================================================================
// Command // Command
// =================================================================================== // ===================================================================================
...@@ -181,6 +209,24 @@ namespace VIZ.TVP.Golf.Module ...@@ -181,6 +209,24 @@ namespace VIZ.TVP.Golf.Module
// 填充展开数据 // 填充展开数据
Dictionary<string, IVizControlObjctsValue> dic = new Dictionary<string, IVizControlObjctsValue>(); Dictionary<string, IVizControlObjctsValue> dic = new Dictionary<string, IVizControlObjctsValue>();
// 当前第几洞
dic["DONGNUMBER"] = new VizControlObjectsStringValue(this.SelectedHoleInfo?.HoleID.ToString());
// 当前第几洞的标准杆
dic["HOLEDATA1"] = new VizControlObjectsStringValue((this.SelectedHoleInfo?.Par - 3).ToString());
// 当前第几洞高亮
dic["1.active"] = new VizControlObjectsStringValue("0");
dic["2.active"] = new VizControlObjectsStringValue("0");
dic["3.active"] = new VizControlObjectsStringValue("0");
dic["4.active"] = new VizControlObjectsStringValue("0");
dic["5.active"] = new VizControlObjectsStringValue("0");
if (this.SelectedCurrentStroke >= 1 && this.SelectedCurrentStroke <= 5)
{
dic[$"{this.SelectedCurrentStroke}.active"] = new VizControlObjectsStringValue("1");
}
// 排名
dic["NUMBER"] = new VizControlObjectsStringValue(this.SelectedGroupTempModel.Position);
// 得分
dic["SCORE"] = new VizControlObjectsStringValue(this.SelectedGroupTempModel.PlayersScore);
// 第一排数据 // 第一排数据
dic["SCORE1"] = this.GetGroupHoleRowData(1, 9); dic["SCORE1"] = this.GetGroupHoleRowData(1, 9);
// 第二排数据 // 第二排数据
...@@ -218,7 +264,6 @@ namespace VIZ.TVP.Golf.Module ...@@ -218,7 +264,6 @@ namespace VIZ.TVP.Golf.Module
// 杆数 // 杆数
item["SCORE"] = string.Empty; item["SCORE"] = string.Empty;
if (holeInfo != null && this.SelectedGroupTempModel != null && this.SelectedGroupTempModel.GroupHoleTempModels != null) if (holeInfo != null && this.SelectedGroupTempModel != null && this.SelectedGroupTempModel.GroupHoleTempModels != null)
{ {
GroupHoleTempModel temp_hole = this.SelectedGroupTempModel.GroupHoleTempModels.FirstOrDefault(p => p.HoleID == i.ToString()); GroupHoleTempModel temp_hole = this.SelectedGroupTempModel.GroupHoleTempModels.FirstOrDefault(p => p.HoleID == i.ToString());
......
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