Commit 7632bd5c by liulongfei

资源调整

parent 186b5415
...@@ -54,21 +54,46 @@ ...@@ -54,21 +54,46 @@
</Border> </Border>
<!-- 示意图 --> <!-- 示意图 -->
<Border Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5"> <Border Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5">
<Grid> <ScrollViewer VerticalScrollBarVisibility="Auto">
<Grid.RowDefinitions> <StackPanel>
<RowDefinition Height="300"></RowDefinition> <GroupBox Padding="10">
<RowDefinition Height="80"></RowDefinition> <GroupBox.Header>
</Grid.RowDefinitions> <TextBlock Text="右侧洞信息版" FontSize="18" FontWeight="Bold"></TextBlock>
<Image Source="pack://SiteOfOrigin:,,,/images/BottomHoleInfo.jpg" /> </GroupBox.Header>
<StackPanel Orientation="Horizontal" Grid.Row="1"> <StackPanel>
<Image Source="pack://SiteOfOrigin:,,,/images/hole_info.jpg" Height="300" />
<StackPanel Orientation="Horizontal" Margin="0,10,0,10">
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0" <fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png" Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png"
Content="上版子" Command="{Binding StartCommand}"></fcommon:IconButton> Content="上版子"
Command="{Binding StartCommand}"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0" <fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png" Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png"
Content="下版子" Command="{Binding StopCommand}"></fcommon:IconButton> Content="下版子"
Command="{Binding Path=StopCommand}"></fcommon:IconButton>
</StackPanel> </StackPanel>
</Grid> </StackPanel>
</GroupBox>
<GroupBox Padding="10">
<GroupBox.Header>
<TextBlock Text="底部滑动洞信息版" FontSize="18" FontWeight="Bold"></TextBlock>
</GroupBox.Header>
<StackPanel>
<Image Source="pack://SiteOfOrigin:,,,/images/hole_info.jpg" Height="300" />
<StackPanel Orientation="Horizontal" Margin="0,10,0,10">
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png"
Content="上版子"
Command="{Binding StartCommand}"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png"
Content="下版子"
Command="{Binding Path=StopCommand}"></fcommon:IconButton>
</StackPanel>
</StackPanel>
</GroupBox>
</StackPanel>
</ScrollViewer>
</Border> </Border>
</Grid> </Grid>
</UserControl> </UserControl>
...@@ -59,10 +59,13 @@ namespace VIZ.TVP.Golf.Module ...@@ -59,10 +59,13 @@ namespace VIZ.TVP.Golf.Module
/// </remarks> /// </remarks>
protected override void Start() protected override void Start()
{ {
StringBuilder sb = new StringBuilder(); Dictionary<string, IVizControlObjctsValue> dic = new Dictionary<string, IVizControlObjctsValue>();
sb.Append($"{this.HolePickerPanelModel.SelectedHoleInfo.HoleID}|{this.realDataService.GetImageName(this.HolePickerPanelModel.SelectedHoleInfo.Picture)}"); // 洞号
dic["HOLENUMBER"] = new VizControlObjectsStringValue(this.HolePickerPanelModel.SelectedHoleInfo.HoleID.ToString());
ApplicationDomainEx.VizEngineModel.STAGE_START($"{TvpStaticResource.SCENE_PATH}15-DXZS", "OnSetData", sb.ToString()); VizControlObjctsCommand cmd = new VizControlObjctsCommand(dic);
ApplicationDomainEx.VizEngineModel.STAGE_START($"{TvpStaticResource.SCENE_PATH}15-DXZS", "OnSetData", cmd.ToString());
} }
#endregion #endregion
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
d:Background="White" d:Background="White"
d:DataContext="{d:DesignInstance Type=local:ChampionViewModel}" d:DataContext="{d:DesignInstance Type=local:ChampionViewModel}"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="800" d:DesignWidth="1600"> d:DesignHeight="1000" d:DesignWidth="1600">
<UserControl.Resources> <UserControl.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
...@@ -63,24 +63,44 @@ ...@@ -63,24 +63,44 @@
</Border> </Border>
<!-- 示意图 --> <!-- 示意图 -->
<Border Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5"> <Border Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5">
<Grid> <ScrollViewer VerticalScrollBarVisibility="Auto">
<Grid.RowDefinitions> <StackPanel>
<RowDefinition Height="300"></RowDefinition> <GroupBox Padding="10">
<RowDefinition Height="80"></RowDefinition> <GroupBox.Header>
</Grid.RowDefinitions> <TextBlock Text="队伍冠军版" FontSize="18" FontWeight="Bold"></TextBlock>
<Image Source="pack://SiteOfOrigin:,,,/images/Champion.jpg" /> </GroupBox.Header>
<StackPanel Orientation="Horizontal" Grid.Row="1"> <StackPanel>
<Image Source="pack://SiteOfOrigin:,,,/images/champion.jpg" Height="300" />
<StackPanel Orientation="Horizontal" Margin="0,10,0,10">
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0" <fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png" Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png"
Content="上队伍冠军版子" Command="{Binding StartTeamCommand}"></fcommon:IconButton> Content="上队伍冠军版子" Command="{Binding StartTeamCommand}"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0" <fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png"
Content="下版子"
Command="{Binding Path=StopCommand}"></fcommon:IconButton>
</StackPanel>
</StackPanel>
</GroupBox>
<GroupBox Padding="10">
<GroupBox.Header>
<TextBlock Text="分组冠军版" FontSize="18" FontWeight="Bold"></TextBlock>
</GroupBox.Header>
<StackPanel>
<Image Source="pack://SiteOfOrigin:,,,/images/champion1.jpg" Height="300" />
<StackPanel Orientation="Horizontal" Margin="0,10,0,10">
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png" Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png"
Content="上分组冠军版子" Command="{Binding StartGroupCommand}"></fcommon:IconButton> Content="上分组冠军版子" Command="{Binding StartGroupCommand}"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0" <fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png" Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png"
Content="下版子" Command="{Binding StopCommand}"></fcommon:IconButton> Content="下版子"
Command="{Binding Path=StopCommand}"></fcommon:IconButton>
</StackPanel> </StackPanel>
</Grid> </StackPanel>
</GroupBox>
</StackPanel>
</ScrollViewer>
</Border> </Border>
</Grid> </Grid>
</UserControl> </UserControl>
...@@ -116,13 +116,15 @@ ...@@ -116,13 +116,15 @@
</Border> </Border>
<!-- 示意图 --> <!-- 示意图 -->
<Border Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5"> <Border Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5">
<Grid> <ScrollViewer VerticalScrollBarVisibility="Auto">
<Grid.RowDefinitions> <StackPanel>
<RowDefinition Height="300"></RowDefinition> <GroupBox Padding="10">
<RowDefinition Height="80"></RowDefinition> <GroupBox.Header>
</Grid.RowDefinitions> <TextBlock Text="分组洞信息" FontSize="18" FontWeight="Bold"></TextBlock>
<Image Source="pack://SiteOfOrigin:,,,/images/GroupHoleInfo.jpg" /> </GroupBox.Header>
<StackPanel Orientation="Horizontal" Grid.Row="1"> <StackPanel>
<Image Source="pack://SiteOfOrigin:,,,/images/group_hole_info.jpg" Height="300" />
<StackPanel Orientation="Horizontal" Margin="0,10,0,10">
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0" <fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png" Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png"
Content="上版子" Command="{Binding StartCommand}"></fcommon:IconButton> Content="上版子" Command="{Binding StartCommand}"></fcommon:IconButton>
...@@ -130,7 +132,10 @@ ...@@ -130,7 +132,10 @@
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png" Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png"
Content="下版子" Command="{Binding StopCommand}"></fcommon:IconButton> Content="下版子" Command="{Binding StopCommand}"></fcommon:IconButton>
</StackPanel> </StackPanel>
</Grid> </StackPanel>
</GroupBox>
</StackPanel>
</ScrollViewer>
</Border> </Border>
</Grid> </Grid>
</UserControl> </UserControl>
...@@ -108,24 +108,43 @@ ...@@ -108,24 +108,43 @@
</Border> </Border>
<!-- 示意图 --> <!-- 示意图 -->
<Border Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5"> <Border Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5">
<Grid> <ScrollViewer VerticalScrollBarVisibility="Auto">
<Grid.RowDefinitions> <StackPanel>
<RowDefinition Height="300"></RowDefinition> <GroupBox Padding="10">
<RowDefinition Height="80"></RowDefinition> <GroupBox.Header>
</Grid.RowDefinitions> <TextBlock Text="分组信息版" FontSize="18" FontWeight="Bold"></TextBlock>
<Image Source="pack://SiteOfOrigin:,,,/images/GroupInfo.jpg" /> </GroupBox.Header>
<StackPanel Orientation="Horizontal" Grid.Row="1"> <StackPanel>
<Image Source="pack://SiteOfOrigin:,,,/images/group_info.jpg" Height="300" />
<StackPanel Orientation="Horizontal" Margin="0,10,0,10">
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0" <fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png" Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png"
Content="上版子" Command="{Binding StartCommand}"></fcommon:IconButton> Content="上版子" Command="{Binding StartCommand}"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0" <fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png"
Content="下版子" Command="{Binding StopCommand}"></fcommon:IconButton>
</StackPanel>
</StackPanel>
</GroupBox>
<GroupBox Padding="10">
<GroupBox.Header>
<TextBlock Text="分组信息版2" FontSize="18" FontWeight="Bold"></TextBlock>
</GroupBox.Header>
<StackPanel>
<Image Source="pack://SiteOfOrigin:,,,/images/group_info2.jpg" Height="300" />
<StackPanel Orientation="Horizontal" Margin="0,10,0,10">
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png" Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png"
Content="上不包含描述的版子" Command="{Binding StartNoDetailCommand}"></fcommon:IconButton> Content="上版子" Command="{Binding StartNoDetailCommand}"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0" <fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png" Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png"
Content="下版子" Command="{Binding StopCommand}"></fcommon:IconButton> Content="下版子"
Command="{Binding Path=StopCommand}"></fcommon:IconButton>
</StackPanel> </StackPanel>
</Grid> </StackPanel>
</GroupBox>
</StackPanel>
</ScrollViewer>
</Border> </Border>
</Grid> </Grid>
</UserControl> </UserControl>
...@@ -115,21 +115,28 @@ ...@@ -115,21 +115,28 @@
</Border> </Border>
<!-- 示意图 --> <!-- 示意图 -->
<Border Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5"> <Border Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5">
<Grid> <ScrollViewer VerticalScrollBarVisibility="Auto">
<Grid.RowDefinitions> <StackPanel>
<RowDefinition Height="300"></RowDefinition> <GroupBox Padding="10">
<RowDefinition Height="80"></RowDefinition> <GroupBox.Header>
</Grid.RowDefinitions> <TextBlock Text="组队版子" FontSize="18" FontWeight="Bold"></TextBlock>
<Image Source="pack://SiteOfOrigin:,,,/images/GroupInfo.jpg" /> </GroupBox.Header>
<StackPanel Orientation="Horizontal" Grid.Row="1"> <StackPanel>
<Image Source="pack://SiteOfOrigin:,,,/images/team_group_info.jpg" Height="300" />
<StackPanel Orientation="Horizontal" Margin="0,10,0,10">
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0" <fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png" Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png"
Content="上版子"></fcommon:IconButton> Content="上组队版子"
Command="{Binding StartCommand}"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0" <fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png" Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png"
Content="下版子"></fcommon:IconButton> Content="下版子"
Command="{Binding Path=StopCommand}"></fcommon:IconButton>
</StackPanel> </StackPanel>
</Grid> </StackPanel>
</GroupBox>
</StackPanel>
</ScrollViewer>
</Border> </Border>
</Grid> </Grid>
</UserControl> </UserControl>
...@@ -192,10 +192,6 @@ namespace VIZ.TVP.Golf.Module ...@@ -192,10 +192,6 @@ namespace VIZ.TVP.Golf.Module
List<PlayerRealModel> list = this.realDataService.LoadPlayerRealModelFormLocal(vm.SelectedFile.FileName); List<PlayerRealModel> list = this.realDataService.LoadPlayerRealModelFormLocal(vm.SelectedFile.FileName);
this.GroupPickerPanelModel.UpdatePlayersScore(list, this.SelectedRound); this.GroupPickerPanelModel.UpdatePlayersScore(list, this.SelectedRound);
// 预设洞号
int? holeId = this.realDataService.GetGroupCurrentHole(list, this.GroupPickerPanelModel.SelectedGroupInfo, this.SelectedRound);
this.SelectedHoleInfo = ApplicationDomainEx.HoleInfos.FirstOrDefault(p => p.HoleID == (holeId ?? -1));
} }
#endregion #endregion
...@@ -218,10 +214,11 @@ namespace VIZ.TVP.Golf.Module ...@@ -218,10 +214,11 @@ namespace VIZ.TVP.Golf.Module
return; return;
} }
WPFHelper.BeginInvoke(() =>
{
List<PlayerRealModel> list = this.realDataService.LoadPlayerRealModelFormLocal(fileName); List<PlayerRealModel> list = this.realDataService.LoadPlayerRealModelFormLocal(fileName);
WPFHelper.BeginInvoke(() =>
{
this.GroupPickerPanelModel.UpdatePlayersScore(list, this.SelectedRound);
}); });
}); });
} }
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
d:Background="White" d:Background="White"
d:DataContext="{d:DesignInstance Type=local:TeamInfoViewModel}" d:DataContext="{d:DesignInstance Type=local:TeamInfoViewModel}"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="800" d:DesignWidth="1600"> d:DesignHeight="1000" d:DesignWidth="1600">
<UserControl.Resources> <UserControl.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
...@@ -94,18 +94,34 @@ ...@@ -94,18 +94,34 @@
</Border> </Border>
<!-- 示意图 --> <!-- 示意图 -->
<Border Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5"> <Border Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5">
<Grid> <ScrollViewer VerticalScrollBarVisibility="Auto">
<Grid.RowDefinitions> <StackPanel>
<RowDefinition Height="300"></RowDefinition> <GroupBox Padding="10">
<RowDefinition Height="80"></RowDefinition> <GroupBox.Header>
</Grid.RowDefinitions> <TextBlock Text="组队版子" FontSize="18" FontWeight="Bold"></TextBlock>
<Image Source="pack://SiteOfOrigin:,,,/images/TeamInfo.jpg" /> </GroupBox.Header>
<StackPanel Orientation="Horizontal" Grid.Row="1"> <StackPanel>
<Image Source="pack://SiteOfOrigin:,,,/images/team_group_info.jpg" Height="300" />
<StackPanel Orientation="Horizontal" Margin="0,10,0,10">
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0" <fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png" Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png"
Content="上组队版子" Content="上组队版子"
Command="{Binding StartGroupCommand}"></fcommon:IconButton> Command="{Binding StartGroupCommand}"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0" <fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png"
Content="下版子"
Command="{Binding Path=StopCommand}"></fcommon:IconButton>
</StackPanel>
</StackPanel>
</GroupBox>
<GroupBox Padding="10">
<GroupBox.Header>
<TextBlock Text="替补版子" FontSize="18" FontWeight="Bold"></TextBlock>
</GroupBox.Header>
<StackPanel>
<Image Source="pack://SiteOfOrigin:,,,/images/team_group_info2.jpg" Height="300" />
<StackPanel Orientation="Horizontal" Margin="0,10,0,10">
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png" Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png"
Content="上替补版子" Content="上替补版子"
Command="{Binding StartSubstituteCommand}"></fcommon:IconButton> Command="{Binding StartSubstituteCommand}"></fcommon:IconButton>
...@@ -114,7 +130,10 @@ ...@@ -114,7 +130,10 @@
Content="下版子" Content="下版子"
Command="{Binding Path=StopCommand}"></fcommon:IconButton> Command="{Binding Path=StopCommand}"></fcommon:IconButton>
</StackPanel> </StackPanel>
</Grid> </StackPanel>
</GroupBox>
</StackPanel>
</ScrollViewer>
</Border> </Border>
</Grid> </Grid>
</UserControl> </UserControl>
...@@ -80,21 +80,28 @@ ...@@ -80,21 +80,28 @@
</Border> </Border>
<!-- 示意图 --> <!-- 示意图 -->
<Border Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5"> <Border Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5">
<Grid> <ScrollViewer VerticalScrollBarVisibility="Auto">
<Grid.RowDefinitions> <StackPanel>
<RowDefinition Height="300"></RowDefinition> <GroupBox Padding="10">
<RowDefinition Height="80"></RowDefinition> <GroupBox.Header>
</Grid.RowDefinitions> <TextBlock Text="赛后排名(第二轮排名)" FontSize="18" FontWeight="Bold"></TextBlock>
<Image Source="pack://SiteOfOrigin:,,,/images/AfterMatchTeamRanking.jpg" /> </GroupBox.Header>
<StackPanel Orientation="Horizontal" Grid.Row="1"> <StackPanel>
<Image Source="pack://SiteOfOrigin:,,,/images/team_ranking_round2.jpg" Height="300" />
<StackPanel Orientation="Horizontal" Margin="0,10,0,10">
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0" <fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png" Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png"
Content="上版子" Command="{Binding StartCommand}"></fcommon:IconButton> Content="上版子"
Command="{Binding StartCommand}"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0" <fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png" Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png"
Content="继续版子" Command="{Binding StopCommand}"></fcommon:IconButton> Content="下版子"
Command="{Binding Path=StopCommand}"></fcommon:IconButton>
</StackPanel> </StackPanel>
</Grid> </StackPanel>
</GroupBox>
</StackPanel>
</ScrollViewer>
</Border> </Border>
</Grid> </Grid>
</UserControl> </UserControl>
...@@ -129,7 +129,7 @@ namespace VIZ.TVP.Golf.Module ...@@ -129,7 +129,7 @@ namespace VIZ.TVP.Golf.Module
} }
// 赛前比较第一轮 // 赛前比较第一轮
TeamTempModelComparer comparer = new TeamTempModelComparer(list, 1); TeamTempModelComparer comparer = new TeamTempModelComparer(list);
teamTempModels.Sort(comparer); teamTempModels.Sort(comparer);
this.realDataService.UpdateTeamPosition(teamTempModels); this.realDataService.UpdateTeamPosition(teamTempModels);
......
...@@ -79,21 +79,28 @@ ...@@ -79,21 +79,28 @@
</Border> </Border>
<!-- 示意图 --> <!-- 示意图 -->
<Border Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5"> <Border Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5">
<Grid> <ScrollViewer VerticalScrollBarVisibility="Auto">
<Grid.RowDefinitions> <StackPanel>
<RowDefinition Height="300"></RowDefinition> <GroupBox Padding="10">
<RowDefinition Height="80"></RowDefinition> <GroupBox.Header>
</Grid.RowDefinitions> <TextBlock Text="赛前排名(第一轮排名)" FontSize="18" FontWeight="Bold"></TextBlock>
<Image Source="pack://SiteOfOrigin:,,,/images/BeforeMatchTeamRanking.jpg" /> </GroupBox.Header>
<StackPanel Orientation="Horizontal" Grid.Row="1"> <StackPanel>
<Image Source="pack://SiteOfOrigin:,,,/images/team_ranking_round1.jpg" Height="300" />
<StackPanel Orientation="Horizontal" Margin="0,10,0,10">
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0" <fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png" Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png"
Content="上版子" Command="{Binding Path=StartCommand}"></fcommon:IconButton> Content="上版子"
Command="{Binding StartCommand}"></fcommon:IconButton>
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0" <fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png" Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/down_16x16.png"
Content="继续版子" Command="{Binding Path=StopCommand}"></fcommon:IconButton> Content="下版子"
Command="{Binding Path=StopCommand}"></fcommon:IconButton>
</StackPanel> </StackPanel>
</Grid> </StackPanel>
</GroupBox>
</StackPanel>
</ScrollViewer>
</Border> </Border>
</Grid> </Grid>
</UserControl> </UserControl>
...@@ -128,7 +128,7 @@ namespace VIZ.TVP.Golf.Module ...@@ -128,7 +128,7 @@ namespace VIZ.TVP.Golf.Module
} }
// 赛前比较第一轮 // 赛前比较第一轮
TeamTempModelComparer comparer = new TeamTempModelComparer(list, 1); TeamTempModelComparer comparer = new TeamTempModelComparer(list);
teamTempModels.Sort(comparer); teamTempModels.Sort(comparer);
this.realDataService.UpdateTeamPosition(teamTempModels); this.realDataService.UpdateTeamPosition(teamTempModels);
......
...@@ -54,30 +54,6 @@ ...@@ -54,30 +54,6 @@
<!-- 版子信息 --> <!-- 版子信息 -->
<Border Grid.Row="1" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5"> <Border Grid.Row="1" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5">
<Grid> <Grid>
<Grid.RowDefinitions>
<RowDefinition Height="100"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<!-- 轮次信息 -->
<GroupBox Padding="10">
<GroupBox.Header>
<TextBlock Text="轮次信息" FontSize="18" FontWeight="Bold"></TextBlock>
</GroupBox.Header>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="30"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Text="轮次:" VerticalAlignment="Center" HorizontalAlignment="Right" Grid.Row="1"></TextBlock>
<StackPanel Grid.Column="1" Margin="10,0,10,0" HorizontalAlignment="Left" Orientation="Horizontal">
<ComboBox Height="30" Width="220" VerticalContentAlignment="Center"
SelectedValue="{Binding Path=SelectedRound,Mode=TwoWay}"
ItemsSource="{Binding Source={x:Static domain:TvpStaticResource.Rounds}}"></ComboBox>
</StackPanel>
</Grid>
</GroupBox>
<!-- 排名 --> <!-- 排名 -->
<GroupBox Padding="10" Grid.Row="1"> <GroupBox Padding="10" Grid.Row="1">
<GroupBox.Header> <GroupBox.Header>
...@@ -98,7 +74,7 @@ ...@@ -98,7 +74,7 @@
ItemsSource="{Binding Path=TeamTempModels}"> ItemsSource="{Binding Path=TeamTempModels}">
<DataGrid.Columns> <DataGrid.Columns>
<DataGridTextColumn Header="排名(*)" Width="60" Binding="{Binding Path=Position}"></DataGridTextColumn> <DataGridTextColumn Header="排名(*)" Width="60" Binding="{Binding Path=Position}"></DataGridTextColumn>
<DataGridTextColumn Header="队伍名称(*)" Width="120" Binding="{Binding Path=Name}"></DataGridTextColumn> <DataGridTextColumn Header="队伍名称(*)" Width="200" Binding="{Binding Path=Name}"></DataGridTextColumn>
<DataGridTextColumn Header="得分(*)" Width="80" Binding="{Binding Path=TotalScore}"></DataGridTextColumn> <DataGridTextColumn Header="得分(*)" Width="80" Binding="{Binding Path=TotalScore}"></DataGridTextColumn>
<DataGridTextColumn Header="之前索引" Width="60" Binding="{Binding Path=PositionOldIndex}"></DataGridTextColumn> <DataGridTextColumn Header="之前索引" Width="60" Binding="{Binding Path=PositionOldIndex}"></DataGridTextColumn>
<DataGridTextColumn Header="之后索引" Width="60" Binding="{Binding Path=PositionNewIndex}"></DataGridTextColumn> <DataGridTextColumn Header="之后索引" Width="60" Binding="{Binding Path=PositionNewIndex}"></DataGridTextColumn>
...@@ -113,7 +89,7 @@ ...@@ -113,7 +89,7 @@
ItemsSource="{Binding Path=ContrastTeamTempModels}" Margin="5,0,0,0"> ItemsSource="{Binding Path=ContrastTeamTempModels}" Margin="5,0,0,0">
<DataGrid.Columns> <DataGrid.Columns>
<DataGridTextColumn Header="排名" Width="60" Binding="{Binding Path=Position}"></DataGridTextColumn> <DataGridTextColumn Header="排名" Width="60" Binding="{Binding Path=Position}"></DataGridTextColumn>
<DataGridTextColumn Header="队伍名称" Width="120" Binding="{Binding Path=Name}"></DataGridTextColumn> <DataGridTextColumn Header="队伍名称" Width="200" Binding="{Binding Path=Name}"></DataGridTextColumn>
<DataGridTextColumn Header="得分" Width="80" Binding="{Binding Path=TotalScore}"></DataGridTextColumn> <DataGridTextColumn Header="得分" Width="80" Binding="{Binding Path=TotalScore}"></DataGridTextColumn>
</DataGrid.Columns> </DataGrid.Columns>
</DataGrid> </DataGrid>
......
...@@ -5,6 +5,7 @@ using System.Linq; ...@@ -5,6 +5,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows; using System.Windows;
using System.Windows.Markup;
using VIZ.Framework.Core; using VIZ.Framework.Core;
using VIZ.TVP.Golf.Domain; using VIZ.TVP.Golf.Domain;
using VIZ.TVP.Golf.Service; using VIZ.TVP.Golf.Service;
...@@ -48,18 +49,19 @@ namespace VIZ.TVP.Golf.Module ...@@ -48,18 +49,19 @@ namespace VIZ.TVP.Golf.Module
TeamTempModel temp_model = new TeamTempModel(); TeamTempModel temp_model = new TeamTempModel();
temp_model.FromInfoModel(info_model); temp_model.FromInfoModel(info_model);
TeamRoundStatisticsData data = this.realDataService.GetTeamRoundStatisticsData(list, info_model.TeamID, this.SelectedRound); TeamRoundStatisticsData data1 = this.realDataService.GetTeamRoundStatisticsData(list, info_model.TeamID, 1);
if (data != null) TeamRoundStatisticsData data2 = this.realDataService.GetTeamRoundStatisticsData(list, info_model.TeamID, 2);
if (data1 != null && data2 != null)
{ {
temp_model.TotalScoreValue = data.Score; temp_model.TotalScoreValue = data1.Score + data2.Score;
temp_model.TotalScore = this.realDataService.GetScoreString(data.Score); temp_model.TotalScore = this.realDataService.GetScoreString(data1.Score + data2.Score);
} }
teamTempModels.Add(temp_model); teamTempModels.Add(temp_model);
} }
// 赛前比较第一轮 // 赛前比较第一轮
TeamTempModelComparer comparer = new TeamTempModelComparer(list, 1); TeamTempModelComparer comparer = new TeamTempModelComparer(list);
teamTempModels.Sort(comparer); teamTempModels.Sort(comparer);
this.realDataService.UpdateTeamPosition(teamTempModels); this.realDataService.UpdateTeamPosition(teamTempModels);
......
...@@ -54,30 +54,6 @@ ...@@ -54,30 +54,6 @@
<!-- 版子信息 --> <!-- 版子信息 -->
<Border Grid.Row="1" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5"> <Border Grid.Row="1" Padding="5" BorderBrush="#44000000" BorderThickness="1" Margin="5">
<Grid> <Grid>
<Grid.RowDefinitions>
<RowDefinition Height="100"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<!-- 轮次信息 -->
<GroupBox Padding="10">
<GroupBox.Header>
<TextBlock Text="轮次信息" FontSize="18" FontWeight="Bold"></TextBlock>
</GroupBox.Header>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="30"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Text="轮次:" VerticalAlignment="Center" HorizontalAlignment="Right" Grid.Row="1"></TextBlock>
<StackPanel Grid.Column="1" Margin="10,0,10,0" HorizontalAlignment="Left" Orientation="Horizontal">
<ComboBox Height="30" Width="220" VerticalContentAlignment="Center"
SelectedValue="{Binding Path=SelectedRound,Mode=TwoWay}"
ItemsSource="{Binding Source={x:Static domain:TvpStaticResource.Rounds}}"></ComboBox>
</StackPanel>
</Grid>
</GroupBox>
<!-- 排名 --> <!-- 排名 -->
<GroupBox Padding="10" Grid.Row="1"> <GroupBox Padding="10" Grid.Row="1">
<GroupBox.Header> <GroupBox.Header>
...@@ -98,7 +74,7 @@ ...@@ -98,7 +74,7 @@
ItemsSource="{Binding Path=TeamTempModels}"> ItemsSource="{Binding Path=TeamTempModels}">
<DataGrid.Columns> <DataGrid.Columns>
<DataGridTextColumn Header="排名(*)" Width="60" Binding="{Binding Path=Position}"></DataGridTextColumn> <DataGridTextColumn Header="排名(*)" Width="60" Binding="{Binding Path=Position}"></DataGridTextColumn>
<DataGridTextColumn Header="队伍名称(*)" Width="120" Binding="{Binding Path=Name}"></DataGridTextColumn> <DataGridTextColumn Header="队伍名称(*)" Width="200" Binding="{Binding Path=Name}"></DataGridTextColumn>
<DataGridTextColumn Header="得分(*)" Width="80" Binding="{Binding Path=TotalScore}"></DataGridTextColumn> <DataGridTextColumn Header="得分(*)" Width="80" Binding="{Binding Path=TotalScore}"></DataGridTextColumn>
<DataGridTextColumn Header="之前索引" Width="60" Binding="{Binding Path=PositionOldIndex}"></DataGridTextColumn> <DataGridTextColumn Header="之前索引" Width="60" Binding="{Binding Path=PositionOldIndex}"></DataGridTextColumn>
<DataGridTextColumn Header="之后索引" Width="60" Binding="{Binding Path=PositionNewIndex}"></DataGridTextColumn> <DataGridTextColumn Header="之后索引" Width="60" Binding="{Binding Path=PositionNewIndex}"></DataGridTextColumn>
...@@ -113,7 +89,7 @@ ...@@ -113,7 +89,7 @@
ItemsSource="{Binding Path=ContrastTeamTempModels}" Margin="5,0,0,0"> ItemsSource="{Binding Path=ContrastTeamTempModels}" Margin="5,0,0,0">
<DataGrid.Columns> <DataGrid.Columns>
<DataGridTextColumn Header="排名" Width="60" Binding="{Binding Path=Position}"></DataGridTextColumn> <DataGridTextColumn Header="排名" Width="60" Binding="{Binding Path=Position}"></DataGridTextColumn>
<DataGridTextColumn Header="队伍名称" Width="120" Binding="{Binding Path=Name}"></DataGridTextColumn> <DataGridTextColumn Header="队伍名称" Width="200" Binding="{Binding Path=Name}"></DataGridTextColumn>
<DataGridTextColumn Header="得分" Width="80" Binding="{Binding Path=TotalScore}"></DataGridTextColumn> <DataGridTextColumn Header="得分" Width="80" Binding="{Binding Path=TotalScore}"></DataGridTextColumn>
</DataGrid.Columns> </DataGrid.Columns>
</DataGrid> </DataGrid>
...@@ -131,7 +107,7 @@ ...@@ -131,7 +107,7 @@
<RowDefinition Height="300"></RowDefinition> <RowDefinition Height="300"></RowDefinition>
<RowDefinition Height="80"></RowDefinition> <RowDefinition Height="80"></RowDefinition>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Image Source="pack://SiteOfOrigin:,,,/images/ShortTeamRanking.jpg" /> <Image Source="pack://SiteOfOrigin:,,,/images/team_ranking_short.jpg" />
<StackPanel Orientation="Horizontal" Grid.Row="1"> <StackPanel Orientation="Horizontal" Grid.Row="1">
<fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0" <fcommon:IconButton Style="{StaticResource IconButton_Red}" Margin="10,0,0,0"
Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png" Icon="/VIZ.TVP.Golf.Module.Resource;component/Icons/up_16x16.png"
......
...@@ -5,6 +5,7 @@ using System.Linq; ...@@ -5,6 +5,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows; using System.Windows;
using System.Windows.Markup;
using VIZ.Framework.Core; using VIZ.Framework.Core;
using VIZ.TVP.Golf.Domain; using VIZ.TVP.Golf.Domain;
using VIZ.TVP.Golf.Service; using VIZ.TVP.Golf.Service;
...@@ -113,18 +114,18 @@ namespace VIZ.TVP.Golf.Module ...@@ -113,18 +114,18 @@ namespace VIZ.TVP.Golf.Module
TeamTempModel temp_model = new TeamTempModel(); TeamTempModel temp_model = new TeamTempModel();
temp_model.FromInfoModel(info_model); temp_model.FromInfoModel(info_model);
TeamRoundStatisticsData data = this.realDataService.GetTeamRoundStatisticsData(list, info_model.TeamID, this.SelectedRound); TeamRoundStatisticsData data1 = this.realDataService.GetTeamRoundStatisticsData(list, info_model.TeamID, 1);
if (data != null) TeamRoundStatisticsData data2 = this.realDataService.GetTeamRoundStatisticsData(list, info_model.TeamID, 2);
if (data1 != null && data2 != null)
{ {
temp_model.TotalScoreValue = data.Score; temp_model.TotalScoreValue = data1.Score + data2.Score;
temp_model.TotalScore = this.realDataService.GetScoreString(data.Score); temp_model.TotalScore = this.realDataService.GetScoreString(data1.Score + data2.Score);
} }
teamTempModels.Add(temp_model); teamTempModels.Add(temp_model);
} }
// 赛前比较第一轮 TeamTempModelComparer comparer = new TeamTempModelComparer(list);
TeamTempModelComparer comparer = new TeamTempModelComparer(list, 1);
teamTempModels.Sort(comparer); teamTempModels.Sort(comparer);
this.realDataService.UpdateTeamPosition(teamTempModels); this.realDataService.UpdateTeamPosition(teamTempModels);
......
...@@ -134,7 +134,7 @@ namespace VIZ.TVP.Golf.Module ...@@ -134,7 +134,7 @@ namespace VIZ.TVP.Golf.Module
} }
// 赛前比较第一轮 // 赛前比较第一轮
TeamTempModelComparer comparer = new TeamTempModelComparer(list, 1); TeamTempModelComparer comparer = new TeamTempModelComparer(list);
teamTempModels.Sort(comparer); teamTempModels.Sort(comparer);
this.realDataService.UpdateTeamPosition(teamTempModels); this.realDataService.UpdateTeamPosition(teamTempModels);
......
...@@ -7,12 +7,18 @@ using System.Text; ...@@ -7,12 +7,18 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Web.Routing; using System.Web.Routing;
using VIZ.TVP.Golf.Domain; using VIZ.TVP.Golf.Domain;
using static NPOI.HSSF.Util.HSSFColor;
namespace VIZ.TVP.Golf.Service namespace VIZ.TVP.Golf.Service
{ {
/// <summary> /// <summary>
/// 队伍临时模型比较器 /// 队伍临时模型比较器
/// </summary> /// </summary>
/// <remarks>
/// 1. 杆数少排名靠前
/// 2. 杆数相同时则比较第二轮成绩
/// 3. 如果再次相同,则比较第二轮由18号洞往前推的每一洞
/// </remarks>
public class TeamTempModelComparer : IComparer<TeamTempModel> public class TeamTempModelComparer : IComparer<TeamTempModel>
{ {
/// <summary> /// <summary>
...@@ -25,27 +31,11 @@ namespace VIZ.TVP.Golf.Service ...@@ -25,27 +31,11 @@ namespace VIZ.TVP.Golf.Service
} }
/// <summary> /// <summary>
/// 队伍临时模型比较器
/// </summary>
/// <param name="playerRealModels">球员真实模型</param>
/// <param name="round">轮次</param>
public TeamTempModelComparer(List<PlayerRealModel> playerRealModels, int round)
{
this.PlayerRealModels = playerRealModels;
this.Round = round;
}
/// <summary>
/// 球员真实模型 /// 球员真实模型
/// </summary> /// </summary>
public List<PlayerRealModel> PlayerRealModels { get; private set; } public List<PlayerRealModel> PlayerRealModels { get; private set; }
/// <summary> /// <summary>
/// 轮次
/// </summary>
public int? Round { get; private set; }
/// <summary>
/// 真实数据服务 /// 真实数据服务
/// </summary> /// </summary>
private RealDataService realDataService = new RealDataService(); private RealDataService realDataService = new RealDataService();
...@@ -55,70 +45,19 @@ namespace VIZ.TVP.Golf.Service ...@@ -55,70 +45,19 @@ namespace VIZ.TVP.Golf.Service
/// </summary> /// </summary>
public int Compare(TeamTempModel x, TeamTempModel y) public int Compare(TeamTempModel x, TeamTempModel y)
{ {
return this.Round == null ? this.CompareAllRound(x, y) : this.CompareWithRound(x, y, this.Round.Value); if (x.TotalScoreValue == null && y.TotalScoreValue == null)
}
/// <summary>
/// 比较大小, 所有轮次
/// </summary>
/// <remarks>
/// 1. 杆数少排名靠前
/// 2. 杆数相同时则比较第二轮成绩
/// 3. 如果再次相同,则比较第二轮由18号洞往前推的每一洞
/// </remarks>
/// <returns></returns>
private int CompareAllRound(TeamTempModel x, TeamTempModel y)
{
TeamRoundStatisticsData teamX_round1 = this.realDataService.GetTeamRoundStatisticsData(this.PlayerRealModels, x.TeamID, 1);
TeamRoundStatisticsData teamY_round1 = this.realDataService.GetTeamRoundStatisticsData(this.PlayerRealModels, y.TeamID, 1);
TeamRoundStatisticsData teamX_round2 = this.realDataService.GetTeamRoundStatisticsData(this.PlayerRealModels, x.TeamID, 1);
TeamRoundStatisticsData teamY_round2 = this.realDataService.GetTeamRoundStatisticsData(this.PlayerRealModels, y.TeamID, 1);
// 队伍X成绩无效 && 队伍Y成绩无效
if ((teamX_round1.Score == null || teamX_round2.Score == null) && (teamY_round1.Score == null || teamY_round2.Score == null))
return 0;
// 队伍X成绩有效 && 队伍Y成绩无效
if ((teamX_round1.Score != null && teamX_round2.Score != null) && (teamY_round1.Score == null || teamY_round2.Score == null))
return -1;
// 队伍X成绩无效 && 队伍Y成绩有效
if ((teamX_round1.Score == null || teamX_round2.Score == null) && (teamY_round1.Score != null && teamY_round2.Score != null))
return 1;
// 比杆数
if (teamX_round1.Strokes + teamX_round2.Strokes < teamY_round1.Strokes + teamY_round2.Strokes)
return -1;
if (teamX_round1.Strokes + teamX_round2.Strokes > teamY_round1.Strokes + teamY_round2.Strokes)
return -1;
return 0;
}
/// <summary>
/// 比较大小
/// </summary>
/// <param name="round">轮次</param>
private int CompareWithRound(TeamTempModel x, TeamTempModel y, int round)
{
TeamRoundStatisticsData team1 = this.realDataService.GetTeamRoundStatisticsData(this.PlayerRealModels, x.TeamID, round);
TeamRoundStatisticsData team2 = this.realDataService.GetTeamRoundStatisticsData(this.PlayerRealModels, y.TeamID, round);
if (team1.Score == null && team2.Score == null)
return 0; return 0;
if (team1.Score != null && team2.Score == null) if (x.TotalScoreValue != null && y.TotalScoreValue == null)
return -1; return -1;
if (team1.Score == null && team2.Score != null) if (x.TotalScoreValue == null && y.TotalScoreValue != null)
return 1; return 1;
if (team1.Score.Value == team2.Score.Value) if (x.TotalScoreValue.Value == y.TotalScoreValue.Value)
return 0; return 0;
else else
return team1.Score.Value < team2.Score.Value ? -1 : 1; return x.TotalScoreValue.Value < y.TotalScoreValue.Value ? -1 : 1;
} }
} }
} }
...@@ -153,7 +153,7 @@ namespace VIZ.TVP.Golf.Service ...@@ -153,7 +153,7 @@ namespace VIZ.TVP.Golf.Service
/// <returns>图片资源名字</returns> /// <returns>图片资源名字</returns>
public string GetImageName(string path) public string GetImageName(string path)
{ {
return path; return "IMAGE*/MyTestProject/Images/1";
} }
/// <summary> /// <summary>
...@@ -469,39 +469,5 @@ namespace VIZ.TVP.Golf.Service ...@@ -469,39 +469,5 @@ namespace VIZ.TVP.Golf.Service
after_group.PositionChangedDesc = $"{after_group.PositionOldIndex} --> {after_group.PositionNewIndex}"; after_group.PositionChangedDesc = $"{after_group.PositionOldIndex} --> {after_group.PositionNewIndex}";
} }
} }
/// <summary>
/// 获取分组当前所在洞号
/// </summary>
/// <param name="list">真实数据列表</param>
/// <param name="group">分组</param>
/// <param name="round">轮次</param>
/// <returns>当前所在洞号</returns>
public int? GetGroupCurrentHole(List<PlayerRealModel> list, GroupTempModel group, int round)
{
if (group == null || group.Player1 == null || group.Player2 == null)
return null;
PlayerRealModel player1 = list.FirstOrDefault(p => p.PlayerID == group.Player1.PlayerID);
PlayerRealModel player2 = list.FirstOrDefault(p => p.PlayerID == group.Player2.PlayerID);
if (player1 == null || player2 == null)
return null;
RoundRealModel round1 = player1.Rounds.FirstOrDefault(p => p.No == round);
RoundRealModel round2 = player2.Rounds.FirstOrDefault(p => p.No == round);
if (round1 == null || round2 == null)
return null;
if (round1.Thru < ApplicationDomainEx.HoleInfos.Count)
{
return (round1.StartingTee + round1.Thru) % ApplicationDomainEx.HoleInfos.Count;
}
else
{
int rsult = (round1.StartingTee + (round1.Thru ?? 0) - 1) % 18;
return rsult == 0 ? ApplicationDomainEx.HoleInfos.Count : rsult;
}
}
} }
} }
...@@ -132,14 +132,5 @@ namespace VIZ.TVP.Golf.Service ...@@ -132,14 +132,5 @@ namespace VIZ.TVP.Golf.Service
/// <param name="before">之前的排名</param> /// <param name="before">之前的排名</param>
/// <param name="after">之后的排名</param> /// <param name="after">之后的排名</param>
void UpdateGroupPositionChanged(IList<GroupTempModel> before, IList<GroupTempModel> after); void UpdateGroupPositionChanged(IList<GroupTempModel> before, IList<GroupTempModel> after);
/// <summary>
/// 获取分组当前所在洞号
/// </summary>
/// <param name="list">真实数据列表</param>
/// <param name="group">分组</param>
/// <param name="round">轮次</param>
/// <returns>当前所在洞号</returns>
int? GetGroupCurrentHole(List<PlayerRealModel> list, GroupTempModel group, int round);
} }
} }
...@@ -208,31 +208,6 @@ ...@@ -208,31 +208,6 @@
<Resource Include="logo.ico" /> <Resource Include="logo.ico" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="images\BottomInformation.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="images\CenterInformation.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="images\CenterPlayerRanking.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="images\CenterTeamRanking.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="images\BottomHoleInfo.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="picture\player\北大国发院.jpg"> <None Include="picture\player\北大国发院.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
...@@ -268,66 +243,6 @@ ...@@ -268,66 +243,6 @@
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="images\NameBar1.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="images\NameBarBottom.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="images\TeamInfo.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="images\GroupInfo.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="images\Champion.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="images\GroupHoleInfo.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="images\BeforeMatchTeamRanking.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="images\AfterMatchTeamRanking.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="images\ShortTeamRanking.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="images\LongTeamRanking.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="images\BeforeMatchGroupRanking.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="images\AfterMatchGroupRanking.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="picture\team\Tbeidaguofa.png"> <None Include="picture\team\Tbeidaguofa.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
...@@ -415,5 +330,60 @@ ...@@ -415,5 +330,60 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="images\team_group_info.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="images\team_group_info2.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="images\group_info.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="images\group_info2.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="images\champion.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="images\champion1.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="images\group_hole_info.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="images\hole_info.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="images\team_ranking_round1.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="images\team_ranking_round2.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="images\team_ranking_short.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>
\ No newline at end of file

44.8 KB | W: | H:

53.1 KB | W: | H:

VIZ.TVP.Golf/images/Champion.jpg
VIZ.TVP.Golf/images/Champion.jpg
VIZ.TVP.Golf/images/Champion.jpg
VIZ.TVP.Golf/images/Champion.jpg
  • 2-up
  • Swipe
  • Onion skin
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