(2012-03-28)

This commit is contained in:
2012-03-28 12:00:00 +02:00
parent 2260c58014
commit a2717a0661
53 changed files with 2940 additions and 169 deletions

View File

@@ -0,0 +1,20 @@
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServerExplorer", "ServerExplorer\ServerExplorer.csproj", "{79531B74-3062-4A71-9953-5702BEBDEC0E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{79531B74-3062-4A71-9953-5702BEBDEC0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{79531B74-3062-4A71-9953-5702BEBDEC0E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{79531B74-3062-4A71-9953-5702BEBDEC0E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{79531B74-3062-4A71-9953-5702BEBDEC0E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Binary file not shown.

View File

@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace ServerExplorer
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new frmPrincipal());
}
}
}

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 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("ServerExplorer")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("cyc")]
[assembly: AssemblyProduct("ServerExplorer")]
[assembly: AssemblyCopyright("Copyright © cyc 2012")]
[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)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("31f76805-336c-471c-8af2-a4c1364e97b9")]
// 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")]

View File

@@ -0,0 +1,71 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3082
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ServerExplorer.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// 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()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[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("ServerExplorer.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}

View File

@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<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>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3082
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ServerExplorer.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;
}
}
}
}

View File

@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View File

@@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{79531B74-3062-4A71-9953-5702BEBDEC0E}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ServerExplorer</RootNamespace>
<AssemblyName>ServerExplorer</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="frmBaseDatos.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmBaseDatos.Designer.cs">
<DependentUpon>frmBaseDatos.cs</DependentUpon>
</Compile>
<Compile Include="frmPrincipal.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmPrincipal.Designer.cs">
<DependentUpon>frmPrincipal.cs</DependentUpon>
</Compile>
<Compile Include="frmServidores.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmServidores.Designer.cs">
<DependentUpon>frmServidores.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="frmBaseDatos.resx">
<DependentUpon>frmBaseDatos.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmPrincipal.resx">
<DependentUpon>frmPrincipal.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmServidores.resx">
<DependentUpon>frmServidores.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -0,0 +1,182 @@
namespace ServerExplorer
{
partial class frmBaseDatos
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.txtConString = new System.Windows.Forms.TextBox();
this.lblConString = new System.Windows.Forms.Label();
this.btnCopiarConString = new System.Windows.Forms.Button();
this.lsvTablas = new System.Windows.Forms.ListView();
this.colNombreTabla = new System.Windows.Forms.ColumnHeader();
this.colEsquema = new System.Windows.Forms.ColumnHeader();
this.colTipo = new System.Windows.Forms.ColumnHeader();
this.lsvColumnas = new System.Windows.Forms.ListView();
this.colNombreColumna = new System.Windows.Forms.ColumnHeader();
this.colTipoDatos = new System.Windows.Forms.ColumnHeader();
this.colTamanho = new System.Windows.Forms.ColumnHeader();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.SuspendLayout();
//
// txtConString
//
this.txtConString.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtConString.Location = new System.Drawing.Point(123, 12);
this.txtConString.Name = "txtConString";
this.txtConString.ReadOnly = true;
this.txtConString.Size = new System.Drawing.Size(472, 20);
this.txtConString.TabIndex = 0;
//
// lblConString
//
this.lblConString.AutoSize = true;
this.lblConString.Location = new System.Drawing.Point(12, 15);
this.lblConString.Name = "lblConString";
this.lblConString.Size = new System.Drawing.Size(105, 13);
this.lblConString.TabIndex = 1;
this.lblConString.Text = "Cadena de conexion";
//
// btnCopiarConString
//
this.btnCopiarConString.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnCopiarConString.Location = new System.Drawing.Point(601, 10);
this.btnCopiarConString.Name = "btnCopiarConString";
this.btnCopiarConString.Size = new System.Drawing.Size(52, 23);
this.btnCopiarConString.TabIndex = 3;
this.btnCopiarConString.Text = "Copiar";
this.btnCopiarConString.UseVisualStyleBackColor = true;
this.btnCopiarConString.Click += new System.EventHandler(this.btnCopiarConString_Click);
//
// lsvTablas
//
this.lsvTablas.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.lsvTablas.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.colNombreTabla,
this.colEsquema,
this.colTipo});
this.lsvTablas.Location = new System.Drawing.Point(12, 38);
this.lsvTablas.Name = "lsvTablas";
this.lsvTablas.Size = new System.Drawing.Size(326, 426);
this.lsvTablas.TabIndex = 4;
this.lsvTablas.UseCompatibleStateImageBehavior = false;
this.lsvTablas.View = System.Windows.Forms.View.Details;
this.lsvTablas.SelectedIndexChanged += new System.EventHandler(this.lsvTablas_SelectedIndexChanged);
//
// colNombreTabla
//
this.colNombreTabla.Text = "Tabla";
this.colNombreTabla.Width = 169;
//
// colEsquema
//
this.colEsquema.Text = "Esquema";
//
// colTipo
//
this.colTipo.Text = "Tipo";
this.colTipo.Width = 71;
//
// lsvColumnas
//
this.lsvColumnas.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lsvColumnas.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.colNombreColumna,
this.colTipoDatos,
this.colTamanho});
this.lsvColumnas.Location = new System.Drawing.Point(344, 38);
this.lsvColumnas.Name = "lsvColumnas";
this.lsvColumnas.Size = new System.Drawing.Size(309, 262);
this.lsvColumnas.TabIndex = 6;
this.lsvColumnas.UseCompatibleStateImageBehavior = false;
this.lsvColumnas.View = System.Windows.Forms.View.Details;
//
// colNombreColumna
//
this.colNombreColumna.Text = "Columna";
this.colNombreColumna.Width = 139;
//
// colTipoDatos
//
this.colTipoDatos.Text = "Tipo de Datos";
this.colTipoDatos.Width = 92;
//
// colTamanho
//
this.colTamanho.Text = "Tamaño";
//
// dataGridView1
//
this.dataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Location = new System.Drawing.Point(344, 306);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.Size = new System.Drawing.Size(309, 158);
this.dataGridView1.TabIndex = 8;
//
// frmBaseDatos
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(665, 476);
this.Controls.Add(this.dataGridView1);
this.Controls.Add(this.lsvColumnas);
this.Controls.Add(this.lsvTablas);
this.Controls.Add(this.btnCopiarConString);
this.Controls.Add(this.lblConString);
this.Controls.Add(this.txtConString);
this.Name = "frmBaseDatos";
this.Text = "Base de Datos";
this.Load += new System.EventHandler(this.frmBaseDatos_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox txtConString;
private System.Windows.Forms.Label lblConString;
private System.Windows.Forms.Button btnCopiarConString;
private System.Windows.Forms.ListView lsvTablas;
private System.Windows.Forms.ColumnHeader colNombreTabla;
private System.Windows.Forms.ColumnHeader colEsquema;
private System.Windows.Forms.ColumnHeader colTipo;
private System.Windows.Forms.ListView lsvColumnas;
private System.Windows.Forms.ColumnHeader colNombreColumna;
private System.Windows.Forms.ColumnHeader colTipoDatos;
private System.Windows.Forms.ColumnHeader colTamanho;
private System.Windows.Forms.DataGridView dataGridView1;
}
}

View File

@@ -0,0 +1,94 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.Sql;
using System.Data.SqlClient;
namespace ServerExplorer
{
public partial class frmBaseDatos : Form
{
SqlConnection cnx;
public frmBaseDatos(String ConString)
{
InitializeComponent();
// Establecer conexion
txtConString.Text = ConString;
cnx = new SqlConnection(ConString);
}
private void frmBaseDatos_Load(object sender, EventArgs e)
{
// Obtener lista de tablas
cnx.Open();
DataTable dt = cnx.GetSchema("Tables");
cnx.Close();
// Mostrar todas las tablas
lsvTablas.Items.Clear();
foreach (DataRow dr in dt.Rows)
{
ListViewItem item = lsvTablas.Items.Add((String)dr["TABLE_NAME"]);
item.SubItems.Add((String)dr["TABLE_SCHEMA"]);
item.SubItems.Add((String)dr["TABLE_TYPE"]);
}
}
private void btnCopiarConString_Click(object sender, EventArgs e)
{
// Copiar la cadena de conexion al portapapeles
System.Windows.Forms.Clipboard.SetText(txtConString.Text);
}
private void lsvTablas_SelectedIndexChanged(object sender, EventArgs e)
{
if (lsvTablas.SelectedItems.Count == 1)
{
DataTable dt;
// Determinar tabla seleccionada
ListViewItem item = lsvTablas.SelectedItems[0];
// Obtener las columnas de la tabla
String[] restr_columna = { null, null, item.SubItems[0].Text, null };
// NOTA: Catalog, Owner, Table, TableType
cnx.Open();
dt = cnx.GetSchema("Columns", restr_columna);
cnx.Close();
// Mostrar "columnas" de las tablas
lsvColumnas.Items.Clear();
foreach (DataRow dr in dt.Rows)
{
ListViewItem subitem = lsvColumnas.Items.Add((String)dr["COLUMN_NAME"]);
subitem.SubItems.Add((String)dr["DATA_TYPE"]);
if (dr["CHARACTER_MAXIMUM_LENGTH"] != DBNull.Value)
{
subitem.SubItems.Add(String.Format("{0}",dr["CHARACTER_MAXIMUM_LENGTH"]));
}
}
// Obtener las restricciones de la tabla
cnx.Open();
dt = cnx.GetSchema("Restrictions");
dt = cnx.GetSchema("ForeignKeys");
//dt = cnx.GetSchema("Indexes");
//dt = cnx.GetSchema("IndexColumns");
//dt = cnx.GetSchema("Constraint");
cnx.Close();
// Mostrar las columnas de la tabla restricciones
dataGridView1.DataSource = dt;
}
}
}
}

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<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>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1,114 @@
namespace ServerExplorer
{
partial class frmPrincipal
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.servidorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.meiBuscarServidor = new System.Windows.Forms.ToolStripMenuItem();
this.baseDeDatosToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.meiConectarA = new System.Windows.Forms.ToolStripMenuItem();
this.meiConectarPRUEBAS = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1.SuspendLayout();
this.SuspendLayout();
//
// menuStrip1
//
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.servidorToolStripMenuItem,
this.baseDeDatosToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(800, 24);
this.menuStrip1.TabIndex = 4;
this.menuStrip1.Text = "menuPrincipal";
//
// servidorToolStripMenuItem
//
this.servidorToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.meiBuscarServidor});
this.servidorToolStripMenuItem.Name = "servidorToolStripMenuItem";
this.servidorToolStripMenuItem.Size = new System.Drawing.Size(59, 20);
this.servidorToolStripMenuItem.Text = "Servidor";
//
// meiBuscarServidor
//
this.meiBuscarServidor.Name = "meiBuscarServidor";
this.meiBuscarServidor.Size = new System.Drawing.Size(160, 22);
this.meiBuscarServidor.Text = "Buscar Servidor";
this.meiBuscarServidor.Click += new System.EventHandler(this.meiBuscarServidor_Click);
//
// baseDeDatosToolStripMenuItem
//
this.baseDeDatosToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.meiConectarA,
this.meiConectarPRUEBAS});
this.baseDeDatosToolStripMenuItem.Name = "baseDeDatosToolStripMenuItem";
this.baseDeDatosToolStripMenuItem.Size = new System.Drawing.Size(88, 20);
this.baseDeDatosToolStripMenuItem.Text = "Base de Datos";
//
// meiConectarA
//
this.meiConectarA.Name = "meiConectarA";
this.meiConectarA.Size = new System.Drawing.Size(186, 22);
this.meiConectarA.Text = "Conectar a...";
//
// meiConectarPRUEBAS
//
this.meiConectarPRUEBAS.Name = "meiConectarPRUEBAS";
this.meiConectarPRUEBAS.Size = new System.Drawing.Size(186, 22);
this.meiConectarPRUEBAS.Text = "Conectar a PRUEBAS";
this.meiConectarPRUEBAS.Click += new System.EventHandler(this.meiConectarPRUEBAS_Click);
//
// frmPrincipal
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 601);
this.Controls.Add(this.menuStrip1);
this.IsMdiContainer = true;
this.MainMenuStrip = this.menuStrip1;
this.Name = "frmPrincipal";
this.Text = "Explorador de Servidores";
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem servidorToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem meiBuscarServidor;
private System.Windows.Forms.ToolStripMenuItem baseDeDatosToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem meiConectarA;
private System.Windows.Forms.ToolStripMenuItem meiConectarPRUEBAS;
}
}

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace ServerExplorer
{
public partial class frmPrincipal : Form
{
public frmPrincipal()
{
InitializeComponent();
}
private void meiConectarPRUEBAS_Click(object sender, EventArgs e)
{
frmBaseDatos frm = new frmBaseDatos("Data Source=SSSRV3;Initial Catalog=PRUEBAS;User ID=sa;Password=SLsssrv3");
frm.MdiParent = this;
frm.Show();
}
private void meiBuscarServidor_Click(object sender, EventArgs e)
{
frmServidores frm = new frmServidores();
frm.MdiParent = this;
frm.Show();
}
}
}

