Browse Source

fix samples/SdaUser and samples/LineCounter

pull/297/head
Siegfried Pammer 11 years ago
parent
commit
57bacdd31b
  1. 8
      samples/LineCounter/LineCounter.csproj
  2. 6
      samples/LineCounter/LineCounter.sln
  3. 5
      samples/LineCounter/Src/Command.cs
  4. 12
      samples/LineCounter/Src/LineCounterBrowser.cs
  5. 27
      samples/LineCounter/Src/LineCounterBrowser.resx
  6. 3
      samples/LineCounter/Src/LineCounterViewContent.cs
  7. 3
      samples/SdaUser/MainForm.cs
  8. 4
      samples/SdaUser/MainForm.resx
  9. 13
      samples/SdaUser/SdaUser.csproj
  10. 10
      samples/SdaUser/SdaUser.sln
  11. 12
      samples/SdaUser/SharpDevelopInteraction/InteractionClass.cs
  12. 8
      samples/SdaUser/SharpDevelopInteraction/SharpDevelopInteraction.csproj
  13. 6
      samples/SdaUser/app.config

8
samples/LineCounter/LineCounter.csproj

@ -17,7 +17,8 @@ @@ -17,7 +17,8 @@
<FileAlignment>4096</FileAlignment>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<IntermediateOutputPath>obj\Debug\</IntermediateOutputPath>
@ -57,11 +58,6 @@ @@ -57,11 +58,6 @@
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="ICSharpCode.SharpDevelop.Dom">
<HintPath>..\..\bin\ICSharpCode.SharpDevelop.Dom.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>

