refactor: #154 为样式的ViewModel构建基类以减少重复代码

This commit is contained in:
denglihong2007
2025-05-18 21:36:46 +08:00
parent 9640997115
commit 1b72ddd73f
43 changed files with 157 additions and 956 deletions

View File

@@ -41,7 +41,7 @@
</StackPanel>
</StackPanel>
<StackPanel Orientation="Vertical">
<DataGrid ItemsSource="{Binding Screen}" AutoGenerateColumns="False" BorderThickness="0"
<DataGrid ItemsSource="{Binding LeftScreen}" AutoGenerateColumns="False" BorderThickness="0"
CanUserResizeColumns="False" CanUserSortColumns="False" CanUserAddRows="False"
CanUserResizeRows="False" CanUserReorderColumns="False"
IsReadOnly="True" GridLinesVisibility="None" RowHeight="34" Foreground="White"

View File

@@ -28,7 +28,7 @@
<converters1:DateTimeToStringConverter x:Key="DateTimeToStringConverter" Format="HH:mm" />
</Window.Resources>
<StackPanel Orientation="Vertical">
<DataGrid ItemsSource="{Binding Screen}" AutoGenerateColumns="False"
<DataGrid ItemsSource="{Binding LeftScreen}" AutoGenerateColumns="False"
CanUserResizeColumns="False" CanUserSortColumns="False" CanUserAddRows="False"
CanUserResizeRows="False" CanUserReorderColumns="False" ClipToBounds="False"
IsReadOnly="True" GridLinesVisibility="None" RowHeight="28" Foreground="White"

View File

@@ -39,7 +39,7 @@
</StackPanel>
</StackPanel>
<StackPanel Orientation="Vertical">
<DataGrid ItemsSource="{Binding Screen}" AutoGenerateColumns="False" BorderThickness="0"
<DataGrid ItemsSource="{Binding LeftScreen}" AutoGenerateColumns="False" BorderThickness="0"
CanUserResizeColumns="False" CanUserSortColumns="False" CanUserAddRows="False"
CanUserResizeRows="False" CanUserReorderColumns="False" ClipToBounds="False"
IsReadOnly="True" GridLinesVisibility="None" RowHeight="34" Foreground="White"

View File

@@ -36,20 +36,20 @@
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Grid.Row="0" Text="{Binding Screen[0].TrainNumber}" VerticalAlignment="Center" TextAlignment="Left"/>
<TextBlock Grid.Column="0" Grid.Row="0" Text="{Binding LeftScreen[0].TrainNumber}" VerticalAlignment="Center" TextAlignment="Left"/>
<TextBlock Grid.Column="1" Grid.Row="0" Text="次" Margin="4,0,0,0" VerticalAlignment="Center" TextAlignment="Left"/>
<TextBlock Grid.Column="3" Grid.Row="0" Text="本站" Foreground="#de502b" VerticalAlignment="Center" TextAlignment="Center"/>
<TextBlock Grid.Column="5" Grid.Row="0" Text="{Binding Screen[0].DepartureTime,Converter={StaticResource DateTimeToStringConverter}}" VerticalAlignment="Center" TextAlignment="Right"/>
<TextBlock Grid.Column="5" Grid.Row="0" Text="{Binding LeftScreen[0].DepartureTime,Converter={StaticResource DateTimeToStringConverter}}" VerticalAlignment="Center" TextAlignment="Right"/>
<TextBlock Grid.Column="6" Grid.Row="0" Text="开" Margin="4,0,0,0" VerticalAlignment="Center" TextAlignment="Right"/>
<TextBlock Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" Text="{Binding Screen[0].Origin}" VerticalAlignment="Center" TextAlignment="Left"/>
<TextBlock Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" Text="{Binding LeftScreen[0].Origin}" VerticalAlignment="Center" TextAlignment="Left"/>
<TextBlock Grid.Column="3" Grid.Row="1" Text="开往" Foreground="#de502b" VerticalAlignment="Center" TextAlignment="Center"/>
<TextBlock Grid.Column="5" Grid.ColumnSpan="2" Grid.Row="1" Text="{Binding Screen[0].Terminal}" VerticalAlignment="Center" TextAlignment="Right"/>
<TextBlock Grid.Column="5" Grid.ColumnSpan="2" Grid.Row="1" Text="{Binding LeftScreen[0].Terminal}" VerticalAlignment="Center" TextAlignment="Right"/>
<pp:RunningText Speed="20" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="7">
<pp:RunningText.Text>
<MultiBinding Mode="OneWay" Converter="{StaticResource LocationToStringConverter}">
<Binding Path="Screen[0].Length" />
<Binding Path="LeftScreen[0].Length" />
<Binding Path="Location" />
</MultiBinding>
</pp:RunningText.Text>

