Browse Source

Make Consolas the default font on Vista.

Allow runtime pad creation.
Ad SharpDevelopInteraction example to SdaUser.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1628 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 19 years ago
parent
commit
941c45808b
  1. 65
      doc/ChangeLog.xml
  2. 24
      samples/SdaUser/MainForm.Designer.cs
  3. 29
      samples/SdaUser/MainForm.cs
  4. 5
      samples/SdaUser/SdaUser.csproj
  5. 6
      samples/SdaUser/SdaUser.sln
  6. 31
      samples/SdaUser/SharpDevelopInteraction/AssemblyInfo.cs
  7. 37
      samples/SdaUser/SharpDevelopInteraction/InteractionClass.cs
  8. 59
      samples/SdaUser/SharpDevelopInteraction/SharpDevelopInteraction.csproj
  9. 6
      samples/SdaUser/SharpDevelopInteraction/SharpDevelopInteraction.sln
  10. 2
      src/AddIns/Misc/HighlightingEditor/Project/Src/Nodes/DigitsNode.cs
  11. 2
      src/AddIns/Misc/HighlightingEditor/Project/Src/Nodes/EnvironmentNode.cs
  12. 2
      src/AddIns/Misc/HighlightingEditor/Project/Src/Nodes/KeywordListNode.cs
  13. 2
      src/AddIns/Misc/HighlightingEditor/Project/Src/Nodes/MarkerNode.cs
  14. 2
      src/AddIns/Misc/SubversionAddIn/Project/Src/Gui/HistoryViewDisplayBinding/DiffPanel.cs
  15. 2
      src/AddIns/Misc/SubversionAddIn/Project/Src/Gui/HistoryViewDisplayBinding/InfoPanel.cs
  16. 6
      src/Main/Base/Project/Src/Gui/Components/ExtTreeView/ExtTreeNode.cs
  17. 2
      src/Main/Base/Project/Src/Gui/Components/FontSelectionPanel.cs
  18. 2
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/IDEOptions/EditStandardHeaderPanel.cs
  19. 2
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/OutputWindowOptionsPanel.cs
  20. 9
      src/Main/Base/Project/Src/Gui/IWorkbench.cs
  21. 9
      src/Main/Base/Project/Src/Gui/IWorkbenchLayout.cs
  22. 4
      src/Main/Base/Project/Src/Gui/Pads/CompilerMessageView/CompilerMessageView.cs
  23. 13
      src/Main/Base/Project/Src/Gui/Workbench/DefaultWorkbench.cs
  24. 9
      src/Main/Base/Project/Src/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs
  25. 72
      src/Main/Base/Project/Src/Internal/Doozers/PadDescriptor.cs
  26. 2
      src/Main/Base/Project/Src/TextEditor/Gui/Editor/SharpDevelopTextEditorProperties.cs
  27. 2
      src/Main/Base/Project/Src/TextEditor/Gui/OptionPanels/CodeTemplatePanel.cs
  28. 4
      src/Main/Base/Project/Src/TextEditor/Gui/OptionPanels/GeneralTextEditorPanel.cs
  29. 25
      src/Main/Core/Project/Src/Services/ResourceService/ResourceService.cs
  30. 11
      src/Main/StartUp/Project/SharpDevelop.exe.manifest
  31. 2
      src/Main/StartUp/Project/SharpDevelopMain.cs

65
doc/ChangeLog.xml

@ -1,4 +1,69 @@ @@ -1,4 +1,69 @@
<ChangeLog project="SharpDevelop">
<Change author="Daniel Grunwald" date="07/28/2006">Add ICSharpCode.SharpDevelop.Sda and SdaUser example application.</Change>
<Change author="Peter Forstmeier" date="07/28/2006">Samples for IList as DataSource, EventLogger is a Report that shows dynamic use of images in a Report,ContributersList shows a couple of Contributers </Change>
<Change author="Peter Forstmeier" date="07/28/2006">Iamges can be set/changed at runtime</Change>
<Change author="Peter Forstmeier" date="07/27/2006">More fixes from FxCop</Change>
<Change author="Peter Forstmeier" date="07/27/2006">Work on Collections as DataSource. Fixed some stuff from FxCop</Change>
<Change author="dickonfield" date="07/26/2006">work in progress - added more detail around connection, metadata and object view management</Change>
<Change author="Daniel Grunwald" date="07/25/2006">Remove unnecessary usage of Assembly.GetEntryAssembly</Change>
<Change author="Peter Forstmeier" date="07/24/2006">Fixed a problem with Fonts, make some changes from FxCop</Change>
<Change author="Peter Forstmeier" date="07/24/2006">Update SharpReport Examples</Change>
<Change author="Daniel Grunwald" date="07/22/2006">Implemented enum completion after "return".</Change>
<Change author="Daniel Grunwald" date="07/22/2006">Fixed SD2-920: Refactoring menu options for enums contains invalid options</Change>
<Change author="Daniel Grunwald" date="07/22/2006">When creating a property in VB, rename the field if it would conflict with the property name (fixes SD2-947)</Change>
<Change author="Daniel Grunwald" date="07/22/2006">Fixed some translation issues.</Change>
<Change author="Daniel Grunwald" date="07/21/2006">SD2-945: Typing a declaration of two or more variables in the same line (VB) throws exception</Change>
<Change author="Daniel Grunwald" date="07/21/2006">Move files to match new namespace structure.</Change>
<Change author="Daniel Grunwald" date="07/21/2006">Improved NRefactory public API (moving classes to other namespaces etc.)</Change>
<Change author="Peter Forstmeier" date="07/21/2006">Fixed Unbound printing for FormSheet Reports</Change>
<Change author="Daniel Grunwald" date="07/21/2006">Fixed SD2-891: Content of VB 'With' statement not converted correctly to C#
Fixed SD2-894: Abstract properties declaration not converted correctly from VB to C#
Fixed SD2-895: VB 'Not' operator is not converted correctly to C#
Fixed SD2-901: VB 'Continue' statement not converted correctly from C#
Fixed SD2-902: C# 'break' statement not converted correctly to VB</Change>
<Change author="Peter Forstmeier" date="07/21/2006">Move samples to SharpDevelop2.1</Change>
<Change author="Daniel Grunwald" date="07/21/2006">Fixed SD2-930: VB exponential operator not converted to C#
Fixed SD2-879: Folding breaks with consecutive operators in VB code
Fixed SD2-906: Folding breaks on VB property declaration
Fixed SD2-921: Definitions in one line converted incorrectly from VB to C#
Fixed SD2-903: 'Using' statement not converted correctly from VB to C#
Fixed SD2-890: 'uint' type converted incorrectly from C# to VB
Fixed SD2-907: static method level variables are not translated from VB to C#</Change>
<Change author="Mathias Simmack" date="07/20/2006">uploaded a new version of my Help 2.0 register tool including its source</Change>
<Change author="Daniel Grunwald" date="07/20/2006">Merged missing SharpReport resources from Corsavy.
Fixed some bugs in code analysis-AddIn.</Change>
<Change author="dickonfield" date="07/19/2006">added addin file</Change>
<Change author="Daniel Grunwald" date="07/19/2006">Add "Suppress message" command to FxCop warnings on the error list</Change>
<Change author="dickonfield" date="07/19/2006">Added SharpDbTools project to the SharpDevelop.sln</Change>
<Change author="Daniel Grunwald" date="07/19/2006">Fixed some FxCop warnings in NRefactory.</Change>
<Change author="Daniel Grunwald" date="07/19/2006">Fixed SD2-922: RegEx window not restoring its size after been maximized</Change>
<Change author="David Srbecký" date="07/17/2006">Added Debugger.BooInterpreter</Change>
<Change author="David Alpert" date="07/17/2006">Fixed SD2-937</Change>
<Change author="David Alpert" date="07/17/2006">Fixed SD2-939</Change>
<Change author="David Alpert" date="07/17/2006">possible workaround to SD2-941.
i couldn't reproduce the problem illustrated in SD2-941, but instead this addresses the crash when BooBinding tries to reference FormsDesigner if the FormsDesigner.addin file does not exist.</Change>
<Change author="David Alpert" date="07/17/2006">Fixed the following build errors for the SharpDevelop.Tests solution:
Main\Base\Test\Services_Navigation\NavigationServiceTestFixture.cs(115,52)
: error CS1026: ) expected
Main\Base\Test\Services_Navigation\NavigationServiceTestFixture.cs(128,55)
: error CS0117: 'ICSharpCode.Core.NavigationService' does not contain a definition for 'GetListOfPoints'
</Change>
<Change author="dickonfield" date="07/16/2006" />
<Change author="Daniel Grunwald" date="07/16/2006">Allow AddIns to customize the MSBuild logger.</Change>
<Change author="Daniel Grunwald" date="07/16/2006">Implemented SD2-572: Enum autocomplete</Change>
<Change author="Daniel Grunwald" date="07/16/2006">Implemented SD2-446: Support skipping method bodies in VB Lexer.</Change>
<Change author="Daniel Grunwald" date="07/16/2006">NRefactory now preserves blank lines.</Change>
<Change author="Daniel Grunwald" date="07/16/2006">Work around MSBuild CopyToOutputDirectory bug.
Fixed NRefactory unit tests.</Change>
<Change author="Daniel Grunwald" date="07/16/2006">New feature: move class to file</Change>
<Change author="David Srbecký" date="07/15/2006">ObjectValue split into ObjectValue and ObjectValueClass;
Variable submenus implemented in Debugger.Core</Change>
<Change author="Daniel Grunwald" date="07/15/2006">NRefactory: use Location structure instead of System.Drawing.Point for source positions.</Change>
<Change author="Daniel Grunwald" date="07/15/2006">Boo.InterpreterAddIn now can host multiple interpreters</Change>
<Change author="Daniel Grunwald" date="07/15/2006">Some FxCop suggestions to NRefactory.</Change>
<Change author="Daniel Grunwald" date="07/15/2006">Update to log4net 1.2.10.</Change>
<Change author="David Alpert" date="07/15/2006">Fixed suggestions by FxCop for NavigationService; </Change>
<Change author="Daniel Grunwald" date="07/14/2006">Merged Corsavy r1517:1567 to trunk.</Change>
<Change author="Matt Ward" date="07/12/2006">Search and Replace dialog buttons disabled if no find pattern entered. Search/replace keyboard shortcuts now switch between the search/replace tabs when the search and replace dialog has the focus.</Change>
<Change author="Matt Ward" date="07/12/2006">SD2-918. Unit tests window - Run tests right click menu option available when no tests are loaded.</Change>
<Change author="Matt Ward" date="07/12/2006">Added keyboard shortcut to open Code Coverage window. Added text editor right click and edit menu options to show/hide code coverage.</Change>

