public static void SetPriority()
{
switch (Conf.Priority)
{
case 1:
Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.Normal;
break;
case 2:
Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.AboveNormal;
break;
case 3:
Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.High;
break;
case 4:
Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.RealTime;
break;
}
}
private void Button1Click(object sender, EventArgs e) { string err = ""; if (err != "") { MessageBox.Show(err, LocRm.GetString("Error")); return; } SaveSMTPSettings(); if (!string.IsNullOrEmpty(MainForm.Conf.ArchiveNew)) { if (!MainForm.Conf.ArchiveNew.EndsWith(@"\")) { MainForm.Conf.ArchiveNew += @"\"; } } MainForm.Iconfont = new Font(FontFamily.GenericSansSerif, MainForm.Conf.BigButtons ? 22 : 15, FontStyle.Bold, GraphicsUnit.Pixel); MainForm.Conf.TalkMic = ""; MainForm.SetPriority(); LocalServer.ReloadAllowedIPs(); LocalServer.ReloadAllowedReferrers(); //SetStorageOptions(); MainForm.ReloadColors(); DialogResult = DialogResult.OK; Close(); }