private void PerformRAMCheck() { ulong check = (ulong)(BytesVal.Value / RatioVal.Value); if (check >= (installedMemory / 8)) { if ((check >= installedMemory) || ((RatioVal.Value == 1) && (GetRAMSize.Checked == true))) { WarningPanel.Visible = true; WarningSign.Image = KeppySynthConfigurator.Properties.Resources.wir; WarningLabel.Text = String.Format("ERROR:\nSorry, but no."); ApplySettings.Enabled = false; } else { WarningPanel.Visible = true; WarningSign.Image = KeppySynthConfigurator.Properties.Resources.wi; WarningLabel.Text = String.Format("WARNING:\nLeave at least {0} of RAM available for Windows.", SFListFunc.ReturnSoundFontSize(null, "evbuff", (long)installedMemory / 8)); ApplySettings.Enabled = true; } } else { WarningPanel.Visible = false; ApplySettings.Enabled = true; } }
private void WarningLabel_Click(object sender, EventArgs e) { MessageBox.Show(String.Format("Leave at least 1/8 of RAM ({0}) available to Windows, to avoid unexpected data loss and system crashes.\n\nRemember, you're responsible of anything that might happen after tampering with this setting.", SFListFunc.ReturnSoundFontSize(null, "evbuff", (long)installedMemory / 8)), "What does this warning mean?", MessageBoxButtons.OK, MessageBoxIcon.Warning); }