View File

@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<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>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@@ -0,0 +1,216 @@
namespace ServerExplorer
{
partial class frmServidores
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.lsvServidores = new System.Windows.Forms.ListView();
this.btnListarServidores = new System.Windows.Forms.Button();
this.colNombreServidor = new System.Windows.Forms.ColumnHeader();
this.colInstancia = new System.Windows.Forms.ColumnHeader();
this.colVersion = new System.Windows.Forms.ColumnHeader();
this.lblServidor = new System.Windows.Forms.Label();
this.txtServidor = new System.Windows.Forms.TextBox();
this.lblUsuario = new System.Windows.Forms.Label();
this.lblContrasenha = new System.Windows.Forms.Label();
this.txtUsuario = new System.Windows.Forms.TextBox();
this.TxtContrasenha = new System.Windows.Forms.TextBox();
this.btnListarBBDD = new System.Windows.Forms.Button();
this.lsvBBDD = new System.Windows.Forms.ListView();
this.colDBName = new System.Windows.Forms.ColumnHeader();
this.colFechaCreacion = new System.Windows.Forms.ColumnHeader();
this.SuspendLayout();
//
// lsvServidores
//
this.lsvServidores.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.lsvServidores.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.colNombreServidor,
this.colInstancia,
this.colVersion});
this.lsvServidores.Location = new System.Drawing.Point(12, 42);
this.lsvServidores.Name = "lsvServidores";
this.lsvServidores.Size = new System.Drawing.Size(281, 391);
this.lsvServidores.TabIndex = 1;
this.lsvServidores.UseCompatibleStateImageBehavior = false;
this.lsvServidores.View = System.Windows.Forms.View.Details;
this.lsvServidores.SelectedIndexChanged += new System.EventHandler(this.lsvServidores_SelectedIndexChanged);
//
// btnListarServidores
//
this.btnListarServidores.Location = new System.Drawing.Point(12, 13);
this.btnListarServidores.Name = "btnListarServidores";
this.btnListarServidores.Size = new System.Drawing.Size(281, 23);
this.btnListarServidores.TabIndex = 2;
this.btnListarServidores.Text = "Listar Servidores";
this.btnListarServidores.UseVisualStyleBackColor = true;
this.btnListarServidores.Click += new System.EventHandler(this.btnListarServidores_Click);
//
// colNombreServidor
//
this.colNombreServidor.Text = "Servidor";
this.colNombreServidor.Width = 110;
//
// colInstancia
//
this.colInstancia.Text = "Instancia";
this.colInstancia.Width = 94;
//
// colVersion
//
this.colVersion.Text = "Version";
this.colVersion.Width = 73;
//
// lblServidor
//
this.lblServidor.AutoSize = true;
this.lblServidor.Location = new System.Drawing.Point(319, 18);
this.lblServidor.Name = "lblServidor";
this.lblServidor.Size = new System.Drawing.Size(46, 13);
this.lblServidor.TabIndex = 3;
this.lblServidor.Text = "Servidor";
//
// txtServidor
//
this.txtServidor.Location = new System.Drawing.Point(429, 15);
this.txtServidor.Name = "txtServidor";
this.txtServidor.Size = new System.Drawing.Size(180, 20);
this.txtServidor.TabIndex = 4;
//
// lblUsuario
//
this.lblUsuario.AutoSize = true;
this.lblUsuario.Location = new System.Drawing.Point(319, 45);
this.lblUsuario.Name = "lblUsuario";
this.lblUsuario.Size = new System.Drawing.Size(43, 13);
this.lblUsuario.TabIndex = 5;
this.lblUsuario.Text = "Usuario";
//
// lblContrasenha
//
this.lblContrasenha.AutoSize = true;
this.lblContrasenha.Location = new System.Drawing.Point(319, 70);
this.lblContrasenha.Name = "lblContrasenha";
this.lblContrasenha.Size = new System.Drawing.Size(61, 13);
this.lblContrasenha.TabIndex = 6;
this.lblContrasenha.Text = "Contraseña";
//
// txtUsuario
//
this.txtUsuario.Location = new System.Drawing.Point(429, 42);
this.txtUsuario.Name = "txtUsuario";
this.txtUsuario.Size = new System.Drawing.Size(180, 20);
this.txtUsuario.TabIndex = 7;
//
// TxtContrasenha
//
this.TxtContrasenha.Location = new System.Drawing.Point(429, 67);
this.TxtContrasenha.Name = "TxtContrasenha";
this.TxtContrasenha.Size = new System.Drawing.Size(180, 20);
this.TxtContrasenha.TabIndex = 8;
this.TxtContrasenha.UseSystemPasswordChar = true;
//
// btnListarBBDD
//
this.btnListarBBDD.Location = new System.Drawing.Point(322, 93);
this.btnListarBBDD.Name = "btnListarBBDD";
this.btnListarBBDD.Size = new System.Drawing.Size(287, 23);
this.btnListarBBDD.TabIndex = 9;
this.btnListarBBDD.Text = "Listar BBDD";
this.btnListarBBDD.UseVisualStyleBackColor = true;
this.btnListarBBDD.Click += new System.EventHandler(this.btnListarBBDD_Click);
//
// lsvBBDD
//
this.lsvBBDD.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.lsvBBDD.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.colDBName,
this.colFechaCreacion});
this.lsvBBDD.Location = new System.Drawing.Point(322, 122);
this.lsvBBDD.Name = "lsvBBDD";
this.lsvBBDD.Size = new System.Drawing.Size(287, 311);
this.lsvBBDD.TabIndex = 11;
this.lsvBBDD.UseCompatibleStateImageBehavior = false;
this.lsvBBDD.View = System.Windows.Forms.View.Details;
this.lsvBBDD.DoubleClick += new System.EventHandler(this.lsvBBDD_DoubleClick);
//
// colDBName
//
this.colDBName.Text = "Base de Datos";
this.colDBName.Width = 165;
//
// colFechaCreacion
//
this.colFechaCreacion.Text = "Fecha de Creacion";
this.colFechaCreacion.Width = 107;
//
// frmServidores
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(631, 445);
this.Controls.Add(this.lsvBBDD);
this.Controls.Add(this.btnListarBBDD);
this.Controls.Add(this.TxtContrasenha);
this.Controls.Add(this.txtUsuario);
this.Controls.Add(this.lblContrasenha);
this.Controls.Add(this.lblUsuario);
this.Controls.Add(this.txtServidor);
this.Controls.Add(this.lblServidor);
this.Controls.Add(this.btnListarServidores);
this.Controls.Add(this.lsvServidores);
this.Name = "frmServidores";
this.Text = "Servidores";
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ListView lsvServidores;
private System.Windows.Forms.Button btnListarServidores;
private System.Windows.Forms.ColumnHeader colNombreServidor;
private System.Windows.Forms.ColumnHeader colInstancia;
private System.Windows.Forms.ColumnHeader colVersion;
private System.Windows.Forms.Label lblServidor;
private System.Windows.Forms.TextBox txtServidor;
private System.Windows.Forms.Label lblUsuario;
private System.Windows.Forms.Label lblContrasenha;
private System.Windows.Forms.TextBox txtUsuario;
private System.Windows.Forms.TextBox TxtContrasenha;
private System.Windows.Forms.Button btnListarBBDD;
private System.Windows.Forms.ListView lsvBBDD;
private System.Windows.Forms.ColumnHeader colDBName;
private System.Windows.Forms.ColumnHeader colFechaCreacion;
}
}

View File

@@ -0,0 +1,121 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.Sql;
using System.Data.SqlClient;
using System.Data.SqlTypes;
namespace ServerExplorer
{
public partial class frmServidores : Form
{
public frmServidores()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void btnListarServidores_Click(object sender, EventArgs e)
{
// Obtener listado de servidores
SqlDataSourceEnumerator enumerador = SqlDataSourceEnumerator.Instance;
DataTable servidores = enumerador.GetDataSources();
lsvServidores.Items.Clear();
lsvBBDD.Items.Clear();
foreach (DataRow dr in servidores.Rows)
{
// Nombre del servidor
ListViewItem item = lsvServidores.Items.Add((String)dr["ServerName"]);
// Nombre de la instancia
if (dr["InstanceName"] == System.DBNull.Value)
{
item.SubItems.Add("");
}
else
{
item.SubItems.Add((String)dr["InstanceName"]);
}
// Numero de version
if (dr["Version"] == System.DBNull.Value)
{
item.SubItems.Add("???");
}
else
{
item.SubItems.Add((String)dr["Version"]);
}
}
}
private void lsvServidores_SelectedIndexChanged(object sender, EventArgs e)
{
if (lsvServidores.SelectedItems.Count > 0)
{
ListViewItem item = lsvServidores.SelectedItems[0];
if (item.SubItems[1].Text.CompareTo("")==0)
{
// Servidor sin subinstancias
txtServidor.Text = item.SubItems[0].Text;
}
else
{
// Servidor con subinstancias
txtServidor.Text = item.SubItems[0].Text+"/"+item.SubItems[1].Text;
}
}
}
private void btnListarBBDD_Click(object sender, EventArgs e)
{
// Construir cadena de conexion
SqlConnectionStringBuilder constructor = new SqlConnectionStringBuilder();
constructor.DataSource = txtServidor.Text;
constructor.InitialCatalog = "master";
constructor.UserID = txtUsuario.Text;
constructor.Password = TxtContrasenha.Text;
// Obtener todas las bases de datos
SqlConnection cnx = new SqlConnection(constructor.ConnectionString);
cnx.Open();
DataTable dt = cnx.GetSchema("Databases");
cnx.Close();
// Mostrar bases de datos
lsvBBDD.Items.Clear();
foreach (DataRow dr in dt.Rows)
{
ListViewItem item = lsvBBDD.Items.Add((String)dr["database_name"]);
item.SubItems.Add(((DateTime)dr["create_date"]).ToShortDateString());
}
}
private void lsvBBDD_DoubleClick(object sender, EventArgs e)
{
if (lsvBBDD.SelectedItems.Count == 1)
{
// Construir cadena de conexion final
SqlConnectionStringBuilder constructor = new SqlConnectionStringBuilder();
constructor.DataSource = txtServidor.Text;
constructor.InitialCatalog = (String)lsvBBDD.SelectedItems[0].SubItems[0].Text;
constructor.UserID = txtUsuario.Text;
constructor.Password = TxtContrasenha.Text;
// Llamar a la venta de la base de datos
frmBaseDatos frm = new frmBaseDatos(constructor.ConnectionString);
frm.Show();
}
}
}
}

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<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>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 10.00 Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2008 # Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServerExplorer", "ServerExplorer\ServerExplorer.csproj", "{79531B74-3062-4A71-9953-5702BEBDEC0E}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServerExplorer", "ServerExplorer\ServerExplorer.csproj", "{79531B74-3062-4A71-9953-5702BEBDEC0E}"
EndProject EndProject
Global Global

