diff --git a/ServerExplorer/ServerExplorer.suo b/ServerExplorer/ServerExplorer.suo index 8a6ab47..4453764 100644 Binary files a/ServerExplorer/ServerExplorer.suo and b/ServerExplorer/ServerExplorer.suo differ diff --git a/ServerExplorer/ServerExplorer/CodeGen.cs b/ServerExplorer/ServerExplorer/CodeGen.cs new file mode 100644 index 0000000..b2c7878 --- /dev/null +++ b/ServerExplorer/ServerExplorer/CodeGen.cs @@ -0,0 +1,120 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.IO; + +namespace ServerExplorer +{ + public class CodeGen + { + public static Boolean GenerarCodigo(CodeGenConfig config,DatabaseDesc database) + { + // Asegura la existencia de los directorios destinos + if (!System.IO.Directory.Exists(config.PathDTO)) { Utiles.CrearDirectorio(config.PathDTO); } + if (!System.IO.Directory.Exists(config.PathDAL)) { Utiles.CrearDirectorio(config.PathDAL); } + if (!System.IO.Directory.Exists(config.PathExtra)) { Utiles.CrearDirectorio(config.PathExtra); } + + // Itera por cada tabla para crear sus DTOs + foreach (TablaDesc t in database.Tablas) + { + string nombreObj = t.Esquema + t.Nombre; + string nombreFichero = config.PathDTO + "/" + nombreObj + "_DTO.cs"; + EscritorCodigo escritor = new EscritorCodigo(nombreFichero); + + // Cabecera. + escritor.Escribe("using System;"); + escritor.Escribe("using System.Data;"); + escritor.Escribe(""); + escritor.EscribeInd("namespace namespace"); + + // El objeto de la tabla. + escritor.EscribeInd("public partial class " + nombreObj); + foreach(ColumnaDesc c in t.Columnas){ + // El atributo privado para cada columna. + escritor.Escribe("private Object " + "_" + c.Nombre + ";"); + + // La propiedad publica para cada columna. + escritor.EscribeInd("public Object " + c.Nombre ); + escritor.EscribeInd("get"); + escritor.Escribe("return _" + c.Nombre + ";"); + escritor.DeInd(); + escritor.EscribeInd("set"); + escritor.Escribe("_" + c.Nombre + " = value;"); + escritor.DeInd(); + escritor.DeInd(); + escritor.Escribe(""); + } + escritor.DeInd(); + + // El Pie + escritor.DeInd(); + + // Cerrar ficheros. + escritor.Cerrar(); + } + + return true; + } + + private class Indentado + { + private int indentado = 0; + private StringBuilder sb = new StringBuilder(); + + public void Inc() + { + indentado++; + } + public void Dec() + { + indentado--; + if (indentado < 0) + { + indentado = 0; + } + } + public string Str() + { + sb.Remove(0, sb.Length); + for (int i=0; i < indentado; i++) + { + sb.Append("\t"); + } + return sb.ToString(); + } + } + + private class EscritorCodigo + { + StreamWriter escritor; + Indentado indentado; + + public EscritorCodigo(string nombreFichero) + { + escritor = new StreamWriter(nombreFichero); + indentado = new Indentado(); + } + public void Cerrar() + { + escritor.Close(); + } + + public void Escribe(String str) + { + escritor.WriteLine(indentado.Str() + str); + } + public void EscribeInd(String str) + { + escritor.WriteLine(indentado.Str() + str); + escritor.WriteLine(indentado.Str() + "{"); + indentado.Inc(); + } + public void DeInd() + { + indentado.Dec(); + escritor.WriteLine(indentado.Str() + "}"); + } + } + } +} diff --git a/ServerExplorer/ServerExplorer/CodeGenConfig.cs b/ServerExplorer/ServerExplorer/CodeGenConfig.cs index cde384b..619383b 100644 --- a/ServerExplorer/ServerExplorer/CodeGenConfig.cs +++ b/ServerExplorer/ServerExplorer/CodeGenConfig.cs @@ -8,25 +8,24 @@ namespace ServerExplorer public class CodeGenConfig { public String ConString = ""; - public String PathRaiz=""; - public String PathDAL=""; - public String PathDTO=""; - public String PathExtra=""; + public String PathRaiz="."; + public String PathDAL="."; + public String PathDTO="."; + public String PathExtra="."; public List Tablas = new List(); public CodeGenConfig() { } - public void Guardar(String fichero){ - Type[] tipos={typeof(CodeGenTablaInfo)}; - XmlSerializer seriador = new XmlSerializer(typeof(CodeGenConfig), tipos); + 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) { - Type[] tipos = { typeof(CodeGenTablaInfo) }; - XmlSerializer seriador = new XmlSerializer(typeof(CodeGenConfig), tipos); + XmlSerializer seriador = new XmlSerializer(typeof(CodeGenConfig)); StreamReader lector = new StreamReader(fichero); CodeGenConfig config = (CodeGenConfig)seriador.Deserialize(lector); return config; @@ -46,4 +45,5 @@ namespace ServerExplorer Nombre = nombre; } } + } diff --git a/ServerExplorer/ServerExplorer/DatabaseDesc.cs b/ServerExplorer/ServerExplorer/DatabaseDesc.cs new file mode 100644 index 0000000..4dfe7c5 --- /dev/null +++ b/ServerExplorer/ServerExplorer/DatabaseDesc.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace ServerExplorer +{ + public class DatabaseDesc + { + public string Nombre = ""; + public List Tablas = new List(); + + public DatabaseDesc() { } + + public DatabaseDesc(string nombre) + { + Nombre = nombre; + } + + } +} diff --git a/ServerExplorer/ServerExplorer/ServerExplorer.csproj b/ServerExplorer/ServerExplorer/ServerExplorer.csproj index 7c2f653..4bb5b58 100644 --- a/ServerExplorer/ServerExplorer/ServerExplorer.csproj +++ b/ServerExplorer/ServerExplorer/ServerExplorer.csproj @@ -68,7 +68,9 @@ + + Form @@ -81,6 +83,12 @@ frmCodeGenConfig.cs + + Form + + + frmDatos.cs + Form @@ -96,12 +104,16 @@ + frmBaseDatos.cs frmCodeGenConfig.cs + + frmDatos.cs + frmPrincipal.cs diff --git a/ServerExplorer/ServerExplorer/Utiles.cs b/ServerExplorer/ServerExplorer/Utiles.cs new file mode 100644 index 0000000..9bb27ef --- /dev/null +++ b/ServerExplorer/ServerExplorer/Utiles.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.IO; + +namespace ServerExplorer +{ + public static class Utiles + { + public static void CrearDirectorio(this String path) + { + DirectoryInfo info=null; + try + { + info = new DirectoryInfo(path); + } + catch (Exception ex) + { + info = new DirectoryInfo("."); + } + CrearDirectorio(info); + } + public static void CrearDirectorio(this DirectoryInfo info) + { + if (info.Parent != null) CrearDirectorio(info.Parent); + if (!info.Exists) info.Create(); + } + } +} diff --git a/ServerExplorer/ServerExplorer/bin/Debug/ServerExplorer.exe b/ServerExplorer/ServerExplorer/bin/Debug/ServerExplorer.exe index 8a62428..bc8d12d 100644 Binary files a/ServerExplorer/ServerExplorer/bin/Debug/ServerExplorer.exe and b/ServerExplorer/ServerExplorer/bin/Debug/ServerExplorer.exe differ diff --git a/ServerExplorer/ServerExplorer/bin/Debug/ServerExplorer.pdb b/ServerExplorer/ServerExplorer/bin/Debug/ServerExplorer.pdb index 89384ae..469aba8 100644 Binary files a/ServerExplorer/ServerExplorer/bin/Debug/ServerExplorer.pdb and b/ServerExplorer/ServerExplorer/bin/Debug/ServerExplorer.pdb differ diff --git a/ServerExplorer/ServerExplorer/frmBaseDatos.Designer.cs b/ServerExplorer/ServerExplorer/frmBaseDatos.Designer.cs index 4a95404..7a2d8f4 100644 --- a/ServerExplorer/ServerExplorer/frmBaseDatos.Designer.cs +++ b/ServerExplorer/ServerExplorer/frmBaseDatos.Designer.cs @@ -46,23 +46,26 @@ this.menuGuardar = new System.Windows.Forms.ToolStripMenuItem(); this.menuConfiguracion = new System.Windows.Forms.ToolStripMenuItem(); this.btnGenerar = new System.Windows.Forms.Button(); + this.btnVerDatos = new System.Windows.Forms.Button(); + this.lblTituloTabla = new System.Windows.Forms.Label(); + this.lblTituloDB = new System.Windows.Forms.Label(); this.menuBaseDatos.SuspendLayout(); 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, 33); + 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(120, 6); this.txtConString.Name = "txtConString"; this.txtConString.ReadOnly = true; - this.txtConString.Size = new System.Drawing.Size(507, 20); + this.txtConString.Size = new System.Drawing.Size(510, 20); this.txtConString.TabIndex = 0; // // lblConString // this.lblConString.AutoSize = true; - this.lblConString.Location = new System.Drawing.Point(12, 36); + this.lblConString.Location = new System.Drawing.Point(9, 9); this.lblConString.Name = "lblConString"; this.lblConString.Size = new System.Drawing.Size(105, 13); this.lblConString.TabIndex = 1; @@ -71,7 +74,7 @@ // 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(636, 31); + this.btnCopiarConString.Location = new System.Drawing.Point(636, 4); this.btnCopiarConString.Name = "btnCopiarConString"; this.btnCopiarConString.Size = new System.Drawing.Size(52, 23); this.btnCopiarConString.TabIndex = 3; @@ -81,17 +84,17 @@ // // 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.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); this.lsvTablas.CheckBoxes = true; this.lsvTablas.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.colNombreTabla, this.colEsquema, this.colTipo}); this.lsvTablas.FullRowSelect = true; - this.lsvTablas.Location = new System.Drawing.Point(12, 59); + this.lsvTablas.Location = new System.Drawing.Point(12, 70); this.lsvTablas.Name = "lsvTablas"; - this.lsvTablas.Size = new System.Drawing.Size(326, 405); + this.lsvTablas.Size = new System.Drawing.Size(326, 394); this.lsvTablas.TabIndex = 4; this.lsvTablas.UseCompatibleStateImageBehavior = false; this.lsvTablas.View = System.Windows.Forms.View.Details; @@ -113,18 +116,18 @@ // // 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.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.colClave}); this.lsvColumnas.FullRowSelect = true; - this.lsvColumnas.Location = new System.Drawing.Point(344, 59); + this.lsvColumnas.Location = new System.Drawing.Point(344, 70); this.lsvColumnas.Name = "lsvColumnas"; - this.lsvColumnas.Size = new System.Drawing.Size(344, 376); + this.lsvColumnas.Size = new System.Drawing.Size(344, 365); this.lsvColumnas.TabIndex = 6; this.lsvColumnas.UseCompatibleStateImageBehavior = false; this.lsvColumnas.View = System.Windows.Forms.View.Details; @@ -150,14 +153,17 @@ // // menuBaseDatos // + this.menuBaseDatos.Dock = System.Windows.Forms.DockStyle.None; this.menuBaseDatos.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.archivoToolStripMenuItem, this.menuConfiguracion}); - this.menuBaseDatos.Location = new System.Drawing.Point(0, 0); + this.menuBaseDatos.Location = new System.Drawing.Point(348, 467); this.menuBaseDatos.Name = "menuBaseDatos"; - this.menuBaseDatos.Size = new System.Drawing.Size(700, 24); + this.menuBaseDatos.Size = new System.Drawing.Size(148, 24); this.menuBaseDatos.TabIndex = 9; this.menuBaseDatos.Text = "menuBaseDatos"; + this.menuBaseDatos.Visible = false; + this.menuBaseDatos.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.menuBaseDatos_ItemClicked); // // archivoToolStripMenuItem // @@ -165,27 +171,27 @@ this.menuCargar, this.menuGuardar}); this.archivoToolStripMenuItem.Name = "archivoToolStripMenuItem"; - this.archivoToolStripMenuItem.Size = new System.Drawing.Size(60, 20); + this.archivoToolStripMenuItem.Size = new System.Drawing.Size(55, 20); this.archivoToolStripMenuItem.Text = "Archivo"; // // menuCargar // this.menuCargar.Name = "menuCargar"; - this.menuCargar.Size = new System.Drawing.Size(116, 22); + this.menuCargar.Size = new System.Drawing.Size(124, 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.Size = new System.Drawing.Size(124, 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.Size = new System.Drawing.Size(85, 20); this.menuConfiguracion.Text = "Configuracion"; this.menuConfiguracion.Click += new System.EventHandler(this.menuConfiguracion_Click); // @@ -200,11 +206,51 @@ this.btnGenerar.UseVisualStyleBackColor = true; this.btnGenerar.Click += new System.EventHandler(this.btnGenerar_Click); // + // btnVerDatos + // + this.btnVerDatos.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnVerDatos.Location = new System.Drawing.Point(521, 441); + this.btnVerDatos.Name = "btnVerDatos"; + this.btnVerDatos.Size = new System.Drawing.Size(75, 23); + this.btnVerDatos.TabIndex = 11; + this.btnVerDatos.Text = "Ver Datos"; + this.btnVerDatos.UseVisualStyleBackColor = true; + this.btnVerDatos.Click += new System.EventHandler(this.btnVerDatos_Click); + // + // lblTituloTabla + // + this.lblTituloTabla.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lblTituloTabla.BackColor = System.Drawing.SystemColors.ControlDarkDark; + this.lblTituloTabla.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblTituloTabla.ForeColor = System.Drawing.SystemColors.ControlLightLight; + this.lblTituloTabla.Location = new System.Drawing.Point(344, 30); + this.lblTituloTabla.Name = "lblTituloTabla"; + this.lblTituloTabla.Size = new System.Drawing.Size(344, 37); + this.lblTituloTabla.TabIndex = 12; + this.lblTituloTabla.Text = "lblTituloTabla"; + this.lblTituloTabla.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lblTituloDB + // + this.lblTituloDB.BackColor = System.Drawing.SystemColors.ControlDarkDark; + this.lblTituloDB.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblTituloDB.ForeColor = System.Drawing.SystemColors.ControlLightLight; + this.lblTituloDB.Location = new System.Drawing.Point(12, 30); + this.lblTituloDB.Name = "lblTituloDB"; + this.lblTituloDB.Size = new System.Drawing.Size(326, 37); + this.lblTituloDB.TabIndex = 13; + this.lblTituloDB.Text = "lblTituloDB"; + this.lblTituloDB.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // // frmBaseDatos // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(700, 476); + this.Controls.Add(this.lblTituloDB); + this.Controls.Add(this.lblTituloTabla); + this.Controls.Add(this.btnVerDatos); this.Controls.Add(this.btnGenerar); this.Controls.Add(this.lsvColumnas); this.Controls.Add(this.lsvTablas); @@ -243,5 +289,8 @@ private System.Windows.Forms.ToolStripMenuItem menuConfiguracion; private System.Windows.Forms.ColumnHeader colClave; private System.Windows.Forms.Button btnGenerar; + private System.Windows.Forms.Button btnVerDatos; + private System.Windows.Forms.Label lblTituloTabla; + private System.Windows.Forms.Label lblTituloDB; } } \ No newline at end of file diff --git a/ServerExplorer/ServerExplorer/frmBaseDatos.cs b/ServerExplorer/ServerExplorer/frmBaseDatos.cs index 0826613..bfe6788 100644 --- a/ServerExplorer/ServerExplorer/frmBaseDatos.cs +++ b/ServerExplorer/ServerExplorer/frmBaseDatos.cs @@ -16,6 +16,8 @@ namespace ServerExplorer { SqlConnection cnx; CodeGenConfig config; + String table_schema = null; + String table_name = null; private void inicializar() { @@ -96,7 +98,19 @@ namespace ServerExplorer j=i; } } - + + + public DatabaseDesc CrearDatabaseDesc() + { + DatabaseDesc db = new DatabaseDesc(cnx.Database); + foreach (CodeGenTablaInfo t in config.Tablas) + { + TablaDesc td = new TablaDesc(); + td.FillDesc(t.Esquema, t.Nombre, cnx); + db.Tablas.Add(td); + } + return (db); + } public frmBaseDatos(String ConString) { @@ -104,6 +118,7 @@ namespace ServerExplorer config = new CodeGenConfig(); config.ConString = ConString; + } public frmBaseDatos(CodeGenConfig config) @@ -118,6 +133,10 @@ namespace ServerExplorer private void frmBaseDatos_Load(object sender, EventArgs e) { inicializar(); + + // Establecer titulos + lblTituloDB.Text = cnx.Database; + lblTituloTabla.Text = ""; } private void btnCopiarConString_Click(object sender, EventArgs e) @@ -133,13 +152,12 @@ namespace ServerExplorer // Determinar tabla seleccionada ListViewItem item = lsvTablas.SelectedItems[0]; - /* - TablaDesc td = new TablaDesc(); - td.FillDesc(item.SubItems[1].Text,item.SubItems[0].Text,cnx); - Type[] tipos = { typeof(ColumnaDesc) }; - XmlSerializer seriador = new XmlSerializer(typeof(TablaDesc),tipos); - seriador.Serialize(System.Console.Out, td); - */ + // Recordar tabla seleccionada + table_schema=item.SubItems[1].Text.ToString(); + table_name = item.SubItems[0].Text.ToString(); + + // Establecer titulo de la lista de columnas + lblTituloTabla.Text=table_schema+"."+table_name; // Obtener descripcion de tabla TablaDesc td = new TablaDesc(); @@ -168,8 +186,6 @@ namespace ServerExplorer subitem.SubItems.Add(""); } } - //XmlSerializer seriador = new XmlSerializer(typeof(TablaDesc)); - //seriador.Serialize(System.Console.Out, td); } } @@ -201,6 +217,43 @@ namespace ServerExplorer } private void btnGenerar_Click(object sender, EventArgs e) + { + tablas_delistview(); + DatabaseDesc db = CrearDatabaseDesc(); + + //XmlSerializer seriador = new XmlSerializer(typeof(DatabaseDesc)); + //seriador.Serialize(System.Console.Out, db); + + CodeGen.GenerarCodigo(config, db); + } + + private void btnVerDatos_Click(object sender, EventArgs e) + { + String nombreTabla; + DataTable dt; + SqlDataAdapter da; + + if (table_schema == null || table_name == null) { return; } + + nombreTabla=table_schema+"."+table_name; + + // Obtener un datatable con todos los registros de la tabla. + da = new SqlDataAdapter( + "select * from "+nombreTabla, + cnx); + dt = new DataTable(); + cnx.Open(); + da.Fill(dt); + cnx.Close(); + + // Crear y mostrar el formulario de los datos. + frmDatos form = new frmDatos(dt, nombreTabla); + form.MdiParent = this.MdiParent; + form.Show(); + + } + + private void menuBaseDatos_ItemClicked(object sender, ToolStripItemClickedEventArgs e) { } diff --git a/ServerExplorer/ServerExplorer/frmDatos.Designer.cs b/ServerExplorer/ServerExplorer/frmDatos.Designer.cs new file mode 100644 index 0000000..2b9f5f5 --- /dev/null +++ b/ServerExplorer/ServerExplorer/frmDatos.Designer.cs @@ -0,0 +1,70 @@ +namespace ServerExplorer +{ + partial class frmDatos + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.dgvDatos = new System.Windows.Forms.DataGridView(); + ((System.ComponentModel.ISupportInitialize)(this.dgvDatos)).BeginInit(); + this.SuspendLayout(); + // + // dgvDatos + // + this.dgvDatos.AllowUserToAddRows = false; + this.dgvDatos.AllowUserToDeleteRows = false; + this.dgvDatos.AllowUserToOrderColumns = true; + this.dgvDatos.AllowUserToResizeRows = false; + this.dgvDatos.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.dgvDatos.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvDatos.Location = new System.Drawing.Point(12, 12); + this.dgvDatos.Name = "dgvDatos"; + this.dgvDatos.ReadOnly = true; + this.dgvDatos.RowHeadersVisible = false; + this.dgvDatos.Size = new System.Drawing.Size(326, 282); + this.dgvDatos.TabIndex = 0; + // + // frmDatos + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(350, 306); + this.Controls.Add(this.dgvDatos); + this.Name = "frmDatos"; + this.Text = "frmDatos"; + this.Load += new System.EventHandler(this.frmDatos_Load); + ((System.ComponentModel.ISupportInitialize)(this.dgvDatos)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.DataGridView dgvDatos; + } +} \ No newline at end of file diff --git a/ServerExplorer/ServerExplorer/frmDatos.cs b/ServerExplorer/ServerExplorer/frmDatos.cs new file mode 100644 index 0000000..9ee99b3 --- /dev/null +++ b/ServerExplorer/ServerExplorer/frmDatos.cs @@ -0,0 +1,27 @@ +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 frmDatos : Form + { + public frmDatos(DataTable dt,String titulo) + { + InitializeComponent(); + + this.Text = titulo; + dgvDatos.DataSource = dt; + } + + private void frmDatos_Load(object sender, EventArgs e) + { + + } + } +} diff --git a/ServerExplorer/ServerExplorer/frmDatos.resx b/ServerExplorer/ServerExplorer/frmDatos.resx new file mode 100644 index 0000000..7080a7d --- /dev/null +++ b/ServerExplorer/ServerExplorer/frmDatos.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ServerExplorer/ServerExplorer/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ServerExplorer/ServerExplorer/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index a7a358c..7610437 100644 Binary files a/ServerExplorer/ServerExplorer/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/ServerExplorer/ServerExplorer/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ServerExplorer/ServerExplorer/obj/Debug/GenerateResource-ResGen.read.1.tlog b/ServerExplorer/ServerExplorer/obj/Debug/GenerateResource-ResGen.read.1.tlog new file mode 100644 index 0000000..0d7fbc1 Binary files /dev/null and b/ServerExplorer/ServerExplorer/obj/Debug/GenerateResource-ResGen.read.1.tlog differ diff --git a/ServerExplorer/ServerExplorer/obj/Debug/GenerateResource-ResGen.write.1.tlog b/ServerExplorer/ServerExplorer/obj/Debug/GenerateResource-ResGen.write.1.tlog new file mode 100644 index 0000000..822cf12 Binary files /dev/null and b/ServerExplorer/ServerExplorer/obj/Debug/GenerateResource-ResGen.write.1.tlog differ diff --git a/ServerExplorer/ServerExplorer/obj/Debug/ResGen.read.1.tlog b/ServerExplorer/ServerExplorer/obj/Debug/ResGen.read.1.tlog index b3cb55e..46b134b 100644 Binary files a/ServerExplorer/ServerExplorer/obj/Debug/ResGen.read.1.tlog and b/ServerExplorer/ServerExplorer/obj/Debug/ResGen.read.1.tlog differ diff --git a/ServerExplorer/ServerExplorer/obj/Debug/ResGen.write.1.tlog b/ServerExplorer/ServerExplorer/obj/Debug/ResGen.write.1.tlog index ab0315d..46b134b 100644 Binary files a/ServerExplorer/ServerExplorer/obj/Debug/ResGen.write.1.tlog and b/ServerExplorer/ServerExplorer/obj/Debug/ResGen.write.1.tlog differ diff --git a/ServerExplorer/ServerExplorer/obj/Debug/ServerExplorer.csproj.FileListAbsolute.txt b/ServerExplorer/ServerExplorer/obj/Debug/ServerExplorer.csproj.FileListAbsolute.txt index 7d0118f..39f754b 100644 --- a/ServerExplorer/ServerExplorer/obj/Debug/ServerExplorer.csproj.FileListAbsolute.txt +++ b/ServerExplorer/ServerExplorer/obj/Debug/ServerExplorer.csproj.FileListAbsolute.txt @@ -2,7 +2,6 @@ D:\VAR\ServerExplorer\ServerExplorer\bin\Debug\ServerExplorer.exe D:\VAR\ServerExplorer\ServerExplorer\bin\Debug\ServerExplorer.pdb D:\VAR\ServerExplorer\ServerExplorer\obj\Debug\ResolveAssemblyReference.cache D:\VAR\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.Properties.Resources.resources -D:\VAR\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.csproj.GenerateResource.Cache D:\VAR\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.exe D:\VAR\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.pdb D:\VAR\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.frmServidores.resources @@ -32,3 +31,9 @@ C:\Users\var\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.frmS C:\Users\var\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.Properties.Resources.resources C:\Users\var\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ResGen.read.1.tlog C:\Users\var\Desktop\ServerExplorer\ServerExplorer\obj\Debug\ResGen.write.1.tlog +D:\VAR\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.frmCodeGenConfig.resources +D:\VAR\ServerExplorer\ServerExplorer\obj\Debug\GenerateResource-ResGen.read.1.tlog +D:\VAR\ServerExplorer\ServerExplorer\obj\Debug\ResGen.read.1.tlog +D:\VAR\ServerExplorer\ServerExplorer\obj\Debug\GenerateResource-ResGen.write.1.tlog +D:\VAR\ServerExplorer\ServerExplorer\obj\Debug\ResGen.write.1.tlog +D:\VAR\ServerExplorer\ServerExplorer\obj\Debug\ServerExplorer.frmDatos.resources diff --git a/ServerExplorer/ServerExplorer/obj/Debug/ServerExplorer.csproj.GenerateResource.Cache b/ServerExplorer/ServerExplorer/obj/Debug/ServerExplorer.csproj.GenerateResource.Cache deleted file mode 100644 index 911d55e..0000000 Binary files a/ServerExplorer/ServerExplorer/obj/Debug/ServerExplorer.csproj.GenerateResource.Cache and /dev/null differ diff --git a/ServerExplorer/ServerExplorer/obj/Debug/ServerExplorer.exe b/ServerExplorer/ServerExplorer/obj/Debug/ServerExplorer.exe index 8a62428..bc8d12d 100644 Binary files a/ServerExplorer/ServerExplorer/obj/Debug/ServerExplorer.exe and b/ServerExplorer/ServerExplorer/obj/Debug/ServerExplorer.exe differ diff --git a/ServerExplorer/ServerExplorer/obj/Debug/ServerExplorer.frmDatos.resources b/ServerExplorer/ServerExplorer/obj/Debug/ServerExplorer.frmDatos.resources new file mode 100644 index 0000000..06c24d0 Binary files /dev/null and b/ServerExplorer/ServerExplorer/obj/Debug/ServerExplorer.frmDatos.resources differ diff --git a/ServerExplorer/ServerExplorer/obj/Debug/ServerExplorer.pdb b/ServerExplorer/ServerExplorer/obj/Debug/ServerExplorer.pdb index 89384ae..469aba8 100644 Binary files a/ServerExplorer/ServerExplorer/obj/Debug/ServerExplorer.pdb and b/ServerExplorer/ServerExplorer/obj/Debug/ServerExplorer.pdb differ