Example #1
0
        internal static void Show(MetroColorStyle highlight, string message, string explanation)
        {
            // Global method for showing with color, message, and explanation
            FilthyMessage box = new FilthyMessage();

            box.Style                  = highlight;
            box.okButton.Style         = highlight;
            box.messageLabel.Text      = message;
            box.smallMessageLabel.Text = explanation;

            int labelWidth = Math.Max(box.messageLabel.Width, box.smallMessageLabel.Width);

            box.Size = new Size(labelWidth + 46, box.messageLabel.Height + box.smallMessageLabel.Height + 89);
            box.okButton.Location = new Point(box.Width / 2 - box.okButton.Width / 2, box.Height - box.okButton.Height / 2 - 33);
            box.ShowDialog();
        }
Example #2
0
 private void applyButton_Click(object sender, EventArgs e)
 {
     // Educational prank
     FilthyMessage.Show("Hah! Tricked you.", "Apply is useless in this situation since you won't see the effect until you close the window anyway.\nThere's no need to click Apply, OK does the same thing but also closes the window if you don't have any more changes to make.\n\nEver tried it? If it didn't work, try again.\nYou're definitely wrong, or using some really dodgy software.\n\nWhat's the difference between OK and Cancel? \"I'm okay with these changes, time to do something else.\"");
 }