audric
New Coder
C#:
namespace AppZero
{
partial class Form1
{
/// <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);
}
private EventHandler GetClick()
{
return button1; // erro is here says " cs0029 not possible to convert System.windows.forms.button to system.eventhandler
}
private Button GetButton1()
{
return button1;
}
#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(EventHandler click, Button button1)
{
dgv = new DataGridView();
Column1 = new DataGridViewTextBoxColumn();
Column2 = new DataGridViewTextBoxColumn();
Column3 = new DataGridViewTextBoxColumn();
Column4 = new DataGridViewTextBoxColumn();
Column5 = new DataGridViewTextBoxColumn();
Column6 = new DataGridViewTextBoxColumn();
Column7 = new DataGridViewTextBoxColumn();
dataGridViewTextBoxColumn1 = new DataGridViewTextBoxColumn();
dataGridViewTextBoxColumn2 = new DataGridViewTextBoxColumn();
button1 = new Button();
openFileDialog1 = new OpenFileDialog();
((System.ComponentModel.ISupportInitialize)dgv).BeginInit();
SuspendLayout();
//
// dgv
//
dgv.AllowUserToAddRows = false;
dgv.BackgroundColor = Color.White;
dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dgv.Columns.AddRange(new DataGridViewColumn[] { Column1, Column2, Column3, Column4, Column5, Column6, Column7, dataGridViewTextBoxColumn1, dataGridViewTextBoxColumn2 });
dgv.Location = new Point(22, 104);
dgv.Name = "dgv";
dgv.RowHeadersVisible = false;
dgv.RowTemplate.Height = 25;
dgv.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
dgv.Size = new Size(873, 334);
dgv.TabIndex = 0;
dgv.CellContentClick += dataGridView1_CellContentClick;
//
// Column1
//
Column1.AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
Column1.HeaderText = "Linha 1";
Column1.Name = "Column1";
Column1.Width = 70;
//
// Column2
//
Column2.HeaderText = "Linha 2";
Column2.Name = "Column2";
//
// Column3
//
Column3.HeaderText = "Linha 3";
Column3.Name = "Column3";
//
// Column4
//
Column4.HeaderText = "Linha 4";
Column4.Name = "Column4";
//
// Column5
//
Column5.HeaderText = "Linha 5";
Column5.Name = "Column5";
//
// Column6
//
Column6.HeaderText = "Linha 6";
Column6.Name = "Column6";
//
// Column7
//
Column7.HeaderText = "Linha 7";
Column7.Name = "Column7";
//
// dataGridViewTextBoxColumn1
//
dataGridViewTextBoxColumn1.HeaderText = "Linha 8";
dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
//
// dataGridViewTextBoxColumn2
//
dataGridViewTextBoxColumn2.HeaderText = "Linha 8";
dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
//
// button1
//
button1.Location = new Point(22, 53);
button1.Name = "button1";
button1.Size = new Size(136, 45);
button1.TabIndex = 1;
button1.Text = "Ler Ficheiros";
button1.UseVisualStyleBackColor = true;
// click += button1;
//
// openFileDialog1
//
openFileDialog1.FileName = "openFD";
//
// Form1
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(927, 450);
Controls.Add(button1);
Controls.Add(dgv);
Name = "Form1";
Text = "Form1";
((System.ComponentModel.ISupportInitialize)dgv).EndInit();
ResumeLayout(false);
}
#endregion
private DataGridView dgv;
private DataGridViewTextBoxColumn Column1;
private DataGridViewTextBoxColumn Column2;
private DataGridViewTextBoxColumn Column3;
private DataGridViewTextBoxColumn Column4;
private DataGridViewTextBoxColumn Column5;
private DataGridViewTextBoxColumn Column6;
private DataGridViewTextBoxColumn Column7;
private DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
private DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
#pragma warning disable CS0649 // Campo "Form1.button1" nunca é atribuído e sempre terá seu valor padrão null
private Button button1;
#pragma warning restore CS0649 // Campo "Form1.button1" nunca é atribuído e sempre terá seu valor padrão null
private OpenFileDialog openFileDialog1;
}
}