24
samples/SdaUser/MainForm.Designer.cs generated

@ -36,6 +36,7 @@ namespace SdaUser @@ -36,6 +36,7 @@ namespace SdaUser
{
this.runButton = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.makeTransparentButton = new System.Windows.Forms.Button();
this.closeButton = new System.Windows.Forms.Button();
this.visibleCheckBox = new System.Windows.Forms.CheckBox();
this.unloadHostDomainButton = new System.Windows.Forms.Button();
@ -55,19 +56,29 @@ namespace SdaUser @@ -55,19 +56,29 @@ namespace SdaUser
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.makeTransparentButton);
this.groupBox1.Controls.Add(this.closeButton);
this.groupBox1.Controls.Add(this.visibleCheckBox);
this.groupBox1.Enabled = false;
this.groupBox1.Location = new System.Drawing.Point(12, 130);
this.groupBox1.Location = new System.Drawing.Point(12, 123);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(268, 92);
this.groupBox1.Size = new System.Drawing.Size(268, 82);
this.groupBox1.TabIndex = 1;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "groupBox1";
//
// makeTransparentButton
//
this.makeTransparentButton.Location = new System.Drawing.Point(135, 50);
this.makeTransparentButton.Name = "makeTransparentButton";
this.makeTransparentButton.Size = new System.Drawing.Size(112, 23);
this.makeTransparentButton.TabIndex = 2;
this.makeTransparentButton.Text = "Make Transparent";
this.makeTransparentButton.UseVisualStyleBackColor = true;
this.makeTransparentButton.Click += new System.EventHandler(this.MakeTransparentButtonClick);
//
// closeButton
//
this.closeButton.Location = new System.Drawing.Point(6, 50);
@ -103,7 +114,7 @@ namespace SdaUser @@ -103,7 +114,7 @@ namespace SdaUser
//
// openFileButton
//
this.openFileButton.Location = new System.Drawing.Point(18, 243);
this.openFileButton.Location = new System.Drawing.Point(18, 223);
this.openFileButton.Name = "openFileButton";
this.openFileButton.Size = new System.Drawing.Size(75, 23);
this.openFileButton.TabIndex = 3;
@ -115,7 +126,7 @@ namespace SdaUser @@ -115,7 +126,7 @@ namespace SdaUser
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(292, 334);
this.ClientSize = new System.Drawing.Size(292, 255);
this.Controls.Add(this.openFileButton);
this.Controls.Add(this.unloadHostDomainButton);
this.Controls.Add(this.groupBox1);
@ -126,6 +137,7 @@ namespace SdaUser @@ -126,6 +137,7 @@ namespace SdaUser
this.groupBox1.ResumeLayout(false);
this.ResumeLayout(false);
}
private System.Windows.Forms.Button makeTransparentButton;
private System.Windows.Forms.Button openFileButton;
private System.Windows.Forms.Button unloadHostDomainButton;
private System.Windows.Forms.Button closeButton;

29
samples/SdaUser/MainForm.cs

@ -31,10 +31,6 @@ namespace SdaUser @@ -31,10 +31,6 @@ namespace SdaUser
// The InitializeComponent() call is required for Windows Forms designer support.
//
InitializeComponent();
//
// TODO: Add constructor code after the InitializeComponent() call.
//
}
void RunButtonClick(object sender, EventArgs e)
@ -109,6 +105,7 @@ namespace SdaUser @@ -109,6 +105,7 @@ namespace SdaUser
using (OpenFileDialog dlg = new OpenFileDialog()) {
if (dlg.ShowDialog() == DialogResult.OK) {
if (runButton.Enabled) {
// create host with InitialFile set
runButton.Enabled = false;
unloadHostDomainButton.Enabled = true;
@ -116,10 +113,32 @@ namespace SdaUser @@ -116,10 +113,32 @@ namespace SdaUser
wbSettings.InitialFileList.Add(dlg.FileName);
RunWorkbench(wbSettings);
} else if (host != null) {
host.OpenDocument(dlg.FileName);
if (host.IsSolutionOrProject(dlg.FileName)) {
// won't occur because no project types are defined
// in our reduces .addin file.
host.OpenProject(dlg.FileName);
} else {
host.OpenDocument(dlg.FileName);
}
}
}
}
}
/// <summary>
/// This demonstrates how to access SharpDevelop's internals from the host application.
/// </summary>
void MakeTransparentButtonClick(object sender, System.EventArgs e)
{
// We need to use a wrapper class to cross the AppDomain barrier.
// The assembly containing the wrapper class will be loaded to both AppDomains.
// Therefore we don't use our possibly large main application, but a special
// assembly just for the interaction.
SharpDevelopInteraction.InteractionClass obj;
obj = host.CreateInstanceInTargetDomain<SharpDevelopInteraction.InteractionClass>();
obj.MakeTransparent();
}
}
}

