-1
첫째로, 나의 영어는 나쁘다, 미안하다.빈 결과가 왜 돌고 있습니까?
textbox
(Form2.cs에서) 텍스트에 MainForm.cs를 표시하려고합니다. 공백 메시지를 표시 할 때 다음 코드를 적용 할 때.
MainForm.cs
private void btnFilitre_ItemClick(object sender,DevExpress.XtraBars.ItemClickEventArgs e)
{
...
Form2 f2 = new Form2();
f2.Show();
}
private void workingFunction()
{
CommClass com = new CommClass();
MessageBox.Show(comm.Sorgu);
}
Form2.cs
private void button1_Click(object sender, EventArgs e)
{
Form1 f1 = new Form1();
CommClass comm = new CommClass();
comm.Sorgu = textBox1.Text;
f1.workingFunction();
Hide();
}
CommClass.cs
public string Sorgu { get; set; }
proble은 무엇입니까 엠?
각 위치에서 새로운 인스턴스를 인스턴스화합니다. workingFunction이 button1_click에서 선언 한 것과 동일한 CommClass를 사용하지 않습니다. – AndrewP