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 float x1, y1, x2, y2 = 0; //private double zoomFactor = 1; public ImageSelector(CheakSpell checkSpell) { InitializeComponent(); pictureBoxProcess.Visible = false; listBoxFiles.Items.Clear(); _checkSpell = checkSpell; }
public void DeleteCorrectWords() { var _chkSpell = new CheakSpell(); var f = File.ReadAllLines(Environment.CurrentDirectory + @"\..\..\..\File\All_word.txt"); string _correctWord = string.Empty; string _failWord = string.Empty; string _isFalseWord = string.Empty; string _isInSuggestList = string.Empty; string _isDefineYet = string.Empty; string result; foreach (var l in f) { if (l.Length > 2) { var words = l.Split(','); _correctWord = words[0]; _failWord = words[1]; if (_chkSpell.Cheak_Spell(_correctWord) == false) { _isDefineYet = "not_define"; } else { _isDefineYet = "define"; } if (_chkSpell.Cheak_Spell(_failWord) == false) { _isFalseWord = "false_word"; if (_chkSpell.Suggest(_failWord).Contains(_correctWord)) { _isInSuggestList = "Suggested"; } else { _isInSuggestList = "NoSuggest"; } } else { _isFalseWord = "true_word"; } result = _isDefineYet + @"," + _correctWord + @"," + _failWord + @"," + _isFalseWord + @"," + _isInSuggestList; File.AppendAllText(Environment.CurrentDirectory + @"\..\..\..\File\All_data.txt", result + Environment.NewLine); Thread.Sleep(1000); } } }
private void SetupSpell() { Application.Options.AutoFormatReplaceQuotes = false; Application.Options.AutoFormatAsYouTypeReplaceQuotes = false; _chkSpell = new CheakSpell { IgnoreEnglish = RegistaryApplicationSetting.GetRegistaryKey(Util.UtilSystemEnum.ChkIgnoreEnglish) == Util.UtilSystemEnum.OnKey ? true : false, CheakSteem = RegistaryApplicationSetting.GetRegistaryKey(Util.UtilSystemEnum.ChkStemSpell) == Util.UtilSystemEnum.OnKey ? true : false, IgnoreChars = RegistaryApplicationSetting.GetRegistaryKey(Util.UtilSystemEnum.TxtIgnoreList) }; }