Cambios de diseño

parent d139937c
......@@ -31,18 +31,13 @@
this.BotonAdd = new System.Windows.Forms.Button();
this.ComboboxIdioma = new System.Windows.Forms.ComboBox();
this.panel1 = new System.Windows.Forms.Panel();
this.txtLiteral = new System.Windows.Forms.TextBox();
this.BotonTraduce = new System.Windows.Forms.Button();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.txtNombreTabla = new System.Windows.Forms.TextBox();
this.txtLitValue = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.button1 = new System.Windows.Forms.Button();
this.btnFullSql = new System.Windows.Forms.Button();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.panel2.SuspendLayout();
......@@ -78,13 +73,6 @@
this.panel1.Size = new System.Drawing.Size(528, 70);
this.panel1.TabIndex = 7;
//
// txtLiteral
//
this.txtLiteral.Location = new System.Drawing.Point(123, 49);
this.txtLiteral.Name = "txtLiteral";
this.txtLiteral.Size = new System.Drawing.Size(410, 20);
this.txtLiteral.TabIndex = 6;
//
// BotonTraduce
//
this.BotonTraduce.Location = new System.Drawing.Point(110, 427);
......@@ -110,22 +98,6 @@
this.txtNombreTabla.Size = new System.Drawing.Size(410, 20);
this.txtNombreTabla.TabIndex = 16;
//
// txtLitValue
//
this.txtLitValue.Location = new System.Drawing.Point(123, 84);
this.txtLitValue.Name = "txtLitValue";
this.txtLitValue.Size = new System.Drawing.Size(410, 20);
this.txtLitValue.TabIndex = 17;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(17, 56);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(94, 13);
this.label5.TabIndex = 18;
this.label5.Text = "Nombre del literal: ";
//
// label6
//
this.label6.AutoSize = true;
......@@ -135,46 +107,15 @@
this.label6.TabIndex = 19;
this.label6.Text = "Nombre de la tabla: ";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(31, 87);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(78, 13);
this.label7.TabIndex = 20;
this.label7.Text = "Valor del literal:";
//
// panel2
//
this.panel2.AutoScroll = true;
this.panel2.Controls.Add(this.dataGridView1);
this.panel2.Location = new System.Drawing.Point(5, 140);
this.panel2.Location = new System.Drawing.Point(5, 36);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(528, 151);
this.panel2.Size = new System.Drawing.Size(528, 255);
this.panel2.TabIndex = 21;
//
// dataGridView1
//
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column1,
this.Column2});
this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView1.Location = new System.Drawing.Point(0, 0);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.Size = new System.Drawing.Size(528, 151);
this.dataGridView1.TabIndex = 1;
//
// button1
//
this.button1.Location = new System.Drawing.Point(212, 111);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(118, 23);
this.button1.TabIndex = 22;
this.button1.Text = "Añadir literal";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// btnFullSql
//
this.btnFullSql.Location = new System.Drawing.Point(248, 427);
......@@ -185,6 +126,18 @@
this.btnFullSql.UseVisualStyleBackColor = true;
this.btnFullSql.Click += new System.EventHandler(this.btnFullSql_Click);
//
// dataGridView1
//
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column1,
this.Column2});
this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView1.Location = new System.Drawing.Point(0, 0);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.Size = new System.Drawing.Size(528, 255);
this.dataGridView1.TabIndex = 2;
//
// Column1
//
this.Column1.HeaderText = "Nombre del literal";
......@@ -203,18 +156,13 @@
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(537, 648);
this.Controls.Add(this.btnFullSql);
this.Controls.Add(this.button1);
this.Controls.Add(this.panel2);
this.Controls.Add(this.label7);
this.Controls.Add(this.label6);
this.Controls.Add(this.label5);
this.Controls.Add(this.txtLitValue);
this.Controls.Add(this.txtNombreTabla);
this.Controls.Add(this.richTextBox1);
this.Controls.Add(this.BotonAdd);
this.Controls.Add(this.ComboboxIdioma);
this.Controls.Add(this.panel1);
this.Controls.Add(this.txtLiteral);
this.Controls.Add(this.BotonTraduce);
this.Name = "MainMenu";
this.ShowIcon = false;
......@@ -232,18 +180,13 @@
private System.Windows.Forms.Button BotonAdd;
private System.Windows.Forms.ComboBox ComboboxIdioma;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.TextBox txtLiteral;
private System.Windows.Forms.Button BotonTraduce;
private System.Windows.Forms.RichTextBox richTextBox1;
private System.Windows.Forms.TextBox txtNombreTabla;
private System.Windows.Forms.TextBox txtLitValue;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.Button btnFullSql;
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
}
......
......@@ -306,8 +306,6 @@ namespace Literals
private void button1_Click(object sender, EventArgs e)
{
DataGridViewRow row = (DataGridViewRow)this.dataGridView1.Rows[0].Clone();
row.Cells[0].Value = this.txtLiteral.Text;
row.Cells[1].Value = this.txtLitValue.Text;
dataGridView1.Rows.Add(row);
}
......@@ -322,9 +320,9 @@ namespace Literals
values += "" +
"IF(SELECT COUNT(*) FROM sysobjects WHERE NAME LIKE '" + this.txtNombreTabla.Text + "') > 0" +
" DROP TABLE dbo.LIT_ED1" +
" CREATE TABLE dbo.LIT_ED1(" +
" [IDIOMA] [varchar](5) NOT NULL";
" DROP TABLE dbo."+ tablevalue + "" +
" CREATE TABLE dbo."+ tablevalue + "(" +
" \n[IDIOMA] [varchar](5) NOT NULL";
for (int i = 0; i < this.dataGridView1.Rows.Count; i++)
{
......@@ -379,7 +377,7 @@ namespace Literals
" )WITH(PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON[PRIMARY] \n" +
"GO \n" +
" ALTER TABLE dbo." + tablevalue + " WITH CHECK ADD CONSTRAINT \n" +
" FK_LIT_ED1_IDIOMAS FOREIGN KEY(IDIOMA)REFERENCES dbo.Idiomas(CODIGO) \n" +
" FK_LIT_"+ itemvalue + "_IDIOMAS FOREIGN KEY(IDIOMA)REFERENCES dbo.Idiomas(CODIGO) \n" +
"GO";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment