CustomTextBox: Añadir parámetro para especificar anchura del tabulador.
This commit is contained in:
39
ServerExplorer/Controls/CustomTextBox.cs
Normal file
39
ServerExplorer/Controls/CustomTextBox.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ServerExplorer.Controls
|
||||
{
|
||||
[ComVisible(true)]
|
||||
[ClassInterface(ClassInterfaceType.AutoDispatch)]
|
||||
public class CustomTextBox : TextBox
|
||||
{
|
||||
#region SetTabWidth
|
||||
|
||||
private const int EM_SETTABSTOPS = 0x00CB;
|
||||
|
||||
[DllImport("User32.dll", CharSet = CharSet.Auto)]
|
||||
private static extern IntPtr SendMessage(IntPtr h, int msg, int wParam, int[] lParam);
|
||||
|
||||
public void SetTabWidth(int tabWidth)
|
||||
{
|
||||
SendMessage(this.Handle, EM_SETTABSTOPS, 1, new int[] { tabWidth * 4 });
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private int _tabWidth=8;
|
||||
public int TabWidth
|
||||
{
|
||||
get { return _tabWidth; }
|
||||
set
|
||||
{
|
||||
_tabWidth = value;
|
||||
SetTabWidth(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -75,6 +75,9 @@
|
||||
</Compile>
|
||||
<Compile Include="Code\DatabaseDesc.cs" />
|
||||
<Compile Include="Code\DocGen.cs" />
|
||||
<Compile Include="Controls\CustomTextBox.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UI\FrmBaseDatos.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
||||
4
ServerExplorer/UI/FrmBaseDatos.Designer.cs
generated
4
ServerExplorer/UI/FrmBaseDatos.Designer.cs
generated
@@ -28,7 +28,7 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.txtConString = new System.Windows.Forms.TextBox();
|
||||
this.txtConString = new ServerExplorer.Controls.CustomTextBox();
|
||||
this.lblConString = new System.Windows.Forms.Label();
|
||||
this.btnCopiarConString = new System.Windows.Forms.Button();
|
||||
this.menuBaseDatos = new System.Windows.Forms.MenuStrip();
|
||||
@@ -350,7 +350,7 @@
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox txtConString;
|
||||
private ServerExplorer.Controls.CustomTextBox txtConString;
|
||||
private System.Windows.Forms.Label lblConString;
|
||||
private System.Windows.Forms.Button btnCopiarConString;
|
||||
private ServerExplorer.Controls.CustomListView lsvTablas;
|
||||
|
||||
4
ServerExplorer/UI/FrmExec.Designer.cs
generated
4
ServerExplorer/UI/FrmExec.Designer.cs
generated
@@ -29,7 +29,7 @@
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.btnExec = new System.Windows.Forms.Button();
|
||||
this.txtCommand = new System.Windows.Forms.TextBox();
|
||||
this.txtCommand = new ServerExplorer.Controls.CustomTextBox();
|
||||
this.dgvDatos = new System.Windows.Forms.DataGridView();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.btnGenInserts = new System.Windows.Forms.Button();
|
||||
@@ -129,7 +129,7 @@
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button btnExec;
|
||||
private System.Windows.Forms.TextBox txtCommand;
|
||||
private ServerExplorer.Controls.CustomTextBox txtCommand;
|
||||
private System.Windows.Forms.DataGridView dgvDatos;
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private System.Windows.Forms.Button btnGenInserts;
|
||||
|
||||
5
ServerExplorer/UI/FrmProcedimientos.Designer.cs
generated
5
ServerExplorer/UI/FrmProcedimientos.Designer.cs
generated
@@ -33,7 +33,7 @@
|
||||
this.colSchema = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.colFecha = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.colTipo = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.txtProc = new System.Windows.Forms.TextBox();
|
||||
this.txtProc = new ServerExplorer.Controls.CustomTextBox();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
@@ -94,6 +94,7 @@
|
||||
this.txtProc.ScrollBars = System.Windows.Forms.ScrollBars.Both;
|
||||
this.txtProc.Size = new System.Drawing.Size(352, 475);
|
||||
this.txtProc.TabIndex = 1;
|
||||
this.txtProc.TabWidth = 4;
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
@@ -137,7 +138,7 @@
|
||||
private ServerExplorer.Controls.CustomListView lsvProcs;
|
||||
private System.Windows.Forms.ColumnHeader colNombre;
|
||||
private System.Windows.Forms.ColumnHeader colFecha;
|
||||
private System.Windows.Forms.TextBox txtProc;
|
||||
private ServerExplorer.Controls.CustomTextBox txtProc;
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private System.Windows.Forms.ColumnHeader colTipo;
|
||||
private System.Windows.Forms.ColumnHeader colSchema;
|
||||
|
||||
12
ServerExplorer/UI/FrmServidores.Designer.cs
generated
12
ServerExplorer/UI/FrmServidores.Designer.cs
generated
@@ -34,11 +34,11 @@
|
||||
this.colVersion = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.btnListarServidores = new System.Windows.Forms.Button();
|
||||
this.lblServidor = new System.Windows.Forms.Label();
|
||||
this.txtServidor = new System.Windows.Forms.TextBox();
|
||||
this.txtServidor = new ServerExplorer.Controls.CustomTextBox();
|
||||
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.txtUsuario = new ServerExplorer.Controls.CustomTextBox();
|
||||
this.TxtContrasenha = new ServerExplorer.Controls.CustomTextBox();
|
||||
this.btnListarBBDD = new System.Windows.Forms.Button();
|
||||
this.lsvBBDD = new ServerExplorer.Controls.CustomListView();
|
||||
this.colDBName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
@@ -242,11 +242,11 @@
|
||||
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 ServerExplorer.Controls.CustomTextBox 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 ServerExplorer.Controls.CustomTextBox txtUsuario;
|
||||
private ServerExplorer.Controls.CustomTextBox TxtContrasenha;
|
||||
private System.Windows.Forms.Button btnListarBBDD;
|
||||
private ServerExplorer.Controls.CustomListView lsvBBDD;
|
||||
private System.Windows.Forms.ColumnHeader colDBName;
|
||||
|
||||
Reference in New Issue
Block a user