Docker 安裝教程 https://www.studenty.cn/?p=1111 Jenkins 安裝教程 https://www.studenty.cn/?p=1404 新建一個ASP.NET Core API應用程式(需要勾選Docker支持): 在GitHub新建一個項目並上傳代碼 建立 ...
1 <SolidColorBrush 2 x:Key="Menu.Static.Background" 3 Color="#FFF0F0F0" /> 4 <SolidColorBrush 5 x:Key="Menu.Static.Border" 6 Color="#FF999999" /> 7 <SolidColorBrush 8 x:Key="Menu.Static.Foreground" 9 Color="#FF212121" /> 10 <SolidColorBrush 11 x:Key="Menu.Static.Separator" 12 Color="#FFD7D7D7" /> 13 <SolidColorBrush 14 x:Key="Menu.Disabled.Foreground" 15 Color="#FF707070" /> 16 <SolidColorBrush 17 x:Key="MenuItem.Selected.Background" 18 Color="#3D26A0DA" /> 19 <SolidColorBrush 20 x:Key="MenuItem.Selected.Border" 21 Color="#FF26A0DA" /> 22 <SolidColorBrush 23 x:Key="MenuItem.Highlight.Background" 24 Color="#3D26A0DA" /> 25 <SolidColorBrush 26 x:Key="MenuItem.Highlight.Border" 27 Color="#FF26A0DA" /> 28 <SolidColorBrush 29 x:Key="MenuItem.Highlight.Disabled.Background" 30 Color="#0A000000" /> 31 <SolidColorBrush 32 x:Key="MenuItem.Highlight.Disabled.Border" 33 Color="#21000000" /> 34 <MenuScrollingVisibilityConverter x:Key="MenuScrollingVisibilityConverter" /> 35 <Geometry x:Key="DownArrow">M 0,0 L 3.5,4 L 7,0 Z</Geometry> 36 <Geometry x:Key="UpArrow">M 0,4 L 3.5,0 L 7,4 Z</Geometry> 37 <Geometry x:Key="RightArrow">M 0,0 L 4,3.5 L 0,7 Z</Geometry> 38 <Geometry x:Key="Checkmark">F1 M 10.0,1.2 L 4.7,9.1 L 4.5,9.1 L 0,5.2 L 1.3,3.5 L 4.3,6.1L 8.3,0 L 10.0,1.2 Z</Geometry> 39 40 <Style 41 x:Key="MenuScrollButton" 42 BasedOn="{x:Null}" 43 TargetType="{x:Type RepeatButton}"> 44 <Setter Property="ClickMode" Value="Hover" /> 45 <Setter Property="Template"> 46 <Setter.Value> 47 <ControlTemplate TargetType="{x:Type RepeatButton}"> 48 <Border 49 x:Name="templateRoot" 50 Background="Transparent" 51 BorderBrush="Transparent" 52 BorderThickness="1" 53 SnapsToDevicePixels="true"> 54 <ContentPresenter 55 Margin="6" 56 HorizontalAlignment="Center" 57 VerticalAlignment="Center" /> 58 </Border> 59 </ControlTemplate> 60 </Setter.Value> 61 </Setter> 62 </Style> 63 64 65 <!-- 彈出的子菜單中 ScrollViewer 的樣式,用於在菜單項較多時,上下滾動顯示所有的菜單項 --> 66 <Style 67 x:Key="{ComponentResourceKey ResourceId=MenuScrollViewer, 68 TypeInTargetAssembly={x:Type FrameworkElement}}" 69 BasedOn="{x:Null}" 70 TargetType="{x:Type ScrollViewer}"> 71 <Setter Property="HorizontalScrollBarVisibility" Value="Hidden" /> 72 <Setter Property="VerticalScrollBarVisibility" Value="Auto" /> 73 <Setter Property="Template"> 74 <Setter.Value> 75 <ControlTemplate TargetType="{x:Type ScrollViewer}"> 76 <Grid SnapsToDevicePixels="true"> 77 <Grid.ColumnDefinitions> 78 <ColumnDefinition Width="*" /> 79 </Grid.ColumnDefinitions> 80 81 <Grid.RowDefinitions> 82 <RowDefinition Height="Auto" /> 83 <RowDefinition Height="*" /> 84 <RowDefinition Height="Auto" /> 85 </Grid.RowDefinitions> 86 87 <!-- 所有的菜單內容 --> 88 <Border 89 Grid.Row="1" 90 Grid.Column="0"> 91 <ScrollContentPresenter 92 Margin="{TemplateBinding Padding}" 93 CanContentScroll="{TemplateBinding CanContentScroll}" /> 94 </Border> 95 96 <!-- 向上滾動按鈕 --> 97 <RepeatButton 98 Grid.Row="0" 99 Grid.Column="0" 100 Command="{x:Static ScrollBar.LineUpCommand}" 101 CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" 102 Focusable="false" 103 Style="{StaticResource MenuScrollButton}"> 104 <RepeatButton.Visibility> 105 <MultiBinding 106 Converter="{StaticResource MenuScrollingVisibilityConverter}" 107 ConverterParameter="0" 108 FallbackValue="Visibility.Collapsed"> 109 <Binding 110 Path="ComputedVerticalScrollBarVisibility" 111 RelativeSource="{RelativeSource TemplatedParent}" /> 112 <Binding 113 Path="VerticalOffset" 114 RelativeSource="{RelativeSource TemplatedParent}" /> 115 <Binding 116 Path="ExtentHeight" 117 RelativeSource="{RelativeSource TemplatedParent}" /> 118 <Binding 119 Path="ViewportHeight" 120 RelativeSource="{RelativeSource TemplatedParent}" /> 121 </MultiBinding> 122 </RepeatButton.Visibility> 123 <Path 124 Data="{StaticResource UpArrow}" 125 Fill="{StaticResource Menu.Static.Foreground}" /> 126 </RepeatButton> 127 128 <!-- 向下滾動按鈕 --> 129 <RepeatButton 130 Grid.Row="2" 131 Grid.Column="0" 132 Command="{x:Static ScrollBar.LineDownCommand}" 133 CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" 134 Focusable="false" 135 Style="{StaticResource MenuScrollButton}"> 136 <RepeatButton.Visibility> 137 <MultiBinding 138 Converter="{StaticResource MenuScrollingVisibilityConverter}" 139 ConverterParameter="100" 140 FallbackValue="Visibility.Collapsed"> 141 <Binding 142 Path="ComputedVerticalScrollBarVisibility" 143 RelativeSource="{RelativeSource TemplatedParent}" /> 144 <Binding 145 Path="VerticalOffset" 146 RelativeSource="{RelativeSource TemplatedParent}" /> 147 <Binding 148 Path="ExtentHeight" 149 RelativeSource="{RelativeSource TemplatedParent}" /> 150 <Binding 151 Path="ViewportHeight" 152 RelativeSource="{RelativeSource TemplatedParent}" /> 153 </MultiBinding> 154 </RepeatButton.Visibility> 155 <Path 156 Data="{StaticResource DownArrow}" 157 Fill="{StaticResource Menu.Static.Foreground}" /> 158 </RepeatButton> 159 </Grid> 160 </ControlTemplate> 161 </Setter.Value> 162 </Setter> 163 </Style> 164 165 <!-- Role 的文檔詳見 https://docs.microsoft.com/en-us/dotnet/api/system.windows.controls.menuitemrole?view=windowsdesktop-6.0 --> 166 167 <!-- 當 Role= TopLevelItem 時的模版 --> 168 <ControlTemplate 169 x:Key="{ComponentResourceKey ResourceId=TopLevelItemTemplateKey, 170 TypeInTargetAssembly={x:Type MenuItem}}" 171 TargetType="{x:Type MenuItem}"> 172 <Border 173 x:Name="templateRoot" 174 Background="{TemplateBinding Background}" 175 BorderBrush="{TemplateBinding BorderBrush}" 176 BorderThickness="{TemplateBinding BorderThickness}" 177 SnapsToDevicePixels="true"> 178 <Grid VerticalAlignment="Center"> 179 <Grid.ColumnDefinitions> 180 <ColumnDefinition Width="Auto" /> 181 <ColumnDefinition Width="Auto" /> 182 </Grid.ColumnDefinitions> 183 <ContentPresenter 184 x:Name="Icon" 185 Width="16" 186 Height="16" 187 Margin="3" 188 HorizontalAlignment="Center" 189 VerticalAlignment="Center" 190 ContentSource="Icon" 191 SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> 192 <Path 193 x:Name="GlyphPanel" 194 Margin="3" 195 VerticalAlignment="Center" 196 Data="{StaticResource Checkmark}" 197 Fill="{StaticResource Menu.Static.Foreground}" 198 FlowDirection="LeftToRight" 199 Visibility="Collapsed" /> 200 <ContentPresenter 201 Grid.Column="1" 202 Margin="{TemplateBinding Padding}" 203 ContentSource="Header" 204 RecognizesAccessKey="True" 205 SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> 206 </Grid> 207 </Border> 208 <ControlTemplate.Triggers> 209 <Trigger Property="Icon" Value="{x:Null}"> 210 <Setter TargetName="Icon" Property="Visibility" Value="Collapsed" /> 211 </Trigger> 212 <Trigger Property="IsChecked" Value="true"> 213 <Setter TargetName="GlyphPanel" Property="Visibility" Value="Visible" /> 214 <Setter TargetName="Icon" Property="Visibility" Value="Collapsed" /> 215 </Trigger> 216 <Trigger Property="IsHighlighted" Value="True"> 217 <Setter TargetName="templateRoot" Property="Background" Value="{StaticResource MenuItem.Highlight.Background}" /> 218 <Setter TargetName="templateRoot" Property="BorderBrush" Value="{StaticResource MenuItem.Highlight.Border}" /> 219 </Trigger> 220 <Trigger Property="IsEnabled" Value="False"> 221 <Setter TargetName="templateRoot" Property="TextElement.Foreground" Value="{StaticResource Menu.Disabled.Foreground}" /> 222 <Setter TargetName="GlyphPanel" Property="Fill" Value="{StaticResource Menu.Disabled.Foreground}" /> 223 </Trigger> 224 <MultiTrigger> 225 <MultiTrigger.Conditions> 226 <Condition Property="IsHighlighted" Value="True" /> 227 <Condition Property="IsEnabled" Value="False" /> 228 </MultiTrigger.Conditions> 229 <Setter TargetName="templateRoot" Property="Background" Value="{StaticResource MenuItem.Highlight.Disabled.Background}" /> 230 <Setter TargetName="templateRoot" Property="BorderBrush" Value="{StaticResource MenuItem.Highlight.Disabled.Border}" /> 231 </MultiTrigger> 232 </ControlTemplate.Triggers> 233 </ControlTemplate> 234 235 <!-- 當 Role= TopLevelHeader 時的模版 --> 236 <ControlTemplate 237 x:Key="{ComponentResourceKey ResourceId=TopLevelHeaderTemplateKey, 238 TypeInTargetAssembly={x:Type MenuItem}}" 239 TargetType="{x:Type MenuItem}"> 240 <Border 241 x:Name="templateRoot" 242 Background="{TemplateBinding Background}" 243 BorderBrush="{TemplateBinding BorderBrush}" 244 BorderThickness="{TemplateBinding BorderThickness}" 245