6
samples/LineCounter/LineCounter.sln

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
# SharpDevelop 4.0.0.5571
# SharpDevelop 5.0
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LineCounter", "LineCounter.csproj", "{880A7EAF-D0B4-46AC-A9B6-B6156512037A}"
EndProject
Global
@ -10,9 +10,9 @@ Global @@ -10,9 +10,9 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{880A7EAF-D0B4-46AC-A9B6-B6156512037A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{880A7EAF-D0B4-46AC-A9B6-B6156512037A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{880A7EAF-D0B4-46AC-A9B6-B6156512037A}.Release|Any CPU.Build.0 = Release|Any CPU
{880A7EAF-D0B4-46AC-A9B6-B6156512037A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{880A7EAF-D0B4-46AC-A9B6-B6156512037A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{880A7EAF-D0B4-46AC-A9B6-B6156512037A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

5
samples/LineCounter/Src/Command.cs

@ -26,11 +26,8 @@ @@ -26,11 +26,8 @@
// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Text;
using System.Windows.Forms;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Gui;
namespace LineCounterAddin
{
@ -38,7 +35,7 @@ namespace LineCounterAddin @@ -38,7 +35,7 @@ namespace LineCounterAddin
{
public override void Run()
{
WorkbenchSingleton.Workbench.ShowView(new LineCounterViewContent());
SD.Workbench.ShowView(new LineCounterViewContent());
}
}
}

12
samples/LineCounter/Src/LineCounterBrowser.cs

@ -13,6 +13,7 @@ using System.Text; @@ -13,6 +13,7 @@ using System.Text;
using System.Windows.Forms;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.SharpDevelop;
@ -765,7 +766,7 @@ namespace LineCounterAddin @@ -765,7 +766,7 @@ namespace LineCounterAddin
m_summaryList.Clear();
Solution solution = ProjectService.OpenSolution;
ISolution solution = ProjectService.OpenSolution;
if (solution != null) // OpenSolution is null when no solution is opened
{
FileInfo fiSolution = new FileInfo(solution.FileName);
@ -783,11 +784,12 @@ namespace LineCounterAddin @@ -783,11 +784,12 @@ namespace LineCounterAddin
tsprgTask.Value = 0;
foreach (IProject fiProject in projects) {
tsprgTotal.PerformStep();
string projName, lang;
if (fiProject.FileName.IndexOf("://") != -1)
string projName;
Guid lang;
if (fiProject.FileName.ToString().IndexOf("://") != -1)
{
projName = fiProject.FileName; // this is a web project
lang = "{00000001-0000-0000-0000-000000000000}";
lang = Guid.Parse("{00000001-0000-0000-0000-000000000000}");
} else {
projName = fiProject.Name;
lang = fiProject.TypeGuid;
@ -823,7 +825,7 @@ namespace LineCounterAddin @@ -823,7 +825,7 @@ namespace LineCounterAddin
/// <param name="projectItems">The ProjectItems collection to scan.</param>
/// <param name="summary">The root summary data object that these
/// files belong to.</param>
private void ScanProjectItems(IList<ProjectItem> projectItems, LineCountSummary summary)
private void ScanProjectItems(IMutableModelCollection<ProjectItem> projectItems, LineCountSummary summary)
{
tsprgTask.Maximum += projectItems.Count;
foreach (ProjectItem projectItem in projectItems)

27
samples/LineCounter/Src/LineCounterBrowser.resx

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
@ -112,20 +112,21 @@ @@ -112,20 +112,21 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing">
<value>365, 17</value>
</metadata>
<metadata name="cmsFileList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
</data>
<data name="cmsFileList.TrayLocation" type="System.Drawing.Point, System.Drawing">
<value>126, 17</value>
</metadata>
<metadata name="imgFileTypes.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
</data>
<data name="imgFileTypes.TrayLocation" type="System.Drawing.Point, System.Drawing">
<value>464, 17</value>
</metadata>
</data>
<data name="imgFileTypes.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
@ -612,9 +613,9 @@ @@ -612,9 +613,9 @@
AQMI/ws=
</value>
</data>
<metadata name="imgProjectTypes.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<data name="imgProjectTypes.TrayLocation" type="System.Drawing.Point, System.Drawing">
<value>231, 17</value>
</metadata>
</data>
<data name="imgProjectTypes.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
@ -774,7 +775,7 @@ @@ -774,7 +775,7 @@
AQECAAj/Cw==
</value>
</data>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<data name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing">
<value>17, 17</value>
</metadata>
</data>
</root>

3
samples/LineCounter/Src/LineCounterViewContent.cs

@ -26,8 +26,7 @@ @@ -26,8 +26,7 @@
// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Windows.Forms;
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop.Workbench;
namespace LineCounterAddin
{

3
samples/SdaUser/MainForm.cs

@ -26,10 +26,7 @@ @@ -26,10 +26,7 @@
// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Reflection;
using System.Windows.Forms;
using ICSharpCode.SharpDevelop.Sda;

4
samples/SdaUser/MainForm.resx

@ -112,9 +112,9 @@ @@ -112,9 +112,9 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

13
samples/SdaUser/SdaUser.csproj

@ -17,7 +17,8 @@ @@ -17,7 +17,8 @@
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<SourceAnalysisOverrideSettingsFile>C:\Users\Daniel\AppData\Roaming\ICSharpCode/SharpDevelop3.0\Settings.SourceAnalysis</SourceAnalysisOverrideSettingsFile>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<IntermediateOutputPath>obj\Debug\</IntermediateOutputPath>
@ -39,6 +40,9 @@ @@ -39,6 +40,9 @@
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
</PropertyGroup>
<ItemGroup>
<Reference Include="SharpDevelop">
<HintPath>..\..\bin\SharpDevelop.exe</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
@ -50,10 +54,6 @@ @@ -50,10 +54,6 @@
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="ICSharpCode.SharpDevelop.Sda">
<HintPath>..\..\bin\ICSharpCode.SharpDevelop.Sda.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
@ -89,5 +89,8 @@ @@ -89,5 +89,8 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
</Project>

10
samples/SdaUser/SdaUser.sln

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
# SharpDevelop 4.0.0.5584
# SharpDevelop 5.0
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}"
@ -12,13 +12,13 @@ Global @@ -12,13 +12,13 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3FF48818-69D2-4884-8F4F-62EC72F0D5F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{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}.Debug|Any CPU.Build.0 = Debug|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
{3FF48818-69D2-4884-8F4F-62EC72F0D5F0}.Release|Any CPU.Build.0 = Release|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}.Debug|Any CPU.Build.0 = Debug|Any CPU
{84054D5E-0B81-4C4B-AABB-DCC43030830B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{84054D5E-0B81-4C4B-AABB-DCC43030830B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

12
samples/SdaUser/SharpDevelopInteraction/InteractionClass.cs

@ -26,9 +26,7 @@ @@ -26,9 +26,7 @@
// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop;
namespace SharpDevelopInteraction
{
@ -45,14 +43,14 @@ namespace SharpDevelopInteraction @@ -45,14 +43,14 @@ namespace SharpDevelopInteraction
{
public void MakeTransparent()
{
WorkbenchSingleton.SafeThreadAsyncCall(MakeTransparentInternal);
SD.MainThread.InvokeAsyncAndForget(MakeTransparentInternal);
}
void MakeTransparentInternal()
{
WorkbenchSingleton.MainWindow.Opacity *= 0.85;
if (WorkbenchSingleton.MainWindow.Opacity < 0.2)
WorkbenchSingleton.MainWindow.Opacity = 1;
SD.Workbench.MainWindow.Opacity *= 0.85;
if (SD.Workbench.MainWindow.Opacity < 0.2)
SD.Workbench.MainWindow.Opacity = 1;
}
}
}

8
samples/SdaUser/SharpDevelopInteraction/SharpDevelopInteraction.csproj

@ -16,7 +16,8 @@ @@ -16,7 +16,8 @@
<FileAlignment>4096</FileAlignment>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
@ -64,11 +65,6 @@ @@ -64,11 +65,6 @@
<Private>False</Private>
</Reference>
<Reference Include="System.Windows.Forms" />
<Reference Include="ICSharpCode.SharpDevelop.Dom">
<HintPath>..\..\..\bin\ICSharpCode.SharpDevelop.Dom.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>

6
samples/SdaUser/app.config

@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>
Loading…
Cancel
Save