Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
cf0f5890
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
cf0f5890
编写于
3月 05, 2019
作者:
A
Andrew Hall (METAL)
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
UI updates post review
上级
7806c67a
变更
17
显示空白变更内容
内联
并排
Showing
17 changed file
with
95 addition
and
79 deletion
+95
-79
src/VisualStudio/Core/Def/Implementation/MoveToNamespace/MoveToNamespaceDialog.xaml
...Implementation/MoveToNamespace/MoveToNamespaceDialog.xaml
+51
-48
src/VisualStudio/Core/Def/Implementation/MoveToNamespace/MoveToNamespaceDialog.xaml.cs
...lementation/MoveToNamespace/MoveToNamespaceDialog.xaml.cs
+6
-3
src/VisualStudio/Core/Def/Implementation/MoveToNamespace/MoveToNamespaceDialogViewModel.cs
...ntation/MoveToNamespace/MoveToNamespaceDialogViewModel.cs
+11
-1
src/VisualStudio/Core/Def/ServicesVSResources.resx
src/VisualStudio/Core/Def/ServicesVSResources.resx
+1
-1
src/VisualStudio/Core/Def/xlf/ServicesVSResources.cs.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.cs.xlf
+2
-2
src/VisualStudio/Core/Def/xlf/ServicesVSResources.de.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.de.xlf
+2
-2
src/VisualStudio/Core/Def/xlf/ServicesVSResources.es.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.es.xlf
+2
-2
src/VisualStudio/Core/Def/xlf/ServicesVSResources.fr.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.fr.xlf
+2
-2
src/VisualStudio/Core/Def/xlf/ServicesVSResources.it.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.it.xlf
+2
-2
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ja.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ja.xlf
+2
-2
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ko.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ko.xlf
+2
-2
src/VisualStudio/Core/Def/xlf/ServicesVSResources.pl.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.pl.xlf
+2
-2
src/VisualStudio/Core/Def/xlf/ServicesVSResources.pt-BR.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.pt-BR.xlf
+2
-2
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ru.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ru.xlf
+2
-2
src/VisualStudio/Core/Def/xlf/ServicesVSResources.tr.xlf
src/VisualStudio/Core/Def/xlf/ServicesVSResources.tr.xlf
+2
-2
src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hans.xlf
...VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hans.xlf
+2
-2
src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hant.xlf
...VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hant.xlf
+2
-2
未找到文件。
src/VisualStudio/Core/Def/Implementation/MoveToNamespace/MoveToNamespaceDialog.xaml
浏览文件 @
cf0f5890
...
...
@@ -8,53 +8,58 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:vs="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.15.0"
xmlns:imaging="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.Imaging"
xmlns:system="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d"
d:DesignHeight="180" d:DesignWidth="460"
Height="180" Width="460"
MinHeight="180" MinWidth="460"
MinWidth="400" MinHeight="100"
Width="400" Height="166"
Title="{Binding ElementName=dialog, Path=MoveToNamespaceDialogTitle}"
HasHelpButton="True"
ResizeMode="CanResizeWithGrip"
ShowInTaskbar="False"
HasDialogFrame="True"
WindowStartupLocation="CenterOwner">
<Window.Resources>
<Thickness x:Key="labelPadding">0, 5, 0, 2</Thickness>
<Thickness x:Key="textboxPadding">2</Thickness>
<Thickness x:Key="verticalLabelMargin">0, 0, 0, 5</Thickness>
<Thickness x:Key="messageMargin">0, 9, 0, 0</Thickness>
<Thickness x:Key="submitButtonsGroupMargin">0, 18, 0, 0</Thickness>
<Thickness x:Key="submitButtonSpacingMargin">6, 0, 0, 0</Thickness>
<system:Double x:Key="buttonWidth">75</system:Double>
<system:Double x:Key="buttonHeight">23</system:Double>
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
</Window.Resources>
<Grid Margin="11,6,11,11">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="50" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<StackPanel Orientation="Vertical" Margin="8, 0, 8, 0" x:Name="Root">
<Label x:Uid="NamespaceLabel"
x:Name="NamespaceLabel"
Grid.Column="0
"
Margin="{StaticResource verticalLabelMargin}
"
Content="{Binding ElementName=dialog, Path=NamespaceLabelText}"
Padding="{StaticResource ResourceKey=labelPadding}"
Target="{Binding ElementName=NamespaceTextBox}" />
<Border BorderThickness="1">
<Border.Style>
<Style TargetType="{x:Type Border}">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=CanSubmit}" Value="False">
<Setter Property="BorderBrush" Value="Red" />
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Style>
<ComboBox x:Uid="NamespaceBox"
Name="NamespaceBox"
Grid.Column="1"
IsEditable="True"
IsReadOnly="False"
AutomationProperties.LabeledBy="{Binding ElementName=NamespaceLabel}"
Text="{Binding NamespaceName, Mode=TwoWay}"
ItemsSource="{Binding AvailableNamespaces, Mode=OneTime}" />
</Grid>
ItemsSource="{Binding AvailableNamespaces, Mode=OneTime}"
BorderThickness="0"
BorderBrush="Red">
</ComboBox>
</Border>
<StackPanel Height="25">
<StackPanel Orientation="Horizontal"
Grid.Row="1"
Visibility="{Binding ShowMessage, Converter={StaticResource BooleanToVisibilityConverter}}"
Margin="0, 11, 0, 0
">
Margin="{StaticResource messageMargin}
">
<imaging:CrispImage Name="MessageIcon"
Moniker="{Binding Icon}"
Height="16"
...
...
@@ -64,27 +69,25 @@
Text="{Binding Message}"
Margin="7, 0, 0, 0" />
</StackPanel>
</StackPanel>
<StackPanel Grid.Row="2"
HorizontalAlignment="Right"
Margin="0, 11, 0, 0"
<StackPanel HorizontalAlignment="Right"
Margin="{StaticResource submitButtonsGroupMargin}"
Orientation="Horizontal">
<Button x:Uid="OkButton"
Content="{Binding ElementName=dialog, Path=OK}"
Margin="0, 0, 0, 0"
Padding="9,2,9,2"
Click="OK_Click"
IsDefault="True"
MinWidth="73"
MinHeight="21"/>
MinWidth="{StaticResource ResourceKey=buttonWidth}"
MinHeight="{StaticResource ResourceKey=buttonHeight}"
IsEnabled="{Binding CanSubmit}" />
<Button x:Uid="CancelButton"
Content="{Binding ElementName=dialog, Path=Cancel}"
Margin="7, 0, 0, 0"
Padding="9,2,9,2"
Margin="{StaticResource submitButtonSpacingMargin}"
Click="Cancel_Click"
IsCancel="True"
MinWidth="73"
MinHeight="21"/>
MinWidth="{StaticResource ResourceKey=buttonWidth}"
MinHeight="{StaticResource ResourceKey=buttonHeight}" />
</StackPanel>
</StackPanel>
</Grid>
</vs:DialogWindow>
src/VisualStudio/Core/Def/Implementation/MoveToNamespace/MoveToNamespaceDialog.xaml.cs
浏览文件 @
cf0f5890
...
...
@@ -14,12 +14,12 @@ internal partial class MoveToNamespaceDialog : DialogWindow
private
readonly
MoveToNamespaceDialogViewModel
_viewModel
;
public
string
MoveToNamespaceDialogTitle
=>
ServicesVSResources
.
Move_to_namespace
;
public
string
NamespaceLabelText
=>
"
Namespace:
"
;
// ServicesVSResources.Namespace_colon;
public
string
NamespaceLabelText
=>
"
Target Namespace:
"
;
// ServicesVSResources.Namespace_colon;
public
string
OK
=>
ServicesVSResources
.
OK
;
public
string
Cancel
=>
ServicesVSResources
.
Cancel
;
internal
MoveToNamespaceDialog
(
MoveToNamespaceDialogViewModel
viewModel
)
:
base
(
helpTopic
:
"vs.csharp.refactoring.movetonamespace"
)
:
base
()
{
_viewModel
=
viewModel
;
...
...
@@ -36,8 +36,11 @@ private void Cancel_Click(object sender, RoutedEventArgs e)
}
private
void
OK_Click
(
object
sender
,
RoutedEventArgs
e
)
{
if
(
_viewModel
.
CanSubmit
)
{
DialogResult
=
true
;
}
}
}
}
src/VisualStudio/Core/Def/Implementation/MoveToNamespace/MoveToNamespaceDialogViewModel.cs
浏览文件 @
cf0f5890
...
...
@@ -41,16 +41,19 @@ public void OnNamespaceUpdated()
Icon
=
KnownMonikers
.
StatusInformation
;
Message
=
$"'
{
NamespaceName
}
' will be created as a new namespace"
;
ShowMessage
=
true
;
CanSubmit
=
true
;
}
else
if
(!
isValidName
)
{
Icon
=
KnownMonikers
.
Status
Error
;
Icon
=
KnownMonikers
.
Status
Invalid
;
Message
=
$"'
{
NamespaceName
}
' is not a valid namespace"
;
ShowMessage
=
true
;
CanSubmit
=
false
;
}
else
{
ShowMessage
=
false
;
CanSubmit
=
true
;
}
}
...
...
@@ -88,5 +91,12 @@ public bool ShowMessage
get
=>
_showMessage
;
private
set
=>
SetProperty
(
ref
_showMessage
,
value
);
}
private
bool
_canSubmit
=
true
;
public
bool
CanSubmit
{
get
=>
_canSubmit
;
private
set
=>
SetProperty
(
ref
_canSubmit
,
value
);
}
}
}
src/VisualStudio/Core/Def/ServicesVSResources.resx
浏览文件 @
cf0f5890
...
...
@@ -1202,7 +1202,7 @@ I agree to all of the foregoing:</value>
<value>
Use enhanced colors for C# and Basic
</value>
</data>
<data
name=
"Move_to_namespace"
xml:space=
"preserve"
>
<value>
Move
T
o Namespace
</value>
<value>
Move
t
o Namespace
</value>
</data>
<data
name=
"Namespace"
xml:space=
"preserve"
>
<value>
Namespace
</value>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.cs.xlf
浏览文件 @
cf0f5890
...
...
@@ -128,8 +128,8 @@
<note
/>
</trans-unit>
<trans-unit
id=
"Move_to_namespace"
>
<source>
Move
T
o Namespace
</source>
<target
state=
"new"
>
Move
T
o Namespace
</target>
<source>
Move
t
o Namespace
</source>
<target
state=
"new"
>
Move
t
o Namespace
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Namespace"
>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.de.xlf
浏览文件 @
cf0f5890
...
...
@@ -128,8 +128,8 @@
<note
/>
</trans-unit>
<trans-unit
id=
"Move_to_namespace"
>
<source>
Move
T
o Namespace
</source>
<target
state=
"new"
>
Move
T
o Namespace
</target>
<source>
Move
t
o Namespace
</source>
<target
state=
"new"
>
Move
t
o Namespace
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Namespace"
>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.es.xlf
浏览文件 @
cf0f5890
...
...
@@ -128,8 +128,8 @@
<note
/>
</trans-unit>
<trans-unit
id=
"Move_to_namespace"
>
<source>
Move
T
o Namespace
</source>
<target
state=
"new"
>
Move
T
o Namespace
</target>
<source>
Move
t
o Namespace
</source>
<target
state=
"new"
>
Move
t
o Namespace
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Namespace"
>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.fr.xlf
浏览文件 @
cf0f5890
...
...
@@ -128,8 +128,8 @@
<note
/>
</trans-unit>
<trans-unit
id=
"Move_to_namespace"
>
<source>
Move
T
o Namespace
</source>
<target
state=
"new"
>
Move
T
o Namespace
</target>
<source>
Move
t
o Namespace
</source>
<target
state=
"new"
>
Move
t
o Namespace
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Namespace"
>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.it.xlf
浏览文件 @
cf0f5890
...
...
@@ -128,8 +128,8 @@
<note
/>
</trans-unit>
<trans-unit
id=
"Move_to_namespace"
>
<source>
Move
T
o Namespace
</source>
<target
state=
"new"
>
Move
T
o Namespace
</target>
<source>
Move
t
o Namespace
</source>
<target
state=
"new"
>
Move
t
o Namespace
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Namespace"
>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ja.xlf
浏览文件 @
cf0f5890
...
...
@@ -128,8 +128,8 @@
<note
/>
</trans-unit>
<trans-unit
id=
"Move_to_namespace"
>
<source>
Move
T
o Namespace
</source>
<target
state=
"new"
>
Move
T
o Namespace
</target>
<source>
Move
t
o Namespace
</source>
<target
state=
"new"
>
Move
t
o Namespace
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Namespace"
>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ko.xlf
浏览文件 @
cf0f5890
...
...
@@ -128,8 +128,8 @@
<note
/>
</trans-unit>
<trans-unit
id=
"Move_to_namespace"
>
<source>
Move
T
o Namespace
</source>
<target
state=
"new"
>
Move
T
o Namespace
</target>
<source>
Move
t
o Namespace
</source>
<target
state=
"new"
>
Move
t
o Namespace
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Namespace"
>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.pl.xlf
浏览文件 @
cf0f5890
...
...
@@ -128,8 +128,8 @@
<note
/>
</trans-unit>
<trans-unit
id=
"Move_to_namespace"
>
<source>
Move
T
o Namespace
</source>
<target
state=
"new"
>
Move
T
o Namespace
</target>
<source>
Move
t
o Namespace
</source>
<target
state=
"new"
>
Move
t
o Namespace
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Namespace"
>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.pt-BR.xlf
浏览文件 @
cf0f5890
...
...
@@ -128,8 +128,8 @@
<note
/>
</trans-unit>
<trans-unit
id=
"Move_to_namespace"
>
<source>
Move
T
o Namespace
</source>
<target
state=
"new"
>
Move
T
o Namespace
</target>
<source>
Move
t
o Namespace
</source>
<target
state=
"new"
>
Move
t
o Namespace
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Namespace"
>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.ru.xlf
浏览文件 @
cf0f5890
...
...
@@ -128,8 +128,8 @@
<note
/>
</trans-unit>
<trans-unit
id=
"Move_to_namespace"
>
<source>
Move
T
o Namespace
</source>
<target
state=
"new"
>
Move
T
o Namespace
</target>
<source>
Move
t
o Namespace
</source>
<target
state=
"new"
>
Move
t
o Namespace
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Namespace"
>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.tr.xlf
浏览文件 @
cf0f5890
...
...
@@ -128,8 +128,8 @@
<note
/>
</trans-unit>
<trans-unit
id=
"Move_to_namespace"
>
<source>
Move
T
o Namespace
</source>
<target
state=
"new"
>
Move
T
o Namespace
</target>
<source>
Move
t
o Namespace
</source>
<target
state=
"new"
>
Move
t
o Namespace
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Namespace"
>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hans.xlf
浏览文件 @
cf0f5890
...
...
@@ -128,8 +128,8 @@
<note
/>
</trans-unit>
<trans-unit
id=
"Move_to_namespace"
>
<source>
Move
T
o Namespace
</source>
<target
state=
"new"
>
Move
T
o Namespace
</target>
<source>
Move
t
o Namespace
</source>
<target
state=
"new"
>
Move
t
o Namespace
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Namespace"
>
...
...
src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hant.xlf
浏览文件 @
cf0f5890
...
...
@@ -128,8 +128,8 @@
<note
/>
</trans-unit>
<trans-unit
id=
"Move_to_namespace"
>
<source>
Move
T
o Namespace
</source>
<target
state=
"new"
>
Move
T
o Namespace
</target>
<source>
Move
t
o Namespace
</source>
<target
state=
"new"
>
Move
t
o Namespace
</target>
<note
/>
</trans-unit>
<trans-unit
id=
"Namespace"
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录