From e25c69457c98bf9cec62c97e6ce5088905cad569 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Sun, 5 Jan 2014 00:48:07 +0100 Subject: [PATCH] Set samples/XamlDesigner to .NET 4.5. --- samples/XamlDesigner/XamlDesigner.csproj | 7 ++- samples/XamlDesigner/XamlDesigner.sln | 18 +++--- samples/XamlDesigner/app.config | 6 ++ .../Project/Src/Refactoring/IssueManager.cs | 2 +- .../WpfDesign.AddIn/Src/OutlineViewPad.cs | 57 ------------------- .../WpfDesign.AddIn/WpfDesign.AddIn.csproj | 1 - .../ICSharpCode.TreeView/SharpTreeNode.cs | 13 ++--- 7 files changed, 26 insertions(+), 78 deletions(-) create mode 100644 samples/XamlDesigner/app.config delete mode 100644 src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/OutlineViewPad.cs diff --git a/samples/XamlDesigner/XamlDesigner.csproj b/samples/XamlDesigner/XamlDesigner.csproj index 8448d81cbf..fec8ea8135 100644 --- a/samples/XamlDesigner/XamlDesigner.csproj +++ b/samples/XamlDesigner/XamlDesigner.csproj @@ -9,7 +9,7 @@ WinExe ICSharpCode.XamlDesigner XamlDesigner - v4.0 + v4.5 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 4 @@ -17,6 +17,7 @@ False False false + true @@ -51,6 +52,9 @@ ..\..\bin\ICSharpCode.AvalonEdit.dll + + ..\..\bin\ICSharpCode.NRefactory.dll + ..\..\bin\ICSharpCode.SharpDevelop.Widgets.dll @@ -142,6 +146,7 @@ + Designer Always diff --git a/samples/XamlDesigner/XamlDesigner.sln b/samples/XamlDesigner/XamlDesigner.sln index df5a790d23..e4a9c002ca 100644 --- a/samples/XamlDesigner/XamlDesigner.sln +++ b/samples/XamlDesigner/XamlDesigner.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 -# SharpDevelop 4.0.0.5563 +# SharpDevelop 5.0 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlDesigner", "XamlDesigner.csproj", "{27DA2B5C-2AAA-4478-AB00-3E184273C241}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign", "..\..\src\AddIns\DisplayBindings\WpfDesign\WpfDesign\Project\WpfDesign.csproj", "{66A378A1-E9F4-4AD5-8946-D0EC06C2902F}" @@ -22,22 +22,22 @@ Global {27DA2B5C-2AAA-4478-AB00-3E184273C241}.Debug|Any CPU.Build.0 = Debug|Any CPU {27DA2B5C-2AAA-4478-AB00-3E184273C241}.Release|Any CPU.ActiveCfg = Release|Any CPU {27DA2B5C-2AAA-4478-AB00-3E184273C241}.Release|Any CPU.Build.0 = Release|Any CPU - {66A378A1-E9F4-4AD5-8946-D0EC06C2902F}.Debug|Any CPU.Build.0 = Debug|Any CPU {66A378A1-E9F4-4AD5-8946-D0EC06C2902F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {66A378A1-E9F4-4AD5-8946-D0EC06C2902F}.Release|Any CPU.Build.0 = Release|Any CPU + {66A378A1-E9F4-4AD5-8946-D0EC06C2902F}.Debug|Any CPU.Build.0 = Debug|Any CPU {66A378A1-E9F4-4AD5-8946-D0EC06C2902F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {78CC29AC-CC79-4355-B1F2-97936DF198AC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {66A378A1-E9F4-4AD5-8946-D0EC06C2902F}.Release|Any CPU.Build.0 = Release|Any CPU {78CC29AC-CC79-4355-B1F2-97936DF198AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {78CC29AC-CC79-4355-B1F2-97936DF198AC}.Release|Any CPU.Build.0 = Release|Any CPU + {78CC29AC-CC79-4355-B1F2-97936DF198AC}.Debug|Any CPU.Build.0 = Debug|Any CPU {78CC29AC-CC79-4355-B1F2-97936DF198AC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {943DBBB3-E84E-4CF4-917C-C05AFA8743C1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {78CC29AC-CC79-4355-B1F2-97936DF198AC}.Release|Any CPU.Build.0 = Release|Any CPU {943DBBB3-E84E-4CF4-917C-C05AFA8743C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {943DBBB3-E84E-4CF4-917C-C05AFA8743C1}.Release|Any CPU.Build.0 = Release|Any CPU + {943DBBB3-E84E-4CF4-917C-C05AFA8743C1}.Debug|Any CPU.Build.0 = Debug|Any CPU {943DBBB3-E84E-4CF4-917C-C05AFA8743C1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {88DA149F-21B2-48AB-82C4-28FB6BDFD783}.Debug|Any CPU.Build.0 = Debug|Any CPU + {943DBBB3-E84E-4CF4-917C-C05AFA8743C1}.Release|Any CPU.Build.0 = Release|Any CPU {88DA149F-21B2-48AB-82C4-28FB6BDFD783}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {88DA149F-21B2-48AB-82C4-28FB6BDFD783}.Release|Any CPU.Build.0 = Release|Any CPU + {88DA149F-21B2-48AB-82C4-28FB6BDFD783}.Debug|Any CPU.Build.0 = Debug|Any CPU {88DA149F-21B2-48AB-82C4-28FB6BDFD783}.Release|Any CPU.ActiveCfg = Release|Any CPU + {88DA149F-21B2-48AB-82C4-28FB6BDFD783}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/samples/XamlDesigner/app.config b/samples/XamlDesigner/app.config new file mode 100644 index 0000000000..9008dd2558 --- /dev/null +++ b/samples/XamlDesigner/app.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/IssueManager.cs b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/IssueManager.cs index efbbb430de..51a32efb73 100644 --- a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/IssueManager.cs +++ b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/IssueManager.cs @@ -293,7 +293,7 @@ namespace CSharpBinding.Refactoring existingResults = results; } if (cancellationTokenSource != null && cancellationTokenSource.Token == cancellationToken) { - // Dispose the cancellation token source if it's still the same on as we originally created + // Dispose the cancellation token source if it's still the same one as we originally created cancellationTokenSource.Dispose(); cancellationTokenSource = null; } diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/OutlineViewPad.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/OutlineViewPad.cs deleted file mode 100644 index 12024eb252..0000000000 --- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/OutlineViewPad.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) -// This code is distributed under the GNU LGPL (for details please see \doc\license.txt) - -using System; -using System.Windows; -using System.Windows.Controls; - -using ICSharpCode.Core; -using ICSharpCode.SharpDevelop.Gui; - -namespace ICSharpCode.WpfDesign.AddIn -{ - /* - public class OutlineViewPad : AbstractPadContent - { - TextBlock notAvailableTextBlock = new TextBlock { - Text = StringParser.Parse("${res:ICSharpCode.SharpDevelop.Gui.OutlinePad.NotAvailable}"), - TextWrapping = TextWrapping.Wrap - }; - - public OutlineViewPad() - { - WorkbenchSingleton.Workbench.ActiveViewContentChanged += WorkbenchActiveViewContentChanged; - WorkbenchActiveViewContentChanged(null, null); - } - - void WorkbenchActiveViewContentChanged(object sender, EventArgs e) - { - WpfViewContent wpfView = WorkbenchSingleton.Workbench.ActiveViewContent as WpfViewContent; - host.ViewContent = wpfView; - if (wpfView != null) { - host.Child = wpfView.Outline; - } else { - host.Child = notAvailableTextBlock; - } - } - - /// - /// The representing the pad - /// - public override System.Windows.Forms.Control Control { - get { - return host; - } - } - - /// - /// Cleans up all used resources - /// - public override void Dispose() - { - host.Dispose(); - base.Dispose(); - } - } - */ -} diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/WpfDesign.AddIn.csproj b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/WpfDesign.AddIn.csproj index 9b6720ff21..54ca072d7a 100644 --- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/WpfDesign.AddIn.csproj +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/WpfDesign.AddIn.csproj @@ -84,7 +84,6 @@ ObjectEditor.xaml - diff --git a/src/Libraries/SharpTreeView/ICSharpCode.TreeView/SharpTreeNode.cs b/src/Libraries/SharpTreeView/ICSharpCode.TreeView/SharpTreeNode.cs index c8b9ed10cd..fc06fb338c 100644 --- a/src/Libraries/SharpTreeView/ICSharpCode.TreeView/SharpTreeNode.cs +++ b/src/Libraries/SharpTreeView/ICSharpCode.TreeView/SharpTreeNode.cs @@ -339,19 +339,14 @@ namespace ICSharpCode.TreeView public IEnumerable Ancestors() { - var node = this; - while (node.Parent != null) { - yield return node.Parent; - node = node.Parent; - } + for (SharpTreeNode n = this.Parent; n != null; n = n.Parent) + yield return n; } public IEnumerable AncestorsAndSelf() { - yield return this; - foreach (var node in Ancestors()) { - yield return node; - } + for (SharpTreeNode n = this; n != null; n = n.Parent) + yield return n; } #endregion