Binary file not shown.

View File

@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
using System.IO;
namespace ServerExplorer
{
public class CodeGenConfig
{
public String ConString = "";
public String PathRaiz="";
public String PathDAL="";
public String PathDTO="";
public String PathExtra="";
public List<String> tablas=new List<String>();
public void Guardar(String fichero){
XmlSerializer seriador = new XmlSerializer(typeof(CodeGenConfig));
StreamWriter escritor = new StreamWriter(fichero);
seriador.Serialize(escritor, this);
}
public static CodeGenConfig Cargar(String fichero)
{
XmlSerializer seriador = new XmlSerializer(typeof(CodeGenConfig));
StreamReader lector = new StreamReader(fichero);
CodeGenConfig config=(CodeGenConfig)seriador.Deserialize(lector);
return config;
}
}
}

View File

@@ -1,49 +1,44 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // Este código fue generado por una herramienta.
// Runtime Version:2.0.50727.3082 // Versión de runtime:4.0.30319.488
// //
// Changes to this file may cause incorrect behavior and will be lost if // Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si
// the code is regenerated. // se vuelve a generar el código.
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace ServerExplorer.Properties namespace ServerExplorer.Properties {
{ using System;
/// <summary> /// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc. /// Clase de recurso con establecimiento inflexible de tipos, para buscar cadenas traducidas, etc.
/// </summary> /// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder // StronglyTypedResourceBuilder generó automáticamente esta clase
// class via a tool like ResGen or Visual Studio. // a través de una herramienta como ResGen o Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen // Para agregar o quitar un miembro, edite el archivo .ResX y, a continuación, vuelva a ejecutar ResGen
// with the /str option, or rebuild your VS project. // con la opción /str o vuelva a generar su proyecto de VS.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources internal class Resources {
{
private static global::System.Resources.ResourceManager resourceMan; private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture; private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() internal Resources() {
{
} }
/// <summary> /// <summary>
/// Returns the cached ResourceManager instance used by this class. /// Devuelve la instancia de ResourceManager almacenada en caché utilizada por esta clase.
/// </summary> /// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager internal static global::System.Resources.ResourceManager ResourceManager {
{ get {
get if (object.ReferenceEquals(resourceMan, null)) {
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ServerExplorer.Properties.Resources", typeof(Resources).Assembly); global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ServerExplorer.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp; resourceMan = temp;
} }
@@ -52,18 +47,15 @@ namespace ServerExplorer.Properties
} }
/// <summary> /// <summary>
/// Overrides the current thread's CurrentUICulture property for all /// Reemplaza la propiedad CurrentUICulture del subproceso actual para todas las
/// resource lookups using this strongly typed resource class. /// búsquedas de recursos mediante esta clase de recurso con establecimiento inflexible de tipos.
/// </summary> /// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture internal static global::System.Globalization.CultureInfo Culture {
{ get {
get
{
return resourceCulture; return resourceCulture;
} }
set set {
{
resourceCulture = value; resourceCulture = value;
} }
} }

View File

@@ -1,28 +1,24 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // Este código fue generado por una herramienta.
// Runtime Version:2.0.50727.3082 // Versión de runtime:4.0.30319.488
// //
// Changes to this file may cause incorrect behavior and will be lost if // Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si
// the code is regenerated. // se vuelve a generar el código.
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace ServerExplorer.Properties namespace ServerExplorer.Properties {
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default public static Settings Default {
{ get {
get
{
return defaultInstance; return defaultInstance;
} }
} }

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -12,6 +12,26 @@
<AssemblyName>ServerExplorer</AssemblyName> <AssemblyName>ServerExplorer</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>3.5</OldToolsVersion>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@@ -48,12 +68,19 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="CodeGenConfig.cs" />
<Compile Include="frmBaseDatos.cs"> <Compile Include="frmBaseDatos.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="frmBaseDatos.Designer.cs"> <Compile Include="frmBaseDatos.Designer.cs">
<DependentUpon>frmBaseDatos.cs</DependentUpon> <DependentUpon>frmBaseDatos.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="frmCodeGenConfig.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmCodeGenConfig.Designer.cs">
<DependentUpon>frmCodeGenConfig.cs</DependentUpon>
</Compile>
<Compile Include="frmPrincipal.cs"> <Compile Include="frmPrincipal.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@@ -71,6 +98,9 @@
<EmbeddedResource Include="frmBaseDatos.resx"> <EmbeddedResource Include="frmBaseDatos.resx">
<DependentUpon>frmBaseDatos.cs</DependentUpon> <DependentUpon>frmBaseDatos.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="frmCodeGenConfig.resx">
<DependentUpon>frmCodeGenConfig.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmPrincipal.resx"> <EmbeddedResource Include="frmPrincipal.resx">
<DependentUpon>frmPrincipal.cs</DependentUpon> <DependentUpon>frmPrincipal.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
@@ -85,6 +115,7 @@
<Compile Include="Properties\Resources.Designer.cs"> <Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon> <DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile> </Compile>
<None Include="Properties\Settings.settings"> <None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
@@ -96,6 +127,23 @@
<DesignTimeSharedInput>True</DesignTimeSharedInput> <DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile> </Compile>
</ItemGroup> </ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishUrlHistory />
<InstallUrlHistory />
<SupportUrlHistory />
<UpdateUrlHistory />
<BootstrapperUrlHistory />
<ErrorReportUrlHistory />
<FallbackCulture>es-ES</FallbackCulture>
<VerifyUploadedFiles>false</VerifyUploadedFiles>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

View File

@@ -32,22 +32,28 @@
this.lblConString = new System.Windows.Forms.Label(); this.lblConString = new System.Windows.Forms.Label();
this.btnCopiarConString = new System.Windows.Forms.Button(); this.btnCopiarConString = new System.Windows.Forms.Button();
this.lsvTablas = new System.Windows.Forms.ListView(); this.lsvTablas = new System.Windows.Forms.ListView();
this.colNombreTabla = new System.Windows.Forms.ColumnHeader(); this.colNombreTabla = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.colEsquema = new System.Windows.Forms.ColumnHeader(); this.colEsquema = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.colTipo = new System.Windows.Forms.ColumnHeader(); this.colTipo = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.lsvColumnas = new System.Windows.Forms.ListView(); this.lsvColumnas = new System.Windows.Forms.ListView();
this.colNombreColumna = new System.Windows.Forms.ColumnHeader(); this.colNombreColumna = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.colTipoDatos = new System.Windows.Forms.ColumnHeader(); this.colTipoDatos = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.colTamanho = new System.Windows.Forms.ColumnHeader(); this.colTamanho = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.dataGridView1 = new System.Windows.Forms.DataGridView(); this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.menuBaseDatos = new System.Windows.Forms.MenuStrip();
this.archivoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuCargar = new System.Windows.Forms.ToolStripMenuItem();
this.menuGuardar = new System.Windows.Forms.ToolStripMenuItem();
this.menuConfiguracion = new System.Windows.Forms.ToolStripMenuItem();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.menuBaseDatos.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// txtConString // txtConString
// //
this.txtConString.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.txtConString.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.txtConString.Location = new System.Drawing.Point(123, 12); this.txtConString.Location = new System.Drawing.Point(123, 33);
this.txtConString.Name = "txtConString"; this.txtConString.Name = "txtConString";
this.txtConString.ReadOnly = true; this.txtConString.ReadOnly = true;
this.txtConString.Size = new System.Drawing.Size(472, 20); this.txtConString.Size = new System.Drawing.Size(472, 20);
@@ -56,7 +62,7 @@
// lblConString // lblConString
// //
this.lblConString.AutoSize = true; this.lblConString.AutoSize = true;
this.lblConString.Location = new System.Drawing.Point(12, 15); this.lblConString.Location = new System.Drawing.Point(12, 36);
this.lblConString.Name = "lblConString"; this.lblConString.Name = "lblConString";
this.lblConString.Size = new System.Drawing.Size(105, 13); this.lblConString.Size = new System.Drawing.Size(105, 13);
this.lblConString.TabIndex = 1; this.lblConString.TabIndex = 1;
@@ -65,7 +71,7 @@
// btnCopiarConString // btnCopiarConString
// //
this.btnCopiarConString.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btnCopiarConString.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnCopiarConString.Location = new System.Drawing.Point(601, 10); this.btnCopiarConString.Location = new System.Drawing.Point(601, 31);
this.btnCopiarConString.Name = "btnCopiarConString"; this.btnCopiarConString.Name = "btnCopiarConString";
this.btnCopiarConString.Size = new System.Drawing.Size(52, 23); this.btnCopiarConString.Size = new System.Drawing.Size(52, 23);
this.btnCopiarConString.TabIndex = 3; this.btnCopiarConString.TabIndex = 3;
@@ -76,14 +82,16 @@
// lsvTablas // lsvTablas
// //
this.lsvTablas.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.lsvTablas.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left))); | System.Windows.Forms.AnchorStyles.Left)));
this.lsvTablas.CheckBoxes = true;
this.lsvTablas.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.lsvTablas.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.colNombreTabla, this.colNombreTabla,
this.colEsquema, this.colEsquema,
this.colTipo}); this.colTipo});
this.lsvTablas.Location = new System.Drawing.Point(12, 38); this.lsvTablas.FullRowSelect = true;
this.lsvTablas.Location = new System.Drawing.Point(12, 59);
this.lsvTablas.Name = "lsvTablas"; this.lsvTablas.Name = "lsvTablas";
this.lsvTablas.Size = new System.Drawing.Size(326, 426); this.lsvTablas.Size = new System.Drawing.Size(326, 405);
this.lsvTablas.TabIndex = 4; this.lsvTablas.TabIndex = 4;
this.lsvTablas.UseCompatibleStateImageBehavior = false; this.lsvTablas.UseCompatibleStateImageBehavior = false;
this.lsvTablas.View = System.Windows.Forms.View.Details; this.lsvTablas.View = System.Windows.Forms.View.Details;
@@ -105,16 +113,16 @@
// //
// lsvColumnas // lsvColumnas
// //
this.lsvColumnas.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.lsvColumnas.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
| System.Windows.Forms.AnchorStyles.Right)));
this.lsvColumnas.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.lsvColumnas.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.colNombreColumna, this.colNombreColumna,
this.colTipoDatos, this.colTipoDatos,
this.colTamanho}); this.colTamanho});
this.lsvColumnas.Location = new System.Drawing.Point(344, 38); this.lsvColumnas.FullRowSelect = true;
this.lsvColumnas.Location = new System.Drawing.Point(344, 59);
this.lsvColumnas.Name = "lsvColumnas"; this.lsvColumnas.Name = "lsvColumnas";
this.lsvColumnas.Size = new System.Drawing.Size(309, 262); this.lsvColumnas.Size = new System.Drawing.Size(309, 241);
this.lsvColumnas.TabIndex = 6; this.lsvColumnas.TabIndex = 6;
this.lsvColumnas.UseCompatibleStateImageBehavior = false; this.lsvColumnas.UseCompatibleStateImageBehavior = false;
this.lsvColumnas.View = System.Windows.Forms.View.Details; this.lsvColumnas.View = System.Windows.Forms.View.Details;
@@ -136,14 +144,55 @@
// dataGridView1 // dataGridView1
// //
this.dataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.dataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Location = new System.Drawing.Point(344, 306); this.dataGridView1.Location = new System.Drawing.Point(344, 306);
this.dataGridView1.Name = "dataGridView1"; this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.Size = new System.Drawing.Size(309, 158); this.dataGridView1.Size = new System.Drawing.Size(309, 158);
this.dataGridView1.TabIndex = 8; this.dataGridView1.TabIndex = 8;
// //
// menuBaseDatos
//
this.menuBaseDatos.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.archivoToolStripMenuItem,
this.menuConfiguracion});
this.menuBaseDatos.Location = new System.Drawing.Point(0, 0);
this.menuBaseDatos.Name = "menuBaseDatos";
this.menuBaseDatos.Size = new System.Drawing.Size(665, 24);
this.menuBaseDatos.TabIndex = 9;
this.menuBaseDatos.Text = "menuBaseDatos";
//
// archivoToolStripMenuItem
//
this.archivoToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuCargar,
this.menuGuardar});
this.archivoToolStripMenuItem.Name = "archivoToolStripMenuItem";
this.archivoToolStripMenuItem.Size = new System.Drawing.Size(60, 20);
this.archivoToolStripMenuItem.Text = "Archivo";
//
// menuCargar
//
this.menuCargar.Name = "menuCargar";
this.menuCargar.Size = new System.Drawing.Size(116, 22);
this.menuCargar.Text = "Cargar";
this.menuCargar.Click += new System.EventHandler(this.menuCargar_Click);
//
// menuGuardar
//
this.menuGuardar.Name = "menuGuardar";
this.menuGuardar.Size = new System.Drawing.Size(116, 22);
this.menuGuardar.Text = "Guardar";
this.menuGuardar.Click += new System.EventHandler(this.menuGuardar_Click);
//
// menuConfiguracion
//
this.menuConfiguracion.Name = "menuConfiguracion";
this.menuConfiguracion.Size = new System.Drawing.Size(95, 20);
this.menuConfiguracion.Text = "Configuracion";
this.menuConfiguracion.Click += new System.EventHandler(this.menuConfiguracion_Click);
//
// frmBaseDatos // frmBaseDatos
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -155,10 +204,14 @@
this.Controls.Add(this.btnCopiarConString); this.Controls.Add(this.btnCopiarConString);
this.Controls.Add(this.lblConString); this.Controls.Add(this.lblConString);
this.Controls.Add(this.txtConString); this.Controls.Add(this.txtConString);
this.Controls.Add(this.menuBaseDatos);
this.MainMenuStrip = this.menuBaseDatos;
this.Name = "frmBaseDatos"; this.Name = "frmBaseDatos";
this.Text = "Base de Datos"; this.Text = "Base de Datos";
this.Load += new System.EventHandler(this.frmBaseDatos_Load); this.Load += new System.EventHandler(this.frmBaseDatos_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.menuBaseDatos.ResumeLayout(false);
this.menuBaseDatos.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
@@ -178,5 +231,10 @@
private System.Windows.Forms.ColumnHeader colTipoDatos; private System.Windows.Forms.ColumnHeader colTipoDatos;
private System.Windows.Forms.ColumnHeader colTamanho; private System.Windows.Forms.ColumnHeader colTamanho;
private System.Windows.Forms.DataGridView dataGridView1; private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.MenuStrip menuBaseDatos;
private System.Windows.Forms.ToolStripMenuItem archivoToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem menuCargar;
private System.Windows.Forms.ToolStripMenuItem menuGuardar;
private System.Windows.Forms.ToolStripMenuItem menuConfiguracion;
} }
} }

