private void RunButton_Click(object sender, EventArgs e) { var text = SelectProgram.SelectedCells[0].Value.ToString(); switch (text) { case "Lab3txt": Process.Start(@"C:\Temp\Lab3.txt"); MyAppNotifyIcon.ShowBalloonTip(20, "StartProcess", @"C:\Temp\Lab3.txt", ToolTipIcon.Info); break; case "Lab3csv": //Process.Start(@"C:\Temp\Lab3.csv"); MyAppNotifyIcon.ShowBalloonTip(20, "StartProcess", @"C:\Temp\Lab3.csv", ToolTipIcon.Info); break; case "Chrome": Process.Start(@"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe", ParamsText.Text); MyAppNotifyIcon.ShowBalloonTip(20, "StartProcess", @"Chrome", ToolTipIcon.Info); break; case "Word": Process.Start(@"C:\Program Files (x86)\Microsoft Office\root\Office16\WINWORD.EXE", "/f \"" + ParamsText.Text + "\""); MyAppNotifyIcon.ShowBalloonTip(20, "StartProcess", @"MSWord", ToolTipIcon.Info); break; } }
private void MyAppTimer_Tick(object sender, EventArgs e) { this.WindowState = FormWindowState.Minimized; MyAppNotifyIcon.ShowBalloonTip(10, "I'm here!", "Application was minimized because of inactive", ToolTipIcon.Warning); }