View File

@@ -45,7 +45,7 @@
</Grid>
</StackPanel>
<StackPanel Orientation="Vertical">
<DataGrid ItemsSource="{Binding Screen}" AutoGenerateColumns="False" BorderThickness="0.1"
<DataGrid ItemsSource="{Binding LeftScreen}" AutoGenerateColumns="False" BorderThickness="0.1"
CanUserResizeColumns="False" CanUserSortColumns="False" CanUserAddRows="False"
CanUserResizeRows="False" CanUserReorderColumns="False" ClipToBounds="False"
IsReadOnly="True" GridLinesVisibility="None" RowHeight="28" Foreground="White"

View File

@@ -49,7 +49,7 @@
</Grid>
</StackPanel>
<StackPanel Orientation="Vertical">
<DataGrid ItemsSource="{Binding Screen}" AutoGenerateColumns="False" BorderThickness="0.1"
<DataGrid ItemsSource="{Binding LeftScreen}" AutoGenerateColumns="False" BorderThickness="0.1"
CanUserResizeColumns="False" CanUserSortColumns="False" CanUserAddRows="False"
CanUserResizeRows="False" CanUserReorderColumns="False" ClipToBounds="False"
IsReadOnly="True" GridLinesVisibility="None" RowHeight="28" Foreground="White"

View File

@@ -94,7 +94,7 @@
</Grid>
</Grid>
<DataGrid ItemsSource="{Binding Screen, Mode=OneWay}" AutoGenerateColumns="False"
<DataGrid ItemsSource="{Binding LeftScreen, Mode=OneWay}" AutoGenerateColumns="False"
CanUserResizeColumns="False" CanUserSortColumns="False" CanUserAddRows="False"
CanUserResizeRows="False" CanUserReorderColumns="False"
IsReadOnly="True" GridLinesVisibility="None" RowHeight="35"

View File

@@ -27,7 +27,7 @@
<converters:TrainStateConverter x:Key="TrainStateConverter" WaitingText="正点"/>
</Window.Resources>
<StackPanel Orientation="Horizontal">
<DataGrid ItemsSource="{Binding Screen}" AutoGenerateColumns="False"
<DataGrid ItemsSource="{Binding LeftScreen}" AutoGenerateColumns="False"
CanUserResizeColumns="False" CanUserSortColumns="False" CanUserAddRows="False"
CanUserResizeRows="False" CanUserReorderColumns="False"
IsReadOnly="True" GridLinesVisibility="None" RowHeight="28" Foreground="#D75B41"

View File

