Browse Source

FileTypeRegisterer now uses HKCU\Software\Classes when there is no write access to HKEY_CLASSES.

SearchAndReplace panel now uses translation database.
Removed many unused resource strings.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@691 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 20 years ago
parent
commit
de36e77696
  1. BIN
      data/resources/StringResources.ar.resources
  2. BIN
      data/resources/StringResources.bg.resources
  3. BIN
      data/resources/StringResources.cn-big.resources
  4. BIN
      data/resources/StringResources.cn-gb.resources
  5. BIN
      data/resources/StringResources.cz.resources
  6. BIN
      data/resources/StringResources.de.resources
  7. BIN
      data/resources/StringResources.dk.resources
  8. BIN
      data/resources/StringResources.es-mx.resources
  9. BIN
      data/resources/StringResources.es.resources
  10. BIN
      data/resources/StringResources.fi.resources
  11. BIN
      data/resources/StringResources.fr.resources
  12. BIN
      data/resources/StringResources.hu.resources
  13. BIN
      data/resources/StringResources.it.resources
  14. BIN
      data/resources/StringResources.jp.resources
  15. BIN
      data/resources/StringResources.kr.resources
  16. BIN
      data/resources/StringResources.lt.resources
  17. BIN
      data/resources/StringResources.nl.resources
  18. BIN
      data/resources/StringResources.pl.resources
  19. BIN
      data/resources/StringResources.pt-br.resources
  20. BIN
      data/resources/StringResources.pt.resources
  21. BIN
      data/resources/StringResources.ro.resources
  22. BIN
      data/resources/StringResources.ru.resources
  23. BIN
      data/resources/StringResources.se.resources
  24. BIN
      data/resources/StringResources.sl.resources
  25. BIN
      data/resources/StringResources.sr.resources
  26. BIN
      data/resources/StringResources.tr.resources
  27. 2
      data/templates/project/CSharp/SharpDevelopAddin.xpt
  28. 145
      data/templates/project/CSharp/SharpDevelopMacro.xpt
  29. 81
      src/AddIns/Misc/FiletypeRegisterer/Project/Src/RegisterFiletypesCommand.cs
  30. 1
      src/AddIns/Misc/FiletypeRegisterer/Project/Src/RegisterFiletypesPanel.cs
  31. 23
      src/AddIns/Misc/FiletypeRegisterer/Project/filetypes/Filetypes.xml
  32. 99
      src/Main/Base/Project/Resources/FindPanel.xfrm
  33. 112
      src/Main/Base/Project/Resources/ReplacePanel.xfrm
  34. 6
      src/Main/Base/Project/Src/TextEditor/SearchAndReplace/Gui/SearchAndReplaceDialog.cs
  35. 6
      src/Main/Base/Project/Src/TextEditor/SearchAndReplace/Gui/SearchAndReplacePanel.cs
  36. BIN
      src/Main/StartUp/Project/Resources/StringResources.resources
  37. 4
      src/Main/StartUp/Project/SharpDevelop.exe.manifest
  38. 1
      src/Tools/StringResourceTool/MainForm.cs
  39. 12
      src/Tools/StringResourceTool/StringResourceTool.sln

BIN
data/resources/StringResources.ar.resources

Binary file not shown.

BIN
data/resources/StringResources.bg.resources

Binary file not shown.

BIN
data/resources/StringResources.cn-big.resources

Binary file not shown.

BIN
data/resources/StringResources.cn-gb.resources

Binary file not shown.

BIN
data/resources/StringResources.cz.resources

Binary file not shown.

BIN
data/resources/StringResources.de.resources

Binary file not shown.

BIN
data/resources/StringResources.dk.resources

Binary file not shown.

BIN
data/resources/StringResources.es-mx.resources

Binary file not shown.

BIN
data/resources/StringResources.es.resources

Binary file not shown.

BIN
data/resources/StringResources.fi.resources

Binary file not shown.

BIN
data/resources/StringResources.fr.resources

Binary file not shown.

BIN
data/resources/StringResources.hu.resources

Binary file not shown.

BIN
data/resources/StringResources.it.resources

Binary file not shown.

BIN
data/resources/StringResources.jp.resources

Binary file not shown.

BIN
data/resources/StringResources.kr.resources

Binary file not shown.

BIN
data/resources/StringResources.lt.resources

Binary file not shown.

BIN
data/resources/StringResources.nl.resources

Binary file not shown.

BIN
data/resources/StringResources.pl.resources

Binary file not shown.

BIN
data/resources/StringResources.pt-br.resources

Binary file not shown.

BIN
data/resources/StringResources.pt.resources

Binary file not shown.

BIN
data/resources/StringResources.ro.resources

Binary file not shown.

BIN
data/resources/StringResources.ru.resources

Binary file not shown.

BIN
data/resources/StringResources.se.resources

Binary file not shown.

BIN
data/resources/StringResources.sl.resources

Binary file not shown.