View File

@@ -14,18 +14,14 @@ namespace ServerExplorer
public partial class frmBaseDatos : Form public partial class frmBaseDatos : Form
{ {
SqlConnection cnx; SqlConnection cnx;
CodeGenConfig config;
public frmBaseDatos(String ConString) private void inicializar()
{ {
InitializeComponent();
// Establecer conexion // Establecer conexion
txtConString.Text = ConString; txtConString.Text = config.ConString;
cnx = new SqlConnection(ConString); cnx = new SqlConnection(config.ConString);
}
private void frmBaseDatos_Load(object sender, EventArgs e)
{
// Obtener lista de tablas // Obtener lista de tablas
cnx.Open(); cnx.Open();
DataTable dt = cnx.GetSchema("Tables"); DataTable dt = cnx.GetSchema("Tables");
@@ -39,6 +35,83 @@ namespace ServerExplorer
item.SubItems.Add((String)dr["TABLE_SCHEMA"]); item.SubItems.Add((String)dr["TABLE_SCHEMA"]);
item.SubItems.Add((String)dr["TABLE_TYPE"]); item.SubItems.Add((String)dr["TABLE_TYPE"]);
} }
tablas_alistview();
// Limpiar Columnas
lsvColumnas.Items.Clear();
}
// Metodo para copiar las tablas seleccionadas
// en el listview a la configuracion
private void tablas_delistview()
{
config.tablas.Clear();
foreach (ListViewItem item in lsvTablas.Items)
{
if (item.Checked)
{
config.tablas.Add(
item.SubItems[1].Text+ // Esquema
item.SubItems[0].Text); // Nombre tabla
}
}
}
// Metodo para seleccionar las tablas
// en le listview desde la configuracion
private void tablas_alistview()
{
int i, j,n;
// Desmarcar todos en caso de no haber ninguna tabla
if (config.tablas.Count == 0)
{
foreach (ListViewItem item in lsvTablas.Items)
item.Checked = false;
return;
}
// Recorrer items marcando los que estan en la configuracion
n=config.tablas.Count;
i=j=0;
foreach (ListViewItem item in lsvTablas.Items)
{
item.Checked = false;
String tablename =
item.SubItems[1].Text + // Esquema
item.SubItems[0].Text; // Nombre tabla
do{
if( config.tablas[i].CompareTo(tablename) == 0){
item.Checked=true;
break;
}
i=(i+1)%n;
}while(i!=j);
j=i;
}
}
public frmBaseDatos(String ConString)
{
InitializeComponent();
config = new CodeGenConfig();
config.ConString = ConString;
}
public frmBaseDatos(CodeGenConfig config)
{
InitializeComponent();
this.config = config;
}
private void frmBaseDatos_Load(object sender, EventArgs e)
{
inicializar();
} }
private void btnCopiarConString_Click(object sender, EventArgs e) private void btnCopiarConString_Click(object sender, EventArgs e)
@@ -90,5 +163,32 @@ namespace ServerExplorer
} }
} }
private void menuCargar_Click(object sender, EventArgs e)
{
OpenFileDialog dialogo = new OpenFileDialog();
if (dialogo.ShowDialog() == DialogResult.OK)
{
config = CodeGenConfig.Cargar(dialogo.FileName);
inicializar();
}
}
private void menuGuardar_Click(object sender, EventArgs e)
{
SaveFileDialog dialogo = new SaveFileDialog();
if (dialogo.ShowDialog() == DialogResult.OK)
{
tablas_delistview();
config.Guardar(dialogo.FileName);
}
}
private void menuConfiguracion_Click(object sender, EventArgs e)
{
// Llamar a la ventana de configuracion
frmCodeGenConfig frm = new frmCodeGenConfig(config);
frm.ShowDialog();
}
} }
} }

View File

@@ -117,4 +117,7 @@
<resheader name="writer"> <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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="menuBaseDatos.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root> </root>

View File

@@ -0,0 +1,259 @@
namespace ServerExplorer
{
partial class frmCodeGenConfig
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.lblConString = new System.Windows.Forms.Label();
this.txtConString = new System.Windows.Forms.TextBox();
this.lblPathRaiz = new System.Windows.Forms.Label();
this.txtPathRaiz = new System.Windows.Forms.TextBox();
this.btnPathRaiz = new System.Windows.Forms.Button();
this.btnPathDAL = new System.Windows.Forms.Button();
this.txtPathDAL = new System.Windows.Forms.TextBox();
this.lblPathDAL = new System.Windows.Forms.Label();
this.btnPathDTO = new System.Windows.Forms.Button();
this.txtPathDTO = new System.Windows.Forms.TextBox();
this.lblPathDTO = new System.Windows.Forms.Label();
this.btnPathExtra = new System.Windows.Forms.Button();
this.txtPathExtra = new System.Windows.Forms.TextBox();
this.lblPathExtra = new System.Windows.Forms.Label();
this.btnCancelar = new System.Windows.Forms.Button();
this.btnAceptar = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// lblConString
//
this.lblConString.AutoSize = true;
this.lblConString.Location = new System.Drawing.Point(12, 9);
this.lblConString.Name = "lblConString";
this.lblConString.Size = new System.Drawing.Size(106, 13);
this.lblConString.TabIndex = 0;
this.lblConString.Text = "Cadena de Conexion";
//
// txtConString
//
this.txtConString.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtConString.Location = new System.Drawing.Point(125, 6);
this.txtConString.Multiline = true;
this.txtConString.Name = "txtConString";
this.txtConString.ReadOnly = true;
this.txtConString.Size = new System.Drawing.Size(330, 45);
this.txtConString.TabIndex = 1;
//
// lblPathRaiz
//
this.lblPathRaiz.AutoSize = true;
this.lblPathRaiz.Location = new System.Drawing.Point(12, 64);
this.lblPathRaiz.Name = "lblPathRaiz";
this.lblPathRaiz.Size = new System.Drawing.Size(53, 13);
this.lblPathRaiz.TabIndex = 2;
this.lblPathRaiz.Text = "Path Raiz";
//
// txtPathRaiz
//
this.txtPathRaiz.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtPathRaiz.Location = new System.Drawing.Point(125, 61);
this.txtPathRaiz.Name = "txtPathRaiz";
this.txtPathRaiz.ReadOnly = true;
this.txtPathRaiz.Size = new System.Drawing.Size(296, 20);
this.txtPathRaiz.TabIndex = 4;
//
// btnPathRaiz
//
this.btnPathRaiz.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnPathRaiz.Location = new System.Drawing.Point(427, 58);
this.btnPathRaiz.Name = "btnPathRaiz";
this.btnPathRaiz.Size = new System.Drawing.Size(28, 23);
this.btnPathRaiz.TabIndex = 5;
this.btnPathRaiz.Text = "...";
this.btnPathRaiz.UseVisualStyleBackColor = true;
this.btnPathRaiz.Click += new System.EventHandler(this.btnPathRaiz_Click);
//
// btnPathDAL
//
this.btnPathDAL.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnPathDAL.Location = new System.Drawing.Point(427, 84);
this.btnPathDAL.Name = "btnPathDAL";
this.btnPathDAL.Size = new System.Drawing.Size(28, 23);
this.btnPathDAL.TabIndex = 8;
this.btnPathDAL.Text = "...";
this.btnPathDAL.UseVisualStyleBackColor = true;
this.btnPathDAL.Click += new System.EventHandler(this.btnPathDAL_Click);
//
// txtPathDAL
//
this.txtPathDAL.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtPathDAL.Location = new System.Drawing.Point(125, 87);
this.txtPathDAL.Name = "txtPathDAL";
this.txtPathDAL.ReadOnly = true;
this.txtPathDAL.Size = new System.Drawing.Size(296, 20);
this.txtPathDAL.TabIndex = 7;
//
// lblPathDAL
//
this.lblPathDAL.AutoSize = true;
this.lblPathDAL.Location = new System.Drawing.Point(12, 90);
this.lblPathDAL.Name = "lblPathDAL";
this.lblPathDAL.Size = new System.Drawing.Size(53, 13);
this.lblPathDAL.TabIndex = 6;
this.lblPathDAL.Text = "Path DAL";
//
// btnPathDTO
//
this.btnPathDTO.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnPathDTO.Location = new System.Drawing.Point(427, 110);
this.btnPathDTO.Name = "btnPathDTO";
this.btnPathDTO.Size = new System.Drawing.Size(28, 23);
this.btnPathDTO.TabIndex = 11;
this.btnPathDTO.Text = "...";
this.btnPathDTO.UseVisualStyleBackColor = true;
this.btnPathDTO.Click += new System.EventHandler(this.btnPathDTO_Click);
//
// txtPathDTO
//
this.txtPathDTO.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtPathDTO.Location = new System.Drawing.Point(125, 113);
this.txtPathDTO.Name = "txtPathDTO";
this.txtPathDTO.ReadOnly = true;
this.txtPathDTO.Size = new System.Drawing.Size(296, 20);
this.txtPathDTO.TabIndex = 10;
//
// lblPathDTO
//
this.lblPathDTO.AutoSize = true;
this.lblPathDTO.Location = new System.Drawing.Point(12, 116);
this.lblPathDTO.Name = "lblPathDTO";
this.lblPathDTO.Size = new System.Drawing.Size(55, 13);
this.lblPathDTO.TabIndex = 9;
this.lblPathDTO.Text = "Path DTO";
//
// btnPathExtra
//
this.btnPathExtra.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnPathExtra.Location = new System.Drawing.Point(427, 136);
this.btnPathExtra.Name = "btnPathExtra";
this.btnPathExtra.Size = new System.Drawing.Size(28, 23);
this.btnPathExtra.TabIndex = 14;
this.btnPathExtra.Text = "...";
this.btnPathExtra.UseVisualStyleBackColor = true;
this.btnPathExtra.Click += new System.EventHandler(this.btnPathExtra_Click);
//
// txtPathExtra
//
this.txtPathExtra.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtPathExtra.Location = new System.Drawing.Point(125, 139);
this.txtPathExtra.Name = "txtPathExtra";
this.txtPathExtra.ReadOnly = true;
this.txtPathExtra.Size = new System.Drawing.Size(296, 20);
this.txtPathExtra.TabIndex = 13;
//
// lblPathExtra
//
this.lblPathExtra.AutoSize = true;
this.lblPathExtra.Location = new System.Drawing.Point(12, 142);
this.lblPathExtra.Name = "lblPathExtra";
this.lblPathExtra.Size = new System.Drawing.Size(56, 13);
this.lblPathExtra.TabIndex = 12;
this.lblPathExtra.Text = "Path Extra";
//
// btnCancelar
//
this.btnCancelar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnCancelar.Location = new System.Drawing.Point(380, 201);
this.btnCancelar.Name = "btnCancelar";
this.btnCancelar.Size = new System.Drawing.Size(75, 23);
this.btnCancelar.TabIndex = 15;
this.btnCancelar.Text = "Cancelar";
this.btnCancelar.UseVisualStyleBackColor = true;
this.btnCancelar.Click += new System.EventHandler(this.btnCancelar_Click);
//
// btnAceptar
//
this.btnAceptar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnAceptar.Location = new System.Drawing.Point(299, 201);
this.btnAceptar.Name = "btnAceptar";
this.btnAceptar.Size = new System.Drawing.Size(75, 23);
this.btnAceptar.TabIndex = 16;
this.btnAceptar.Text = "Aceptar";
this.btnAceptar.UseVisualStyleBackColor = true;
this.btnAceptar.Click += new System.EventHandler(this.btnAceptar_Click);
//
// frmCodeGenConfig
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(467, 236);
this.Controls.Add(this.btnAceptar);
this.Controls.Add(this.btnCancelar);
this.Controls.Add(this.btnPathExtra);
this.Controls.Add(this.txtPathExtra);
this.Controls.Add(this.lblPathExtra);
this.Controls.Add(this.btnPathDTO);
this.Controls.Add(this.txtPathDTO);
this.Controls.Add(this.lblPathDTO);
this.Controls.Add(this.btnPathDAL);
this.Controls.Add(this.txtPathDAL);
this.Controls.Add(this.lblPathDAL);
this.Controls.Add(this.btnPathRaiz);
this.Controls.Add(this.txtPathRaiz);
this.Controls.Add(this.lblPathRaiz);
this.Controls.Add(this.txtConString);
this.Controls.Add(this.lblConString);
this.Name = "frmCodeGenConfig";
this.Text = "Configuracion del Generador de Codigo";
this.Load += new System.EventHandler(this.frmCodeGenConfig_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label lblConString;
private System.Windows.Forms.TextBox txtConString;
private System.Windows.Forms.Label lblPathRaiz;
private System.Windows.Forms.TextBox txtPathRaiz;
private System.Windows.Forms.Button btnPathRaiz;
private System.Windows.Forms.Button btnPathDAL;
private System.Windows.Forms.TextBox txtPathDAL;
private System.Windows.Forms.Label lblPathDAL;
private System.Windows.Forms.Button btnPathDTO;
private System.Windows.Forms.TextBox txtPathDTO;
private System.Windows.Forms.Label lblPathDTO;
private System.Windows.Forms.Button btnPathExtra;
private System.Windows.Forms.TextBox txtPathExtra;
private System.Windows.Forms.Label lblPathExtra;
private System.Windows.Forms.Button btnCancelar;
private System.Windows.Forms.Button btnAceptar;
}
}

View File

@@ -0,0 +1,86 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace ServerExplorer
{
public partial class frmCodeGenConfig : Form
{
CodeGenConfig config;
public frmCodeGenConfig(CodeGenConfig config)
{
InitializeComponent();
this.config = config;
}
private void frmCodeGenConfig_Load(object sender, EventArgs e)
{
txtConString.Text = config.ConString;
txtPathRaiz.Text = config.PathRaiz;
txtPathDAL.Text = config.PathDAL;
txtPathDTO.Text = config.PathDTO;
txtPathExtra.Text = config.PathExtra;
}
private void btnPathRaiz_Click(object sender, EventArgs e)
{
FolderBrowserDialog dialog = new FolderBrowserDialog();
dialog.SelectedPath = txtPathRaiz.Text;
if (dialog.ShowDialog() == DialogResult.OK)
{
txtPathRaiz.Text = dialog.SelectedPath;
}
}
private void btnPathDAL_Click(object sender, EventArgs e)
{
FolderBrowserDialog dialog = new FolderBrowserDialog();
dialog.SelectedPath = txtPathDAL.Text;
if (dialog.ShowDialog() == DialogResult.OK)
{
txtPathDAL.Text = dialog.SelectedPath;
}
}
private void btnPathDTO_Click(object sender, EventArgs e)
{
FolderBrowserDialog dialog = new FolderBrowserDialog();
dialog.SelectedPath = txtPathDTO.Text;
if (dialog.ShowDialog() == DialogResult.OK)
{
txtPathDTO.Text = dialog.SelectedPath;
}
}
private void btnPathExtra_Click(object sender, EventArgs e)
{
FolderBrowserDialog dialog = new FolderBrowserDialog();
dialog.SelectedPath = txtPathExtra.Text;
if (dialog.ShowDialog() == DialogResult.OK)
{
txtPathExtra.Text = dialog.SelectedPath;
}
}
private void btnAceptar_Click(object sender, EventArgs e)
{
config.PathRaiz = txtPathRaiz.Text;
config.PathDAL = txtPathDAL.Text;
config.PathDTO = txtPathDTO.Text;
config.PathExtra = txtPathExtra.Text;
this.Close();
}
private void btnCancelar_Click(object sender, EventArgs e)
{
this.Close();
}
}
}

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<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>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -28,75 +28,76 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.menuPrincipal = new System.Windows.Forms.MenuStrip();
this.servidorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.menuServidor = new System.Windows.Forms.ToolStripMenuItem();
this.meiBuscarServidor = new System.Windows.Forms.ToolStripMenuItem(); this.menuBuscarServidor = new System.Windows.Forms.ToolStripMenuItem();
this.baseDeDatosToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.menuBaseDatos = new System.Windows.Forms.ToolStripMenuItem();
this.meiConectarA = new System.Windows.Forms.ToolStripMenuItem(); this.menuConectarA = new System.Windows.Forms.ToolStripMenuItem();
this.meiConectarPRUEBAS = new System.Windows.Forms.ToolStripMenuItem(); this.menuConectarPRUEBAS = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1.SuspendLayout(); this.menuPrincipal.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// menuStrip1 // menuPrincipal
// //
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.menuPrincipal.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.servidorToolStripMenuItem, this.menuServidor,
this.baseDeDatosToolStripMenuItem}); this.menuBaseDatos});
this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuPrincipal.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1"; this.menuPrincipal.Name = "menuPrincipal";
this.menuStrip1.Size = new System.Drawing.Size(800, 24); this.menuPrincipal.Size = new System.Drawing.Size(800, 24);
this.menuStrip1.TabIndex = 4; this.menuPrincipal.TabIndex = 4;
this.menuStrip1.Text = "menuPrincipal"; this.menuPrincipal.Text = "menuPrincipal";
// //
// servidorToolStripMenuItem // menuServidor
// //
this.servidorToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.menuServidor.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.meiBuscarServidor}); this.menuBuscarServidor});
this.servidorToolStripMenuItem.Name = "servidorToolStripMenuItem"; this.menuServidor.Name = "menuServidor";
this.servidorToolStripMenuItem.Size = new System.Drawing.Size(59, 20); this.menuServidor.Size = new System.Drawing.Size(62, 20);
this.servidorToolStripMenuItem.Text = "Servidor"; this.menuServidor.Text = "Servidor";
// //
// meiBuscarServidor // menuBuscarServidor
// //
this.meiBuscarServidor.Name = "meiBuscarServidor"; this.menuBuscarServidor.Name = "menuBuscarServidor";
this.meiBuscarServidor.Size = new System.Drawing.Size(160, 22); this.menuBuscarServidor.Size = new System.Drawing.Size(155, 22);
this.meiBuscarServidor.Text = "Buscar Servidor"; this.menuBuscarServidor.Text = "Buscar Servidor";
this.meiBuscarServidor.Click += new System.EventHandler(this.meiBuscarServidor_Click); this.menuBuscarServidor.Click += new System.EventHandler(this.menuBuscarServidor_Click);
// //
// baseDeDatosToolStripMenuItem // menuBaseDatos
// //
this.baseDeDatosToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.menuBaseDatos.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.meiConectarA, this.menuConectarA,
this.meiConectarPRUEBAS}); this.menuConectarPRUEBAS});
this.baseDeDatosToolStripMenuItem.Name = "baseDeDatosToolStripMenuItem"; this.menuBaseDatos.Name = "menuBaseDatos";
this.baseDeDatosToolStripMenuItem.Size = new System.Drawing.Size(88, 20); this.menuBaseDatos.Size = new System.Drawing.Size(92, 20);
this.baseDeDatosToolStripMenuItem.Text = "Base de Datos"; this.menuBaseDatos.Text = "Base de Datos";
// //
// meiConectarA // menuConectarA
// //
this.meiConectarA.Name = "meiConectarA"; this.menuConectarA.Name = "menuConectarA";
this.meiConectarA.Size = new System.Drawing.Size(186, 22); this.menuConectarA.Size = new System.Drawing.Size(183, 22);
this.meiConectarA.Text = "Conectar a..."; this.menuConectarA.Text = "Conectar a...";
this.menuConectarA.Click += new System.EventHandler(this.menuConectarA_Click);
// //
// meiConectarPRUEBAS // menuConectarPRUEBAS
// //
this.meiConectarPRUEBAS.Name = "meiConectarPRUEBAS"; this.menuConectarPRUEBAS.Name = "menuConectarPRUEBAS";
this.meiConectarPRUEBAS.Size = new System.Drawing.Size(186, 22); this.menuConectarPRUEBAS.Size = new System.Drawing.Size(183, 22);
this.meiConectarPRUEBAS.Text = "Conectar a PRUEBAS"; this.menuConectarPRUEBAS.Text = "Conectar a PRUEBAS";
this.meiConectarPRUEBAS.Click += new System.EventHandler(this.meiConectarPRUEBAS_Click); this.menuConectarPRUEBAS.Click += new System.EventHandler(this.menuConectarPRUEBAS_Click);
// //
// frmPrincipal // frmPrincipal
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 601); this.ClientSize = new System.Drawing.Size(800, 601);
this.Controls.Add(this.menuStrip1); this.Controls.Add(this.menuPrincipal);
this.IsMdiContainer = true; this.IsMdiContainer = true;
this.MainMenuStrip = this.menuStrip1; this.MainMenuStrip = this.menuPrincipal;
this.Name = "frmPrincipal"; this.Name = "frmPrincipal";
this.Text = "Explorador de Servidores"; this.Text = "Explorador de Servidores";
this.menuStrip1.ResumeLayout(false); this.menuPrincipal.ResumeLayout(false);
this.menuStrip1.PerformLayout(); this.menuPrincipal.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
@@ -104,11 +105,11 @@
#endregion #endregion
private System.Windows.Forms.MenuStrip menuStrip1; private System.Windows.Forms.MenuStrip menuPrincipal;
private System.Windows.Forms.ToolStripMenuItem servidorToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem menuServidor;
private System.Windows.Forms.ToolStripMenuItem meiBuscarServidor; private System.Windows.Forms.ToolStripMenuItem menuBuscarServidor;
private System.Windows.Forms.ToolStripMenuItem baseDeDatosToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem menuBaseDatos;
private System.Windows.Forms.ToolStripMenuItem meiConectarA; private System.Windows.Forms.ToolStripMenuItem menuConectarA;
private System.Windows.Forms.ToolStripMenuItem meiConectarPRUEBAS; private System.Windows.Forms.ToolStripMenuItem menuConectarPRUEBAS;
} }
} }