@@ -35,11 +35,11 @@
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Foreground="#0089FF" Text="{Binding Screen[0].DepartureTime,Converter={StaticResource DateTimeToStringConverter}}" FontSize="32" Margin="64,0,0,0" FontWeight="Bold"/>
<TextBlock Grid.Column="0" Foreground="#0089FF" Text="{Binding LeftScreen[0].DepartureTime,Converter={StaticResource DateTimeToStringConverter}}" FontSize="32" Margin="64,0,0,0" FontWeight="Bold"/>
<TextBlock Grid.Column="1" Foreground="#0089FF" Text="开" FontSize="32" Margin="4,0,8,0" FontWeight="Bold"/>
<Image Grid.Column="2" Source="pack://application:,,,/CRSim.ScreenSimulator;component/Assets/Hanzhong/Image.png" Height="{Binding ActualHeight,ElementName=Panel}"/>
<Rectangle Grid.Column="3" Fill="#0089FF" Height="{Binding ActualHeight,ElementName=Panel}"/>
<TextBlock Grid.Column="4" Text="{Binding Screen[0].TrainNumber}" Foreground="#FE5649" Background="#0089FF" FontSize="32" FontWeight="Bold"/>
<TextBlock Grid.Column="4" Text="{Binding LeftScreen[0].TrainNumber}" Foreground="#FE5649" Background="#0089FF" FontSize="32" FontWeight="Bold"/>
<Rectangle Grid.Column="5" Fill="#0089FF" Height="{Binding ActualHeight,ElementName=Panel}" Width="8"/>
<TextBlock Grid.Column="6" Text="次" Foreground="#FE5649" Background="#0089FF" FontSize="32" FontWeight="Bold"/>
<Rectangle Grid.Column="7" Fill="#0089FF" Height="{Binding ActualHeight,ElementName=Panel}" Width="52"/>
@@ -51,7 +51,7 @@
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" TextAlignment="Center" Text="{Binding Screen[0].Origin}" FontSize="36" Foreground="#09F2F6" FontWeight="Bold"/>
<TextBlock Grid.Column="0" TextAlignment="Center" Text="{Binding LeftScreen[0].Origin}" FontSize="36" Foreground="#09F2F6" FontWeight="Bold"/>
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
@@ -70,7 +70,7 @@
<Polygon Points="0,0 0,10 8.66,5" Fill="#FDB441" Margin="2.5"/>
</StackPanel>
</Grid>
<TextBlock Grid.Column="2" TextAlignment="Center" Text="{Binding Screen[0].Terminal}" FontSize="36" Foreground="#09F2F6" FontWeight="Bold"/>
<TextBlock Grid.Column="2" TextAlignment="Center" Text="{Binding LeftScreen[0].Terminal}" FontSize="36" Foreground="#09F2F6" FontWeight="Bold"/>
</Grid>
<TextBlock Grid.Row="2" TextAlignment="Center" Foreground="White" Text="{Binding Text}" Margin="0,5"/>
</Grid>

View File

@@ -39,18 +39,18 @@
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding Screen[0].TrainNumber}" VerticalAlignment="Center" TextAlignment="Center"/>
<TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding LeftScreen[0].TrainNumber}" VerticalAlignment="Center" TextAlignment="Center"/>
<TextBlock Grid.Row="0" Grid.Column="2" Text="次" Margin="4,0,0,0" VerticalAlignment="Center" TextAlignment="Center"/>
<TextBlock Grid.Row="0" Grid.Column="4" Text="本站" Foreground="#de502b" VerticalAlignment="Center" TextAlignment="Center"/>
<TextBlock Grid.Row="0" Grid.Column="6" Text="{Binding Screen[0].DepartureTime,Converter={StaticResource DateTimeToStringConverter}}" VerticalAlignment="Center" TextAlignment="Center"/>
<TextBlock Grid.Row="0" Grid.Column="6" Text="{Binding LeftScreen[0].DepartureTime,Converter={StaticResource DateTimeToStringConverter}}" VerticalAlignment="Center" TextAlignment="Center"/>
<TextBlock Grid.Row="0" Grid.Column="7" Text="开" Margin="4,0,0,0" VerticalAlignment="Center" TextAlignment="Center"/>
<TextBlock Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Text="{Binding Screen[0].Origin}" VerticalAlignment="Center" TextAlignment="Center"/>
<TextBlock Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Text="{Binding LeftScreen[0].Origin}" VerticalAlignment="Center" TextAlignment="Center"/>
<TextBlock Grid.Row="1" Grid.Column="4" Text="开往" Foreground="#de502b" VerticalAlignment="Center" TextAlignment="Center"/>
<TextBlock Grid.Row="1" Grid.Column="6" Grid.ColumnSpan="2" Text="{Binding Screen[0].Terminal}" VerticalAlignment="Center" TextAlignment="Center"/>
<TextBlock Grid.Row="1" Grid.Column="6" Grid.ColumnSpan="2" Text="{Binding LeftScreen[0].Terminal}" VerticalAlignment="Center" TextAlignment="Center"/>
<pp:RunningText Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="9" Speed="20">
<pp:RunningText.Text>
<MultiBinding Mode="OneWay" Converter="{StaticResource LocationToStringConverter}">
<Binding Path="Screen[0].Length" />
<Binding Path="LeftScreen[0].Length" />
<Binding Path="Location" />
</MultiBinding>
</pp:RunningText.Text>

