Rename forms.

This commit is contained in:
2020-06-18 01:22:56 +02:00
parent ce64158a3e
commit 233a1e5fbb
17 changed files with 114 additions and 90 deletions

View File

@@ -14,7 +14,7 @@ namespace VAR.DatabaseExplorer
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new FrmPrincipal());
Application.Run(new FrmMain());
}
}
}

View File

@@ -1,6 +1,6 @@
namespace VAR.DatabaseExplorer.UI
{
partial class FrmDatos
partial class FrmData
{
/// <summary>
/// Required designer variable.

View File

@@ -6,7 +6,7 @@ using System.Windows.Forms;
namespace VAR.DatabaseExplorer.UI
{
public partial class FrmDatos : Form
public partial class FrmData : Form
{
#region Declarations
@@ -18,7 +18,7 @@ namespace VAR.DatabaseExplorer.UI
#region Form life cycle
public FrmDatos(string conexionString, string tableSchema, string tableName)
public FrmData(string conexionString, string tableSchema, string tableName)
{
InitializeComponent();
_conexionString = conexionString;

View File

@@ -1,6 +1,6 @@
namespace VAR.DatabaseExplorer.UI
{
partial class FrmBaseDatos
partial class FrmDatabase
{
/// <summary>
/// Required designer variable.

View File

@@ -9,7 +9,7 @@ using VAR.DatabaseExplorer.Code.DataTransfer;
namespace VAR.DatabaseExplorer.UI
{
public partial class FrmBaseDatos : Form
public partial class FrmDatabase : Form
{
private string _connectionString;
@@ -30,7 +30,7 @@ namespace VAR.DatabaseExplorer.UI
lsvColumnas.Items.Clear();
}
public FrmBaseDatos(string connectionString)
public FrmDatabase(string connectionString)
{
InitializeComponent();
_connectionString = connectionString;
@@ -41,6 +41,7 @@ namespace VAR.DatabaseExplorer.UI
{
Initialize();
Database database = DatabaseBL.Database_Get(_connectionString);
Text = database.Name;
lblTituloDB.Text = database.Name;
lblTituloTabla.Text = "";
}
@@ -76,20 +77,20 @@ namespace VAR.DatabaseExplorer.UI
{
if (string.IsNullOrEmpty(_tableSchema) || string.IsNullOrEmpty(_tableName)) { return; }
var form = new FrmDatos(_connectionString, _tableSchema, _tableName);
FrmPrincipal.AddForm(form);
var form = new FrmData(_connectionString, _tableSchema, _tableName);
FrmMain.AddForm(form);
}
private void btnProcs_Click(object sender, EventArgs e)
{
var form = new FrmProcedimientos(_connectionString);
FrmPrincipal.AddForm(form);
var form = new FrmRoutines(_connectionString);
FrmMain.AddForm(form);
}
private void btnExec_Click(object sender, EventArgs e)
{
var form = new FrmExec(_connectionString);
FrmPrincipal.AddForm(form);
FrmMain.AddForm(form);
}
private void btnDocGen_Click(object sender, EventArgs e)

View File

@@ -1,6 +1,6 @@
namespace VAR.DatabaseExplorer.UI
{
partial class FrmPrincipal
partial class FrmMain
{
/// <summary>
/// Required designer variable.
@@ -30,8 +30,9 @@
{
this.menuPrincipal = new System.Windows.Forms.MenuStrip();
this.menuServidor = new System.Windows.Forms.ToolStripMenuItem();
this.menuBuscarServidor = new System.Windows.Forms.ToolStripMenuItem();
this.menuSQLServerSearch = new System.Windows.Forms.ToolStripMenuItem();
this.flowpnlWindows = new System.Windows.Forms.FlowLayoutPanel();
this.menuConectionString = new System.Windows.Forms.ToolStripMenuItem();
this.menuPrincipal.SuspendLayout();
this.SuspendLayout();
//
@@ -48,17 +49,18 @@
// menuServidor
//
this.menuServidor.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuBuscarServidor});
this.menuSQLServerSearch,
this.menuConectionString});
this.menuServidor.Name = "menuServidor";
this.menuServidor.Size = new System.Drawing.Size(62, 20);
this.menuServidor.Text = "Servidor";
//
// menuBuscarServidor
// menuSQLServerSearch
//
this.menuBuscarServidor.Name = "menuBuscarServidor";
this.menuBuscarServidor.Size = new System.Drawing.Size(155, 22);
this.menuBuscarServidor.Text = "Buscar Servidor";
this.menuBuscarServidor.Click += new System.EventHandler(this.menuBuscarServidor_Click);
this.menuSQLServerSearch.Name = "menuSQLServerSearch";
this.menuSQLServerSearch.Size = new System.Drawing.Size(180, 22);
this.menuSQLServerSearch.Text = "SQL Server Search";
this.menuSQLServerSearch.Click += new System.EventHandler(this.menuSQLServerSearch_Click);
//
// flowpnlWindows
//
@@ -70,7 +72,14 @@
this.flowpnlWindows.Size = new System.Drawing.Size(800, 0);
this.flowpnlWindows.TabIndex = 6;
//
// FrmPrincipal
// menuConectionString
//
this.menuConectionString.Name = "menuConectionString";
this.menuConectionString.Size = new System.Drawing.Size(180, 22);
this.menuConectionString.Text = "Conection String";
this.menuConectionString.Click += new System.EventHandler(this.menuConectionString_Click);
//
// FrmMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
@@ -79,7 +88,7 @@
this.Controls.Add(this.menuPrincipal);
this.IsMdiContainer = true;
this.MainMenuStrip = this.menuPrincipal;
this.Name = "FrmPrincipal";
this.Name = "FrmMain";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Explorador de Servidores";
this.MdiChildActivate += new System.EventHandler(this.FrmPrincipal_MdiChildActivate);
@@ -94,7 +103,8 @@
private System.Windows.Forms.MenuStrip menuPrincipal;
private System.Windows.Forms.ToolStripMenuItem menuServidor;
private System.Windows.Forms.ToolStripMenuItem menuBuscarServidor;
private System.Windows.Forms.ToolStripMenuItem menuSQLServerSearch;
private System.Windows.Forms.FlowLayoutPanel flowpnlWindows;
private System.Windows.Forms.ToolStripMenuItem menuConectionString;
}
}

View File

@@ -5,17 +5,17 @@ using VAR.DatabaseExplorer.Controls;
namespace VAR.DatabaseExplorer.UI
{
public partial class FrmPrincipal : Form
public partial class FrmMain : Form
{
#region Declarations
private static FrmPrincipal _currentInstance;
private static FrmMain _currentInstance;
#endregion Declarations
#region Creator
public FrmPrincipal()
public FrmMain()
{
_currentInstance = this;
InitializeComponent();
@@ -81,12 +81,18 @@ namespace VAR.DatabaseExplorer.UI
#region Menus
private void menuBuscarServidor_Click(object sender, EventArgs e)
private void menuSQLServerSearch_Click(object sender, EventArgs e)
{
var frm = new FrmServidores();
FrmPrincipal.AddForm(frm);
var frm = new FrmSQLServerSearch();
FrmMain.AddForm(frm);
}
private void menuConectionString_Click(object sender, EventArgs e)
{
}
#endregion Menus
}
}

View File

@@ -112,15 +112,15 @@
<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>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.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>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="menuPrincipal.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=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>14, 6</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>32</value>
</metadata>
</root>

View File

@@ -1,6 +1,6 @@
namespace VAR.DatabaseExplorer.UI
{
partial class FrmProcedimientos
partial class FrmRoutines
{
/// <summary>
/// Required designer variable.

View File

@@ -7,7 +7,7 @@ using VAR.DatabaseExplorer.Code.DataTransfer;
namespace VAR.DatabaseExplorer.UI
{
public partial class FrmProcedimientos : Form
public partial class FrmRoutines : Form
{
#region Declarations
@@ -19,7 +19,7 @@ namespace VAR.DatabaseExplorer.UI
#region Form life cycle
public FrmProcedimientos(string cnxString)
public FrmRoutines(string cnxString)
{
InitializeComponent();

View File

@@ -1,6 +1,6 @@
namespace VAR.DatabaseExplorer.UI
{
partial class FrmServidores
partial class FrmSQLServerSearch
{
/// <summary>
/// Required designer variable.
@@ -44,6 +44,7 @@
this.colDBName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.colFechaCreacion = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
@@ -60,6 +61,7 @@
this.colInstancia,
this.colVersion});
this.lsvServidores.FullRowSelect = true;
this.lsvServidores.HideSelection = false;
this.lsvServidores.Location = new System.Drawing.Point(3, 32);
this.lsvServidores.Name = "lsvServidores";
this.lsvServidores.Size = new System.Drawing.Size(306, 386);
@@ -112,6 +114,7 @@
this.txtServidor.Name = "txtServidor";
this.txtServidor.Size = new System.Drawing.Size(218, 20);
this.txtServidor.TabIndex = 4;
this.txtServidor.TabWidth = 8;
//
// lblUsuario
//
@@ -139,6 +142,7 @@
this.txtUsuario.Name = "txtUsuario";
this.txtUsuario.Size = new System.Drawing.Size(218, 20);
this.txtUsuario.TabIndex = 7;
this.txtUsuario.TabWidth = 8;
//
// TxtContrasenha
//
@@ -148,6 +152,7 @@
this.TxtContrasenha.Name = "TxtContrasenha";
this.TxtContrasenha.Size = new System.Drawing.Size(218, 20);
this.TxtContrasenha.TabIndex = 8;
this.TxtContrasenha.TabWidth = 8;
this.TxtContrasenha.UseSystemPasswordChar = true;
//
// btnListarBBDD
@@ -172,6 +177,7 @@
this.colDBName,
this.colFechaCreacion});
this.lsvBBDD.FullRowSelect = true;
this.lsvBBDD.HideSelection = false;
this.lsvBBDD.Location = new System.Drawing.Point(6, 113);
this.lsvBBDD.Name = "lsvBBDD";
this.lsvBBDD.Size = new System.Drawing.Size(282, 305);
@@ -217,17 +223,18 @@
this.splitContainer1.SplitterDistance = 312;
this.splitContainer1.TabIndex = 12;
//
// FrmServidores
// FrmSQLServerSearch
//
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.splitContainer1);
this.Name = "FrmServidores";
this.Text = "Servidores";
this.Name = "FrmSQLServerSearch";
this.Text = "SQL Server Search";
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.ResumeLayout(false);

View File

@@ -7,9 +7,9 @@ using VAR.DatabaseExplorer.Code.DataTransfer;
namespace VAR.DatabaseExplorer.UI
{
public partial class FrmServidores : Form
public partial class FrmSQLServerSearch : Form
{
public FrmServidores()
public FrmSQLServerSearch()
{
InitializeComponent();
}
@@ -58,8 +58,8 @@ namespace VAR.DatabaseExplorer.UI
string databaseName = lsvBBDD.SelectedItems[0].SubItems[0].Text;
// Llamar a la venta de la base de datos
string connectionStirng = BuildConnectionString(txtServidor.Text, databaseName, txtUsuario.Text, TxtContrasenha.Text);
var frm = new FrmBaseDatos(connectionStirng);
FrmPrincipal.AddForm(frm);
var frm = new FrmDatabase(connectionStirng);
FrmMain.AddForm(frm);
}
private string BuildConnectionString(string server, string database, string user, string password)

View File

@@ -112,9 +112,9 @@
<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>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.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>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -110,17 +110,17 @@
<Compile Include="Controls\WindowButton.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="UI\FrmBaseDatos.cs">
<Compile Include="UI\FrmDatabase.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="UI\FrmBaseDatos.Designer.cs">
<DependentUpon>FrmBaseDatos.cs</DependentUpon>
<Compile Include="UI\FrmDatabase.Designer.cs">
<DependentUpon>FrmDatabase.cs</DependentUpon>
</Compile>
<Compile Include="UI\FrmDatos.cs">
<Compile Include="UI\FrmData.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="UI\FrmDatos.Designer.cs">
<DependentUpon>FrmDatos.cs</DependentUpon>
<Compile Include="UI\FrmData.Designer.cs">
<DependentUpon>FrmData.cs</DependentUpon>
</Compile>
<Compile Include="UI\FrmExec.cs">
<SubType>Form</SubType>
@@ -128,44 +128,44 @@
<Compile Include="UI\FrmExec.Designer.cs">
<DependentUpon>FrmExec.cs</DependentUpon>
</Compile>
<Compile Include="UI\FrmPrincipal.cs">
<Compile Include="UI\FrmMain.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="UI\FrmPrincipal.Designer.cs">
<DependentUpon>FrmPrincipal.cs</DependentUpon>
<Compile Include="UI\FrmMain.Designer.cs">
<DependentUpon>FrmMain.cs</DependentUpon>
</Compile>
<Compile Include="UI\FrmProcedimientos.cs">
<Compile Include="UI\FrmRoutines.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="UI\FrmProcedimientos.Designer.cs">
<DependentUpon>FrmProcedimientos.cs</DependentUpon>
<Compile Include="UI\FrmRoutines.Designer.cs">
<DependentUpon>FrmRoutines.cs</DependentUpon>
</Compile>
<Compile Include="UI\FrmServidores.cs">
<Compile Include="UI\FrmSQLServerSearch.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="UI\FrmServidores.Designer.cs">
<DependentUpon>FrmServidores.cs</DependentUpon>
<Compile Include="UI\FrmSQLServerSearch.Designer.cs">
<DependentUpon>FrmSQLServerSearch.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Code\DataTableHelper.cs" />
<EmbeddedResource Include="UI\FrmBaseDatos.resx">
<DependentUpon>FrmBaseDatos.cs</DependentUpon>
<EmbeddedResource Include="UI\FrmDatabase.resx">
<DependentUpon>FrmDatabase.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UI\FrmDatos.resx">
<DependentUpon>FrmDatos.cs</DependentUpon>
<EmbeddedResource Include="UI\FrmData.resx">
<DependentUpon>FrmData.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UI\FrmExec.resx">
<DependentUpon>FrmExec.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UI\FrmPrincipal.resx">
<DependentUpon>FrmPrincipal.cs</DependentUpon>
<EmbeddedResource Include="UI\FrmMain.resx">
<DependentUpon>FrmMain.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UI\FrmProcedimientos.resx">
<DependentUpon>FrmProcedimientos.cs</DependentUpon>
<EmbeddedResource Include="UI\FrmRoutines.resx">
<DependentUpon>FrmRoutines.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UI\FrmServidores.resx">
<DependentUpon>FrmServidores.cs</DependentUpon>
<EmbeddedResource Include="UI\FrmSQLServerSearch.resx">
<DependentUpon>FrmSQLServerSearch.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>