BIN
data/resources/StringResources.sr.resources

Binary file not shown.

BIN
data/resources/StringResources.tr.resources

Binary file not shown.

2
data/templates/project/CSharp/SharpDevelopAddin.xpt

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
<!-- Template Header -->
<TemplateConfiguration>
<Name>${res:Templates.Project.SharpDevelopAddin.Name}</Name>
<Category>C#</Category>
<Category>SharpDevelop</Category>
<Icon>C#.Project.ControlLibrary</Icon>
<LanguageName>C#</LanguageName>
<Description>${res:Templates.Project.SharpDevelopAddin.Description}</Description>

145
data/templates/project/CSharp/SharpDevelopMacro.xpt

@ -0,0 +1,145 @@ @@ -0,0 +1,145 @@
<?xml version="1.0"?>
<Template originator = "Daniel Grunwald"
created = "01/11/2005"
lastModified = "01/11/2005">
<!-- Template Header -->
<TemplateConfiguration>
<Name>${res:Templates.Project.SharpDevelopMacro.Name}</Name>
<Category>SharpDevelop</Category>
<Icon>C#.Project.ControlLibrary</Icon>
<LanguageName>C#</LanguageName>
<Description>${res:Templates.Project.SharpDevelopMacro.Description}</Description>
</TemplateConfiguration>
<!-- Actions -->
<Actions>
<Open filename = "${ProjectName}.addin"/>
</Actions>
<Combine name = "${ProjectName}" directory = ".">
<Options>
<StartupProject>${ProjectName}</StartupProject>
</Options>
<Project name = "${ProjectName}" directory = ".">
<Options OutputType = "Library" />
<ProjectItems>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ProjectItems>
<Files>
<File name="${ProjectName}.addin" copyToOutputDirectory="Always"><![CDATA[<AddIn name = "${ProjectName}"
author = "${USER}"
copyright = "GNU General Public License"
url = ""
description = "TODO: Put description here"
version = "1.0.0">
<Runtime>
<Import assembly = "${ProjectName}.dll"/>
</Runtime>
<Path name = "/SharpDevelop/Workbench/MainMenu/Tools">
<MenuItem id = "${ProjectName}Command1"
insertafter = "Separator1"
insertbefore = "Separator2"
label = "${ProjectName}"
class = "${ProjectName}.ToolCommand1"/>
</Path>
</AddIn>
]]></File>
<File name="Src/Command.cs">
<![CDATA[// Copyright (C) yyyy name of author
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
using System;
using System.Text;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor;
using ICSharpCode.TextEditor;
namespace Macro1
{
public class ToolCommand1 : AbstractMenuCommand
{
public override void Run()
{
// Here an example that shows how to access the current text document:
ITextEditorControlProvider tecp = WorkbenchSingleton.Workbench.ActiveContent as ITextEditorControlProvider;
if (tecp == null) {
// active content is not a text editor control
return;
}
// Get the active text area from the control:
TextArea textArea = tecp.TextEditorControl.ActiveTextAreaControl.TextArea;
// get the selected text:
string text = textArea.SelectionManager.SelectedText;
// reverse the text:
StringBuilder b = new StringBuilder(text.Length);
for (int i = text.Length - 1; i >= 0; i--)
b.Append(text[i]);
string newText = b.ToString();
// replace the selected text with the new text:
// Replace() takes the arguments: start offset to replace, length of the text to remove, new text
textArea.Document.Replace(textArea.Caret.Offset, text.Length, newText);
// Redraw:
textArea.Refresh();
}
}
}
]]></File>
<File name="Configuration/AssemblyInfo.cs">
<![CDATA[using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following
// attributes.
//
// change them to the information which is associated with the assembly
// you compile.
[assembly: AssemblyTitle("${ProjectName}")]
[assembly: AssemblyDescription("Macro AddIn for SharpDevelop 2.0")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SharpDevelop")]
[assembly: AssemblyCopyright("GNU General Public Licence")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// The assembly version has following format :
//
// Major.Minor.Build.Revision
//
// You can specify all values by your own or you can build default build and revision
// numbers with the '*' character (the default):
[assembly: AssemblyVersion("1.0.*")]
]]></File>
</Files>
</Project>
</Combine>
</Template>

81
src/AddIns/Misc/FiletypeRegisterer/Project/Src/RegisterFiletypesCommand.cs

@ -31,7 +31,7 @@ namespace ICSharpCode.FiletypeRegisterer { @@ -31,7 +31,7 @@ namespace ICSharpCode.FiletypeRegisterer {
const int SHCNE_ASSOCCHANGED = 0x08000000;
const int SHCNF_IDLIST = 0x0;
public static string DefaultExtensions = "sln|csproj|vbproj";
public static string DefaultExtensions = "sln|csproj|vbproj|booproj";
public static string[,] GetFileTypes()
{
@ -45,7 +45,9 @@ namespace ICSharpCode.FiletypeRegisterer { @@ -45,7 +45,9 @@ namespace ICSharpCode.FiletypeRegisterer {
string[,] ret = new string[doc.DocumentElement.ChildNodes.Count, 3];
for(int i = 0; i < nodes.Count; ++i) {
XmlElement el = (XmlElement)nodes.Item(i);
if (nodes[i].NodeType == XmlNodeType.Comment)
continue;
XmlElement el = (XmlElement)nodes[i];
ret[i, 0] = el.InnerText;
ret[i, 1] = el.Attributes["ext"].InnerText;
ret[i, 2] = el.Attributes["icon"].InnerText;
@ -87,6 +89,7 @@ namespace ICSharpCode.FiletypeRegisterer { @@ -87,6 +89,7 @@ namespace ICSharpCode.FiletypeRegisterer {
string[,] FileTypes = GetFileTypes();
string resPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "filetypes") + Path.DirectorySeparatorChar;
for(int i = 0; i < FileTypes.GetLength(0); ++i) {
if (FileTypes[i, 0] == null) continue;
if (!IsRegisteredFileType(FileTypes[i, 1])) {
RegisterFiletype(FileTypes[i, 1], FileTypes[i, 0], '"' + Path.GetFullPath(mainExe) + '"' + " \"%1\"", Path.GetFullPath(resPath + FileTypes[i, 2]));
}
@ -105,39 +108,59 @@ namespace ICSharpCode.FiletypeRegisterer { @@ -105,39 +108,59 @@ namespace ICSharpCode.FiletypeRegisterer {
public static void RegisterFiletype(string extension, string description, string command, string icon)
{
try {
RegistryKey extKey, clsKey, openKey;
extKey = Registry.ClassesRoot.CreateSubKey("." + extension);
// save previous association
string prev = (string)extKey.GetValue("", "");
if (prev != "" && prev != ("SD." + extension + "file")) {
extKey.SetValue("PreSD", extKey.GetValue(""));
}
extKey.SetValue("", "SD." + extension + "file");
extKey.Close();
clsKey = Registry.ClassesRoot.CreateSubKey("SD." + extension + "file");
clsKey.SetValue("", StringParser.Parse(description));
clsKey.CreateSubKey("DefaultIcon").SetValue("", '"' + icon + '"');
openKey = clsKey.CreateSubKey("shell\\open\\command");
openKey.SetValue("", command);
openKey.Close();
clsKey.Close();
RegisterFiletype(Registry.ClassesRoot, extension, description, command, icon);
} catch (UnauthorizedAccessException) {
try {
RegisterFiletype(Registry.CurrentUser.CreateSubKey("Software\\Classes"), extension, description, command, icon);
} catch {}
}
try {
SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, IntPtr.Zero, IntPtr.Zero);
} catch {}
}
static void RegisterFiletype(RegistryKey rootKey, string extension, string description, string command, string icon)
{
RegistryKey extKey, clsKey, openKey;
extKey = rootKey.CreateSubKey("." + extension);
// save previous association
string prev = (string)extKey.GetValue("", "");
if (prev != "" && prev != ("SD." + extension + "file")) {
extKey.SetValue("PreSD", extKey.GetValue(""));
}
extKey.SetValue("", "SD." + extension + "file");
extKey.Close();
clsKey = rootKey.CreateSubKey("SD." + extension + "file");
clsKey.SetValue("", StringParser.Parse(description));
clsKey.CreateSubKey("DefaultIcon").SetValue("", '"' + icon + '"');
openKey = clsKey.CreateSubKey("shell\\open\\command");
openKey.SetValue("", command);
openKey.Close();
clsKey.Close();
}
public static void UnRegisterFiletype(string extension)
{
UnRegisterFiletype(extension, Registry.ClassesRoot);
try {
UnRegisterFiletype(extension, Registry.CurrentUser.CreateSubKey("Software\\Classes"));
} catch {}
try {
SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, IntPtr.Zero, IntPtr.Zero);
} catch {}
}
static void UnRegisterFiletype(string extension, RegistryKey root)
{
try {
root.DeleteSubKeyTree("SD." + extension + "file");
} catch {}
try {
Registry.ClassesRoot.DeleteSubKeyTree("SD." + extension + "file");
RegistryKey extKey;
extKey = Registry.ClassesRoot.OpenSubKey("." + extension, true);
extKey = root.OpenSubKey("." + extension, true);
// if no association return
if (extKey == null) return;
@ -150,9 +173,9 @@ namespace ICSharpCode.FiletypeRegisterer { @@ -150,9 +173,9 @@ namespace ICSharpCode.FiletypeRegisterer {
extKey.SetValue("", prev);
}
extKey.Close();
SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, IntPtr.Zero, IntPtr.Zero);
if (prev != null) {
root.DeleteSubKeyTree("." + extension);
}
} catch {}
}

1
src/AddIns/Misc/FiletypeRegisterer/Project/Src/RegisterFiletypesPanel.cs

@ -117,6 +117,7 @@ namespace ICSharpCode.FiletypeRegisterer @@ -117,6 +117,7 @@ namespace ICSharpCode.FiletypeRegisterer
string[,] Items = RegisterFiletypesCommand.GetFileTypes();
for(int i = 0; i < Items.GetLength(0); ++i) {
if (Items[i, 0] == null) continue;
ListViewItem lv;
lv = new ListViewItem(StringParser.Parse(Items[i, 0]) + " (." + Items[i, 1] + ")");
lv.Tag = Items[i, 1];

23
src/AddIns/Misc/FiletypeRegisterer/Project/filetypes/Filetypes.xml

@ -1,15 +1,16 @@ @@ -1,15 +1,16 @@
<?xml version="1.0" ?>
<Filetypes>
<Filetype ext="cmbx" icon="cmbx.ico">SharpDevelop 1.x Combine</Filetype>
<Filetype ext="prjx" icon="prjx.ico">SharpDevelop 1.x Project</Filetype>
<Filetype ext="sln" icon="cmbx.ico">SharpDevelop Solution</Filetype>
<Filetype ext="csproj" icon="prjx.ico">SharpDevelop C# Project</Filetype>
<Filetype ext="vbproj" icon="prjx.ico">SharpDevelop VB Project</Filetype>
<Filetype ext="cs" icon="cs.ico">C# Source File</Filetype>
<Filetype ext="vb" icon="vb.ico">VB.NET Source File</Filetype>
<Filetype ext="java" icon="java.ico">Java Source File</Filetype>
<Filetype ext="xfrm" icon="xfrm.ico">SharpDevelop XML Form</Filetype>
<Filetype ext="resx" icon="resx.ico">.NET Resource File</Filetype>
<Filetype ext="resources" icon="resx.ico">.NET Resource File (Binary)</Filetype>
<Filetype ext="xml" icon="xml.ico">XML Document</Filetype>
<Filetype ext="prjx" icon="prjx.ico">SharpDevelop 1.x ${res:ICSharpCode.FiletypeRegisterer.Project}</Filetype>
<Filetype ext="sln" icon="cmbx.ico">${res:ICSharpCode.FiletypeRegisterer.SolutionFileAssozisation}</Filetype>
<Filetype ext="csproj" icon="prjx.ico">C# ${res:ICSharpCode.FiletypeRegisterer.Project}</Filetype>
<Filetype ext="vbproj" icon="prjx.ico">VB ${res:ICSharpCode.FiletypeRegisterer.Project}</Filetype>
<Filetype ext="booproj" icon="prjx.ico">Boo ${res:ICSharpCode.FiletypeRegisterer.Project}</Filetype>
<Filetype ext="cs" icon="cs.ico">${res:ICSharpCode.FiletypeRegisterer.CSharpSourceFileAssozisation}</Filetype>
<Filetype ext="vb" icon="vb.ico">${res:ICSharpCode.FiletypeRegisterer.VBNetSourceFileAssozisation}</Filetype>
<!--<Filetype ext="java" icon="java.ico">${res:ICSharpCode.FiletypeRegisterer.JavaSourceFileAssozisation}</Filetype>-->
<Filetype ext="xfrm" icon="xfrm.ico">${res:ICSharpCode.FiletypeRegisterer.XMLFormFileAssozisation}</Filetype>
<Filetype ext="resx" icon="resx.ico">${res:ICSharpCode.FiletypeRegisterer.ResXResourceFilesFileAssozisation}</Filetype>
<Filetype ext="resources" icon="resx.ico">${res:ICSharpCode.FiletypeRegisterer.BinaryResourceFilesFileAssozisation}</Filetype>
<Filetype ext="xml" icon="xml.ico">${res:ICSharpCode.FiletypeRegisterer.XmlFileAssozisation}</Filetype>
</Filetypes>

99
src/Main/Base/Project/Resources/FindPanel.xfrm

@ -1,131 +1,148 @@ @@ -1,131 +1,148 @@
<Components version="1.0">
<System.Windows.Forms.UserControl>
<Name value="XmlUserControl1" />
<DockPadding value="" />
<ClientSize value="{Width=432, Height=312}" />
<Controls>
<System.Windows.Forms.Button>
<Name value="findAllButton" />
<Location value="{X=120,Y=280}" />
<Size value="{Width=96, Height=23}" />
<Text value="Find &amp;all" />
<UseCompatibleTextRendering value="True" />
<Text value="${res:Dialog.NewProject.SearchReplace.FindAll}" />
<Anchor value="Top, Right" />
<Size value="{Width=96, Height=23}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="14" />
</System.Windows.Forms.Button>
<System.Windows.Forms.ComboBox>
<Name value="useComboBox" />
<Anchor value="Top, Left, Right" />
<TabIndex value="11" />
<Location value="{X=8,Y=248}" />
<Size value="{Width=416, Height=21}" />
<TabIndex value="11" />
<DropDownStyle value="DropDownList" />
<Location value="{X=8,Y=248}" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.ComboBox>
<System.Windows.Forms.Label>
<Name value="label4" />
<Text value="Us&amp;e:" />
<TextAlign value="BottomLeft" />
<Location value="{X=8,Y=224}" />
<UseCompatibleTextRendering value="True" />
<Text value="${res:Dialog.NewProject.SearchReplace.UseMethodLabel}" />
<Anchor value="Top, Left, Right" />
<TabIndex value="10" />
<TextAlign value="BottomLeft" />
<Size value="{Width=416, Height=23}" />
<Location value="{X=8,Y=224}" />
<TabIndex value="10" />
</System.Windows.Forms.Label>
<System.Windows.Forms.Button>
<Name value="findNextButton" />
<Location value="{X=224,Y=280}" />
<Size value="{Width=96, Height=23}" />
<Text value="&amp;Find next" />
<UseCompatibleTextRendering value="True" />
<Text value="${res:Dialog.NewProject.SearchReplace.FindButton}" />
<Anchor value="Top, Right" />
<Size value="{Width=96, Height=23}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="12" />
</System.Windows.Forms.Button>
<System.Windows.Forms.Button>
<Name value="bookmarkAllButton" />
<Location value="{X=328,Y=280}" />
<Size value="{Width=96, Height=23}" />
<Text value="&amp;Bookmark all" />
<UseCompatibleTextRendering value="True" />
<Text value="${res:Dialog.NewProject.SearchReplace.MarkAllButton}" />
<Anchor value="Top, Right" />
<Size value="{Width=96, Height=23}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="13" />
</System.Windows.Forms.Button>
<System.Windows.Forms.CheckBox>
<Name value="matchWholeWordCheckBox" />
<RightToLeft value="No" />
<Location value="{X=8,Y=200}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<Text value="${res:Dialog.NewProject.SearchReplace.MatchWholeWord}" />
<TabIndex value="9" />
<Size value="{Width=416, Height=24}" />
<Text value="Match &amp;whole word" />
<UseCompatibleTextRendering value="True" />
<Anchor value="Top, Left, Right" />
<RightToLeft value="No" />
<TabIndex value="9" />
</System.Windows.Forms.CheckBox>
<System.Windows.Forms.CheckBox>
<Name value="matchCaseCheckBox" />
<Location value="{X=8,Y=176}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<Text value="${res:Dialog.NewProject.SearchReplace.MatchCase}" />
<TabIndex value="8" />
<Size value="{Width=416, Height=24}" />
<Text value="Match &amp;case" />
<UseCompatibleTextRendering value="True" />
<Anchor value="Top, Left, Right" />
<TabIndex value="8" />
</System.Windows.Forms.CheckBox>
<System.Windows.Forms.ComboBox>
<Name value="fileTypesComboBox" />
<Anchor value="Top, Left, Right" />
<Size value="{Width=416, Height=21}" />
<TabIndex value="7" />
<Location value="{X=8,Y=152}" />
<Size value="{Width=416, Height=21}" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.ComboBox>
<System.Windows.Forms.Label>
<Name value="lookAtTypesLabel" />
<Text value="Look at these file &amp;types:" />
<TextAlign value="BottomLeft" />
<Location value="{X=8,Y=128}" />
<UseCompatibleTextRendering value="True" />
<Text value="${res:Dialog.NewProject.SearchReplace.LookAtFileTypes}" />
<Anchor value="Top, Left, Right" />
<TabIndex value="6" />
<TextAlign value="BottomLeft" />
<Size value="{Width=416, Height=23}" />
<Location value="{X=8,Y=128}" />
<TabIndex value="6" />
</System.Windows.Forms.Label>
<System.Windows.Forms.CheckBox>
<Name value="includeSubFolderCheckBox" />
<Location value="{X=24,Y=104}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<Text value="${res:Dialog.NewProject.SearchReplace.IncludeSubFolders}" />
<TabIndex value="5" />
<Size value="{Width=400, Height=24}" />
<Text value="Include su&amp;b-folders" />
<UseCompatibleTextRendering value="True" />
<Anchor value="Top, Left, Right" />
<TabIndex value="5" />
</System.Windows.Forms.CheckBox>
<System.Windows.Forms.Button>
<Name value="lookInBrowseButton" />
<Location value="{X=400,Y=80}" />
<Size value="{Width=24, Height=21}" />
<UseCompatibleTextRendering value="True" />
<Text value="..." />
<Anchor value="Top, Right" />
<Size value="{Width=24, Height=21}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="4" />
</System.Windows.Forms.Button>
<System.Windows.Forms.ComboBox>
<Name value="lookInComboBox" />
<Anchor value="Top, Left, Right" />
<Size value="{Width=384, Height=21}" />
<TabIndex value="3" />
<Location value="{X=8,Y=80}" />
<Size value="{Width=384, Height=21}" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.ComboBox>
<System.Windows.Forms.Label>
<Name value="label2" />
<Text value="&amp;Look in:" />
<TextAlign value="BottomLeft" />
<Location value="{X=8,Y=56}" />
<UseCompatibleTextRendering value="True" />
<Text value="${res:Dialog.NewProject.SearchReplace.SearchIn}" />
<Anchor value="Top, Left, Right" />
<TabIndex value="2" />
<TextAlign value="BottomLeft" />
<Size value="{Width=416, Height=23}" />
<Location value="{X=8,Y=56}" />
<TabIndex value="2" />
</System.Windows.Forms.Label>
<System.Windows.Forms.ComboBox>
<Name value="findComboBox" />
<Anchor value="Top, Left, Right" />
<Size value="{Width=416, Height=21}" />
<TabIndex value="1" />
<Location value="{X=8,Y=32}" />
<Size value="{Width=416, Height=21}" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.ComboBox>
<System.Windows.Forms.Label>
<Name value="label1" />
<Text value="Fi&amp;nd what:" />
<TextAlign value="BottomLeft" />
<Location value="{X=8,Y=8}" />
<UseCompatibleTextRendering value="True" />
<Text value="${res:Dialog.NewProject.SearchReplace.FindWhat}" />
<Anchor value="Top, Left, Right" />
<TabIndex value="0" />
<TextAlign value="BottomLeft" />
<Size value="{Width=416, Height=23}" />
<Location value="{X=8,Y=8}" />
<TabIndex value="0" />
</System.Windows.Forms.Label>
</Controls>
</System.Windows.Forms.UserControl>
</Components>
</Components>

112
src/Main/Base/Project/Resources/ReplacePanel.xfrm

@ -1,147 +1,165 @@ @@ -1,147 +1,165 @@
<Components version="1.0">
<System.Windows.Forms.UserControl>
<Name value="XmlUserControl1" />
<DockPadding value="" />
<ClientSize value="{Width=432, Height=360}" />
<Controls>
<System.Windows.Forms.ComboBox>
<Name value="useComboBox" />
<Anchor value="Top, Left, Right" />
<TabIndex value="13" />
<Location value="{X=8,Y=296}" />
<Size value="{Width=416, Height=21}" />
<TabIndex value="13" />
<DropDownStyle value="DropDownList" />
<Location value="{X=8,Y=296}" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.ComboBox>
<System.Windows.Forms.Label>
<Name value="label5" />
<Text value="Us&amp;e:" />
<TextAlign value="BottomLeft" />
<Location value="{X=8,Y=272}" />
<UseCompatibleTextRendering value="True" />
<Text value="${res:Dialog.NewProject.SearchReplace.UseMethodLabel}" />
<Anchor value="Top, Left, Right" />
<TabIndex value="12" />
<TextAlign value="BottomLeft" />
<Size value="{Width=416, Height=23}" />
<Location value="{X=8,Y=272}" />
<TabIndex value="12" />
</System.Windows.Forms.Label>
<System.Windows.Forms.Button>
<Name value="replaceAllButton" />
<Location value="{X=328,Y=328}" />
<Size value="{Width=96, Height=23}" />
<Text value="&amp;Replace all" />
<UseCompatibleTextRendering value="True" />
<Text value="${res:Dialog.NewProject.SearchReplace.ReplaceAllButton}" />
<Anchor value="Top, Right" />
<Size value="{Width=96, Height=23}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="16" />
</System.Windows.Forms.Button>
<System.Windows.Forms.ComboBox>
<Name value="replaceComboBox" />
<Anchor value="Top, Left, Right" />
<Size value="{Width=416, Height=21}" />
<TabIndex value="3" />
<Location value="{X=8,Y=80}" />
<Size value="{Width=416, Height=21}" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.ComboBox>
<System.Windows.Forms.Label>
<Name value="label4" />
<Text value="Re&amp;place with:" />
<TextAlign value="BottomLeft" />
<Location value="{X=8,Y=56}" />
<UseCompatibleTextRendering value="True" />
<Text value="${res:Dialog.NewProject.SearchReplace.ReplaceWith}" />
<Anchor value="Top, Left, Right" />
<TabIndex value="2" />
<TextAlign value="BottomLeft" />
<Size value="{Width=416, Height=23}" />
<Location value="{X=8,Y=56}" />
<TabIndex value="2" />
</System.Windows.Forms.Label>
<System.Windows.Forms.Button>
<Name value="findNextButton" />
<Location value="{X=120,Y=328}" />
<Size value="{Width=96, Height=23}" />
<Text value="&amp;Find next" />
<UseCompatibleTextRendering value="True" />
<Text value="${res:Dialog.NewProject.SearchReplace.FindNextButton}" />
<Anchor value="Top, Right" />
<Size value="{Width=96, Height=23}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="14" />
</System.Windows.Forms.Button>
<System.Windows.Forms.Button>
<Name value="replaceButton" />
<Location value="{X=224,Y=328}" />
<Size value="{Width=96, Height=23}" />
<Text value="&amp;Replace" />
<UseCompatibleTextRendering value="True" />
<Text value="${res:Dialog.NewProject.SearchReplace.ReplaceButton}" />
<Anchor value="Top, Right" />
<Size value="{Width=96, Height=23}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="15" />
</System.Windows.Forms.Button>
<System.Windows.Forms.CheckBox>
<Name value="matchWholeWordCheckBox" />
<RightToLeft value="No" />
<Location value="{X=8,Y=248}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<Text value="${res:Dialog.NewProject.SearchReplace.MatchWholeWord}" />
<TabIndex value="11" />
<Size value="{Width=416, Height=24}" />
<Text value="Match &amp;whole word" />
<UseCompatibleTextRendering value="True" />
<Anchor value="Top, Left, Right" />
<RightToLeft value="No" />
<TabIndex value="11" />
</System.Windows.Forms.CheckBox>
<System.Windows.Forms.CheckBox>
<Name value="matchCaseCheckBox" />
<Location value="{X=8,Y=224}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<Text value="${res:Dialog.NewProject.SearchReplace.MatchCase}" />
<TabIndex value="10" />
<Size value="{Width=416, Height=24}" />
<Text value="Match &amp;case" />
<UseCompatibleTextRendering value="True" />
<Anchor value="Top, Left, Right" />
<TabIndex value="10" />
</System.Windows.Forms.CheckBox>
<System.Windows.Forms.ComboBox>
<Name value="fileTypesComboBox" />
<Anchor value="Top, Left, Right" />
<Size value="{Width=416, Height=21}" />
<TabIndex value="9" />
<Location value="{X=8,Y=200}" />
<Size value="{Width=416, Height=21}" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.ComboBox>
<System.Windows.Forms.Label>
<Name value="lookAtTypesLabel" />
<Text value="Look at these file &amp;types:" />
<TextAlign value="BottomLeft" />
<Location value="{X=8,Y=176}" />
<UseCompatibleTextRendering value="True" />
<Text value="${res:Dialog.NewProject.SearchReplace.LookAtFileTypes}" />
<Anchor value="Top, Left, Right" />
<TabIndex value="8" />
<TextAlign value="BottomLeft" />
<Size value="{Width=416, Height=23}" />
<Location value="{X=8,Y=176}" />
<TabIndex value="8" />
</System.Windows.Forms.Label>
<System.Windows.Forms.CheckBox>
<Name value="includeSubFolderCheckBox" />
<Location value="{X=24,Y=152}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<Text value="${res:Dialog.NewProject.SearchReplace.IncludeSubFolders}" />
<TabIndex value="7" />
<Size value="{Width=400, Height=24}" />
<Text value="Include su&amp;b-folders" />
<UseCompatibleTextRendering value="True" />
<Anchor value="Top, Left, Right" />
<TabIndex value="7" />
</System.Windows.Forms.CheckBox>
<System.Windows.Forms.Button>
<Name value="lookInBrowseButton" />
<Location value="{X=400,Y=128}" />
<Size value="{Width=24, Height=21}" />
<UseCompatibleTextRendering value="True" />
<Text value="..." />
<Anchor value="Top, Right" />
<Size value="{Width=24, Height=21}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<TabIndex value="6" />
</System.Windows.Forms.Button>
<System.Windows.Forms.ComboBox>
<Name value="lookInComboBox" />
<Anchor value="Top, Left, Right" />
<Size value="{Width=384, Height=21}" />
<TabIndex value="5" />
<Location value="{X=8,Y=128}" />
<Size value="{Width=384, Height=21}" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.ComboBox>
<System.Windows.Forms.Label>
<Name value="label2" />
<Text value="&amp;Look in:" />
<TextAlign value="BottomLeft" />
<Location value="{X=8,Y=104}" />
<UseCompatibleTextRendering value="True" />
<Text value="${res:Dialog.NewProject.SearchReplace.SearchIn}" />
<Anchor value="Top, Left, Right" />
<TabIndex value="4" />
<TextAlign value="BottomLeft" />
<Size value="{Width=416, Height=23}" />
<Location value="{X=8,Y=104}" />
<TabIndex value="4" />
</System.Windows.Forms.Label>
<System.Windows.Forms.ComboBox>
<Name value="findComboBox" />
<Anchor value="Top, Left, Right" />
<Size value="{Width=416, Height=21}" />
<TabIndex value="1" />
<Location value="{X=8,Y=32}" />
<Size value="{Width=416, Height=21}" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.ComboBox>
<System.Windows.Forms.Label>
<Name value="label1" />
<Text value="Fi&amp;nd what:" />
<TextAlign value="BottomLeft" />
<Location value="{X=8,Y=8}" />
<UseCompatibleTextRendering value="True" />
<Text value="${res:Dialog.NewProject.SearchReplace.FindWhat}" />
<Anchor value="Top, Left, Right" />
<TabIndex value="0" />
<TextAlign value="BottomLeft" />
<Size value="{Width=416, Height=23}" />
<Location value="{X=8,Y=8}" />
<TabIndex value="0" />
</System.Windows.Forms.Label>
</Controls>
</System.Windows.Forms.UserControl>
</Components>
</Components>

6
src/Main/Base/Project/Src/TextEditor/SearchAndReplace/Gui/SearchAndReplaceDialog.cs

@ -52,7 +52,7 @@ namespace SearchAndReplace @@ -52,7 +52,7 @@ namespace SearchAndReplace
this.FormBorderStyle = FormBorderStyle.FixedToolWindow;
this.ShowInTaskbar = false;
this.TopMost = false;
this.Text = "Search and Replace";
this.Text = StringParser.Parse("${res:Dialog.NewProject.SearchReplace.Title}");
this.StartPosition = FormStartPosition.CenterParent;
this.KeyPreview = true;
@ -66,13 +66,13 @@ namespace SearchAndReplace @@ -66,13 +66,13 @@ namespace SearchAndReplace
toolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
toolStrip.Renderer = MenuService.Renderer;
searchButton.Text = "&Search";
searchButton.Text = StringParser.Parse("${res:Dialog.NewProject.SearchReplace.FindDialogName}");
searchButton.Image = IconService.GetBitmap("Icons.16x16.FindIcon");
searchButton.Checked = searchAndReplaceMode == SearchAndReplaceMode.Search;
searchButton.Click += new EventHandler(SearchButtonClick);
toolStrip.Items.Add(searchButton);
replaceButton.Text = "&Replace";
replaceButton.Text = StringParser.Parse("${res:Dialog.NewProject.SearchReplace.ReplaceDialogName}");
replaceButton.Image = IconService.GetBitmap("Icons.16x16.ReplaceIcon");
replaceButton.Checked = searchAndReplaceMode == SearchAndReplaceMode.Replace;
replaceButton.Click += new EventHandler(ReplaceButtonClick);

6
src/Main/Base/Project/Src/TextEditor/SearchAndReplace/Gui/SearchAndReplacePanel.cs

@ -133,9 +133,9 @@ namespace SearchAndReplace @@ -133,9 +133,9 @@ namespace SearchAndReplace
Get<CheckBox>("includeSubFolder").Checked = SearchOptions.IncludeSubdirectories;
Get<ComboBox>("use").Items.Clear();
Get<ComboBox>("use").Items.Add("Standard search");
Get<ComboBox>("use").Items.Add("Regular expressions");
Get<ComboBox>("use").Items.Add("Wildcards");
Get<ComboBox>("use").Items.Add(StringParser.Parse("${res:Dialog.NewProject.SearchReplace.SearchStrategy.Standard}"));
Get<ComboBox>("use").Items.Add(StringParser.Parse("${res:Dialog.NewProject.SearchReplace.SearchStrategy.RegexSearch}"));
Get<ComboBox>("use").Items.Add(StringParser.Parse("${res:Dialog.NewProject.SearchReplace.SearchStrategy.WildcardSearch}"));
switch (SearchOptions.SearchStrategyType) {
case SearchStrategyType.RegEx:
Get<ComboBox>("use").SelectedIndex = 1;

BIN
src/Main/StartUp/Project/Resources/StringResources.resources

Binary file not shown.

4
src/Main/StartUp/Project/SharpDevelop.exe.manifest

@ -8,9 +8,9 @@ @@ -8,9 +8,9 @@
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
language="*"
/>
</dependentAssembly>
</dependency>

1
src/Tools/StringResourceTool/MainForm.cs

@ -277,6 +277,7 @@ namespace StringResourceTool @@ -277,6 +277,7 @@ namespace StringResourceTool
foreach (string fileName in Directory.GetFiles(path, "*.*")) {
switch (Path.GetExtension(fileName).ToLowerInvariant()) {
case ".cs":
case ".boo":
FindUsedStrings(fileName, t, true);
break;
case ".resx":

12
src/Tools/StringResourceTool/StringResourceTool.sln

@ -1,6 +1,16 @@ @@ -1,6 +1,16 @@
Microsoft Visual Studio Solution File, Format Version 9.00
# SharpDevelop 2.0.0.550
# SharpDevelop 2.0.0.689
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StringResourceTool", "StringResourceTool.csproj", "{197537EA-78F4-4434-904C-C81B19459FE7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{197537EA-78F4-4434-904C-C81B19459FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{197537EA-78F4-4434-904C-C81B19459FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{197537EA-78F4-4434-904C-C81B19459FE7}.Release|Any CPU.Build.0 = Release|Any CPU
{197537EA-78F4-4434-904C-C81B19459FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
EndGlobalSection
EndGlobal

Loading…
Cancel
Save