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. 5
      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
<value>Delete all web references</value> <value>Delete all web references</value>
<comment>Title of the dialog box when the user tries to remove all web references.</comment> <comment>Title of the dialog box when the user tries to remove all web references.</comment>
</data> </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"> <data name="ReflectorAddIn.OpenReflectorCommand" xml:space="preserve">
<value>Open .NET Reflector</value> <value>Open .NET Reflector</value>
</data> </data>
@ -6390,9 +6401,6 @@ Removed the end part of the original message ", reason '${Message}'" since this
<data name="ReflectorAddIn.ReflectorPathNotSet" xml:space="preserve"> <data name="ReflectorAddIn.ReflectorPathNotSet" xml:space="preserve">
<value>The path to Reflector has not been set yet.</value> <value>The path to Reflector has not been set yet.</value>
</data> </data>
<data name="ReflectorAddIn.ReflectorChangePath" xml:space="preserve">
<value>Change Reflector path.</value>
</data>
<data name="ReflectorAddIn.ReflectorRemotingFailed" xml:space="preserve"> <data name="ReflectorAddIn.ReflectorRemotingFailed" xml:space="preserve">
<value>Failed to connect to Reflector.</value> <value>Failed to connect to Reflector.</value>
</data> </data>
@ -6405,17 +6413,6 @@ Removed the end part of the original message ", reason '${Message}'" since this
<data name="ReflectorAddIn.SetReflectorPathDialogTitle" xml:space="preserve"> <data name="ReflectorAddIn.SetReflectorPathDialogTitle" xml:space="preserve">
<value>Set path to Reflector</value> <value>Set path to Reflector</value>
</data> </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"> <data name="RegExpTk.MainDialog.Assemblies" xml:space="preserve">
<value>Assemblies (*.dll)|*.dll</value> <value>Assemblies (*.dll)|*.dll</value>
</data> </data>

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

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

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

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

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

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

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

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

Loading…
Cancel
Save