1
Powershell로 변환하고 싶지만 어떻게해야할지 잘 모르겠습니다. 중요한 부분은 trayMenu 항목에 대한 처리기를 만드는 것입니다.Powershell에서 contextmenustrip에 대한 처리기를 추가하십시오.
NotifyIcon trayIcon;
ContextMenuStrip trayMenu;
trayMenu = new ContextMenuStrip();
trayMenu.Items.Add("Login", ContextMenuStripItemImages).Click += new EventHandler(Login_Click); //Create a new item in the context menu strip and link its Click event with Login_Click
trayIcon = new NotifyIcon();
trayIcon.ContextMenuStrip = trayMenu; //Set the ContextMenuStrip of trayIcon to trayMenu
}
private void Login_Click(object sender, EventArgs e)
{
//Do something when Login is clicked
}
미리 도움을 청하십시오.
정말 고마워요. 완벽하게 작동했습니다. :) –