|
24 | 24 | <converters1:TrueToVisibleConverter x:Key="TrueToVisibleConverter" />
|
25 | 25 | <converters:FalseToVisibilityConverter x:Key="FalseToVisibleConverter" />
|
26 | 26 | <converters1:AnyTrueToVisibleConverter x:Key="AnyTrueToVisibleConverter"/>
|
| 27 | + <!--<Style x:Key="SectionControlStyle1" TargetType="{x:Type framework:SectionControl}"/>--> |
| 28 | + <Style TargetType="DataGrid"> |
| 29 | + <!--网格线颜色--> |
| 30 | + <Setter Property="CanUserResizeColumns" Value="false"/> |
| 31 | + <Setter Property="Background" Value="#E6DBBB" /> |
| 32 | + <Setter Property="BorderBrush" Value="#d6c79b" /> |
| 33 | + <Setter Property="HorizontalGridLinesBrush"> |
| 34 | + <Setter.Value> |
| 35 | + <SolidColorBrush Color="#d6c79b"/> |
| 36 | + </Setter.Value> |
| 37 | + </Setter> |
| 38 | + <Setter Property="VerticalGridLinesBrush"> |
| 39 | + <Setter.Value> |
| 40 | + <SolidColorBrush Color="#d6c79b"/> |
| 41 | + </Setter.Value> |
| 42 | + </Setter> |
| 43 | + </Style> |
| 44 | + |
| 45 | + <!--标题栏样式--> |
| 46 | + <!--<Style TargetType="DataGridColumnHeader" > |
| 47 | + <Setter Property="Width" Value="50"/> |
| 48 | + <Setter Property="Height" Value="30"/> |
| 49 | + <Setter Property="FontSize" Value="14" /> |
| 50 | + <Setter Property="Background" Value="White" /> |
| 51 | + <Setter Property="FontWeight" Value="Bold"/> |
| 52 | + </Style>--> |
| 53 | + |
| 54 | + <Style TargetType="DataGridColumnHeader"> |
| 55 | + <Setter Property="SnapsToDevicePixels" Value="True" /> |
| 56 | + <Setter Property="MinWidth" Value="0" /> |
| 57 | + <Setter Property="MinHeight" Value="28" /> |
| 58 | + <Setter Property="Foreground" Value="#323433" /> |
| 59 | + <Setter Property="FontSize" Value="14" /> |
| 60 | + <Setter Property="Cursor" Value="Hand" /> |
| 61 | + <Setter Property="Template"> |
| 62 | + <Setter.Value> |
| 63 | + <ControlTemplate TargetType="DataGridColumnHeader"> |
| 64 | + <Border x:Name="BackgroundBorder" BorderThickness="0,1,0,1" |
| 65 | + BorderBrush="#e6dbba" |
| 66 | + Width="Auto"> |
| 67 | + <Grid > |
| 68 | + <Grid.ColumnDefinitions> |
| 69 | + <ColumnDefinition Width="*" /> |
| 70 | + </Grid.ColumnDefinitions> |
| 71 | + <ContentPresenter Margin="0,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
| 72 | + <Path x:Name="SortArrow" Visibility="Collapsed" Data="M0,0 L1,0 0.5,1 z" Stretch="Fill" Grid.Column="2" Width="8" Height="6" Fill="White" Margin="0,0,50,0" |
| 73 | + VerticalAlignment="Center" RenderTransformOrigin="1,1" /> |
| 74 | + <Rectangle Width="1" Fill="#d6c79b" HorizontalAlignment="Right" Grid.ColumnSpan="1" /> |
| 75 | + <!--<TextBlock Background="Red"> |
| 76 | + <ContentPresenter></ContentPresenter></TextBlock>--> |
| 77 | + </Grid> |
| 78 | + </Border> |
| 79 | + </ControlTemplate> |
| 80 | + </Setter.Value> |
| 81 | + </Setter> |
| 82 | + <Setter Property="Height" Value="25"/> |
| 83 | + </Style> |
| 84 | + <!--行样式触发--> |
| 85 | + <!--背景色改变必须先设置cellStyle 因为cellStyle会覆盖rowStyle样式--> |
| 86 | + <Style TargetType="DataGridRow"> |
| 87 | + <Setter Property="Background" Value="#F2F2F2" /> |
| 88 | + <Setter Property="Height" Value="25"/> |
| 89 | + <Setter Property="Foreground" Value="Black" /> |
| 90 | + <Style.Triggers> |
| 91 | + <!--隔行换色--> |
| 92 | + <Trigger Property="AlternationIndex" Value="0" > |
| 93 | + <Setter Property="Background" Value="#e7e7e7" /> |
| 94 | + </Trigger> |
| 95 | + <Trigger Property="AlternationIndex" Value="1" > |
| 96 | + <Setter Property="Background" Value="#f2f2f2" /> |
| 97 | + </Trigger> |
| 98 | + |
| 99 | + <Trigger Property="IsMouseOver" Value="True"> |
| 100 | + <Setter Property="Background" Value="LightGray"/> |
| 101 | + <!--<Setter Property="Foreground" Value="White"/>--> |
| 102 | + </Trigger> |
| 103 | + |
| 104 | + <Trigger Property="IsSelected" Value="True"> |
| 105 | + <Setter Property="Foreground" Value="Black"/> |
| 106 | + </Trigger> |
| 107 | + </Style.Triggers> |
| 108 | + </Style> |
| 109 | + |
| 110 | + <!--单元格样式触发--> |
| 111 | + <Style TargetType="DataGridCell"> |
| 112 | + <Setter Property="Template"> |
| 113 | + <Setter.Value> |
| 114 | + <ControlTemplate TargetType="DataGridCell"> |
| 115 | + <TextBlock TextAlignment="Center" VerticalAlignment="Center" > |
| 116 | + <ContentPresenter /> |
| 117 | + </TextBlock> |
| 118 | + </ControlTemplate> |
| 119 | + </Setter.Value> |
| 120 | + </Setter> |
| 121 | + <Style.Triggers> |
| 122 | + <Trigger Property="IsSelected" Value="True"> |
| 123 | + <!--<Setter Property="Background" Value="White"/> |
| 124 | + <Setter Property="BorderThickness" Value="0"/>--> |
| 125 | + <Setter Property="Foreground" Value="Black"/> |
| 126 | + </Trigger> |
| 127 | + </Style.Triggers> |
| 128 | + </Style> |
27 | 129 | </Grid.Resources>
|
28 | 130 | <Grid.RowDefinitions>
|
29 | 131 | <RowDefinition Height="Auto" />
|
|
35 | 137 | <Separator Style="{StaticResource VerticalSeparator}" />
|
36 | 138 | <teamExplorer:TextLink Text="拉取(变基)" Localization.Attributes="Text (Modifiable Readable Text)" Command="{Binding Rebase}" />
|
37 | 139 | <Separator Style="{StaticResource VerticalSeparator}" />
|
38 |
| - <teamExplorer:TextLink Text="Push" Localization.Attributes="Text (Modifiable Readable Text)" Command="{Binding Push}" /> |
| 140 | + <teamExplorer:TextLink Text="推送" Localization.Attributes="Text (Modifiable Readable Text)" Command="{Binding Push}" /> |
39 | 141 |
|
40 |
| - <Separator Style="{StaticResource VerticalSeparator}" /> |
41 |
| - <teamExplorer:TextLink Text="Push (Force)" Localization.Attributes="Text (Modifiable Readable Text)" Command="{Binding PushForce}" IsEnabled="{Binding Mode=TwoWay, Path=DoForcePush}" /> |
| 142 | + <!--<Separator Style="{StaticResource VerticalSeparator}" /> |
| 143 | + <teamExplorer:TextLink Text="Push (Force)" Localization.Attributes="Text (Modifiable Readable Text)" Command="{Binding PushForce}" IsEnabled="{Binding Mode=TwoWay, Path=DoForcePush}" />--> |
42 | 144 | <Separator Style="{StaticResource VerticalSeparator}" />
|
43 | 145 | <teamExplorer:TextLink Text="获取" Localization.Attributes="Text (Modifiable Readable Text)" Command="{Binding FetchOrigin}" />
|
44 | 146 | </WrapPanel>
|
|
55 | 157 | </MultiBinding>
|
56 | 158 | </WrapPanel.Visibility>
|
57 | 159 | <Rectangle Margin="2,0,4,2" Width="14" Height="14" Fill="{StaticResource WarningIconBrush}" Visibility="{Binding Path=IsDirty, Converter={StaticResource TrueToVisibleConverter}, ConverterParameter=Hidden}" />
|
58 |
| - <teamExplorer:TextLink Margin="0,0,0,0" Text="Pending changes in staging area. Please Resolve." Command="{Binding Path=ViewChangesPage}" Visibility="{Binding Path=IsDirty, Converter={StaticResource TrueToVisibleConverter}}" /> |
| 160 | + <teamExplorer:TextLink Margin="0,0,0,0" Text="暂存区有等待处理的文件,请处理(提交或暂存或解决冲突)" Command="{Binding Path=ViewChangesPage}" Visibility="{Binding Path=IsDirty, Converter={StaticResource TrueToVisibleConverter}}" /> |
59 | 161 | </WrapPanel>
|
60 | 162 | <WrapPanel Margin="0,6,0,0" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Stretch">
|
61 | 163 | <WrapPanel.Visibility>
|
|
65 | 167 | </MultiBinding>
|
66 | 168 | </WrapPanel.Visibility>
|
67 | 169 | <Rectangle Margin="2,0,4,2" Width="14" Height="14" Fill="{StaticResource WarningIconBrush}" Visibility="{Binding Path=IsConflicts, Converter={StaticResource TrueToVisibleConverter}, ConverterParameter=Hidden}" />
|
68 |
| - <teamExplorer:TextLink Margin="0,0,0,0" Text="Conflicts Found" Command="{Binding Path=ViewConflictsPage}" Visibility="{Binding Path=IsConflicts, Converter={StaticResource TrueToVisibleConverter}}" /> |
| 170 | + <teamExplorer:TextLink Margin="0,0,0,0" Text="发现冲突" Command="{Binding Path=ViewConflictsPage}" Visibility="{Binding Path=IsConflicts, Converter={StaticResource TrueToVisibleConverter}}" /> |
69 | 171 | <Separator Style="{StaticResource VerticalSeparator}" Visibility="{Binding Path=IsRebaseInProgress, Converter={StaticResource TrueToVisibleConverter}}" />
|
70 |
| - <teamExplorer:TextLink Margin="0,0,6,0" Text="Continue" Localization.Attributes="Text (Modifiable Readable Text)" Command="{Binding Path=ContinueRebase}" Visibility="{Binding Path=IsRebaseInProgress, Converter={StaticResource TrueToVisibleConverter}}" /> |
71 |
| - <teamExplorer:TextLink Margin="0,0,6,0" Text="Abort" Localization.Attributes="Text (Modifiable Readable Text)" Command="{Binding Path=AbortRebase}" Visibility="{Binding Path=IsRebaseInProgress, Converter={StaticResource TrueToVisibleConverter}}" /> |
72 |
| - <teamExplorer:TextLink Margin="0,0,6,0" Text="Skip (use with care)" Localization.Attributes="Text (Modifiable Readable Text)" Command="{Binding Path=Skip}" Visibility="{Binding Path=IsRebaseInProgress, Converter={StaticResource TrueToVisibleConverter}}" /> |
| 172 | + <teamExplorer:TextLink Margin="0,0,6,0" Text="继续变基" Localization.Attributes="Text (Modifiable Readable Text)" Command="{Binding Path=ContinueRebase}" Visibility="{Binding Path=IsRebaseInProgress, Converter={StaticResource TrueToVisibleConverter}}" /> |
| 173 | + <teamExplorer:TextLink Margin="0,0,6,0" Text="终止变基" Localization.Attributes="Text (Modifiable Readable Text)" Command="{Binding Path=AbortRebase}" Visibility="{Binding Path=IsRebaseInProgress, Converter={StaticResource TrueToVisibleConverter}}" /> |
| 174 | + <teamExplorer:TextLink Margin="0,0,6,0" Text="跳过 (慎点)" Localization.Attributes="Text (Modifiable Readable Text)" Command="{Binding Path=Skip}" Visibility="{Binding Path=IsRebaseInProgress, Converter={StaticResource TrueToVisibleConverter}}" /> |
73 | 175 | </WrapPanel>
|
74 | 176 | <WrapPanel Margin="0,6,0,0" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Stretch" Visibility="{Binding OperationSuccess, Converter={StaticResource FalseToVisibleConverter}, FallbackValue=Collapsed}">
|
75 | 177 | <Rectangle Margin="2,0,4,2" Width="14" Height="14" Fill="{StaticResource WarningIconBrush}" />
|
|
84 | 186 | <wpf:TextBlockControl Text="分支:" Margin="6,6,3,0" />
|
85 | 187 | <teamExplorer:TextLink Text="{Binding CurrentBranch.FriendlyName}" Margin="3,6,3,0" Command="{Binding ChangeBranch}" />
|
86 | 188 | </StackPanel>
|
87 |
| - <framework:SectionControl HeaderText="父提交" IsExpanded="True" Margin="0,6,0,0" IsBusy="{Binding IsBusy}" ShowProgressWhenBusy="True" > |
| 189 | + <framework:SectionControl HeaderText="父提交" IsExpanded="True" Margin="0,6,0,0" IsBusy="{Binding IsBusy}" ShowProgressWhenBusy="True" Style="{DynamicResource SectionControlStyle1}" > |
88 | 190 | <framework:SectionControl.Content>
|
89 | 191 | <Grid>
|
90 | 192 | <Grid.RowDefinitions>
|
|
107 | 209 |
|
108 | 210 | </ComboBox>
|
109 | 211 | </StackPanel>
|
110 |
| - <DataGrid Grid.Row="1" IsReadOnly="True" SelectionMode="Single" SelectedValue="{Binding SelectedCommit}" ItemsSource="{Binding BranchCommits}" AutoGenerateColumns="False" Margin="0,0,6,0" Background="{x:Null}" BorderBrush="{x:Null}"> |
| 212 | + <DataGrid Grid.Row="1" IsReadOnly="True" SelectionMode="Single" SelectedValue="{Binding SelectedCommit}" ItemsSource="{Binding BranchCommits}" AutoGenerateColumns="False" Margin="0,0,6,0" BorderBrush="{x:Null}" Background="{x:Null}"> |
111 | 213 | <DataGrid.Columns>
|
112 | 214 | <DataGridTextColumn MaxWidth="50" Binding="{Binding Sha, Converter={converters:PrefixValueConverter PrefixLength=6}}" Header="ID"/>
|
113 | 215 | <DataGridTextColumn Binding="{Binding MessageShort}" Width="250" Header="消息" />
|
|
130 | 232 | </framework:SectionControl.Content>
|
131 | 233 | </framework:SectionControl>
|
132 | 234 |
|
133 |
| - <framework:SectionControl HeaderText="推送" IsExpanded="False" Margin="0,6,0,0" IsBusy="{Binding IsBusy}" ShowProgressWhenBusy="True" > |
| 235 | + <framework:SectionControl HeaderText="推送" IsExpanded="False" Margin="0,6,0,0" IsBusy="{Binding IsBusy}" ShowProgressWhenBusy="True" Visibility="Collapsed" > |
134 | 236 | <framework:SectionControl.Content>
|
135 | 237 | <CheckBox IsChecked="{Binding Mode=TwoWay, Path=DoForcePush}" Background="Transparent" Content="执行强制推送 (不建议)" Margin="6,6,3,0" ToolTip="如果你确定要这么做,请通知你的队友" />
|
136 | 238 | </framework:SectionControl.Content>
|
|
0 commit comments