View File

@@ -107,7 +107,7 @@
</Canvas>
</Grid>
<DataGrid ItemsSource="{Binding Screen, Mode=OneWay}" AutoGenerateColumns="False"
<DataGrid ItemsSource="{Binding LeftScreen, Mode=OneWay}" AutoGenerateColumns="False"
CanUserResizeColumns="False" CanUserSortColumns="False" CanUserAddRows="False"
CanUserResizeRows="False" CanUserReorderColumns="False"
IsReadOnly="True" GridLinesVisibility="None" RowHeight="28"

View File

@@ -40,11 +40,11 @@
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Orientation="Horizontal">
<TextBlock Text="←" Foreground="LightYellow" Margin="4,0,0,0" FontFamily="黑体"/>
<TextBlock Text="{Binding Screen[0].TrainNumber}" Foreground="LightYellow" Margin="40,0,0,0"/>
<TextBlock Text="{Binding LeftScreen[0].TrainNumber}" Foreground="LightYellow" Margin="40,0,0,0"/>
<TextBlock Text="次" Foreground="LightYellow" Margin="25,0,0,0"/>
</StackPanel>
<TextBlock Grid.Column="2" Visibility="{Binding Screen[0].Landmark,Converter={StaticResource EmptyToVisibilityConverter}}" Text="{Binding Screen[0].Landmark}" Foreground="Red" FontWeight="Bold"/>
<TextBlock Grid.Column="3" Visibility="{Binding Screen[0].Landmark,Converter={StaticResource EmptyToVisibilityConverter}}" Text="地标" Foreground="Red" FontWeight="Bold"/>
<TextBlock Grid.Column="2" Visibility="{Binding LeftScreen[0].Landmark,Converter={StaticResource EmptyToVisibilityConverter}}" Text="{Binding LeftScreen[0].Landmark}" Foreground="Red" FontWeight="Bold"/>
<TextBlock Grid.Column="3" Visibility="{Binding LeftScreen[0].Landmark,Converter={StaticResource EmptyToVisibilityConverter}}" Text="地标" Foreground="Red" FontWeight="Bold"/>
</Grid>
<Grid Grid.Row="1" Margin="0,10">
<Grid.ColumnDefinitions>
@@ -57,11 +57,11 @@
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding Screen[0].DepartureTime,Converter={StaticResource DateTimeToStringConverter}}" Foreground="LawnGreen" FontSize="25"/>
<TextBlock Grid.Column="0" Text="{Binding LeftScreen[0].DepartureTime,Converter={StaticResource DateTimeToStringConverter}}" Foreground="LawnGreen" FontSize="25"/>
<TextBlock Grid.Column="1" Text="开" Foreground="LawnGreen" FontSize="25" Margin="5,0,0,0"/>
<TextBlock Grid.Column="3" Text="{Binding Screen[0].Origin}" Foreground="LawnGreen" FontSize="25"/>
<TextBlock Grid.Column="3" Text="{Binding LeftScreen[0].Origin}" Foreground="LawnGreen" FontSize="25"/>
<TextBlock Grid.Column="5" Text="开往" Foreground="LawnGreen" FontSize="25"/>
<TextBlock Grid.Column="7" Text="{Binding Screen[0].Terminal}" Foreground="LawnGreen" FontSize="25" Margin="0,0,4,0"/>
<TextBlock Grid.Column="7" Text="{Binding LeftScreen[0].Terminal}" Foreground="LawnGreen" FontSize="25" Margin="0,0,4,0"/>
</Grid>
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
@@ -72,7 +72,7 @@
<pp:RunningText Speed="20" Width="265" Grid.Column="0" FontSize="25" Foreground="LightYellow">
<pp:RunningText.Text>
<MultiBinding Mode="OneWay" Converter="{StaticResource LocationToStringConverter}">
<Binding Path="Screen[0].Length" />
<Binding Path="LeftScreen[0].Length" />
<Binding Path="Location" />
</MultiBinding>
</pp:RunningText.Text>