View File

@@ -16,18 +16,38 @@ namespace ServerExplorer
InitializeComponent(); InitializeComponent();
} }
private void meiConectarPRUEBAS_Click(object sender, EventArgs e) private void menuConectarPRUEBAS_Click(object sender, EventArgs e)
{ {
frmBaseDatos frm = new frmBaseDatos("Data Source=SSSRV3;Initial Catalog=PRUEBAS;User ID=sa;Password=SLsssrv3"); // Crear ventana de la base de datos de pruebas
//frmBaseDatos frm = new frmBaseDatos("Data Source=SSSRV3;Initial Catalog=PRUEBAS;User ID=sa;Password=SLsssrv3");
frmBaseDatos frm = new frmBaseDatos("Data Source=DANTE;Initial Catalog=BD_AlfonsoRodriguez;Integrated Security=True");
frm.MdiParent = this; frm.MdiParent = this;
frm.WindowState = FormWindowState.Maximized;
frm.Show(); frm.Show();
} }
private void meiBuscarServidor_Click(object sender, EventArgs e) private void menuBuscarServidor_Click(object sender, EventArgs e)
{ {
// Mostrar ventana de buscador de servidores
frmServidores frm = new frmServidores(); frmServidores frm = new frmServidores();
frm.MdiParent = this; frm.MdiParent = this;
frm.Show(); frm.Show();
} }
private void menuConectarA_Click(object sender, EventArgs e)
{
// Cargar configuracion
OpenFileDialog dialogo = new OpenFileDialog();
if (dialogo.ShowDialog() == DialogResult.OK)
{
CodeGenConfig config = CodeGenConfig.Cargar(dialogo.FileName);
// Crear y mostrar ventana
frmBaseDatos frm = new frmBaseDatos(config);
frm.MdiParent = this;
frm.WindowState = FormWindowState.Maximized;
frm.Show();
}
}
} }
} }

View File

@@ -117,7 +117,7 @@
<resheader name="writer"> <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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="menuPrincipal.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
</root> </root>

View File

@@ -29,10 +29,10 @@
private void InitializeComponent() private void InitializeComponent()
{ {
this.lsvServidores = new System.Windows.Forms.ListView(); this.lsvServidores = new System.Windows.Forms.ListView();
this.colNombreServidor = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.colInstancia = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.colVersion = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.btnListarServidores = new System.Windows.Forms.Button(); this.btnListarServidores = new System.Windows.Forms.Button();
this.colNombreServidor = new System.Windows.Forms.ColumnHeader();
this.colInstancia = new System.Windows.Forms.ColumnHeader();
this.colVersion = new System.Windows.Forms.ColumnHeader();
this.lblServidor = new System.Windows.Forms.Label(); this.lblServidor = new System.Windows.Forms.Label();
this.txtServidor = new System.Windows.Forms.TextBox(); this.txtServidor = new System.Windows.Forms.TextBox();
this.lblUsuario = new System.Windows.Forms.Label(); this.lblUsuario = new System.Windows.Forms.Label();
@@ -41,18 +41,19 @@
this.TxtContrasenha = new System.Windows.Forms.TextBox(); this.TxtContrasenha = new System.Windows.Forms.TextBox();
this.btnListarBBDD = new System.Windows.Forms.Button(); this.btnListarBBDD = new System.Windows.Forms.Button();
this.lsvBBDD = new System.Windows.Forms.ListView(); this.lsvBBDD = new System.Windows.Forms.ListView();
this.colDBName = new System.Windows.Forms.ColumnHeader(); this.colDBName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.colFechaCreacion = new System.Windows.Forms.ColumnHeader(); this.colFechaCreacion = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.SuspendLayout(); this.SuspendLayout();
// //
// lsvServidores // lsvServidores
// //
this.lsvServidores.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.lsvServidores.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left))); | System.Windows.Forms.AnchorStyles.Left)));
this.lsvServidores.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.lsvServidores.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.colNombreServidor, this.colNombreServidor,
this.colInstancia, this.colInstancia,
this.colVersion}); this.colVersion});
this.lsvServidores.FullRowSelect = true;
this.lsvServidores.Location = new System.Drawing.Point(12, 42); this.lsvServidores.Location = new System.Drawing.Point(12, 42);
this.lsvServidores.Name = "lsvServidores"; this.lsvServidores.Name = "lsvServidores";
this.lsvServidores.Size = new System.Drawing.Size(281, 391); this.lsvServidores.Size = new System.Drawing.Size(281, 391);
@@ -61,16 +62,6 @@
this.lsvServidores.View = System.Windows.Forms.View.Details; this.lsvServidores.View = System.Windows.Forms.View.Details;
this.lsvServidores.SelectedIndexChanged += new System.EventHandler(this.lsvServidores_SelectedIndexChanged); this.lsvServidores.SelectedIndexChanged += new System.EventHandler(this.lsvServidores_SelectedIndexChanged);
// //
// btnListarServidores
//
this.btnListarServidores.Location = new System.Drawing.Point(12, 13);
this.btnListarServidores.Name = "btnListarServidores";
this.btnListarServidores.Size = new System.Drawing.Size(281, 23);
this.btnListarServidores.TabIndex = 2;
this.btnListarServidores.Text = "Listar Servidores";
this.btnListarServidores.UseVisualStyleBackColor = true;
this.btnListarServidores.Click += new System.EventHandler(this.btnListarServidores_Click);
//
// colNombreServidor // colNombreServidor
// //
this.colNombreServidor.Text = "Servidor"; this.colNombreServidor.Text = "Servidor";
@@ -86,6 +77,16 @@
this.colVersion.Text = "Version"; this.colVersion.Text = "Version";
this.colVersion.Width = 73; this.colVersion.Width = 73;
// //
// btnListarServidores
//
this.btnListarServidores.Location = new System.Drawing.Point(12, 13);
this.btnListarServidores.Name = "btnListarServidores";
this.btnListarServidores.Size = new System.Drawing.Size(281, 23);
this.btnListarServidores.TabIndex = 2;
this.btnListarServidores.Text = "Listar Servidores";
this.btnListarServidores.UseVisualStyleBackColor = true;
this.btnListarServidores.Click += new System.EventHandler(this.btnListarServidores_Click);
//
// lblServidor // lblServidor
// //
this.lblServidor.AutoSize = true; this.lblServidor.AutoSize = true;
@@ -148,10 +149,11 @@
// lsvBBDD // lsvBBDD
// //
this.lsvBBDD.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.lsvBBDD.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left))); | System.Windows.Forms.AnchorStyles.Left)));
this.lsvBBDD.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.lsvBBDD.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.colDBName, this.colDBName,
this.colFechaCreacion}); this.colFechaCreacion});
this.lsvBBDD.FullRowSelect = true;
this.lsvBBDD.Location = new System.Drawing.Point(322, 122); this.lsvBBDD.Location = new System.Drawing.Point(322, 122);
this.lsvBBDD.Name = "lsvBBDD"; this.lsvBBDD.Name = "lsvBBDD";
this.lsvBBDD.Size = new System.Drawing.Size(287, 311); this.lsvBBDD.Size = new System.Drawing.Size(287, 311);

View File

@@ -81,8 +81,15 @@ namespace ServerExplorer
SqlConnectionStringBuilder constructor = new SqlConnectionStringBuilder(); SqlConnectionStringBuilder constructor = new SqlConnectionStringBuilder();
constructor.DataSource = txtServidor.Text; constructor.DataSource = txtServidor.Text;
constructor.InitialCatalog = "master"; constructor.InitialCatalog = "master";
constructor.UserID = txtUsuario.Text; if (txtUsuario.Text.CompareTo("") == 0)
constructor.Password = TxtContrasenha.Text; {
constructor.IntegratedSecurity = true;
}
else
{
constructor.UserID = txtUsuario.Text;
constructor.Password = TxtContrasenha.Text;
}
// Obtener todas las bases de datos // Obtener todas las bases de datos
SqlConnection cnx = new SqlConnection(constructor.ConnectionString); SqlConnection cnx = new SqlConnection(constructor.ConnectionString);
@@ -109,11 +116,19 @@ namespace ServerExplorer
SqlConnectionStringBuilder constructor = new SqlConnectionStringBuilder(); SqlConnectionStringBuilder constructor = new SqlConnectionStringBuilder();
constructor.DataSource = txtServidor.Text; constructor.DataSource = txtServidor.Text;
constructor.InitialCatalog = (String)lsvBBDD.SelectedItems[0].SubItems[0].Text; constructor.InitialCatalog = (String)lsvBBDD.SelectedItems[0].SubItems[0].Text;
constructor.UserID = txtUsuario.Text; if (txtUsuario.Text.CompareTo("") == 0)
constructor.Password = TxtContrasenha.Text; {
constructor.IntegratedSecurity = true;
}
else
{
constructor.UserID = txtUsuario.Text;
constructor.Password = TxtContrasenha.Text;
}
// Llamar a la venta de la base de datos // Llamar a la venta de la base de datos
frmBaseDatos frm = new frmBaseDatos(constructor.ConnectionString); frmBaseDatos frm = new frmBaseDatos(constructor.ConnectionString);
frm.MdiParent = this.MdiParent;
frm.Show(); frm.Show();
} }
} }

