Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit e20c3e3

Browse files
committed
Fixed ComponentInspector sample.
1 parent 0997683 commit e20c3e3

16 files changed

Lines changed: 153 additions & 41 deletions

samples/ComponentInspector/ComponentInspector.AddIn/ComponentInspector.AddIn.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@
1515
<PlatformTarget>AnyCPU</PlatformTarget>
1616
<FileAlignment>4096</FileAlignment>
1717
<WarningLevel>4</WarningLevel>
18-
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
19-
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
18+
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
19+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
20+
<TargetFrameworkProfile />
2021
</PropertyGroup>
2122
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
2223
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
@@ -45,7 +46,7 @@
4546
</Reference>
4647
<Reference Include="ICSharpCode.SharpDevelop">
4748
<HintPath>..\..\..\bin\ICSharpCode.SharpDevelop.dll</HintPath>
48-
<Private>False</Private>
49+
<Private>True</Private>
4950
</Reference>
5051
<Reference Include="System" />
5152
<Reference Include="System.Xml" />

samples/ComponentInspector/ComponentInspector.AddIn/ComponentInspector.addin

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<Import assembly="ComponentInspector.AddIn.dll"/>
1717
</Runtime>
1818

19-
<Path name="/Workspace/Tools">
19+
<Path name="/SharpDevelop/Workbench/Tools">
2020
<MenuItem id="ShowComponentInspector"
2121
insertafter="ShowAddInScout"
2222
label="${res:ComponentInspector.ToolsMenu.ShowComponentInspectorMenuItem}"

samples/ComponentInspector/ComponentInspector.AddIn/Src/ComponentInspectorView.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using System.Windows.Forms;
1010
using ICSharpCode.Core;
1111
using ICSharpCode.SharpDevelop.Gui;
12+
using ICSharpCode.SharpDevelop.Workbench;
1213
using NoGoop.ObjBrowser;
1314

1415
namespace ICSharpCode.ComponentInspector.AddIn

samples/ComponentInspector/ComponentInspector.AddIn/Src/ShowComponentInspectorCommand.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
using System;
99
using ICSharpCode.Core;
10+
using ICSharpCode.SharpDevelop;
1011
using ICSharpCode.SharpDevelop.Gui;
1112

1213
namespace ICSharpCode.ComponentInspector.AddIn
@@ -16,7 +17,7 @@ public class ShowComponentInspectorCommand : AbstractMenuCommand
1617
public override void Run()
1718
{
1819
// Switch to previously opened view.
19-
foreach (IViewContent viewContent in WorkbenchSingleton.Workbench.ViewContentCollection) {
20+
foreach (IViewContent viewContent in SD.Workbench.ViewContentCollection) {
2021
ComponentInspectorView openView = viewContent as ComponentInspectorView;
2122
if (openView != null) {
2223
openView.WorkbenchWindow.SelectWindow();
@@ -26,7 +27,7 @@ public override void Run()
2627

2728
// Create new view.
2829
ComponentInspectorView view = new ComponentInspectorView();
29-
WorkbenchSingleton.Workbench.ShowView(view);
30+
SD.Workbench.ShowView(view);
3031
}
3132
}
3233
}

samples/ComponentInspector/ComponentInspector.Core/ComponentInspector.Core.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
<WarningLevel>4</WarningLevel>
1818
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
1919
<NoWarn>0618,0626,0108</NoWarn>
20-
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
20+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
21+
<TargetFrameworkProfile />
2122
</PropertyGroup>
2223
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
2324
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
@@ -46,6 +47,9 @@
4647
<Reference Include="ICSharpCode.Core.WinForms">
4748
<HintPath>..\..\..\bin\ICSharpCode.Core.WinForms.dll</HintPath>
4849
</Reference>
50+
<Reference Include="ICSharpCode.SharpDevelop">
51+
<HintPath>..\..\..\bin\ICSharpCode.SharpDevelop.dll</HintPath>
52+
</Reference>
4953
<Reference Include="System" />
5054
<Reference Include="System.Data" />
5155
<Reference Include="System.Drawing" />

samples/ComponentInspector/ComponentInspector.Core/Src/Controls/ErrorDialog.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
using ICSharpCode.Core;
1717
using ICSharpCode.Core.WinForms;
18+
using ICSharpCode.SharpDevelop;
1819
using NoGoop.Util;
1920

2021
namespace NoGoop.Controls
@@ -290,7 +291,7 @@ protected void LinkClicked(object sender, LinkClickedEventArgs e)
290291

291292
void CopyInfoToClipboard()
292293
{
293-
ClipboardWrapper.SetText(GetClipboardString());
294+
SD.Clipboard.SetText(GetClipboardString());
294295
}
295296

296297
string GetClipboardString()

samples/ComponentInspector/ComponentInspector.Core/Src/ObjectBrowser/ComponentInspectorProperties.cs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
using System.Windows.Forms;
1111

1212
using ICSharpCode.Core;
13+
using ICSharpCode.SharpDevelop;
1314

1415
namespace NoGoop.ObjBrowser
1516
{
@@ -20,16 +21,21 @@ public class ComponentInspectorProperties
2021
ComponentInspectorProperties()
2122
{
2223
}
23-
24+
2425
static ComponentInspectorProperties()
25-
{
26-
properties = PropertyService.Get("ComponentInspector.Properties", new Properties());
26+
{
27+
properties = SD.PropertyService.NestedProperties("ComponentInspector.Properties");
2728
}
2829

29-
static Properties Properties {
30+
public static void Update()
31+
{
32+
SD.PropertyService.SetNestedProperties("ComponentInspector.Properties", Properties);
33+
}
34+
35+
static Properties Properties {
3036
get {
3137
return properties;
32-
}
38+
}
3339
}
3440

3541
public static bool ShowGettingStartedDialog {
@@ -137,7 +143,7 @@ public static bool ShowControlPanel {
137143
}
138144
}
139145
}
140-
}
146+
}
141147

