Page 6 of 6 FirstFirst ... 3456
Results 201 to 213 of 213

Thread: 20130521 - i00 Spell Check and Control Extensions -No Third Party Components Required

  1. #201
    Frenzied Member i00's Avatar
    Join Date
    Mar 02
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    1,719

    Re: 20120609 - i00 .Net Spell Check - Code Project prize winner!

    Quote Originally Posted by Adviser View Post
    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

  2. #202
    Frenzied Member i00's Avatar
    Join Date
    Mar 02
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    1,719

    Re: 20130114 - i00 Spell Check and Control Extensions -No Third Party Components Requ

    Quote Originally Posted by Adviser View Post
    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

  3. #203
    Frenzied Member i00's Avatar
    Join Date
    Mar 02
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    1,719

    Re: 20130114 - i00 Spell Check and Control Extensions -No Third Party Components Requ

    Quote Originally Posted by Adviser View Post
    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:
    1. Public Shared Function AllInCaps(ByVal CompareWord As String) As Boolean
    2.             If CompareWord = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(CompareWord) Then
    3.                 'all letters in this word are caps
    4.                 Return True
    5.             End If
    6.         End Function

    Quote Originally Posted by Adviser View Post
    Also found one more bug.
    Will check this one out tomorrow... am tired as atm

    Regards,
    Kris

  4. #204
    Frenzied Member i00's Avatar
    Join Date
    Mar 02
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    1,719

    Re: 20130114 - i00 Spell Check and Control Extensions -No Third Party Components Requ

    Quote Originally Posted by Adviser View Post
    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

  5. #205
    New Member
    Join Date
    Jan 13
    Posts
    4

    Re: 20130114 - i00 Spell Check and Control Extensions -No Third Party Components Requ

    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.

  6. #206
    Frenzied Member i00's Avatar
    Join Date
    Mar 02
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    1,719

    Re: 20130114 - i00 Spell Check and Control Extensions -No Third Party Components Requ

    Quote Originally Posted by Adviser View Post
    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:
    1. 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

  7. #207
    New Member
    Join Date
    Jan 13
    Posts
    3

    Question 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.
    Attached Images Attached Images    

  8. #208
    Frenzied Member i00's Avatar
    Join Date
    Mar 02
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    1,719

    Re: 20130114 - i00 Spell Check and Control Extensions -No Third Party Components Requ

    Quote Originally Posted by jhwilliams1985 View Post
    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

  9. #209
    New Member
    Join Date
    Jan 13
    Posts
    3

    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.

  10. #210
    New Member
    Join Date
    Jan 13
    Posts
    3

    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

  11. #211
    Frenzied Member i00's Avatar
    Join Date
    Mar 02
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    1,719

    Re: 20130114 - i00 Spell Check and Control Extensions -No Third Party Components Requ

    Quote Originally Posted by jhwilliams1985 View Post
    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

  12. #212
    PowerPoster BruceG's Avatar
    Join Date
    May 00
    Location
    New Jersey (USA)
    Posts
    2,589

    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.
    "It's cold gin time again ..."

    Check out my website here.

  13. #213
    Frenzied Member i00's Avatar
    Join Date
    Mar 02
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    1,719

    Re: i00 .Net Spell Check - No 3rd party components required!

    20130521 is out!

Page 6 of 6 FirstFirst ... 3456

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •