From 0abbd0ee819fbbeaf95419b50ac6c22a52ee6f1a Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Sat, 7 Nov 2009 20:37:53 +0000 Subject: [PATCH] Removed another part of old SharpServerTools. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5230 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../ServerTools/DbControlController.cs | 45 ----- .../ServerTools/DbControlNode.cs | 48 ------ .../ServerTools/ICSharpCode.ServerTools.addin | 24 --- .../ICSharpCode.ServerTools.csproj | 157 ------------------ .../ServerTools/Properties/AssemblyInfo.cs | 57 ------- .../Properties/Resources.Designer.cs | 71 -------- .../ServerTools/Properties/Resources.resx | 117 ------------- .../Properties/Settings.Designer.cs | 30 ---- .../ServerTools/Properties/Settings.settings | 7 - .../ServerTools/ServerBrowserHost.cs | 63 ------- .../ServerTools/ServerControl.xaml | 27 --- .../ServerTools/ServerControl.xaml.cs | 98 ----------- 12 files changed, 744 deletions(-) delete mode 100644 src/AddIns/DisplayBindings/ServerTools/DbControlController.cs delete mode 100644 src/AddIns/DisplayBindings/ServerTools/DbControlNode.cs delete mode 100644 src/AddIns/DisplayBindings/ServerTools/ICSharpCode.ServerTools.addin delete mode 100644 src/AddIns/DisplayBindings/ServerTools/ICSharpCode.ServerTools.csproj delete mode 100644 src/AddIns/DisplayBindings/ServerTools/Properties/AssemblyInfo.cs delete mode 100644 src/AddIns/DisplayBindings/ServerTools/Properties/Resources.Designer.cs delete mode 100644 src/AddIns/DisplayBindings/ServerTools/Properties/Resources.resx delete mode 100644 src/AddIns/DisplayBindings/ServerTools/Properties/Settings.Designer.cs delete mode 100644 src/AddIns/DisplayBindings/ServerTools/Properties/Settings.settings delete mode 100644 src/AddIns/DisplayBindings/ServerTools/ServerBrowserHost.cs delete mode 100644 src/AddIns/DisplayBindings/ServerTools/ServerControl.xaml delete mode 100644 src/AddIns/DisplayBindings/ServerTools/ServerControl.xaml.cs diff --git a/src/AddIns/DisplayBindings/ServerTools/DbControlController.cs b/src/AddIns/DisplayBindings/ServerTools/DbControlController.cs deleted file mode 100644 index e593b4a499..0000000000 --- a/src/AddIns/DisplayBindings/ServerTools/DbControlController.cs +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Created by SharpDevelop. - * User: dickon - * Date: 15/01/2008 - * Time: 16:47 - * - */ - -using System; -using System.Windows.Controls; -using System.Collections.Generic; -using System.Data.OleDb; - -using dbtool = ICSharpCode.DataTools.OleDbConnectionUtil; - -namespace ICSharpCode.ServerTools -{ - /// - /// Description of DbToolController. - /// - public static class DbControlController - { - private static Dictionary connections = - new Dictionary(); - - /// - /// Lookup the connection for the named db node, - /// - /// - public static void BuildDbNode(TreeViewItem dbNode, string connectionName) - { - - } - - public static bool TryGetConnection(string connectionName, out OleDbConnection connection) - { - if (connections.TryGetValue(connectionName, out connection)) { - return true; - } else { - // TODO: use OleDbUtils to get a connection if possible. - return false; - } - } - } -} diff --git a/src/AddIns/DisplayBindings/ServerTools/DbControlNode.cs b/src/AddIns/DisplayBindings/ServerTools/DbControlNode.cs deleted file mode 100644 index a3f353da65..0000000000 --- a/src/AddIns/DisplayBindings/ServerTools/DbControlNode.cs +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Created by SharpDevelop. - * User: dickon - * Date: 15/01/2008 - * Time: 18:15 - * - * To change this template use Tools | Options | Coding | Edit Standard Headers. - */ - -using System; -using System.Windows.Controls; - -namespace ICSharpCode.ServerTools -{ - /// - /// Description of DbNode. - /// - public class DbControlNode : TreeViewItem - { - private DbControlNodeState state; - - public DbControlNode(string name) - { - this.Name = name; - } - - public DbControlNode(string name, DbControlNodeState state) - { - this.Name = name; - this.state = state; - } - - public DbControlNodeState State { - get { - return this.state; - } - set { - this.state = value; - } - } - } - - public enum DbControlNodeState - { - Open, - Closed - } -} diff --git a/src/AddIns/DisplayBindings/ServerTools/ICSharpCode.ServerTools.addin b/src/AddIns/DisplayBindings/ServerTools/ICSharpCode.ServerTools.addin deleted file mode 100644 index 4555e5dadf..0000000000 --- a/src/AddIns/DisplayBindings/ServerTools/ICSharpCode.ServerTools.addin +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/src/AddIns/DisplayBindings/ServerTools/ICSharpCode.ServerTools.csproj b/src/AddIns/DisplayBindings/ServerTools/ICSharpCode.ServerTools.csproj deleted file mode 100644 index 61bfe2ce49..0000000000 --- a/src/AddIns/DisplayBindings/ServerTools/ICSharpCode.ServerTools.csproj +++ /dev/null @@ -1,157 +0,0 @@ - - - - Debug - AnyCPU - 9.0.21022 - 2.0 - {8CF1EB90-324F-4AA9-BAA2-DEF87392CE86} - Library - Properties - ICSharpCode.ServerTools - ICSharpCode.ServerTools - v3.5 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - False - False - false - - - true - Full - false - ..\..\..\..\AddIns\AddIns\DisplayBindings\ServerTools\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - True - - - False - Auto - 4194304 - AnyCPU - - - - - - 3.5 - - - - 3.5 - - - 3.5 - - - - - 3.0 - - - 3.0 - - - 3.0 - - - 3.0 - - - 3.0 - - - - - MSBuild:Compile - Designer - - - - - ServerControl.xaml - Code - - - {2748AD25-9C63-4E12-877B-4DCE96FBED54} - ICSharpCode.SharpDevelop - - - {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} - ICSharpCode.Core - - - {EF53050B-882E-4776-B643-EDA472E8E3F2} - 2 - 7 - 0 - tlbimp - False - - - {2206CEB0-19C1-11D1-89E0-00C04FD7A829} - 1 - 0 - 0 - tlbimp - False - - - Always - - - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - - {6CC3DF82-E815-483F-B4B5-85191064D981} - ICSharpCode.DataTools - - - - - \ No newline at end of file diff --git a/src/AddIns/DisplayBindings/ServerTools/Properties/AssemblyInfo.cs b/src/AddIns/DisplayBindings/ServerTools/Properties/AssemblyInfo.cs deleted file mode 100644 index 0e97e34e51..0000000000 --- a/src/AddIns/DisplayBindings/ServerTools/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System.Reflection; -using System.Resources; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Windows; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("SharpServerTools.Servers")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("SharpServerTools.Servers")] -[assembly: AssemblyCopyright("Copyright © 2007")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -//In order to begin building localizable applications, set -//CultureYouAreCodingWith in your .csproj file -//inside a . For example, if you are using US english -//in your source files, set the to en-US. Then uncomment -//the NeutralResourceLanguage attribute below. Update the "en-US" in -//the line below to match the UICulture setting in the project file. - -//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] - - -[assembly: ThemeInfo( - ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located - //(used if a resource is not found in the page, - // or application resource dictionaries) - ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located - //(used if a resource is not found in the page, - // app, or any theme specific resource dictionaries) -)] - - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] - -[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("TestServerControl")] \ No newline at end of file diff --git a/src/AddIns/DisplayBindings/ServerTools/Properties/Resources.Designer.cs b/src/AddIns/DisplayBindings/ServerTools/Properties/Resources.Designer.cs deleted file mode 100644 index 5fdf6b57fb..0000000000 --- a/src/AddIns/DisplayBindings/ServerTools/Properties/Resources.Designer.cs +++ /dev/null @@ -1,71 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.1378 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace ICSharpCode.ServerTools.Servers.Properties -{ - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources - { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() - { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager - { - get - { - if ((resourceMan == null)) - { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SharpServerTools.Servers.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture - { - get - { - return resourceCulture; - } - set - { - resourceCulture = value; - } - } - } -} diff --git a/src/AddIns/DisplayBindings/ServerTools/Properties/Resources.resx b/src/AddIns/DisplayBindings/ServerTools/Properties/Resources.resx deleted file mode 100644 index af7dbebbac..0000000000 --- a/src/AddIns/DisplayBindings/ServerTools/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/src/AddIns/DisplayBindings/ServerTools/Properties/Settings.Designer.cs b/src/AddIns/DisplayBindings/ServerTools/Properties/Settings.Designer.cs deleted file mode 100644 index 8a3f3250ec..0000000000 --- a/src/AddIns/DisplayBindings/ServerTools/Properties/Settings.Designer.cs +++ /dev/null @@ -1,30 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.1378 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace ICSharpCode.ServerTools.Servers.Properties -{ - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { - return defaultInstance; - } - } - } -} diff --git a/src/AddIns/DisplayBindings/ServerTools/Properties/Settings.settings b/src/AddIns/DisplayBindings/ServerTools/Properties/Settings.settings deleted file mode 100644 index 033d7a5e9e..0000000000 --- a/src/AddIns/DisplayBindings/ServerTools/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/src/AddIns/DisplayBindings/ServerTools/ServerBrowserHost.cs b/src/AddIns/DisplayBindings/ServerTools/ServerBrowserHost.cs deleted file mode 100644 index e176c16aa2..0000000000 --- a/src/AddIns/DisplayBindings/ServerTools/ServerBrowserHost.cs +++ /dev/null @@ -1,63 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.Windows.Forms; -using System.Windows.Forms.Integration; -using ICSharpCode.Core; -using ICSharpCode.SharpDevelop.Gui; -using ICSharpCode.ServerTools; - -namespace ICSharpCode.ServerTools -{ - /// - /// Enables a user to browse metadata associated with a db server and to open resources - /// referenced therein. The intention is to extend this to other server processes over - /// time. - /// - public class ServerBrowserHost : AbstractPadContent - { - ElementHost ctl; - - /// - /// ServerBrowserTool hosts one or more TreeViews providing views of types - /// of server. Currently it shows only relational database servers. - /// - public ServerBrowserHost() - { - LoggingService.Debug("Loading ServerBrowserHost"); - ctl = new ElementHost(); - ServerControl serverControl = new ServerControl(); - ctl.Child = serverControl; - } - - /// - /// The representing the pad - /// - public override Control Control { - get { - return ctl; - } - } - - /// - /// Rebuildes the pad - /// - public override void RedrawContent() - { - - } - - /// - /// Cleans up all used resources - /// - public override void Dispose() - { - ctl.Dispose(); - } - } -} diff --git a/src/AddIns/DisplayBindings/ServerTools/ServerControl.xaml b/src/AddIns/DisplayBindings/ServerTools/ServerControl.xaml deleted file mode 100644 index bf79253e8c..0000000000 --- a/src/AddIns/DisplayBindings/ServerTools/ServerControl.xaml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/AddIns/DisplayBindings/ServerTools/ServerControl.xaml.cs b/src/AddIns/DisplayBindings/ServerTools/ServerControl.xaml.cs deleted file mode 100644 index f2f33b9684..0000000000 --- a/src/AddIns/DisplayBindings/ServerTools/ServerControl.xaml.cs +++ /dev/null @@ -1,98 +0,0 @@ -using System; -using System.Linq; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; -using System.Data; -using System.Data.OleDb; -using System.Data.Common; -using System.Configuration; -using System.Collections.Generic; - -using ICSharpCode.DataTools; -using log = ICSharpCode.Core.LoggingService; - -namespace ICSharpCode.ServerTools -{ - /// - /// Interaction logic for UserControl1.xaml - /// - public partial class ServerControl : UserControl - { - public ServerControl() - { - InitializeComponent(); - Refresh(); - } - - public void Refresh() - { - log.Debug("refreshing ServerControl"); - log.Debug("loading oledb connection strings"); - ConnectionStringSettingsCollection c - = OleDbConnectionUtil.GetConnectionSettingsCollection(); - this.dbTree.Items.Clear(); - foreach (ConnectionStringSettings s in c) - { - TreeViewItem n = new TreeViewItem(); - n.Header = s.Name; - this.dbTree.Items.Add(n); - } - } - - /// - /// Uses the DataLink dialog to define a new Oledb connection string, - /// tests it, and adds it to the exe config. - /// - /// - /// - private void addConnectionButton_Click(object sender, RoutedEventArgs e) - { - MSDASC.DataLinks mydlg = new MSDASC.DataLinks(); - OleDbConnection oleCon = new OleDbConnection(); - ADODB._Connection aDOcon; - - //Cast the generic object that PromptNew returns to an ADODB._Connection. - aDOcon = (ADODB._Connection)mydlg.PromptNew(); - if (aDOcon == null) - { - return; - } - - oleCon.ConnectionString = aDOcon.ConnectionString; - oleCon.Open(); - - if (oleCon.State.ToString() == "Open") - { - // If we get to here, we have a valid oledb - // connection string, at least on the basis of the current - // state of the platform that it refers to. - // Now construct a name for the connection string settings based on - // the attributes of the connection string and save it. - // VS08 assumes the following naming scheme: - // connection name ::= .\. - - string provider = oleCon.Provider; - string source = oleCon.DataSource; - string catalogue = oleCon.Database; - string dbServerName = @provider + ":" + @source + "." + @catalogue; - - OleDbConnectionUtil.Put(dbServerName, oleCon.ConnectionString); - OleDbConnectionUtil.Save(); - this.Refresh(); - oleCon.Close(); - } - else - { - MessageBox.Show("Connection Failed"); - } - } - } -}