-
Re: 20120609 - i00 .Net Spell Check - Code Project prize winner!
Quote:
Originally Posted by
Adviser
I can look this, because I fluently work with Cyrillic symbols. But I have some problems :) First I'am C# programmer. It's not a big problem, I understand your code mostly. Second - I want to ask you where you got .syn and .def files for english? I got OpenOffice ru dictionary, but there are only two files: aff and dic. And dic format differ from you. Added /J /H /O /E /G /LQU /AS ... keys. So if you say me how I can convert dictionary into your format I will help with solving this problem.
Hi,
Would be great if you could look @ that symbol problem :).
The syn file I built from Word... check out the project included in my download: ~Used\~Related projects\Build change to from word\WindowsApplication6.sln
The def file I built from WordNet.
As for converting the OpenOffice dictionaries into a flat file, I am not sure if this would be easily possible, they kind of use word rules to build words, so run could be combined with ing to get running... but don't know enough about the files themselves to do this.
Regards,
Kris
-
Re: 20130114 - i00 Spell Check and Control Extensions -No Third Party Components Requ
Quote:
Originally Posted by
Adviser
I tried to use hunspell extension, like in your tests. It works fine with all three files: dic,af,dat. But only by F7.
Looks like you filter keypress and block all non english characters on input. So if any non english char pressed it even not try to find suggested words (functions from hunspell not fired). Where did you filter keys, pressed in RichTextBox?
I haven't filtered keys... think there must be something more going on here....
Don't have a non-English keyboard, so not exactly sure how to test this either... but...
I would check the files under "i00SpellCheck\Spell Check\Controls\TextBox\"
Thanks,
Kris
-
Re: 20130114 - i00 Spell Check and Control Extensions -No Third Party Components Requ
Quote:
Originally Posted by
Adviser
Found a problem. Dictionary.Formatting.AllInCaps(). It incorrectly count char uppercase for non-english languages.
Don't know what I was thinking when I wrote that function ... try this:?
VB Code:
Public Shared Function AllInCaps(ByVal CompareWord As String) As Boolean
If CompareWord = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(CompareWord) Then
'all letters in this word are caps
Return True
End If
End Function
Quote:
Originally Posted by
Adviser
Also found one more bug.
Will check this one out tomorrow... am tired as atm
Regards,
Kris
-
Re: 20130114 - i00 Spell Check and Control Extensions -No Third Party Components Requ
Quote:
Originally Posted by
Adviser
Also found one more bug.
private void ucMessageText_Load(object sender, EventArgs e)
{
try
{
HunspellDictionary dic = new HunspellDictionary();
dic.LoadFromFile(Directory.GetCurrentDirectory() + "\\Dicts\\ru_RU.dic");
i00SpellCheck.Dictionary.DefaultDictionary = dic;
HunspellSynonims synonims = new HunspellSynonims();
synonims.File = Directory.GetCurrentDirectory() + "\\Dicts\\th_ru_RU.dat";
i00SpellCheck.Synonyms.DefaultSynonyms = synonims;
//If you wanted to pass in options you can do so by handling the ControlExtensionAdding event PRIOR to calling EnableControlExtensions:
ControlExtensions.ControlExtensionAdding += ControlExtensionAdding;
rtb1.SpellCheck(true, null).Settings.IgnoreWordsInUpperCase = false;
rtb2.SpellCheck(true, null).Settings.IgnoreWordsInUpperCase = false;
}
catch (Exception ex)
{
Logger.Error(MethodBase.GetCurrentMethod(), ex);
}
this.EnableControlExtensions();
}
//This is used to setup spell check settings when the spell check extension is loaded:
static i00SpellCheck.SpellCheckSettings SpellCheckSettings = null;//Static for settings to be shared amongst all controls, use "i00SpellCheck.SpellCheckSettings SpellCheckSettings = null;" in the method below for control specific settings...
private void ControlExtensionAdding(object sender, i00SpellCheck.MiscControlExtension.ControlExtensionAddingEventArgs e)
{
var SpellCheckControlBase = e.Extension as SpellCheckControlBase;
if (SpellCheckControlBase != null)
{
//i00SpellCheck.SpellCheckSettings SpellCheckSettings = null;
if (SpellCheckSettings == null)
{
SpellCheckSettings = new i00SpellCheck.SpellCheckSettings();
SpellCheckSettings.AllowAdditions = true; //Specifies if you want to allow the user to add words to the dictionary
SpellCheckSettings.AllowIgnore = true; //Specifies if you want to allow the user ignore words
SpellCheckSettings.AllowRemovals = false; //Specifies if you want to allow users to delete words from the dictionary
SpellCheckSettings.AllowInMenuDefs = true; //Specifies if the in menu definitions should be shown for correctly spelled words
SpellCheckSettings.AllowChangeTo = true; //Specifies if "Change to..." (to change to a synonym) should be shown in the menu for correctly spelled words
}
SpellCheckControlBase.Settings = SpellCheckSettings;
}
}
If bolded settings enabled (so if we want to set different settings for controls) we receive Object reference not set to an instance of an object. exception on
Private Sub extTextBoxContextMenu_MenuOpening
If Settings.IgnoreWordOverride(extTextBoxContextMenu.MenuSpellClickReturn.Word) Then
line. Underlined is null.
It happens only if same one ContextMenuStrip linked to different RichTextBoxElements.
I cannot get this to duplicate ... can you provide me with a test form where this is the case?
Thanks,
Kris
-
Re: 20130114 - i00 Spell Check and Control Extensions -No Third Party Components Requ
Quote:
I cannot get this to duplicate ... can you provide me with a test form where this is the case?
Sure:
http://www.sendspace.com/file/vivck3
Or you can do next steps:
1. Create empty Windows Forms application
2. Add two RichTextBoxes to form
3. Add one ContextMenuStrip. Link two RichTextBoxes with this one ContextMenuStrip.
4. Write OnLoad: this.EnableControlExtensions();
5. Run. Try to open context menu in any of RichTextBoxes.
First time extTextBoxContextMenu_MenuOpening work ok. But second time (don't understand why it called two times) will be error because extTextBoxContextMenu.MenuSpellClickReturn == null.
-
Re: 20130114 - i00 Spell Check and Control Extensions -No Third Party Components Requ
Quote:
Originally Posted by
Adviser
Sure:
http://www.sendspace.com/file/vivck3
Or you can do next steps:
1. Create empty Windows Forms application
2. Add
two RichTextBoxes to form
3. Add
one ContextMenuStrip. Link two RichTextBoxes with this one ContextMenuStrip.
4. Write OnLoad: this.EnableControlExtensions();
5. Run. Try to open context menu in any of RichTextBoxes.
First time extTextBoxContextMenu_MenuOpening work ok. But second time (don't understand why it called two times) will be error because extTextBoxContextMenu.MenuSpellClickReturn == null.
OK... that was easy ... basically the content menu events are being fired 2x ... 1 time for each control extension ... as the context menu is shared between 2 controls...
Basically to fix ... you will need to edit i00SpellCheck\Control Extension\TextBox\Plugins\extTextBoxContextMenu.vb
You will need to find "Handles ContextMenuStrip." in this file and after each of these lines insert:
vb Code:
If DirectCast(sender, System.Windows.Forms.ContextMenuStrip).SourceControl IsNot MyBase.Control Then Return
This will basically terminate the event if it is not linked to the current control extension.
Will be fixed in the next version.
Regards,
Kris
-
3 Attachment(s)
Re: 20130114 - i00 Spell Check and Control Extensions -No Third Party Components Requ
Hello,
I know you may hear this many times but I am trying to use the software that you have listed to add to my own VB.NET program. I have made a simple program that I have uploaded with what I have done with the program but the spell check is not working. I have also tried the following code
"'To load a single control extension on a control call:
ControlExtensions.LoadSingleControlExtension(TextBox1, New TextBoxPrinter.TextBoxPrinter)"
with in my system and it did not work. it said that the textboxprinter.textboxprinter did not exist so I could not use that feature like you said.
I have zipped the full file, but the full file wont upload. (If you want to see full file, I can Email.) I took 3 screen shots showing Code, what program looks like, also the page showing the references with I00SpellCheck was listed.
Is there any help that you can provide that I am doing wrong?
Thank You
John.
-
Re: 20130114 - i00 Spell Check and Control Extensions -No Third Party Components Requ
Quote:
Originally Posted by
jhwilliams1985
Hello,
I know you may hear this many times but I am trying to use the software that you have listed to add to my own VB.NET program. I have made a simple program that I have uploaded with what I have done with the program but the spell check is not working. I have also tried the following code
"'To load a single control extension on a control call:
ControlExtensions.LoadSingleControlExtension(TextBox1, New TextBoxPrinter.TextBoxPrinter)"
with in my system and it did not work. it said that the textboxprinter.textboxprinter did not exist so I could not use that feature like you said.
I have zipped the full file, but the full file wont upload. (If you want to see full file, I can Email.) I took 3 screen shots showing Code, what program looks like, also the page showing the references with I00SpellCheck was listed.
Is there any help that you can provide that I am doing wrong?
Thank You
John.
Hi John,
Do the words underline when you do this? If not check the dic.dic file is in your application path .... if this still doesn't work ... send me a screen shot of your output directory and you projects solution tree with all branches expanded... or upload to something like rapidshare if you cannot post an attachment on here.
Just some things to note:
- You shouldn't need to call EnableControlExtensions and then TextBox1.EnableSpellCheck etc.
- To load the TextBoxPrinter Plugin (that you are trying to do when you call ControlExtensions.LoadSingleControlExtension(TextBox1, New TextBoxPrinter.TextBoxPrinter)) you will need to add a reference to that plugin dll, (this is not required if loading all plugins, just to load specific ones, if you want to load all plugins you just need to put the dll in the same folder).
Regards,
Kris
-
Re: 20130114 - i00 Spell Check and Control Extensions -No Third Party Components Requ
Hello Kris;
No I don't get any words underlined, I have checked the DIC.DIC file and it looks good.
With in the Solution tree it had the My Project and Form1. I have added the file to rapidshare.com so you can look at it.
https://rapidshare.com/files/4003728...stSpelling.zip
Thank you
John.
-
Re: 20130114 - i00 Spell Check and Control Extensions -No Third Party Components Requ
Hello Kris,
I just figured it out also found your basic example that helped.
Looks like the Dic, Def, Syn, also Def folder did not copy to the debug folder. You may want to make a note of that so other's know.
Thank You
John
-
Re: 20130114 - i00 Spell Check and Control Extensions -No Third Party Components Requ
Quote:
Originally Posted by
jhwilliams1985
Hello Kris,
I just figured it out also found your basic example that helped.
Looks like the Dic, Def, Syn, also Def folder did not copy to the debug folder. You may want to make a note of that so other's know.
Thank You
John
Glad you worked it out ... only the dic.dic file is required for spelling...
The def.def shows word definitions in the context menu when right clicking and for suggestions as a tooltip when you hold over a word.
The syn.syn holds a list of synonyms for the "change to" option
The def folder shows icons in some word definitions... eg game
Kris
-
Re: 20130114 - i00 Spell Check and Control Extensions -No Third Party Components Requ
I am using i00 Spell check in my project.
Great work, Kris. I'm glad I found this.
-
Re: i00 .Net Spell Check - No 3rd party components required!
-
Re: i00 .Net Spell Check - No 3rd party components required!
Quote:
Originally Posted by
i00
20130521 is out!
I still cannot get it to build, I'm targeting version 4.0 of the .net framework. I tried replacing the code as suggested in earilier posts but I get something like 400+ errors.
I'm on vs 2010 with my app targeting v.4.0.
Are there plans on targeting a higher framework?
-
Re: i00 .Net Spell Check - No 3rd party components required!
Quote:
Originally Posted by
crater
I still cannot get it to build, I'm targeting version 4.0 of the .net framework. I tried replacing the code as suggested in earilier posts but I get something like 400+ errors.
I'm on vs 2010 with my app targeting v.4.0.
Are there plans on targeting a higher framework?
I have it running in 2013 without any problems ...
Here's how:
Open it up and run the conversion wizard
Change the target framework
Reference System.Xaml (like it says to in the error list)
... all 43 errors fixed :)
Kris
-
Re: 20130521 - i00 Spell Check and Control Extensions -No Third Party Components Requ
I am using i00 Spell check in my project. Thanks much!
-
Re: 20130521 - i00 Spell Check and Control Extensions -No Third Party Components Requ
I add reference i00spellchecker and i have this error in visual studio 2010 4.0 netframework
Code:
The currently targeted framework ".NETFramework,Version=v4.0,Profile=Client" does not include "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which the referenced assembly "i00SpellCheck" depends on. This caused the referenced assembly to not resolve. To fix this, either (1) change the targeted framework for this project, or (2) remove the referenced assembly from the project. SpellCheck
-
Re: 20130521 - i00 Spell Check and Control Extensions -No Third Party Components Requ
I have only used VS 2008, 2012 and 2013 ... but ... I am guessing that the project has re-targeted when it was upgraded to .Net framework 4
I would start by checking the projects framework target, if it has been updated you will probably need to remove the reference to System.Web and re-add the one that matches the version from the framework that you are targeting.
Kris
-
Re: 20130521 - i00 Spell Check and Control Extensions -No Third Party Components Requ
So i when i start program i need to make to be on net framework 3.5 not 4.
-
Re: 20130521 - i00 Spell Check and Control Extensions -No Third Party Components Requ
Just re-targeting to framework 4.0 myself... in VS2013 though
Got it working here's what I did:
- Run through the upgrade wizard that popped up when opening it in VS2013
- Set the target framework to 4.0 in ALL of the projects (I used 4.0 because A. That's what you have and B. Because a lot of people still run XP and it is the last version compatible with it!)
- Added a reference to System.Xaml in the i00SpellCheck project
- Had no errors so ran it!
If you still have problems copy and paste the error list into here
Kris
-
Re: 20130521 - i00 Spell Check and Control Extensions -No Third Party Components Requ
Just made the download link point to Code Project ... Frustrating having to update 2 articles each time.
Kris
-
Re: 20130521 - i00 Spell Check and Control Extensions -No Third Party Components Requ
I intend to use this code in a project.
-
Re: 20130521 - i00 Spell Check and Control Extensions -No Third Party Components Requ
I have been enjoying the i00 spell check, I have made my self a book program. Some of my books that I had made have many error's in spelling and I would like to see a popup window to manage all spelling error's instead of looking for all the underlined words.
I have Microsoft Office word, but I don't want to use that spell check because of my custom dictionary that was made for those books.
Each book has its own dictionary.
The question that I have:
When you right click on the word that is underlined, and have a button to launch a master spell check window so you can click accept change's or deny change's for each word. Like a Do until loop or something?
-
Re: 20130521 - i00 Spell Check and Control Extensions -No Third Party Components Requ
Hi. I am using i00 spell check for my project. I have one question. How do you disable the spell check on a read-only textbox / datagridview column? I don't want the user to change anything if the control is read-only. Even if it's a misspelled word!
Thanks!
-
Re: 20130521 - i00 Spell Check and Control Extensions -No Third Party Components Requ
Quote:
Originally Posted by
jhwilliams1985
I have been enjoying the i00 spell check, I have made my self a book program. Some of my books that I had made have many error's in spelling and I would like to see a popup window to manage all spelling error's instead of looking for all the underlined words.
I have Microsoft Office word, but I don't want to use that spell check because of my custom dictionary that was made for those books.
Each book has its own dictionary.
The question that I have:
When you right click on the word that is underlined, and have a button to launch a master spell check window so you can click accept change's or deny change's for each word. Like a Do until loop or something?
Sorry about the delay ... you can press F7 ... or load it with code ... can't remember how to do this from memory (not near a computer I can check on), but there is an eg of this in my demo project.
Kris
-
Re: 20130521 - i00 Spell Check and Control Extensions -No Third Party Components Requ
Quote:
Originally Posted by
blessed
Hi. I am using i00 spell check for my project. I have one question. How do you disable the spell check on a read-only textbox / datagridview column? I don't want the user to change anything if the control is read-only. Even if it's a misspelled word!
Thanks!
Hrm ... I have been meaning to fix this ... you have to disable it on a case by case basis atm through code... will hopefully have an update shortly.
Kris
-
Re: i00 Spell Check and Control Extensions - No Third Party Components Required
Nice!
It would be better if you would make it easier to log in and post a reply like a simple "I am using i00 Spell check in my project"
:)
-
Re: i00 Spell Check and Control Extensions - No Third Party Components Required
I am using your spell checker in my project. Thank you very much!!
-
Re: i00 Spell Check and Control Extensions - No Third Party Components Required
I am using i00 Spell check in my project, it is very good.
-
Re: i00 .Net Spell Check - No 3rd party components required!
I am using i00 Spell check in my project, thank you!
-
Re: 20130521 - i00 Spell Check and Control Extensions -No Third Party Components Requ
I am using i00 Spell check in my project.
-
Re: 20130521 - i00 Spell Check and Control Extensions -No Third Party Components Requ
I am using i00 Spell check in my project, thanks for this awesome standalone resource!
-
Re: i00 .Net Spell Check - No 3rd party components required!
I am using i00 Spell check in my project :)
-
Re: 20130521 - i00 Spell Check and Control Extensions -No Third Party Components Requ
Is there any video could explain the steps one by one?
I'm really interested to get rid of word spellchecker from all my projects
-
Re: 20130521 - i00 Spell Check and Control Extensions -No Third Party Components Requ
Quote:
Originally Posted by
Joye
Is there any video could explain the steps one by one?
I'm really interested to get rid of word spellchecker from all my projects
No there is not sorry, but if you PM me I am happy to organize personal correspondence with you to help you integrate the features that you specifically require into your project.
Kris
-
Re: 20130521 - i00 Spell Check and Control Extensions -No Third Party Components Requ
Quote:
Originally Posted by
i00
No there is not sorry, but if you PM me I am happy to organize personal correspondence with you to help you integrate the features that you specifically require into your project.
Kris
Thank you I just did
-
Re: 20130521 - i00 Spell Check and Control Extensions -No Third Party Components Requ
Quote:
Originally Posted by
i00
No there is not sorry, but if you PM me I am happy to organize personal correspondence with you to help you integrate the features that you specifically require into your project.
Kris
Now I am using i00 Spell check in my project, thank you for this awesome standalone resource :thumb:
-
Re: 20130521 - i00 Spell Check and Control Extensions -No Third Party Components Requ
Quote:
Originally Posted by
Joye
Now I am using i00 Spell check in my project, thank you for this awesome standalone resource :thumb:
Glad I could help :)
Kris
-
Re: 20130521 - i00 Spell Check and Control Extensions -No Third Party Components Requ
Hey Kris,
Thank you for making this available as free to use. However I cannot make it to work :(
I am sure you have read this many times, after publish when run setup this error: Reference in the manifest does not match the identity of the downloaded assembly i00BindingList.exe.
I have spend half day now try to find solution and I have try everything. Also some comments here "have to sign ClickOnce Manifest + ClickOnce Security Setting" and also other possible solutions like this
https://stackoverflow.com/questions/...does-not-match
I still get same error.
What I did was to add your project to mine and to reference your project in my project. So, I am not sure what is causing this error. Perhaps two exe's.. I don't know.
So maybe I shall try other option to implement your spellchecker i.e.
Quote:
or you can bring all of *.vb files in the "SpellCheck\Spell Check" folder (from the zip) directly into your own project (VB.Net only)*
NOTE: For the methods with the * you will need to also copy the dictionary files to the applications path
If I try this option do i have to get all *.vb files of all 18 projects in that solution from the zip? It is a lot..and for some other functionalities as well... I want to do spell check on datagridviews and textboxes only...
Can you please tell me what to do?
Much appreciated
-
Re: 20130521 - i00 Spell Check and Control Extensions -No Third Party Components Requ
Quote:
Originally Posted by
schoemr
Hey Kris,
Thank you for making this available as free to use. However I cannot make it to work :(
I am sure you have read this many times, after publish when run setup this error: Reference in the manifest does not match the identity of the downloaded assembly i00BindingList.exe.
I have spend half day now try to find solution and I have try everything. Also some comments here "have to sign ClickOnce Manifest + ClickOnce Security Setting" and also other possible solutions like this
https://stackoverflow.com/questions/...does-not-match
I still get same error.
What I did was to add your project to mine and to reference your project in my project. So, I am not sure what is causing this error. Perhaps two exe's.. I don't know.
So maybe I shall try other option to implement your spellchecker i.e.
If I try this option do i have to get all *.vb files of all 18 projects in that solution from the zip? It is a lot..and for some other functionalities as well... I want to do spell check on datagridviews and textboxes only...
Can you please tell me what to do?
Much appreciated
Not sure what's going on here schoemr, but have PM'ed you to investigate further.
...Also what you are doing with the project seems ok ... but I have asked you to elaborate a bit in the PM just in case.
Kris