public OpenMeme() { InitializeComponent(); openMeme = this; this.FormClosing += new FormClosingEventHandler(Form_Closing); LblBackground.MouseWheel += MouseWheel; btnAddComment.MouseWheel += MouseWheel; txtBoxWriteComment.MouseWheel += TextBoxMouseWheel; btnAddComment.Click += AddComment; }
void SetDarkMode() { Meme.SetDarkModeToAll(); Comment.SetDarkModeToAll(); OpenMeme.SetDarkMode(); if (darkMode) { PicBoxNightMode.Image = Image.FromFile("Images/DarkModeOn.png"); LblBackground.BackColor = Color.FromArgb(255, 25, 25, 25); PicBoxTopBar.BackColor = Color.FromArgb(255, 51, 51, 51); PicBoxNightMode.BackColor = Color.FromArgb(255, 51, 51, 51); } else { PicBoxNightMode.Image = Image.FromFile("Images/DarkModeOff.png"); LblBackground.BackColor = Color.FromArgb(255, 255, 255, 255); PicBoxTopBar.BackColor = Color.FromArgb(255, 0, 0, 0); PicBoxNightMode.BackColor = Color.FromArgb(255, 0, 0, 0); } }