View File

@@ -8,3 +8,15 @@ D:\VAR\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.pdb
D:\VAR\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.frmServidores.resources D:\VAR\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.frmServidores.resources
D:\VAR\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.frmBaseDatos.resources D:\VAR\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.frmBaseDatos.resources
D:\VAR\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.frmPrincipal.resources D:\VAR\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.frmPrincipal.resources
C:\Users\val\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.exe
C:\Users\val\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.pdb
C:\Users\val\Desktop\ServerExplorer\ServerExplorer\bin\Debug\ServerExplorer.exe
C:\Users\val\Desktop\ServerExplorer\ServerExplorer\bin\Debug\ServerExplorer.pdb
C:\Users\val\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ResolveAssemblyReference.cache
C:\Users\val\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.frmBaseDatos.resources
C:\Users\val\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.frmPrincipal.resources
C:\Users\val\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.frmServidores.resources
C:\Users\val\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.Properties.Resources.resources
C:\Users\val\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ResGen.read.1.tlog
C:\Users\val\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ResGen.write.1.tlog
C:\Users\val\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.frmCodeGenConfig.resources

View File

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type='text/xsl' href='_UpgradeReport_Files/UpgradeReport.xslt'?><UpgradeLog>
<Properties><Property Name="Solution" Value="ServerExplorer">
</Property><Property Name="Archivo de la solución" Value="C:\Users\val\Desktop\ServerExplorer\ServerExplorer.sln">
</Property><Property Name="Archivo de opciones de usuario" Value="C:\Users\val\Desktop\ServerExplorer\ServerExplorer.suo">
</Property><Property Name="Date" Value="miércoles, 28 de marzo de 2012">
</Property><Property Name="Time" Value="14:40">
</Property></Properties><Event ErrorLevel="0" Project="" Source="ServerExplorer.sln" Description="La copia C:\Users\val\Desktop\ServerExplorer\Backup\ServerExplorer.sln del archivo se ha realizado correctamente">
</Event><Event ErrorLevel="0" Project="" Source="ServerExplorer.suo" Description="La copia C:\Users\val\Desktop\ServerExplorer\Backup\ServerExplorer.suo del archivo se ha realizado correctamente">
</Event><Event ErrorLevel="0" Project="ServerExplorer" Source="ServerExplorer\ServerExplorer.csproj" Description="Se realizó correctamente la copia de seguridad del archivo de proyecto C:\Users\val\Desktop\ServerExplorer\Backup\ServerExplorer\ServerExplorer.csproj">
</Event><Event ErrorLevel="0" Project="ServerExplorer" Source="ServerExplorer\frmBaseDatos.cs" Description="Se realizó correctamente la copia de seguridad del archivo C:\Users\val\Desktop\ServerExplorer\Backup\ServerExplorer\frmBaseDatos.cs">
</Event><Event ErrorLevel="0" Project="ServerExplorer" Source="ServerExplorer\frmBaseDatos.Designer.cs" Description="Se realizó correctamente la copia de seguridad del archivo C:\Users\val\Desktop\ServerExplorer\Backup\ServerExplorer\frmBaseDatos.Designer.cs">
</Event><Event ErrorLevel="0" Project="ServerExplorer" Source="ServerExplorer\frmPrincipal.cs" Description="Se realizó correctamente la copia de seguridad del archivo C:\Users\val\Desktop\ServerExplorer\Backup\ServerExplorer\frmPrincipal.cs">
</Event><Event ErrorLevel="0" Project="ServerExplorer" Source="ServerExplorer\frmPrincipal.Designer.cs" Description="Se realizó correctamente la copia de seguridad del archivo C:\Users\val\Desktop\ServerExplorer\Backup\ServerExplorer\frmPrincipal.Designer.cs">
</Event><Event ErrorLevel="0" Project="ServerExplorer" Source="ServerExplorer\frmServidores.cs" Description="Se realizó correctamente la copia de seguridad del archivo C:\Users\val\Desktop\ServerExplorer\Backup\ServerExplorer\frmServidores.cs">
</Event><Event ErrorLevel="0" Project="ServerExplorer" Source="ServerExplorer\frmServidores.Designer.cs" Description="Se realizó correctamente la copia de seguridad del archivo C:\Users\val\Desktop\ServerExplorer\Backup\ServerExplorer\frmServidores.Designer.cs">
</Event><Event ErrorLevel="0" Project="ServerExplorer" Source="ServerExplorer\Program.cs" Description="Se realizó correctamente la copia de seguridad del archivo C:\Users\val\Desktop\ServerExplorer\Backup\ServerExplorer\Program.cs">
</Event><Event ErrorLevel="0" Project="ServerExplorer" Source="ServerExplorer\Properties\AssemblyInfo.cs" Description="Se realizó correctamente la copia de seguridad del archivo C:\Users\val\Desktop\ServerExplorer\Backup\ServerExplorer\Properties\AssemblyInfo.cs">
</Event><Event ErrorLevel="0" Project="ServerExplorer" Source="ServerExplorer\Properties\Resources.Designer.cs" Description="Se realizó correctamente la copia de seguridad del archivo C:\Users\val\Desktop\ServerExplorer\Backup\ServerExplorer\Properties\Resources.Designer.cs">
</Event><Event ErrorLevel="0" Project="ServerExplorer" Source="ServerExplorer\Properties\Settings.Designer.cs" Description="Se realizó correctamente la copia de seguridad del archivo C:\Users\val\Desktop\ServerExplorer\Backup\ServerExplorer\Properties\Settings.Designer.cs">
</Event><Event ErrorLevel="0" Project="ServerExplorer" Source="ServerExplorer\Properties\Settings.settings" Description="Se realizó correctamente la copia de seguridad del archivo C:\Users\val\Desktop\ServerExplorer\Backup\ServerExplorer\Properties\Settings.settings">
</Event><Event ErrorLevel="0" Project="ServerExplorer" Source="ServerExplorer\frmBaseDatos.resx" Description="Se realizó correctamente la copia de seguridad del archivo C:\Users\val\Desktop\ServerExplorer\Backup\ServerExplorer\frmBaseDatos.resx">
</Event><Event ErrorLevel="0" Project="ServerExplorer" Source="ServerExplorer\frmPrincipal.resx" Description="Se realizó correctamente la copia de seguridad del archivo C:\Users\val\Desktop\ServerExplorer\Backup\ServerExplorer\frmPrincipal.resx">
</Event><Event ErrorLevel="0" Project="ServerExplorer" Source="ServerExplorer\frmServidores.resx" Description="Se realizó correctamente la copia de seguridad del archivo C:\Users\val\Desktop\ServerExplorer\Backup\ServerExplorer\frmServidores.resx">
</Event><Event ErrorLevel="0" Project="ServerExplorer" Source="ServerExplorer\Properties\Resources.resx" Description="Se realizó correctamente la copia de seguridad del archivo C:\Users\val\Desktop\ServerExplorer\Backup\ServerExplorer\Properties\Resources.resx">
</Event><Event ErrorLevel="0" Project="ServerExplorer" Source="ServerExplorer\ServerExplorer.csproj" Description="Proyecto convertido correctamente">
</Event><Event ErrorLevel="3" Project="ServerExplorer" Source="ServerExplorer\ServerExplorer.csproj" Description="Converted">
</Event><Event ErrorLevel="0" Project="" Source="ServerExplorer.sln" Description="La solución se convirtió correctamente">
</Event><Event ErrorLevel="3" Project="" Source="ServerExplorer.sln" Description="Converted">
</Event><Event ErrorLevel="0" Project="ServerExplorer" Source="ServerExplorer\ServerExplorer.csproj" Description="Examen completo: no es necesario actualizar los archivos de proyecto.">
</Event></UpgradeLog>

View File

@@ -0,0 +1,207 @@
BODY
{
BACKGROUND-COLOR: white;
FONT-FAMILY: "Verdana", sans-serif;
FONT-SIZE: 100%;
MARGIN-LEFT: 0px;
MARGIN-TOP: 0px
}
P
{
FONT-FAMILY: "Verdana", sans-serif;
FONT-SIZE: 70%;
LINE-HEIGHT: 12pt;
MARGIN-BOTTOM: 0px;
MARGIN-LEFT: 10px;
MARGIN-TOP: 10px
}
.note
{
BACKGROUND-COLOR: #ffffff;
COLOR: #336699;
FONT-FAMILY: "Verdana", sans-serif;
FONT-SIZE: 100%;
MARGIN-BOTTOM: 0px;
MARGIN-LEFT: 0px;
MARGIN-TOP: 0px;
PADDING-RIGHT: 10px
}
.infotable
{
BACKGROUND-COLOR: #f0f0e0;
BORDER-BOTTOM: #ffffff 0px solid;
BORDER-COLLAPSE: collapse;
BORDER-LEFT: #ffffff 0px solid;
BORDER-RIGHT: #ffffff 0px solid;
BORDER-TOP: #ffffff 0px solid;
FONT-SIZE: 70%;
MARGIN-LEFT: 10px
}
.issuetable
{
BACKGROUND-COLOR: #ffffe8;
BORDER-COLLAPSE: collapse;
COLOR: #000000;
FONT-SIZE: 100%;
MARGIN-BOTTOM: 10px;
MARGIN-LEFT: 13px;
MARGIN-TOP: 0px
}
.issuetitle
{
BACKGROUND-COLOR: #ffffff;
BORDER-BOTTOM: #dcdcdc 1px solid;
BORDER-TOP: #dcdcdc 1px;
COLOR: #003366;
FONT-WEIGHT: normal
}
.header
{
BACKGROUND-COLOR: #cecf9c;
BORDER-BOTTOM: #ffffff 1px solid;
BORDER-LEFT: #ffffff 1px solid;
BORDER-RIGHT: #ffffff 1px solid;
BORDER-TOP: #ffffff 1px solid;
COLOR: #000000;
FONT-WEIGHT: bold
}
.issuehdr
{
BACKGROUND-COLOR: #E0EBF5;
BORDER-BOTTOM: #dcdcdc 1px solid;
BORDER-TOP: #dcdcdc 1px solid;
COLOR: #000000;
FONT-WEIGHT: normal
}
.issuenone
{
BACKGROUND-COLOR: #ffffff;
BORDER-BOTTOM: 0px;
BORDER-LEFT: 0px;
BORDER-RIGHT: 0px;
BORDER-TOP: 0px;
COLOR: #000000;
FONT-WEIGHT: normal
}
.content
{
BACKGROUND-COLOR: #e7e7ce;
BORDER-BOTTOM: #ffffff 1px solid;
BORDER-LEFT: #ffffff 1px solid;
BORDER-RIGHT: #ffffff 1px solid;
BORDER-TOP: #ffffff 1px solid;
PADDING-LEFT: 3px
}
.issuecontent
{
BACKGROUND-COLOR: #ffffff;
BORDER-BOTTOM: #dcdcdc 1px solid;
BORDER-TOP: #dcdcdc 1px solid;
PADDING-LEFT: 3px
}
A:link
{
COLOR: #cc6633;
TEXT-DECORATION: underline
}
A:visited
{
COLOR: #cc6633;
}
A:active
{
COLOR: #cc6633;
}
A:hover
{
COLOR: #cc3300;
TEXT-DECORATION: underline
}
H1
{
BACKGROUND-COLOR: #003366;
BORDER-BOTTOM: #336699 6px solid;
COLOR: #ffffff;
FONT-SIZE: 130%;
FONT-WEIGHT: normal;
MARGIN: 0em 0em 0em -20px;
PADDING-BOTTOM: 8px;
PADDING-LEFT: 30px;
PADDING-TOP: 16px
}
H2
{
COLOR: #000000;
FONT-SIZE: 80%;
FONT-WEIGHT: bold;
MARGIN-BOTTOM: 3px;
MARGIN-LEFT: 10px;
MARGIN-TOP: 20px;
PADDING-LEFT: 0px
}
H3
{
COLOR: #000000;
FONT-SIZE: 80%;
FONT-WEIGHT: bold;
MARGIN-BOTTOM: -5px;
MARGIN-LEFT: 10px;
MARGIN-TOP: 20px
}
H4
{
COLOR: #000000;
FONT-SIZE: 70%;
FONT-WEIGHT: bold;
MARGIN-BOTTOM: 0px;
MARGIN-TOP: 15px;
PADDING-BOTTOM: 0px
}
UL
{
COLOR: #000000;
FONT-SIZE: 70%;
LIST-STYLE: square;
MARGIN-BOTTOM: 0pt;
MARGIN-TOP: 0pt
}
OL
{
COLOR: #000000;
FONT-SIZE: 70%;
LIST-STYLE: square;
MARGIN-BOTTOM: 0pt;
MARGIN-TOP: 0pt
}
LI
{
LIST-STYLE: square;
MARGIN-LEFT: 0px
}
.expandable
{
CURSOR: hand
}
.expanded
{
color: black
}
.collapsed
{
DISPLAY: none
}
.foot
{
BACKGROUND-COLOR: #ffffff;
BORDER-BOTTOM: #cecf9c 1px solid;
BORDER-TOP: #cecf9c 2px solid
}
.settings
{
MARGIN-LEFT: 25PX;
}
.help
{
TEXT-ALIGN: right;
margin-right: 10px;
}

