私は2つのフォームを持っています。
フォーム1:
public partial class Panel1
{
public void ShowExport(object sender, EventArgs e)
{
.......
}
}
フォーム2:
public partial class Panel2
{
public delegate void ShowExportReport(object sender, EventArgs e);
public event ShowExportReport ShowExportClicked;
private void buttonExport_Click(object sender, RoutedEventArgs e)
{
if (ShowExportClicked != null)
{
ShowExportClicked(sender, new EventArgs());
}
}
}
ボタンをクリックすると-
button.Click = buttonExport_Click
Panel2.buttonExport_ClickからPanel1.ShowExport ()を呼び出すにはどうすればよいですか?