5
samples/SdaUser/SdaUser.csproj

@ -62,6 +62,11 @@ @@ -62,6 +62,11 @@
<Content Include="SdaAddIns\SdaBase.addin">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<ProjectReference Include="SharpDevelopInteraction\SharpDevelopInteraction.csproj">
<Project>{84054D5E-0B81-4C4B-AABB-DCC43030830B}</Project>
<Name>SharpDevelopInteraction</Name>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
</Project>

6
samples/SdaUser/SdaUser.sln

@ -2,6 +2,8 @@ @@ -2,6 +2,8 @@
# SharpDevelop 2.1.0.1602
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SdaUser", "SdaUser.csproj", "{3FF48818-69D2-4884-8F4F-62EC72F0D5F0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpDevelopInteraction", "SharpDevelopInteraction\SharpDevelopInteraction.csproj", "{84054D5E-0B81-4C4B-AABB-DCC43030830B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -12,5 +14,9 @@ Global @@ -12,5 +14,9 @@ Global
{3FF48818-69D2-4884-8F4F-62EC72F0D5F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3FF48818-69D2-4884-8F4F-62EC72F0D5F0}.Release|Any CPU.Build.0 = Release|Any CPU
{3FF48818-69D2-4884-8F4F-62EC72F0D5F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{84054D5E-0B81-4C4B-AABB-DCC43030830B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{84054D5E-0B81-4C4B-AABB-DCC43030830B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{84054D5E-0B81-4C4B-AABB-DCC43030830B}.Release|Any CPU.Build.0 = Release|Any CPU
{84054D5E-0B81-4C4B-AABB-DCC43030830B}.Release|Any CPU.ActiveCfg = Release|Any CPU
EndGlobalSection
EndGlobal

31
samples/SdaUser/SharpDevelopInteraction/AssemblyInfo.cs

@ -0,0 +1,31 @@ @@ -0,0 +1,31 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 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("SharpDevelopInteraction")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SharpDevelopInteraction")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// This sets the default COM visibility of types in the assembly to invisible.
// If you need to expose a type to COM, use [ComVisible(true)] on that type.
[assembly: ComVisible(false)]
// 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.*")]

37
samples/SdaUser/SharpDevelopInteraction/InteractionClass.cs

@ -0,0 +1,37 @@ @@ -0,0 +1,37 @@
/*
* Created by SharpDevelop.
* User: Daniel Grunwald
* Date: 28.07.2006
* Time: 23:10
*/
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using ICSharpCode.SharpDevelop.Gui;
namespace SharpDevelopInteraction
{
/// <summary>
/// If you want to control SharpDevelop's internals from the host application,
/// you need to use a wrapper assembly and class like this.
/// Make sure to inherit from MarshalByRefObject and create the instance using
/// host.CreateInstanceInTargetDomain&lt;T&gt; in the host application.
///
/// The class itself will be responsible to use WorkbenchSingleton.SafeThread(Async)Call
/// for all operations if SharpDevelop is running on its own thread.
/// </summary>
public class InteractionClass : MarshalByRefObject
{
public void MakeTransparent()
{
WorkbenchSingleton.SafeThreadAsyncCall(new MethodInvoker(MakeTransparentInternal));
}
void MakeTransparentInternal()
{
WorkbenchSingleton.MainForm.Opacity *= 0.85;
if (WorkbenchSingleton.MainForm.Opacity < 0.2)
WorkbenchSingleton.MainForm.Opacity = 1;
}
}
}

59
samples/SdaUser/SharpDevelopInteraction/SharpDevelopInteraction.csproj

@ -0,0 +1,59 @@ @@ -0,0 +1,59 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OutputType>Library</OutputType>
<RootNamespace>SharpDevelopInteraction</RootNamespace>
<AssemblyName>SharpDevelopInteraction</AssemblyName>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{84054D5E-0B81-4C4B-AABB-DCC43030830B}</ProjectGuid>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<NoStdLib>False</NoStdLib>
<RegisterForComInterop>False</RegisterForComInterop>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
<BaseAddress>4194304</BaseAddress>
<PlatformTarget>AnyCPU</PlatformTarget>
<FileAlignment>4096</FileAlignment>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
<IntermediateOutputPath>obj\Debug\</IntermediateOutputPath>
<OutputPath>..\..\..\bin\</OutputPath>
<Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
<IntermediateOutputPath>obj\Release\</IntermediateOutputPath>
<OutputPath>bin\Release\</OutputPath>
<Optimize>True</Optimize>
<DefineConstants>TRACE</DefineConstants>
<DebugSymbols>False</DebugSymbols>
<DebugType>None</DebugType>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="ICSharpCode.Core">
<HintPath>..\..\..\bin\ICSharpCode.Core.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="ICSharpCode.SharpDevelop">
<HintPath>..\..\..\bin\ICSharpCode.SharpDevelop.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup>
<Compile Include="InteractionClass.cs" />
<Compile Include="AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
</Project>

6
samples/SdaUser/SharpDevelopInteraction/SharpDevelopInteraction.sln

@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 9.00
# SharpDevelop 2.1.0.1602
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpDevelopInteraction", "SharpDevelopInteraction.csproj", "{84054D5E-0B81-4C4B-AABB-DCC43030830B}"
EndProject
Global
EndGlobal

2
src/AddIns/Misc/HighlightingEditor/Project/Src/Nodes/DigitsNode.cs

@ -82,7 +82,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -82,7 +82,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
DigitsNode node = (DigitsNode)parent;
Properties properties = ((Properties)PropertyService.Get("ICSharpCode.TextEditor.Document.Document.DefaultDocumentAggregatorProperties", new Properties()));
sampleLabel.Font = ParseFont(properties.Get("DefaultFont", ResourceService.CourierNew10.ToString()));
sampleLabel.Font = ParseFont(properties.Get("DefaultFont", ResourceService.DefaultMonospacedFont.ToString()));
color = node.Color;
PreviewUpdate(sampleLabel, color);
}

2
src/AddIns/Misc/HighlightingEditor/Project/Src/Nodes/EnvironmentNode.cs

@ -158,7 +158,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -158,7 +158,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
this.UseItemStyleForSubItems = false;
Properties properties = ((Properties)PropertyService.Get("ICSharpCode.TextEditor.Document.Document.DefaultDocumentAggregatorProperties", new Properties()));
basefont = ParseFont(properties.Get("DefaultFont", ResourceService.CourierNew10.ToString()));
basefont = ParseFont(properties.Get("DefaultFont", ResourceService.DefaultMonospacedFont.ToString()));
listfont = listFont;
ColorUpdate();

2
src/AddIns/Misc/HighlightingEditor/Project/Src/Nodes/KeywordListNode.cs

@ -152,7 +152,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -152,7 +152,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
}
Properties properties = ((Properties)PropertyService.Get("ICSharpCode.TextEditor.Document.Document.DefaultDocumentAggregatorProperties", new Properties()));
sampleLabel.Font = ParseFont(properties.Get("DefaultFont", ResourceService.CourierNew10.ToString()));
sampleLabel.Font = ParseFont(properties.Get("DefaultFont", ResourceService.DefaultMonospacedFont.ToString()));
color = node.Color;
nameBox.Text = node.Name;

2
src/AddIns/Misc/HighlightingEditor/Project/Src/Nodes/MarkerNode.cs

@ -133,7 +133,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -133,7 +133,7 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
Properties properties = ((Properties)PropertyService.Get("ICSharpCode.TextEditor.Document.Document.DefaultDocumentAggregatorProperties", new Properties()));
sampleLabel.Font = ParseFont(properties.Get("DefaultFont", ResourceService.CourierNew10.ToString()));
sampleLabel.Font = ParseFont(properties.Get("DefaultFont", ResourceService.DefaultMonospacedFont.ToString()));
color = node.Color;
nameBox.Text = node.What;

2
src/AddIns/Misc/SubversionAddIn/Project/Src/Gui/HistoryViewDisplayBinding/DiffPanel.cs

@ -35,7 +35,7 @@ namespace ICSharpCode.Svn @@ -35,7 +35,7 @@ namespace ICSharpCode.Svn
Get<ListView>("toRevision").SelectedIndexChanged += new EventHandler(ShowDiff);
ControlDictionary["diffRichTextBox"].Enabled = false;
ControlDictionary["diffRichTextBox"].Font = ResourceService.CourierNew10;
ControlDictionary["diffRichTextBox"].Font = ResourceService.DefaultMonospacedFont;
ControlDictionary["splitter1"].Height = 3;
ListViewItem newItem;

2
src/AddIns/Misc/SubversionAddIn/Project/Src/Gui/HistoryViewDisplayBinding/InfoPanel.cs

@ -37,7 +37,7 @@ namespace ICSharpCode.Svn @@ -37,7 +37,7 @@ namespace ICSharpCode.Svn
changesList = Get<ListView>("changes");
revisionList.SelectedIndexChanged += RevisionListViewSelectionChanged;
ControlDictionary["commentRichTextBox"].Enabled = false;
ControlDictionary["commentRichTextBox"].Font = ResourceService.CourierNew10;
ControlDictionary["commentRichTextBox"].Font = ResourceService.DefaultMonospacedFont;
// Work around WinForms/XmlForms bug:
ControlDictionary["splitter1"].Height = 3;

6
src/Main/Base/Project/Src/Gui/Components/ExtTreeView/ExtTreeNode.cs

@ -333,9 +333,9 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -333,9 +333,9 @@ namespace ICSharpCode.SharpDevelop.Gui
boldFont = ResourceService.LoadFont("Tahoma", 9, FontStyle.Bold);
italicFont = ResourceService.LoadFont("Tahoma", 9, FontStyle.Italic);
monospacedFont = ResourceService.LoadFont("Courier New", 10);
boldMonospacedFont = ResourceService.LoadFont("Courier New", 10, FontStyle.Bold);
italicMonospacedFont = ResourceService.LoadFont("Courier New", 10, FontStyle.Italic);
monospacedFont = ResourceService.DefaultMonospacedFont;
boldMonospacedFont = ResourceService.LoadDefaultMonospacedFont(FontStyle.Bold);
italicMonospacedFont = ResourceService.LoadDefaultMonospacedFont(FontStyle.Italic);
}
#endregion

2
src/Main/Base/Project/Src/Gui/Components/FontSelectionPanel.cs

@ -106,7 +106,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -106,7 +106,7 @@ namespace ICSharpCode.SharpDevelop.Gui
return new Font(descr[1], Single.Parse(descr[3]));
} catch (Exception ex) {
LoggingService.Warn(ex);
return ResourceService.CourierNew10;
return ResourceService.DefaultMonospacedFont;
}
}