View File

@@ -25,7 +25,7 @@
<converters:TrainStateConverter x:Key="TrainStateConverter" WaitingText="候 车" CheckInText="检 票" StopCheckInText="停 检"/>
<converters:TrainStateColorConverter x:Key="TrainStateColorConverter" WaitingColor="LightYellow"/>
</Window.Resources>
<DataGrid ItemsSource="{Binding Screen}" AutoGenerateColumns="False"
<DataGrid ItemsSource="{Binding LeftScreen}" AutoGenerateColumns="False"
CanUserResizeColumns="False" CanUserSortColumns="False" CanUserAddRows="False"
CanUserResizeRows="False" CanUserReorderColumns="False" ClipToBounds="False"
IsReadOnly="True" GridLinesVisibility="None" RowHeight="28" Foreground="LightYellow"

View File

@@ -42,7 +42,7 @@
</Grid.ColumnDefinitions>
<Border Grid.Column="0" CornerRadius="4,0,0,4" Background="#830DFF">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Screen[0].TrainNumber}" Foreground="White" VerticalAlignment="Center" Margin="8,0,0,0"/>
<TextBlock Text="{Binding LeftScreen[0].TrainNumber}" Foreground="White" VerticalAlignment="Center" Margin="8,0,0,0"/>
<TextBlock Text="次" Foreground="White" VerticalAlignment="Center" Margin="20,0"/>
</StackPanel>
</Border>
@@ -50,7 +50,7 @@
<Border Grid.Column="2" CornerRadius="0,4,4,0" Background="Yellow" x:Name="Panel">
<StackPanel Orientation="Horizontal">
<Image Grid.Column="0" Source="pack://application:,,,/CRSim.ScreenSimulator;component/Assets/Tianjin/Image.png" Height="{Binding ActualHeight,ElementName=Panel}"/>
<TextBlock Grid.Column="1" Text="{Binding Screen[0].DepartureTime,Converter={StaticResource DateTimeToStringConverter}}" Foreground="Black" VerticalAlignment="Center" Padding="12,0,64,0"/>
<TextBlock Grid.Column="1" Text="{Binding LeftScreen[0].DepartureTime,Converter={StaticResource DateTimeToStringConverter}}" Foreground="Black" VerticalAlignment="Center" Padding="12,0,64,0"/>
</StackPanel>
</Border>
</Grid>
@@ -60,7 +60,7 @@
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" TextAlignment="Center" Text="{Binding Screen[0].Origin}" FontSize="32" Foreground="White" FontWeight="Bold"/>
<TextBlock Grid.Column="0" TextAlignment="Center" Text="{Binding LeftScreen[0].Origin}" FontSize="32" Foreground="White" FontWeight="Bold"/>
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
@@ -77,13 +77,13 @@
<Polygon Grid.Column="1" Points="0,0 0,8 8.66,4" Fill="White" Margin="0"/>
</Grid>
</Grid>
<TextBlock Grid.Column="2" TextAlignment="Center" Text="{Binding Screen[0].Terminal}" FontSize="32" Foreground="White" FontWeight="Bold"/>
<TextBlock Grid.Column="2" TextAlignment="Center" Text="{Binding LeftScreen[0].Terminal}" FontSize="32" Foreground="White" FontWeight="Bold"/>
</Grid>
<Border Grid.Row="3" CornerRadius="8" Background="#830DFF">
<TextBlock TextAlignment="Center" Foreground="White" FontSize="20" Padding="2">
<TextBlock.Text>
<MultiBinding Mode="OneWay" Converter="{StaticResource LocationToStringConverter}">
<Binding Path="Screen[0].Length" />
<Binding Path="LeftScreen[0].Length" />
<Binding Path="Location" />
</MultiBinding>
</TextBlock.Text>

View File