View File

@@ -0,0 +1,232 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
<xsl:key name="ProjectKey" match="Event" use="@Project"/>
<xsl:template match="Events" mode="createProjects">
<projects>
<xsl:for-each select="Event">
<!--xsl:sort select="@Project" order="descending"/-->
<xsl:if test="(1=position()) or (preceding-sibling::*[1]/@Project != @Project)">
<xsl:variable name="ProjectName" select="@Project"/>
<project>
<xsl:attribute name="name">
<xsl:value-of select="@Project"/>
</xsl:attribute>
<xsl:if test="@Project=''">
<xsl:attribute name="solution">
<xsl:value-of select="@Solution"/>
</xsl:attribute>
</xsl:if>
<xsl:for-each select="key('ProjectKey', $ProjectName)">
<!--xsl:sort select="@Source" /-->
<xsl:if test="(1=position()) or (preceding-sibling::*[1]/@Source != @Source)">
<source>
<xsl:attribute name="name">
<xsl:value-of select="@Source"/>
</xsl:attribute>
<xsl:variable name="Source">
<xsl:value-of select="@Source"/>
</xsl:variable>
<xsl:for-each select="key('ProjectKey', $ProjectName)[ @Source = $Source ]">
<event>
<xsl:attribute name="error-level">
<xsl:value-of select="@ErrorLevel"/>
</xsl:attribute>
<xsl:attribute name="description">
<xsl:value-of select="@Description"/>
</xsl:attribute>
</event>
</xsl:for-each>
</source>
</xsl:if>
</xsl:for-each>
</project>
</xsl:if>
</xsl:for-each>
</projects>
</xsl:template>
<xsl:template match="projects">
<xsl:for-each select="project">
<xsl:sort select="@Name" order="ascending"/>
<h2>
<xsl:if test="@solution"><a _locID="Solution">Solución</a>: <xsl:value-of select="@solution"/></xsl:if>
<xsl:if test="not(@solution)"><a _locID="Project">Proyecto</a>: <xsl:value-of select="@name"/>
<xsl:for-each select="source">
<xsl:variable name="Hyperlink" select="@name"/>
<xsl:for-each select="event[@error-level='4']">
<A class="note"><xsl:attribute name="HREF"><xsl:value-of select="$Hyperlink"/></xsl:attribute><xsl:value-of select="@description"/></A>
</xsl:for-each>
</xsl:for-each>
</xsl:if>
</h2>
<table cellpadding="2" cellspacing="0" width="98%" border="1" bordercolor="white" class="infotable">
<tr>
<td nowrap="1" class="header" _locID="Filename">Nombre de archivo</td>
<td nowrap="1" class="header" _locID="Status">Estado</td>
<td nowrap="1" class="header" _locID="Errors">Errores</td>
<td nowrap="1" class="header" _locID="Warnings">Advertencias</td>
</tr>
<xsl:for-each select="source">
<xsl:sort select="@name" order="ascending"/>
<xsl:variable name="source-id" select="generate-id(.)"/>
<xsl:if test="count(event)!=count(event[@error-level='4'])">
<tr class="row">
<td class="content">
<A HREF="javascript:"><xsl:attribute name="onClick">javascript:document.images['<xsl:value-of select="$source-id"/>'].click()</xsl:attribute><IMG border="0" _locID="IMG.alt" _locAttrData="alt" alt="expandir o contraer sección" class="expandable" height="11" onclick="changepic()" src="_UpgradeReport_Files/UpgradeReport_Plus.gif" width="9"><xsl:attribute name="name"><xsl:value-of select="$source-id"/></xsl:attribute><xsl:attribute name="child">src<xsl:value-of select="$source-id"/></xsl:attribute></IMG></A> <xsl:value-of select="@name"/>
</td>
<td class="content">
<xsl:if test="count(event[@error-level='3'])=1">
<xsl:for-each select="event[@error-level='3']">
<xsl:if test="@description='Converted'"><a _locID="Converted1">Convertido</a></xsl:if>
<xsl:if test="@description!='Converted'"><xsl:value-of select="@description"/></xsl:if>
</xsl:for-each>
</xsl:if>
<xsl:if test="count(event[@error-level='3'])!=1 and count(event[@error-level='3' and @description='Converted'])!=0"><a _locID="Converted2">Convertido</a>
</xsl:if>
</td>
<td class="content"><xsl:value-of select="count(event[@error-level='2'])"/></td>
<td class="content"><xsl:value-of select="count(event[@error-level='1'])"/></td>
</tr>
<tr class="collapsed" bgcolor="#ffffff">
<xsl:attribute name="id">src<xsl:value-of select="$source-id"/></xsl:attribute>
<td colspan="7">
<table width="97%" border="1" bordercolor="#dcdcdc" rules="cols" class="issuetable">
<tr>
<td colspan="7" class="issuetitle" _locID="ConversionIssues">Informe de conversión - <xsl:value-of select="@name"/>:</td>
</tr>
<xsl:for-each select="event[@error-level!='3']">
<xsl:if test="@error-level!='4'">
<tr>
<td class="issuenone" style="border-bottom:solid 1 lightgray">
<xsl:value-of select="@description"/>
</td>
</tr>
</xsl:if>
</xsl:for-each>
</table>
</td>
</tr>
</xsl:if>
</xsl:for-each>
<tr valign="top">
<td class="foot">
<xsl:if test="count(source)!=1">
<xsl:value-of select="count(source)"/><a _locID="file1"> archivos</a>
</xsl:if>
<xsl:if test="count(source)=1">
<a _locID="file2">1 archivo</a>
</xsl:if>
</td>
<td class="foot">
<a _locID="Converted3">Convertido</a>: <xsl:value-of select="count(source/event[@error-level='3' and @description='Converted'])"/><BR/>
<a _locID="NotConverted">No convertido</a>: <xsl:value-of select="count(source) - count(source/event[@error-level='3' and @description='Converted'])"/>
</td>
<td class="foot"><xsl:value-of select="count(source/event[@error-level='2'])"/></td>
<td class="foot"><xsl:value-of select="count(source/event[@error-level='1'])"/></td>
</tr>
</table>
</xsl:for-each>
</xsl:template>
<xsl:template match="Property">
<xsl:if test="@Name!='Date' and @Name!='Time' and @Name!='LogNumber' and @Name!='Solution'">
<tr><td nowrap="1"><b><xsl:value-of select="@Name"/>: </b><xsl:value-of select="@Value"/></td></tr>
</xsl:if>
</xsl:template>
<xsl:template match="UpgradeLog">
<html>
<head>
<META HTTP-EQUIV="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" href="_UpgradeReport_Files\UpgradeReport.css"/>
<title _locID="ConversionReport0">Informe de conversión
<xsl:if test="Properties/Property[@Name='LogNumber']">
<xsl:value-of select="Properties/Property[@Name='LogNumber']/@Value"/>
</xsl:if>
</title>
<script language="javascript">
function outliner () {
oMe = window.event.srcElement
//get child element
var child = document.all[event.srcElement.getAttribute("child",false)];
//if child element exists, expand or collapse it.
if (null != child)
child.className = child.className == "collapsed" ? "expanded" : "collapsed";
}
function changepic() {
uMe = window.event.srcElement;
var check = uMe.src.toLowerCase();
if (check.lastIndexOf("upgradereport_plus.gif") != -1)
{
uMe.src = "_UpgradeReport_Files/UpgradeReport_Minus.gif"
}
else
{
uMe.src = "_UpgradeReport_Files/UpgradeReport_Plus.gif"
}
}
</script>
</head>
<body topmargin="0" leftmargin="0" rightmargin="0" onclick="outliner();">
<h1 _locID="ConversionReport">Informe de conversión - <xsl:value-of select="Properties/Property[@Name='Solution']/@Value"/></h1>
<p><span class="note">
<b _locID="TimeOfConversion">Tiempo de conversión:</b> <xsl:value-of select="Properties/Property[@Name='Date']/@Value"/> <xsl:value-of select="Properties/Property[@Name='Time']/@Value"/><br/>
</span></p>
<xsl:variable name="SortedEvents">
<Events>
<xsl:for-each select="Event">
<xsl:sort select="@Project" order="ascending"/>
<xsl:sort select="@Source" order="ascending"/>
<xsl:sort select="@ErrorLevel" order="ascending"/>
<Event>
<xsl:attribute name="Project"><xsl:value-of select="@Project"/> </xsl:attribute>
<xsl:attribute name="Solution"><xsl:value-of select="/UpgradeLog/Properties/Property[@Name='Solution']/@Value"/> </xsl:attribute>
<xsl:attribute name="Source"><xsl:value-of select="@Source"/> </xsl:attribute>
<xsl:attribute name="ErrorLevel"><xsl:value-of select="@ErrorLevel"/> </xsl:attribute>
<xsl:attribute name="Description"><xsl:value-of select="@Description"/> </xsl:attribute>
</Event>
</xsl:for-each>
</Events>
</xsl:variable>
<xsl:variable name="Projects">
<xsl:apply-templates select="msxsl:node-set($SortedEvents)/*" mode="createProjects"/>
</xsl:variable>
<xsl:apply-templates select="msxsl:node-set($Projects)/*"/>
<p></p><p>
<table class="note">
<tr>
<td nowrap="1">
<b _locID="ConversionSettings">Configuración de conversión</b>
</td>
</tr>
<xsl:apply-templates select="Properties"/>
</table></p>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 B