2
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/IDEOptions/EditStandardHeaderPanel.cs

@ -23,7 +23,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels @@ -23,7 +23,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
{
SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.EditStandardHeaderPanel.xfrm"));
ControlDictionary["headerTextBox"].Font = ResourceService.CourierNew10;
ControlDictionary["headerTextBox"].Font = ResourceService.DefaultMonospacedFont;
foreach (StandardHeader header in StandardHeader.StandardHeaders) {
((ComboBox)ControlDictionary["headerChooser"]).Items.Add(header);
}

2
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/OutputWindowOptionsPanel.cs

@ -39,7 +39,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels @@ -39,7 +39,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
ControlDictionary["FontGroupBox"].Controls.Add(fontSelectionPanel);
((CheckBox)ControlDictionary["wordWrapCheckBox"]).Checked = properties.Get("WordWrap", true);
fontSelectionPanel.CurrentFontString = properties.Get("DefaultFont", ResourceService.CourierNew10.ToString()).ToString();
fontSelectionPanel.CurrentFontString = properties.Get("DefaultFont", ResourceService.DefaultMonospacedFont.ToString()).ToString();
}
public override bool StorePanelContents()

9
src/Main/Base/Project/Src/Gui/IWorkbench.cs

@ -65,6 +65,11 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -65,6 +65,11 @@ namespace ICSharpCode.SharpDevelop.Gui
/// </summary>
void ShowPad(PadDescriptor content);
/// <summary>
/// Closes and disposes a <see cref="IPadContent"/>.
/// </summary>
void UnloadPad(PadDescriptor content);
/// <summary>
/// Returns a pad from a specific type.
/// </summary>
@ -83,7 +88,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -83,7 +88,7 @@ namespace ICSharpCode.SharpDevelop.Gui
/// <summary>
/// Re-initializes all components of the workbench, should be called
/// when a special property is changed that affects layout stuff.
/// (like language change)
/// (like language change)
/// </summary>
void RedrawAllComponents();
@ -91,7 +96,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -91,7 +96,7 @@ namespace ICSharpCode.SharpDevelop.Gui
/// Is called, when a workbench view was opened
/// </summary>
/// <example>
/// WorkbenchSingleton.WorkbenchCreated += delegate {
/// WorkbenchSingleton.WorkbenchCreated += delegate {
/// WorkbenchSingleton.Workbench.ViewOpened += ...;
/// };
/// </example>

