private void chkStemSpell_CheckedChanged(object sender, EventArgs e) { var value = chkStemSpell.Checked ? Util.UtilSystemEnum.OnKey : Util.UtilSystemEnum.OffKey; RegistaryApplicationSetting.SetRegistaryKey(chkStemSpell.Name, value); _cheakSpell.CheakSteem = chkStemSpell.Checked; }
public frmSetting(CheakSpell cheakSpell) { InitializeComponent(); Util util = new Util(); _cheakSpell = cheakSpell; chkRecSpell.Checked = RegistaryApplicationSetting.GetRegistaryKey(chkRecSpell.Name) == Util.UtilSystemEnum.OnKey ? true : false; chkStemSpell.Checked = RegistaryApplicationSetting.GetRegistaryKey(chkStemSpell.Name) == Util.UtilSystemEnum.OnKey ? true : false; chkPunkRec.Checked = RegistaryApplicationSetting.GetRegistaryKey(chkPunkRec.Name) == Util.UtilSystemEnum.OnKey ? true : false; chkIgnoreEnglish.Checked = RegistaryApplicationSetting.GetRegistaryKey(chkIgnoreEnglish.Name) == Util.UtilSystemEnum.OnKey ? true : false; txtIgnoreList.Text = RegistaryApplicationSetting.GetRegistaryKey(Util.UtilSystemEnum.txtIgnoreList); var screenWidth = Screen.PrimaryScreen.Bounds.Width.ToString(); var screenHeight = Screen.PrimaryScreen.Bounds.Height.ToString(); var os = Environment.OSVersion; var ver = os.Version; lblSysinfo.Text = SystemInformation.ComputerName + Environment.NewLine + SystemInformation.UserName + Environment.NewLine + @"Resolution: " + screenWidth + @"x" + screenHeight + Environment.NewLine + @"max DotNet Version:" + util.GetVersionFromRegistry() + Environment.NewLine + os.VersionString + @" " + os.Platform + " " + ver.Major; }
private void txtIgnoreList_Validating(object sender, CancelEventArgs e) { var bol = txtIgnoreList.Text.Trim().ToCharArray().Where(x => !valid.Contains(x)); lblErr.Text = string.Empty; if (!bol.Any()) { RegistaryApplicationSetting.SetRegistaryKey(Util.UtilSystemEnum.txtIgnoreList, txtIgnoreList.Text.Trim()); _cheakSpell.IgnoreChars = txtIgnoreList.Text.Trim(); } else { var result = new string(bol.ToArray()); lblErr.Text = result + Util.UtilMessagesEnum.NotValid; e.Cancel = true; } }
private void chkPunkRec_CheckedChanged(object sender, EventArgs e) { var value = chkPunkRec.Checked ? Util.UtilSystemEnum.OnKey : Util.UtilSystemEnum.OffKey; RegistaryApplicationSetting.SetRegistaryKey(chkPunkRec.Name, value); }