@@ -45,7 +45,7 @@
</StackPanel>
</StackPanel>
<StackPanel Orientation="Vertical">
<DataGrid ItemsSource="{Binding Screen}" AutoGenerateColumns="False" BorderThickness="0"
<DataGrid ItemsSource="{Binding LeftScreen}" AutoGenerateColumns="False" BorderThickness="0"
CanUserResizeColumns="False" CanUserSortColumns="False" CanUserAddRows="False"
CanUserResizeRows="False" CanUserReorderColumns="False" ClipToBounds="False"
IsReadOnly="True" GridLinesVisibility="None" RowHeight="34" Foreground="White"

View File

@@ -46,11 +46,11 @@
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding Screen[0].TrainNumber}" Foreground="#ffffff" Margin="15,0,0,0" FontSize="18" />
<TextBlock Grid.Column="0" Text="{Binding LeftScreen[0].TrainNumber}" Foreground="#ffffff" Margin="15,0,0,0" FontSize="18" />
<TextBlock Grid.Column="1" Text="次" Foreground="#ffffff" FontSize="16" Margin="20,0,0,0"/>
<TextBlock Grid.Column="3" Text="{Binding Screen[0].ArrivalTime,Converter={StaticResource DateTimeToStringConverter}}" Foreground="#ffffff" FontSize="18"/>
<TextBlock Grid.Column="3" Text="{Binding LeftScreen[0].ArrivalTime,Converter={StaticResource DateTimeToStringConverter}}" Foreground="#ffffff" FontSize="18"/>
<TextBlock Grid.Column="4" Text="到" Foreground="#ffffff" FontSize="18" Margin="10,0"/>
<TextBlock Grid.Column="5" Text="{Binding Screen[0].DepartureTime,Converter={StaticResource DateTimeToStringConverter}}" Foreground="#ffffff" FontSize="18"/>
<TextBlock Grid.Column="5" Text="{Binding LeftScreen[0].DepartureTime,Converter={StaticResource DateTimeToStringConverter}}" Foreground="#ffffff" FontSize="18"/>
<TextBlock Grid.Column="6" Text="开" Foreground="#ffffff" FontSize="18" Margin="10,0"/>
</Grid>
<Grid Grid.Row="1" Margin="0,10,0,10">
@@ -66,9 +66,9 @@
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="1" Text="{Binding Screen[0].Origin}" Foreground="#ffffff" FontSize="20"/>
<TextBlock Grid.Column="1" Text="{Binding LeftScreen[0].Origin}" Foreground="#ffffff" FontSize="20"/>
<TextBlock Grid.Column="3" Text=" — " Foreground="#ffffff" FontSize="20"/>
<TextBlock Grid.Column="5" Text="{Binding Screen[0].Terminal}" Foreground="#ffffff" FontSize="20"/>
<TextBlock Grid.Column="5" Text="{Binding LeftScreen[0].Terminal}" Foreground="#ffffff" FontSize="20"/>
<TextBlock Grid.Column="7" Text="{Binding ThisPlatform}" Foreground="#ffffff" FontSize="20"/>
<TextBlock Grid.Column="9" Text="台" Foreground="#ffffff" FontSize="20" Margin="0,0,10,0"/>
</Grid>
@@ -89,7 +89,7 @@
<TextBlock Grid.Column="1" TextAlignment="Center" Foreground="White" FontSize="18" Padding="2" Margin="0,5,0,5">
<TextBlock.Text>
<MultiBinding Mode="OneWay" Converter="{StaticResource LocationToStringConverter}">
<Binding Path="Screen[0].Length" />
<Binding Path="LeftScreen[0].Length" />
<Binding Path="Location" />
</MultiBinding>
</TextBlock.Text>

View File

@@ -58,7 +58,7 @@
</Window.Resources>
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<DataGrid ItemsSource="{Binding Screen, Mode=OneWay}" AutoGenerateColumns="False"
<DataGrid ItemsSource="{Binding LeftScreen, Mode=OneWay}" AutoGenerateColumns="False"
CanUserResizeColumns="False" CanUserSortColumns="False" CanUserAddRows="False"
CanUserResizeRows="False" CanUserReorderColumns="False"
IsReadOnly="True" GridLinesVisibility="None" RowHeight="35"