9
src/Main/Base/Project/Src/Gui/IWorkbenchLayout.cs

@ -11,7 +11,7 @@ using ICSharpCode.Core; @@ -11,7 +11,7 @@ using ICSharpCode.Core;
namespace ICSharpCode.SharpDevelop.Gui
{
/// <summary>
/// The IWorkbenchLayout object is responsible for the layout of
/// The IWorkbenchLayout object is responsible for the layout of
/// the workspace, it shows the contents, chooses the IWorkbenchWindow
/// implementation etc. it could be attached/detached at the runtime
/// to a workbench.
@ -48,10 +48,15 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -48,10 +48,15 @@ namespace ICSharpCode.SharpDevelop.Gui
void ActivatePad(string fullyQualifiedTypeName);
/// <summary>
/// Hides a new <see cref="IPadContent"/>.
/// Hides a <see cref="IPadContent"/>.
/// </summary>
void HidePad(PadDescriptor content);
/// <summary>
/// Closes and disposes a <see cref="IPadContent"/>.
/// </summary>
void UnloadPad(PadDescriptor content);
/// <summary>
/// returns true, if padContent is visible;
/// </summary>

4
src/Main/Base/Project/Src/Gui/Pads/CompilerMessageView/CompilerMessageView.cs

@ -127,7 +127,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -127,7 +127,7 @@ namespace ICSharpCode.SharpDevelop.Gui
properties = (Properties)PropertyService.Get(OutputWindowOptionsPanel.OutputWindowsProperty, new Properties());
textEditorControl.Font = FontSelectionPanel.ParseFont(properties.Get("DefaultFont", ResourceService.CourierNew10.ToString()).ToString());
textEditorControl.Font = FontSelectionPanel.ParseFont(properties.Get("DefaultFont", ResourceService.DefaultMonospacedFont.ToString()).ToString());
properties.PropertyChanged += new PropertyChangedEventHandler(PropertyChanged);
//textEditorControl.ActiveTextAreaControl.TextArea.DoubleClick += TextEditorControlDoubleClick;
@ -367,7 +367,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -367,7 +367,7 @@ namespace ICSharpCode.SharpDevelop.Gui
ToolbarService.UpdateToolbar(toolStrip);
}
if (e.Key == "DefaultFont") {
textEditorControl.Font = FontSelectionPanel.ParseFont(properties.Get("DefaultFont", ResourceService.CourierNew10.ToString()).ToString());
textEditorControl.Font = FontSelectionPanel.ParseFont(properties.Get("DefaultFont", ResourceService.DefaultMonospacedFont.ToString()).ToString());
}
}

