データベース内の情報に基づいて動的に作成されるいくつかのモジュールを持つ winform があります。これらの各モジュールには編集ボタンがあります。オブジェクトをクリック ハンドラに渡してから新しいフォームに渡したいのですが、方法がわかりません。ここに私が持っているものがあります:
PingServer temp = manager.servers.ElementAt(i).Value;
EditButton.Click += new EventHandler(openEditor(temp));
private void openEditor(PingServer server)
{
EditConnectionForm editConnection = new EditConnectionForm(server);
editConnection.ShowDialog();
}