Browse Source

SetReflectorPath: set dialog owner; fixed OK/Cancel button margins.

pull/4/head
Daniel Grunwald 15 years ago
parent
commit
48e241bea1
  1. 25
      data/resources/StringResources.resx
  2. 1
      src/AddIns/Misc/ReflectorAddIn/ReflectorAddIn/Project/Properties/AssemblyInfo.cs
  3. 4
      src/AddIns/Misc/ReflectorAddIn/ReflectorAddIn/Project/Src/ReflectorSetupHelper.cs
  4. 13
      src/AddIns/Misc/ReflectorAddIn/ReflectorAddIn/Project/Src/Windows/SetReflectorPath.xaml
  5. 3
      src/AddIns/Misc/ReflectorAddIn/ReflectorAddIn/Project/Src/Windows/SetReflectorPath.xaml.cs

25
data/resources/StringResources.resx

@ -6381,6 +6381,17 @@ Removed the end part of the original message ", reason '${Message}'" since this @@ -6381,6 +6381,17 @@ Removed the end part of the original message ", reason '${Message}'" since this
<value>Delete all web references</value>
<comment>Title of the dialog box when the user tries to remove all web references.</comment>
</data>
<data name="ReflectorAddIn.IdeOptions.FindReflectorPath" xml:space="preserve">
<value>Select Reflector path</value>
<comment>Button to select the Reflector path</comment>
</data>
<data name="ReflectorAddIn.IdeOptions.ReflectorFoundInPath" xml:space="preserve">
<value>Reflector was found in the following directory:</value>
</data>
<data name="ReflectorAddIn.IdeOptions.ReflectorTitle" xml:space="preserve">
<value>Reflector</value>
<comment>Title of Reflector path option panel</comment>
</data>
<data name="ReflectorAddIn.OpenReflectorCommand" xml:space="preserve">
<value>Open .NET Reflector</value>
</data>
@ -6390,9 +6401,6 @@ Removed the end part of the original message ", reason '${Message}'" since this @@ -6390,9 +6401,6 @@ Removed the end part of the original message ", reason '${Message}'" since this
<data name="ReflectorAddIn.ReflectorPathNotSet" xml:space="preserve">
<value>The path to Reflector has not been set yet.</value>
</data>
<data name="ReflectorAddIn.ReflectorChangePath" xml:space="preserve">
<value>Change Reflector path.</value>
</data>
<data name="ReflectorAddIn.ReflectorRemotingFailed" xml:space="preserve">
<value>Failed to connect to Reflector.</value>
</data>
@ -6405,17 +6413,6 @@ Removed the end part of the original message ", reason '${Message}'" since this @@ -6405,17 +6413,6 @@ Removed the end part of the original message ", reason '${Message}'" since this
<data name="ReflectorAddIn.SetReflectorPathDialogTitle" xml:space="preserve">
<value>Set path to Reflector</value>
</data>
<data name="ReflectorAddIn.IdeOptions.ReflectorFoundInPath" xml:space="preserve">
<value>Reflector was found in the following directory:</value>
</data>
<data name="ReflectorAddIn.IdeOptions.ReflectorTitle" xml:space="preserve">
<value>Reflector</value>
<comment>Title of Reflector path choosing groupbox</comment>
</data>
<data name="ReflectorAddIn.IdeOptions.FindReflectorPath" xml:space="preserve">
<value>Select Reflector path</value>
<comment>Button to select the Reflector path</comment>
</data>
<data name="RegExpTk.MainDialog.Assemblies" xml:space="preserve">
<value>Assemblies (*.dll)|*.dll</value>
</data>

1
src/AddIns/Misc/ReflectorAddIn/ReflectorAddIn/Project/Properties/AssemblyInfo.cs

@ -21,4 +21,3 @@ using System.Reflection; @@ -21,4 +21,3 @@ using System.Reflection;
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: System.CLSCompliant(true)]

4
src/AddIns/Misc/ReflectorAddIn/ReflectorAddIn/Project/Src/ReflectorSetupHelper.cs

@ -33,6 +33,7 @@ namespace ReflectorAddIn @@ -33,6 +33,7 @@ namespace ReflectorAddIn
if (askReason != null) {
SetReflectorPath dialog = new SetReflectorPath(path, askReason);
dialog.Owner = WorkbenchSingleton.MainWindow;
bool? result = dialog.ShowDialog();
if (!result.HasValue || !result.Value || !File.Exists(dialog.SelectedFile))
return null;
@ -46,9 +47,10 @@ namespace ReflectorAddIn @@ -46,9 +47,10 @@ namespace ReflectorAddIn
internal static void OpenReflectorExeFullPathInteractiver() {
string path = PropertyService.Get(ReflectorExePathPropertyName);
string askReason = ResourceService.GetString("ReflectorAddIn.ReflectorChangePath");
string askReason = null;
SetReflectorPath dialog = new SetReflectorPath(path, askReason);
dialog.Owner = WorkbenchSingleton.MainWindow;
bool? result = dialog.ShowDialog();
if (!result.HasValue || !result.Value || !File.Exists(dialog.SelectedFile))

13
src/AddIns/Misc/ReflectorAddIn/ReflectorAddIn/Project/Src/Windows/SetReflectorPath.xaml

@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
ResizeMode="NoResize"
WindowStyle="ToolWindow"
ShowInTaskbar="False"
Height="230"
SizeToContent="Height"
Width="446">
<Window.Resources>
<Style
@ -84,22 +84,23 @@ @@ -84,22 +84,23 @@
Click="BrowseButton_Click" />
</widgets:StackPanelWithSpacing>
</GroupBox>
<widgets:StackPanelWithSpacing
Orientation="Horizontal"
<widgets:UniformGridWithSpacing
Columns="2"
Margin="0,0,12,12"
HorizontalAlignment="Right">
<Button
Name="OkButton"
IsDefault="False"
IsDefault="True"
Content="{core:Localize Global.OKButtonText}"
Style="{x:Static core:GlobalStyles.ButtonStyle}"
Click="OkButton_Click"/>
<Button
Name="CancelButton"
IsDefault="False"
IsCancel="True"
Content="{core:Localize Global.CancelButtonText}"
Click="CancelButton_Click"
Style="{x:Static core:GlobalStyles.ButtonStyle}" />
</widgets:StackPanelWithSpacing>
</widgets:UniformGridWithSpacing>
</widgets:StackPanelWithSpacing>
</StackPanel>
</Window>

3
src/AddIns/Misc/ReflectorAddIn/ReflectorAddIn/Project/Src/Windows/SetReflectorPath.xaml.cs

@ -22,7 +22,10 @@ namespace ReflectorAddIn.Windows @@ -22,7 +22,10 @@ namespace ReflectorAddIn.Windows
this.Title = ResourceService.GetString("ReflectorAddIn.SetReflectorPathDialogTitle");
if (reason != null)
this.txtReason.Text = reason;
else
this.txtReason.Visibility = Visibility.Collapsed;
if (!String.IsNullOrEmpty(oldPath)) {
this.slePath.Text = oldPath;
}

Loading…
Cancel
Save