13
src/Main/Base/Project/Src/Gui/Workbench/DefaultWorkbench.cs

@ -314,6 +314,19 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -314,6 +314,19 @@ namespace ICSharpCode.SharpDevelop.Gui
}
}
/// <summary>
/// Closes and disposes a <see cref="IPadContent"/>.
/// </summary>
public void UnloadPad(PadDescriptor content)
{
PadContentCollection.Remove(content);
if (layout != null) {
layout.UnloadPad(content);
}
content.Dispose();
}
public void UpdateRenderer()
{
bool pro = PropertyService.Get("ICSharpCode.SharpDevelop.Gui.UseProfessionalRenderer", true);

9
src/Main/Base/Project/Src/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs

@ -469,6 +469,15 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -469,6 +469,15 @@ namespace ICSharpCode.SharpDevelop.Gui
}
}
public void UnloadPad(PadDescriptor padContent)
{
if (padContent != null && contentHash.ContainsKey(padContent.Class)) {
contentHash[padContent.Class].Close();
contentHash[padContent.Class].Dispose();
contentHash.Remove(padContent.Class);
}
}
public void ActivatePad(PadDescriptor padContent)
{
if (padContent != null && contentHash.ContainsKey(padContent.Class)) {

72
src/Main/Base/Project/Src/Internal/Doozers/PadDescriptor.cs

@ -11,20 +11,54 @@ using ICSharpCode.SharpDevelop.Gui; @@ -11,20 +11,54 @@ using ICSharpCode.SharpDevelop.Gui;
namespace ICSharpCode.Core
{
/// <summary>
/// Description of PadDescriptor.
/// Describes a pad.
/// </summary>
public class PadDescriptor : IDisposable
{
Codon codon;
string @class;
string title;
string icon;
string category;
string shortcut;
AddIn addIn;
Type padType;
IPadContent padContent;
bool padContentCreated;
/// <summary>
/// Creates a new pad descriptor from the AddIn tree.
/// </summary>
public PadDescriptor(Codon codon)
{
addIn = codon.AddIn;
shortcut = codon.Properties["shortcut"];
category = codon.Properties["category"];
icon = codon.Properties["icon"];
title = codon.Properties["title"];
@class = codon.Properties["class"];
}
/// <summary>
/// Creates a pad descriptor for the specified pad type.
/// </summary>
public PadDescriptor(Type padType, string title, string icon)
{
this.padType = padType;
this.@class = padType.FullName;
this.title = title;
this.icon = icon;
this.category = "none";
this.shortcut = "";
}
/// <summary>
/// Returns the title of the pad.
/// </summary>
public string Title {
get {
return codon.Properties["title"];
return title;
}
}
@ -34,7 +68,7 @@ namespace ICSharpCode.Core @@ -34,7 +68,7 @@ namespace ICSharpCode.Core
/// </summary>
public string Icon {
get {
return codon.Properties["icon"];
return icon;
}
}
@ -44,7 +78,12 @@ namespace ICSharpCode.Core @@ -44,7 +78,12 @@ namespace ICSharpCode.Core
/// </summary>
public string Category {
get {
return codon.Properties["category"];
return category;
}
set {
if (value == null)
throw new ArgumentNullException("value");
category = value;
}
}
@ -53,13 +92,21 @@ namespace ICSharpCode.Core @@ -53,13 +92,21 @@ namespace ICSharpCode.Core
/// </summary>
public string Shortcut {
get {
return codon.Properties["shortcut"];
return shortcut;
}
set {
if (value == null)
throw new ArgumentNullException("value");
shortcut = value;
}
}
/// <summary>
/// Gets the name of the pad class.
/// </summary>
public string Class {
get {
return codon.Properties["class"];
return @class;
}
}
@ -99,7 +146,11 @@ namespace ICSharpCode.Core @@ -99,7 +146,11 @@ namespace ICSharpCode.Core
#endif
if (!padContentCreated) {
padContentCreated = true;
padContent = (IPadContent)codon.AddIn.CreateObject(Class);
if (addIn != null) {
padContent = (IPadContent)addIn.CreateObject(Class);
} else {
padContent = (IPadContent)Activator.CreateInstance(padType);
}
}
}
@ -112,10 +163,5 @@ namespace ICSharpCode.Core @@ -112,10 +163,5 @@ namespace ICSharpCode.Core
}
WorkbenchSingleton.Workbench.WorkbenchLayout.ActivatePad(this);
}
public PadDescriptor(Codon codon)
{
this.codon = codon;
}
}
}