142148
public static event EventHandler ShowGacPanelChanged;
143149

@@ -373,7 +379,7 @@ static string GetTypeHandlerPropertyName(string name)
373379
}
374380

375381
static PreviouslyOpenedAssemblyCollection previouslyOpenedAssemblies;
376-
382+
377383
public static PreviouslyOpenedAssemblyCollection PreviouslyOpenedAssemblies {
378384
get {
379385
if (previouslyOpenedAssemblies == null) {

samples/ComponentInspector/ComponentInspector.Core/Src/ObjectBrowser/PreviouslyOpenedAssemblyCollection.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ public PreviouslyOpenedAssembly this[int index] {
6060
/// </summary>
6161
string[] PreviouslyOpenedAssemblies {
6262
get {
63-
return properties.Get("PreviouslyOpenedAssemblies", new string[0]);
63+
return (string[]) properties.GetList<string>("PreviouslyOpenedAssemblies");
6464
}
6565
set {
66-
properties.Set("PreviouslyOpenedAssemblies", value);
66+
properties.SetList("PreviouslyOpenedAssemblies", value);
6767
}
6868
}
6969

samples/ComponentInspector/ComponentInspector.Core/Src/ObjectBrowser/PreviouslyOpenedTypeLibraryCollection.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ public PreviouslyOpenedTypeLibrary this[int index] {
5555
/// </summary>
5656
string[] PreviouslyOpenedTypeLibraries {
5757
get {
58-
return properties.Get("PreviouslyOpenedTypeLibraries", new string[0]);
58+
return (string[]) properties.GetList<string>("PreviouslyOpenedTypeLibraries");
5959
}
6060
set {
61-
properties.Set("PreviouslyOpenedTypeLibraries", value);
61+
properties.SetList("PreviouslyOpenedTypeLibraries", value);
6262
}
6363
}
6464

samples/ComponentInspector/ComponentInspector.Core/Src/ObjectBrowser/SavedCastInfoCollection.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ public SavedCastInfo this[int index] {
5656
/// </summary>
5757
string[] SavedCasts {
5858
get {
59-
return properties.Get("SavedCasts", new string[0]);
59+
return (string[]) properties.GetList<string>("SavedCasts");
6060
}
6161
set {
62-
properties.Set("SavedCasts", value);
62+
properties.SetList("SavedCasts", value);
6363
}
6464
}
6565

0 commit comments

Comments
 (0)