NotificationPopup.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. namespace MusicPlayer
  11. {
  12. public partial class NotificationPopup : Form
  13. {
  14. MainForm f;
  15. public NotificationPopup(MainForm f)
  16. {
  17. InitializeComponent();
  18. this.f = f;
  19. }
  20. private void NotificationPopup_Shown(object sender, EventArgs e)
  21. {
  22. System.Drawing.Rectangle workingRectangle = Screen.PrimaryScreen.WorkingArea;
  23. this.Left = workingRectangle.Width - this.Width -10;
  24. this.Top = workingRectangle.Height - this.Height -10;
  25. this.Show();
  26. }
  27. private void pictureBox4_Click(object sender, EventArgs e)
  28. {
  29. f.WindowState = FormWindowState.Normal;
  30. }
  31. private void NotificationPopup_Leave(object sender, EventArgs e)
  32. {
  33. this.Visible = false;
  34. }
  35. }
  36. }