2
src/Main/Base/Project/Src/TextEditor/Gui/Editor/SharpDevelopTextEditorProperties.cs

@ -23,7 +23,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor @@ -23,7 +23,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
static SharpDevelopTextEditorProperties()
{
Properties properties2 = ((Properties)PropertyService.Get("ICSharpCode.TextEditor.Document.Document.DefaultDocumentAggregatorProperties", new Properties()));
FontContainer.DefaultFont = FontContainer.ParseFont(properties2.Get("DefaultFont", ResourceService.CourierNew10.ToString()));
FontContainer.DefaultFont = FontContainer.ParseFont(properties2.Get("DefaultFont", ResourceService.DefaultMonospacedFont.ToString()));
properties2.PropertyChanged += new PropertyChangedEventHandler(CheckFontChange);
}

2
src/Main/Base/Project/Src/TextEditor/Gui/OptionPanels/CodeTemplatePanel.cs

@ -48,7 +48,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels @@ -48,7 +48,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
ControlDictionary["removeGroupButton"].Click += new System.EventHandler(RemoveGroupEvent);
((TextBox)ControlDictionary["templateTextBox"]).Font = ResourceService.CourierNew10;
((TextBox)ControlDictionary["templateTextBox"]).Font = ResourceService.DefaultMonospacedFont;
((TextBox)ControlDictionary["templateTextBox"]).TextChanged += new EventHandler(TextChange);
((ListView)ControlDictionary["templateListView"]).Activation = ItemActivation.Standard;

4
src/Main/Base/Project/Src/TextEditor/Gui/OptionPanels/GeneralTextEditorPanel.cs

@ -99,7 +99,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.OptionPanels @@ -99,7 +99,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.OptionPanels
((ComboBox)ControlDictionary["textEncodingComboBox"]).SelectedIndex = encodingIndex;
encoding = CharacterEncodings.GetEncodingByIndex(encodingIndex).CodePage;
Font currentFont = ParseFont(((Properties)CustomizationObject).Get("DefaultFont", ResourceService.CourierNew10.ToString()).ToString());
Font currentFont = ParseFont(((Properties)CustomizationObject).Get("DefaultFont", ResourceService.DefaultMonospacedFont.ToString()).ToString());
for (int i = 6; i <= 24; ++i) {
((ComboBox)ControlDictionary["fontSizeComboBox"]).Items.Add(i);
@ -219,7 +219,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.OptionPanels @@ -219,7 +219,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.OptionPanels
return new Font(descr[1], Single.Parse(descr[3]));
} catch (Exception ex) {
LoggingService.Warn(ex);
return ResourceService.CourierNew10;
return ResourceService.DefaultMonospacedFont;
}
}
}

25
src/Main/Core/Project/Src/Services/ResourceService/ResourceService.cs

@ -215,13 +215,28 @@ namespace ICSharpCode.Core @@ -215,13 +215,28 @@ namespace ICSharpCode.Core
}
#region Font loading
static Font courierNew10;
static Font defaultMonospacedFont;
public static Font CourierNew10 {
public static Font DefaultMonospacedFont {
get {
if (courierNew10 == null)
courierNew10 = LoadFont("Courier New", 10);
return courierNew10;
if (defaultMonospacedFont == null) {
defaultMonospacedFont = LoadDefaultMonospacedFont(FontStyle.Regular);
}
return defaultMonospacedFont;
}
}
/// <summary>
/// Loads the default monospaced font (Consolas or Courier New).
/// </summary>
public static Font LoadDefaultMonospacedFont(FontStyle style)
{
if (Environment.OSVersion.Platform == PlatformID.Win32NT
&& Environment.OSVersion.Version.Major >= 6)
{
return LoadFont("Consolas", 10, style);
} else {
return LoadFont("Courier New", 10, style);
}
}

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

@ -14,4 +14,15 @@ @@ -14,4 +14,15 @@
/>
</dependentAssembly>
</dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<!-- this section tells Vista that SharpDevelop runs correctly in standard -->
<!-- user mode and does not need file/registry virtualization -->
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
<!-- (uiAccess should be used only for UI Accessibility applications) -->
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

2
src/Main/StartUp/Project/SharpDevelopMain.cs

@ -115,7 +115,7 @@ namespace ICSharpCode.SharpDevelop @@ -115,7 +115,7 @@ namespace ICSharpCode.SharpDevelop
startup.ApplicationRootPath = Path.Combine(Path.GetDirectoryName(exe.Location), "..");
startup.AllowUserAddIns = true;
startup.ConfigDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
".ICSharpCode/SharpDevelop2.1");
"ICSharpCode/SharpDevelop2.1");
startup.AddAddInsFromDirectory(Path.Combine(startup.ApplicationRootPath, "AddIns"));

Loading…
Cancel
Save