未验证 提交 7d121e2f 编写于 作者: A Andy Gocke 提交者: GitHub

Merge pull request #24374 from dotnet/merges/dev15.7.x-to-features/compiler-20180122-080036

Merge dev15.7.x to features/compiler
......@@ -480,6 +480,15 @@ internal class ServicesVSResources {
}
}
/// <summary>
/// Looks up a localized string similar to The settings configured here only apply to your machine. To configure these settings to travel with your solution, use .editorconfig files..
/// </summary>
internal static string Code_style_header_use_editor_config {
get {
return ResourceManager.GetString("Code_style_header_use_editor_config", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to prefer auto properties.
/// </summary>
......
......@@ -1015,4 +1015,7 @@ I agree to all of the foregoing:</value>
<data name="Decompiler_Legal_Notice_Title" xml:space="preserve">
<value>Decompiler Legal Notice</value>
</data>
</root>
<data name="Code_style_header_use_editor_config" xml:space="preserve">
<value>The settings configured here only apply to your machine. To configure these settings to travel with your solution, use .editorconfig files.</value>
</data>
</root>
\ No newline at end of file
......@@ -1498,6 +1498,11 @@ Souhlasím se všemi výše uvedenými podmínkami:</target>
<target state="translated">Právní doložka pro dekompilátor</target>
<note />
</trans-unit>
<trans-unit id="Code_style_header_use_editor_config">
<source>The settings configured here only apply to your machine. To configure these settings to travel with your solution, use .editorconfig files.</source>
<target state="new">The settings configured here only apply to your machine. To configure these settings to travel with your solution, use .editorconfig files.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
......@@ -1498,6 +1498,11 @@ Ich stimme allen vorstehenden Bedingungen zu:</target>
<target state="translated">Rechtlicher Hinweis zum Decompiler</target>
<note />
</trans-unit>
<trans-unit id="Code_style_header_use_editor_config">
<source>The settings configured here only apply to your machine. To configure these settings to travel with your solution, use .editorconfig files.</source>
<target state="new">The settings configured here only apply to your machine. To configure these settings to travel with your solution, use .editorconfig files.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
......@@ -1498,6 +1498,11 @@ Estoy de acuerdo con todo lo anterior:</target>
<target state="translated">Aviso legal del Descompilador</target>
<note />
</trans-unit>
<trans-unit id="Code_style_header_use_editor_config">
<source>The settings configured here only apply to your machine. To configure these settings to travel with your solution, use .editorconfig files.</source>
<target state="new">The settings configured here only apply to your machine. To configure these settings to travel with your solution, use .editorconfig files.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
......@@ -1498,6 +1498,11 @@ Je suis d'accord avec tout ce qui précède :</target>
<target state="translated">Décompileur - Mention légale</target>
<note />
</trans-unit>
<trans-unit id="Code_style_header_use_editor_config">
<source>The settings configured here only apply to your machine. To configure these settings to travel with your solution, use .editorconfig files.</source>
<target state="new">The settings configured here only apply to your machine. To configure these settings to travel with your solution, use .editorconfig files.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
......@@ -1498,6 +1498,11 @@ L'utente accetta le condizioni sopra riportate:</target>
<target state="translated">Note legali sul decompilatore</target>
<note />
</trans-unit>
<trans-unit id="Code_style_header_use_editor_config">
<source>The settings configured here only apply to your machine. To configure these settings to travel with your solution, use .editorconfig files.</source>
<target state="new">The settings configured here only apply to your machine. To configure these settings to travel with your solution, use .editorconfig files.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
......@@ -1498,6 +1498,11 @@ I agree to all of the foregoing:</source>
<target state="translated">デコンパイラの法的通知</target>
<note />
</trans-unit>
<trans-unit id="Code_style_header_use_editor_config">
<source>The settings configured here only apply to your machine. To configure these settings to travel with your solution, use .editorconfig files.</source>
<target state="new">The settings configured here only apply to your machine. To configure these settings to travel with your solution, use .editorconfig files.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
......@@ -1498,6 +1498,11 @@ I agree to all of the foregoing:</source>
<target state="translated">디컴파일러 법적 고지 사항</target>
<note />
</trans-unit>
<trans-unit id="Code_style_header_use_editor_config">
<source>The settings configured here only apply to your machine. To configure these settings to travel with your solution, use .editorconfig files.</source>
<target state="new">The settings configured here only apply to your machine. To configure these settings to travel with your solution, use .editorconfig files.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
......@@ -1498,6 +1498,11 @@ Wyrażam zgodę na wszystkie następujące postanowienia:</target>
<target state="translated">Informacje prawne dotyczące Dekompilatora</target>
<note />
</trans-unit>
<trans-unit id="Code_style_header_use_editor_config">
<source>The settings configured here only apply to your machine. To configure these settings to travel with your solution, use .editorconfig files.</source>
<target state="new">The settings configured here only apply to your machine. To configure these settings to travel with your solution, use .editorconfig files.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
......@@ -1498,6 +1498,11 @@ Eu concordo com todo o conteúdo supracitado:</target>
<target state="translated">Aviso Legal do Descompilador</target>
<note />
</trans-unit>
<trans-unit id="Code_style_header_use_editor_config">
<source>The settings configured here only apply to your machine. To configure these settings to travel with your solution, use .editorconfig files.</source>
<target state="new">The settings configured here only apply to your machine. To configure these settings to travel with your solution, use .editorconfig files.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
......@@ -1498,6 +1498,11 @@ I agree to all of the foregoing:</source>
<target state="translated">Юридическая информация для декомпилятора</target>
<note />
</trans-unit>
<trans-unit id="Code_style_header_use_editor_config">
<source>The settings configured here only apply to your machine. To configure these settings to travel with your solution, use .editorconfig files.</source>
<target state="new">The settings configured here only apply to your machine. To configure these settings to travel with your solution, use .editorconfig files.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
......@@ -1498,6 +1498,11 @@ Aşağıdakilerin tümünü onaylıyorum:</target>
<target state="translated">Derleme Ayırıcı Yasal Bildirim</target>
<note />
</trans-unit>
<trans-unit id="Code_style_header_use_editor_config">
<source>The settings configured here only apply to your machine. To configure these settings to travel with your solution, use .editorconfig files.</source>
<target state="new">The settings configured here only apply to your machine. To configure these settings to travel with your solution, use .editorconfig files.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
......@@ -1498,6 +1498,11 @@ I agree to all of the foregoing:</source>
<target state="translated">Decompiler 法律声明</target>
<note />
</trans-unit>
<trans-unit id="Code_style_header_use_editor_config">
<source>The settings configured here only apply to your machine. To configure these settings to travel with your solution, use .editorconfig files.</source>
<target state="new">The settings configured here only apply to your machine. To configure these settings to travel with your solution, use .editorconfig files.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
......@@ -1498,6 +1498,11 @@ I agree to all of the foregoing:</source>
<target state="translated">解編程式的法律聲明</target>
<note />
</trans-unit>
<trans-unit id="Code_style_header_use_editor_config">
<source>The settings configured here only apply to your machine. To configure these settings to travel with your solution, use .editorconfig files.</source>
<target state="new">The settings configured here only apply to your machine. To configure these settings to travel with your solution, use .editorconfig files.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
......@@ -5,7 +5,7 @@
xmlns:converters="clr-namespace:Microsoft.VisualStudio.LanguageServices.Implementation.Options.Converters"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:options="clr-namespace:Microsoft.VisualStudio.LanguageServices.Implementation.Options"
xmlns:imaging="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.Imaging"
......@@ -21,9 +21,9 @@
<Setter.Value>
<Style TargetType="DataGridCell">
<Setter Property="BorderThickness" Value="1" />
<Setter Property="IsTabStop"
Value="{Binding
Path=Column,
<Setter Property="IsTabStop"
Value="{Binding
Path=Column,
Converter={StaticResource ColumnToTabStopConverter},
RelativeSource={RelativeSource Self}}"/>
</Style>
......@@ -35,12 +35,20 @@
<converters:MarginConverter x:Key="MarginConverter" />
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="5" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBlock TextWrapping="Wrap">
<Run Text="{x:Static local:GridOptionPreviewControl.CodeStylePageHeader}"/>
<Run Text=" "/>
<Hyperlink RequestNavigate="LearnMoreHyperlink_RequestNavigate" NavigateUri="{x:Static local:GridOptionPreviewControl.CodeStylePageHeaderLearnMoreUri}">
<TextBlock Text="{x:Static local:GridOptionPreviewControl.CodeStylePageHeaderLearnMoreText}"/>
</Hyperlink>
</TextBlock>
<DataGrid
Grid.Row="0"
Grid.Row="1"
x:Uid="CodeStyleContent"
x:Name="CodeStyleMembers"
Margin="0,5,0,0"
......@@ -88,7 +96,7 @@
</DataGrid.GroupStyle>
<DataGrid.Columns>
<DataGridTemplateColumn
x:Name="description"
x:Name="description"
Header="{x:Static local:GridOptionPreviewControl.DescriptionHeader}"
Width="4.5*"
IsReadOnly="True">
......@@ -106,8 +114,8 @@
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn
x:Name="preference"
<DataGridTemplateColumn
x:Name="preference"
Header="{x:Static local:GridOptionPreviewControl.PreferenceHeader}"
Width="3*">
<DataGridTemplateColumn.CellTemplate>
......@@ -115,7 +123,7 @@
<ComboBox
ItemsSource="{Binding Preferences}"
DisplayMemberPath="Name"
SelectedItem="{Binding SelectedPreference, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
SelectedItem="{Binding SelectedPreference, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
VerticalContentAlignment="Center"
HorizontalContentAlignment="Left">
<ComboBox.ItemContainerStyle>
......@@ -127,8 +135,8 @@
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn
x:Name="severity"
<DataGridTemplateColumn
x:Name="severity"
Header="{x:Static local:GridOptionPreviewControl.SeverityHeader}"
Width="2.5*">
<DataGridTemplateColumn.CellTemplate>
......@@ -147,12 +155,12 @@
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<imaging:CrispImage
Height="16"
Width="16"
Height="16"
Width="16"
Moniker="{Binding Moniker}"
Grid.Column="0"/>
<TextBlock
Margin="5, 0, 0, 0"
<TextBlock
Margin="5, 0, 0, 0"
Text="{Binding Notification}"
Grid.Column="1"/>
</Grid>
......@@ -169,8 +177,8 @@
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
<GridSplitter Grid.Row="1" HorizontalAlignment="Stretch"></GridSplitter>
<Border Grid.Row="2" BorderBrush="Gray" BorderThickness="1">
<GridSplitter Grid.Row="2" HorizontalAlignment="Stretch"></GridSplitter>
<Border Grid.Row="3" BorderBrush="Gray" BorderThickness="1">
<ContentControl Name="EditorControl" Content="{Binding TextViewHost, Mode=OneWay}" Focusable="False"></ContentControl>
</Border>
</Grid>
......
......@@ -4,23 +4,29 @@
using System.Linq;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Navigation;
using Microsoft.CodeAnalysis.Options;
using Microsoft.VisualStudio.LanguageServices.Implementation.Utilities;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.Options
{
internal partial class GridOptionPreviewControl : AbstractOptionPageControl
{
private const string UseEditorConfigUrl = "https://go.microsoft.com/fwlink/?linkid=866541";
internal AbstractOptionPreviewViewModel ViewModel;
private readonly IServiceProvider _serviceProvider;
private readonly Func<OptionSet, IServiceProvider, AbstractOptionPreviewViewModel> _createViewModel;
public static readonly Uri CodeStylePageHeaderLearnMoreUri = new Uri(UseEditorConfigUrl);
public static string CodeStylePageHeader => ServicesVSResources.Code_style_header_use_editor_config;
public static string CodeStylePageHeaderLearnMoreText => ServicesVSResources.Learn_more;
public static string DescriptionHeader => ServicesVSResources.Description;
public static string PreferenceHeader => ServicesVSResources.Preference;
public static string SeverityHeader => ServicesVSResources.Severity;
internal GridOptionPreviewControl(IServiceProvider serviceProvider,
Func<OptionSet, IServiceProvider,
AbstractOptionPreviewViewModel> createViewModel)
internal GridOptionPreviewControl(IServiceProvider serviceProvider,
Func<OptionSet, IServiceProvider,
AbstractOptionPreviewViewModel> createViewModel)
: base(serviceProvider)
{
InitializeComponent();
......@@ -29,6 +35,17 @@ internal partial class GridOptionPreviewControl : AbstractOptionPageControl
_createViewModel = createViewModel;
}
private void LearnMoreHyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)
{
if (e.Uri == null)
{
return;
}
BrowserHelper.StartBrowser(e.Uri);
e.Handled = true;
}
private void Options_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
var dataGrid = (DataGrid)sender;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册