Example #1
0
        public SpeechRecognitionEngine InitiliseSRE()
        {
            sre = new SpeechRecognitionEngine(
                new System.Globalization.CultureInfo("en-EN"));
            //Use the microphone
            sre.SetInputToDefaultAudioDevice();
            Choices Words = new Choices();

            //use these words
            NetSpell.SpellChecker.Dictionary.WordDictionary oDict = new NetSpell.SpellChecker.Dictionary.WordDictionary();
            oDict.DictionaryFolder = @"packages\NetSpell.2.1.7\dic";
            oDict.DictionaryFile   = "en-CA.dic";
            //oDict.DictionaryFile = "en-US.dic";
            oDict.Initialize();
            foreach (DictionaryEntry x in oDict.BaseWords)
            {
                Words.Add((string)x.Key);
            }
            //Words.Add(new string[] { "Test", "Coffee", "blue", "Stream", "Siege","game","do anything","Chicken Nuggets" });
            GrammarBuilder gb = new GrammarBuilder();

            gb.Append(Words);
            gb.Culture = Thread.CurrentThread.CurrentCulture;
            Grammar g = new Grammar(gb);

            sre.LoadGrammar(g);

            sre.SpeechRecognized += Sre_SpeechRecognized;
            return(sre);
        }
        private const Int32 NumCheckWords = 100;              //maximum number of words the program will check to make a decision on key
        public static void Main(string[] args)
        {
            try
            {
                #region Variables
                String filename;
                String encryptedText;
                #region initializing spellchecker

                var dict = new NetSpell.SpellChecker.Dictionary.WordDictionary
                {
                    DictionaryFolder = String.Concat(Environment.CurrentDirectory, Path.DirectorySeparatorChar, "data"),
                    DictionaryFile   = "en-US.dic"
                };
                dict.Initialize();
                _spell = new NetSpell.SpellChecker.Spelling {
                    Dictionary = dict
                };

                #endregion
                #endregion

                #region Get File and Location
                if (args.Length > 0)//tries to read filename from arguments
                {
                    filename = args[0];
                }
                else//if theres no argument (double clicked exe) program need to ask for the filename
                {
                    Console.WriteLine("Enter the file name without extension (must be a .txt file)");
                    filename = Console.ReadLine();
                }

                filename += ".txt";                                       //gives .txt extension to the name
                var filepath = String.Concat(DefaultInputPath, filename); //concats path and filename

                #endregion
                encryptedText = File.ReadAllText(filepath); //puts all text in a single string to work with

                // gets the most suitable key for the given text
                var key = FindKey(encryptedText);

                var text = TranslateText(encryptedText, key);

                Console.WriteLine(text);

                Console.ReadKey();
            }
            catch (FileNotFoundException)
            {
                Console.WriteLine("File not found!");
                Console.ReadKey();
            }
            catch (Exception)
            {
                Console.WriteLine("Something really unexpected happened! :( \n" +
                                  "Shutting down the application...");
                Console.ReadKey();
            }
        }
        protected void Page_Init(object sender, EventArgs e)
        {
            // if not in cache, create new
            WordDictionary = new NetSpell.SpellChecker.Dictionary.WordDictionary();
            WordDictionary.EnableUserFile = false;

            //getting folder for dictionaries
            string          dicFolder = Path.Combine(Utils.GetDataFolderPath(), @"dictionary");
            WebmailSettings settings  = (new WebMailSettingsCreator()).CreateWebMailSettings();
            string          defLang   = settings.DefaultLanguage;
            Account         acct      = (Account)Session[Constants.sessionAccount];

            if (acct != null)
            {
                defLang = acct.UserOfAccount.Settings.DefaultLanguage;
            }
            string dictionaryFile = "en-US.dic";

            switch (defLang)
            {
            case "French": dictionaryFile = "fr-FR.dic"; break;

            case "German": dictionaryFile = "de-DE.dic"; break;
            }
            WordDictionary.DictionaryFolder = dicFolder;
            WordDictionary.DictionaryFile   = dictionaryFile;

            //load and initialize the dictionary
            WordDictionary.Initialize();

            // create spell checker
            SpellChecker            = new Spelling();
            SpellChecker.ShowDialog = false;
            SpellChecker.Dictionary = WordDictionary;
        }
Example #4
0
 public WordChecker()
 {
     oDict = new NetSpell.SpellChecker.Dictionary.WordDictionary();
     oDict.DictionaryFile = "en-US.dic";
     oDict.Initialize();
     oSpell            = new NetSpell.SpellChecker.Spelling();
     oSpell.Dictionary = oDict;
 }
Example #5
0
 public DictionarySpellCheck()
 {
     this.wordDictionary = new NetSpell.SpellChecker.Dictionary.WordDictionary();
     this.wordDictionary.DictionaryFile = GetServerMapPath("DictionarySources\\en-US.dic");
     this.wordDictionary.Initialize();
     this.spellChecker            = new NetSpell.SpellChecker.Spelling();
     this.spellChecker.Dictionary = this.wordDictionary;
 }
Example #6
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.Configuration.AppSettingsReader configurationAppSettings = new System.Configuration.AppSettingsReader();
     this.spellButton = new System.Windows.Forms.Button();
     this.demoRichText = new System.Windows.Forms.RichTextBox();
     this.spelling = new NetSpell.SpellChecker.Spelling(this.components);
     this.wordDictionary = new NetSpell.SpellChecker.Dictionary.WordDictionary(this.components);
     this.SuspendLayout();
     //
     // spellButton
     //
     this.spellButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     this.spellButton.Location = new System.Drawing.Point(344, 368);
     this.spellButton.Name = "spellButton";
     this.spellButton.Size = new System.Drawing.Size(80, 23);
     this.spellButton.TabIndex = 3;
     this.spellButton.Text = "Spell Check";
     this.spellButton.Click += new System.EventHandler(this.spellButton_Click);
     //
     // demoRichText
     //
     this.demoRichText.AcceptsTab = true;
     this.demoRichText.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
         | System.Windows.Forms.AnchorStyles.Left)
         | System.Windows.Forms.AnchorStyles.Right)));
     this.demoRichText.AutoWordSelection = true;
     this.demoRichText.Location = new System.Drawing.Point(16, 16);
     this.demoRichText.Name = "demoRichText";
     this.demoRichText.ShowSelectionMargin = true;
     this.demoRichText.Size = new System.Drawing.Size(408, 344);
     this.demoRichText.TabIndex = 2;
     this.demoRichText.Text = "Becuase people are realy bad spelers, ths produc was desinged to prevent speling " +
         "erors in a text area like ths.";
     //
     // spelling
     //
     this.spelling.Dictionary = this.wordDictionary;
     this.spelling.ReplacedWord += new NetSpell.SpellChecker.Spelling.ReplacedWordEventHandler(this.spelling_ReplacedWord);
     this.spelling.EndOfText += new NetSpell.SpellChecker.Spelling.EndOfTextEventHandler(this.spelling_EndOfText);
     this.spelling.DeletedWord += new NetSpell.SpellChecker.Spelling.DeletedWordEventHandler(this.spelling_DeletedWord);
     //
     // wordDictionary
     //
     this.wordDictionary.DictionaryFolder = ((string)(configurationAppSettings.GetValue("wordDictionary.DictionaryFolder", typeof(string))));
     //
     // DemoForm
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize = new System.Drawing.Size(440, 406);
     this.Controls.Add(this.spellButton);
     this.Controls.Add(this.demoRichText);
     this.Name = "DemoForm";
     this.Text = "NetSpell Demo";
     this.ResumeLayout(false);
 }
Example #7
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.Configuration.AppSettingsReader configurationAppSettings = new System.Configuration.AppSettingsReader();
     this.spellButton    = new System.Windows.Forms.Button();
     this.demoRichText   = new System.Windows.Forms.RichTextBox();
     this.spelling       = new NetSpell.SpellChecker.Spelling(this.components);
     this.wordDictionary = new NetSpell.SpellChecker.Dictionary.WordDictionary(this.components);
     this.SuspendLayout();
     //
     // spellButton
     //
     this.spellButton.Anchor   = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     this.spellButton.Location = new System.Drawing.Point(344, 368);
     this.spellButton.Name     = "spellButton";
     this.spellButton.Size     = new System.Drawing.Size(80, 23);
     this.spellButton.TabIndex = 3;
     this.spellButton.Text     = "Spell Check";
     this.spellButton.Click   += new System.EventHandler(this.spellButton_Click);
     //
     // demoRichText
     //
     this.demoRichText.AcceptsTab = true;
     this.demoRichText.Anchor     = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                           | System.Windows.Forms.AnchorStyles.Left)
                                                                          | System.Windows.Forms.AnchorStyles.Right)));
     this.demoRichText.AutoWordSelection = true;
     this.demoRichText.Location          = new System.Drawing.Point(16, 16);
     this.demoRichText.Name = "demoRichText";
     this.demoRichText.ShowSelectionMargin = true;
     this.demoRichText.Size     = new System.Drawing.Size(408, 344);
     this.demoRichText.TabIndex = 2;
     this.demoRichText.Text     = "Becuase people are realy bad spelers, \nths produc was desinged to prevent speling " +
                                  "erors in a text area like ths.";
     //
     // spelling
     //
     this.spelling.Dictionary    = this.wordDictionary;
     this.spelling.ReplacedWord += new NetSpell.SpellChecker.Spelling.ReplacedWordEventHandler(this.spelling_ReplacedWord);
     this.spelling.EndOfText    += new NetSpell.SpellChecker.Spelling.EndOfTextEventHandler(this.spelling_EndOfText);
     this.spelling.DeletedWord  += new NetSpell.SpellChecker.Spelling.DeletedWordEventHandler(this.spelling_DeletedWord);
     //
     // wordDictionary
     //
     this.wordDictionary.DictionaryFolder = ((string)(configurationAppSettings.GetValue("wordDictionary.DictionaryFolder", typeof(string))));
     //
     // DemoForm
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(440, 406);
     this.Controls.Add(this.spellButton);
     this.Controls.Add(this.demoRichText);
     this.Name = "DemoForm";
     this.Text = "NetSpell Demo";
     this.ResumeLayout(false);
 }
Example #8
0
 public WordTransform(string ws, string wd)
 {
     wsrc   = ws;                        //set source word
     wtrans = ws;
     wdst   = wd;
     oDict  = new NetSpell.SpellChecker.Dictionary.WordDictionary();
     oSpell = new NetSpell.SpellChecker.Spelling();
     oDict.DictionaryFile = "packages\\NetSpell.2.1.7\\dic\\en-US.dic";
     oDict.Initialize();     //set final word
 }
Example #9
0
 public CleanCodeAnalyzer(TokenGenerator tokenGenerator)
 {
     this.tokenGenerator = tokenGenerator;
     oDict = new NetSpell.SpellChecker.Dictionary.WordDictionary();
     //If you're running this project separately you need to change this to relative path.
     oDict.DictionaryFile = "CocoProject/packages/NetSpell.2.1.7/dic/en-US.dic";
     oDict.Initialize();
     oSpell            = new NetSpell.SpellChecker.Spelling();
     oSpell.Dictionary = oDict;
 }
Example #10
0
        public MainForm()
        {
            InitializeComponent();


            NetSpell.SpellChecker.Dictionary.WordDictionary w = new NetSpell.SpellChecker.Dictionary.WordDictionary();
            w.DictionaryFile   = "en-US.dic";
            w.DictionaryFolder = Application.StartupPath + @"\";
            w.Initialize();
            nS            = new NetSpell.SpellChecker.Spelling();
            nS.Dictionary = w;
            nS.ShowDialog = false;
        }
Example #11
0
 public frmDocument(String template, Building build)
 {
     building = build;
     InitializeComponent();
     if (!String.IsNullOrEmpty(template))
     {
         content = template;
     }
     spellCheck = new Spelling();
     dictionary = new NetSpell.SpellChecker.Dictionary.WordDictionary {
         DictionaryFolder = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "dic")
     };
     spellCheck.Dictionary    = dictionary;
     spellCheck.EndOfText    += spellCheck_EndOfText;
     spellCheck.DeletedWord  += spellCheck_DeletedWord;
     spellCheck.ReplacedWord += spellCheck_ReplacedWord;
 }
Example #12
0
        private async Task MessageReceivedAsync(IDialogContext context, IAwaitable <object> result)
        {
            var activity = await result as Activity;

            NetSpell.SpellChecker.Dictionary.WordDictionary oDict = new NetSpell.SpellChecker.Dictionary.WordDictionary();
            string wordToCheck = activity.Text;

            try
            {
                oDict.DictionaryFile = "C:\\Program Files (x86)\\IIS Express\\en-US.dic";
                oDict.Initialize();
                NetSpell.SpellChecker.Spelling oSpell = new NetSpell.SpellChecker.Spelling();
                oSpell.Dictionary = oDict;



                // calculate something for us to return
                int length = (activity.Text ?? string.Empty).Length;

                // return our reply to the user
                if (oSpell.TestWord(wordToCheck))
                {
                    await context.PostAsync($"Word exists in the English dictionary");
                }
                else
                {
                    await context.PostAsync($"Word does not exist in the English dictionary");
                }
            }
            catch (FileNotFoundException fnfe)
            {
                await context.PostAsync($"File Was Not Found | Details: {fnfe.Message}");
            }
            finally
            {
                oDict.Dispose();
            }


            //await context.PostAsync($"You sent {activity.Text} which was {length} characters From {activity.From}");

            context.Wait(MessageReceivedAsync);
        }
Example #13
0
        static void Main(string[] args)
        {
            validWordsDict = new Dictionary <string, bool>();
            callsDict      = new Dictionary <string, bool>();

            oDict = new NetSpell.SpellChecker.Dictionary.WordDictionary();
            oDict.DictionaryFile = "en-US.dic";
            oDict.Initialize();
            oSpell            = new NetSpell.SpellChecker.Spelling();
            oSpell.Dictionary = oDict;

            var s             = "aqqz";
            var filledIndexes = "aaaa";
            var alphabet      = "abcdefghijklmnopqrstuvwxyz";

            var codes = CrackCode(s, filledIndexes, alphabet).ToList();

            var str = codes.Aggregate((a, b) => $"{a}{Environment.NewLine}{b}");

            System.Console.Out.WriteLine(str);
        }
Example #14
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            Iterations = new WordsArray(this);

            Bulls = new BullsArray(this);

            Cows = new CowsArray(this);

            Chances = new ChancesArray(this);

            NetSpell.SpellChecker.Dictionary.WordDictionary oDict = new NetSpell.SpellChecker.Dictionary.WordDictionary();

            oDict.DictionaryFile = "en-US.dic";

            oDict.Initialize();

            spelCheck = new NetSpell.SpellChecker.Spelling();

            spelCheck.Dictionary = oDict;

            OriginalWord = GenerateWord();
        }
Example #15
0
        //-////////////////////////////////////////////////////////
        //
        static void Main(string[] args)
        {
            //char[] arr = { 'a', 'b', 'c' };
            //GetPer2(arr, (char[] result) =>
            //{
            //    Console.WriteLine(result);
            //    if(new string(result) == "bca")
            //    {
            //        Console.WriteLine("Found it!");
            //        return true;
            //    }
            //    return false;
            //});
            //return;

            /// Initialization
            // Init Word Checker
            wordDict = new NetSpell.SpellChecker.Dictionary.WordDictionary();
            wordDict.DictionaryFile = "en-US.dic";
            wordDict.Initialize();
            wordChecker            = new NetSpell.SpellChecker.Spelling();
            wordChecker.Dictionary = wordDict;

            //string input = "fqjcb rwjwj vnjax bnkhj whxcq nawjv nfxdu mbvnu ujbbf nnc";
            //string input = "fqjcbrwjwjvnjaxbnkhjwhxcqnawjvnfxdumbvnuujbbfnnc";
            string input = inputStrings[2];

            Console.WriteLine("==============================");
            Console.WriteLine(input);

            bool success = Decrypt(input);

            /// Complete Decryption Process
            // Print Map Results
            PrintSubstitutionMap(substitutionMap);
            // Finished. Keep Console Open.
            Console.Read();
        }
Example #16
0
        private void LoadDictionary()
        {
            this.wordDictionary = new NetSpell.SpellChecker.Dictionary.WordDictionary(components);

            this.wordDictionary.DictionaryFile = GitCommands.Settings.GetDictionaryDir() + GitCommands.Settings.Dictionary + ".dic";

            this.spelling.Dictionary = this.wordDictionary;
        }
Example #17
0
        public static bool validTurn(List <BoardSpace> spacesPlayed)
        {
            if (spacesPlayed.Count < 1)
            {
                return(true);
            }
            NetSpell.SpellChecker.Dictionary.WordDictionary oDict = new NetSpell.SpellChecker.Dictionary.WordDictionary();

            oDict.DictionaryFile = @"Assets\Packages\NetSpell.2.1.7\dic\en-US.dic";
            oDict.Initialize();

            List <String>     wordsPlayed = new List <String>();
            List <BoardSpace> spacesAdded = new List <BoardSpace>();

            foreach (BoardSpace space in spacesPlayed)
            {
                string word = "";
                word += space.getTile().getLetter();
                if (!checkListForMatch(space, spacesAdded))
                {
                    spacesAdded.Add(space);
                }

                //Check Left and Right
                if ((space.getX() != 0 && Board.boardSpaces[space.getX() - 1, space.getY()].checkEmpty() == false) || (space.getX() != 15 && Board.boardSpaces[space.getX() + 1, space.getY()].checkEmpty() == false))
                {
                    int xIndex = space.getX();
                    int yIndex = space.getY();
                    //Left
                    while (xIndex != 0 && Board.boardSpaces[xIndex - 1, yIndex].checkEmpty() == false && !checkListForMatch(Board.boardSpaces[xIndex - 1, yIndex], spacesAdded))
                    {
                        spacesAdded.Add(Board.boardSpaces[xIndex - 1, yIndex]);
                        word = Board.boardSpaces[xIndex - 1, yIndex].getTile().getLetter() + word;
                        Console.WriteLine(word);

                        xIndex--;
                    }
                    //Reset to original position
                    xIndex = space.getX();
                    yIndex = space.getY();

                    //Right
                    while (xIndex != 14 && Board.boardSpaces[xIndex + 1, yIndex].checkEmpty() == false && !checkListForMatch(Board.boardSpaces[xIndex + 1, yIndex], spacesAdded))
                    {
                        spacesAdded.Add(Board.boardSpaces[xIndex + 1, yIndex]);
                        word = word + Board.boardSpaces[xIndex + 1, yIndex].getTile().getLetter();
                        Console.WriteLine(word);

                        xIndex++;
                    }

                    if (word.Length > 1)
                    {
                        wordsPlayed.Add(word);
                    }
                }

                word  = "";
                word += space.getTile().getLetter();
                //Check Above and Below Space
                if ((space.getY() != 0 && Board.boardSpaces[space.getX(), space.getY() - 1].checkEmpty() == false) || (space.getY() != 15 && Board.boardSpaces[space.getX(), space.getY() + 1].checkEmpty() == false))
                {
                    int xIndex = space.getX();
                    int yIndex = space.getY();
                    //Below
                    while (yIndex != 0 && Board.boardSpaces[xIndex, yIndex - 1].checkEmpty() == false && !checkListForMatch(Board.boardSpaces[xIndex, yIndex - 1], spacesAdded))
                    {
                        spacesAdded.Add(Board.boardSpaces[xIndex, yIndex - 1]);
                        word = word + Board.boardSpaces[xIndex, yIndex - 1].getTile().getLetter();
                        Console.WriteLine(word);

                        yIndex--;
                    }
                    //Reset to original position
                    xIndex = space.getX();
                    yIndex = space.getY();

                    //Above
                    while (yIndex != 14 && Board.boardSpaces[xIndex, yIndex + 1].checkEmpty() == false && !checkListForMatch(Board.boardSpaces[xIndex, yIndex + 1], spacesAdded))
                    {
                        spacesAdded.Add(Board.boardSpaces[xIndex, yIndex + 1]);
                        word = Board.boardSpaces[xIndex, yIndex + 1].getTile().getLetter() + word;
                        Console.WriteLine(word);

                        yIndex++;
                    }

                    if (word.Length > 1)
                    {
                        wordsPlayed.Add(word);
                    }
                }
            }

            foreach (string word in wordsPlayed)
            {
                string wordToCheck = word;
                NetSpell.SpellChecker.Spelling oSpell = new NetSpell.SpellChecker.Spelling();

                oSpell.Dictionary = oDict;
                string reverse = reverseWord(wordToCheck);
                if (!oSpell.TestWord(reverse) && !oSpell.TestWord(wordToCheck))
                {
                    //Allows no tiles to be played and still be a valid turn
                    if (spacesPlayed.Count != 0)
                    {
                        //FAKE WORD DETECTED - RETURN FALSE AND NOTIFY PLAYER THEIR TURN IS NO GOOD
                        return(false);
                    }
                }
            }

            if (Board.boardSpaces[7, 7].checkEmpty() || wordsPlayed.Count == 0)
            {
                return(false);
            }
            return(true);//ALL WORDS ARE GOOD, Star space is used
        }
Example #18
0
        static void Main(string[] args)
        {
            SeleccionaRegistros();
            Console.WriteLine("Termine de seleccionar registros");
            Console.WriteLine("Ojo Ojo Ojo");
            Console.ReadKey();
            Console.WriteLine("Empezamos con la lectura de BD");
            ExtracciónPalabras contratosTexto = new ExtracciónPalabras();
            Thread             t2012          = new Thread(new ThreadStart(contratosTexto.Extrae2012));
            Thread             t2013          = new Thread(new ThreadStart(contratosTexto.Extrae2013));
            Thread             t2014          = new Thread(new ThreadStart(contratosTexto.Extrae2014));
            Thread             t2015          = new Thread(new ThreadStart(contratosTexto.Extrae2015));
            Thread             t2016          = new Thread(new ThreadStart(contratosTexto.Extrae2016));
            Thread             t2017          = new Thread(new ThreadStart(contratosTexto.Extrae2017));
            Thread             t2018          = new Thread(new ThreadStart(contratosTexto.Extrae2018));

            t2012.Start();
            t2013.Start();
            t2014.Start();
            t2015.Start();
            t2016.Start();
            t2017.Start();
            t2018.Start();

            t2012.Join();
            t2013.Join();
            t2014.Join();
            t2015.Join();
            t2016.Join();
            t2017.Join();
            t2018.Join();

            Console.WriteLine("Inventario de Palabras de la base de datos");

            CreaInventarioPalabras(@"D:\AnalisisPalabrasAPF\Palabras2012.txt");
            CreaInventarioPalabras(@"D:\AnalisisPalabrasAPF\Palabras2013.txt");
            CreaInventarioPalabras(@"D:\AnalisisPalabrasAPF\Palabras2014.txt");
            CreaInventarioPalabras(@"D:\AnalisisPalabrasAPF\Palabras2015.txt");
            CreaInventarioPalabras(@"D:\AnalisisPalabrasAPF\Palabras2016.txt");
            CreaInventarioPalabras(@"D:\AnalisisPalabrasAPF\Palabras2017.txt");
            CreaInventarioPalabras(@"D:\AnalisisPalabrasAPF\Palabras2018.txt");

            Console.WriteLine("Terminamos inventario");
            Console.WriteLine("Escribimos el inventario de palabras");
            List <string> ListaInventarioPalabras = new List <string>();

            foreach (string palabra in InventarioPalabras)
            {
                ListaInventarioPalabras.Add(palabra);
            }
            ListaInventarioPalabras.Sort();

            componente = new System.ComponentModel.Container();
            NetSpell.SpellChecker.Spelling oSpell = new NetSpell.SpellChecker.Spelling(componente);
            NetSpell.SpellChecker.Dictionary.WordDictionary oDict = new NetSpell.SpellChecker.Dictionary.WordDictionary(componente);
            oDict.DictionaryFolder = @"D:\VSProjects\NetSpell.2.1.7\dic\";
            oDict.DictionaryFile   = "es-MX.dic";
            oDict.Initialize();
            oSpell.Dictionary = oDict;

            if (oSpell.TestWord("acertijo"))
            {
                Console.WriteLine("acertijo OK");
            }
            else
            {
                Console.WriteLine("acertijo NOK");
            }
            if (oSpell.TestWord("acercátelos"))
            {
                Console.WriteLine(" acercátelos OK");
            }
            else
            {
                Console.WriteLine("acercátelos NOK");
            }

            using (System.IO.StreamWriter fileOK =
                       new System.IO.StreamWriter(@"D:\AnalisisPalabrasAPF\InventarioOK.txt")) {
                using (System.IO.StreamWriter fileNOK =
                           new System.IO.StreamWriter(@"D:\AnalisisPalabrasAPF\InventarioNOK.txt"))
                {
                    foreach (string palabra in ListaInventarioPalabras)
                    {
                        if (palabra.Length > 2)
                        {
                            if (oSpell.TestWord(palabra))
                            {
                                fileOK.WriteLine(palabra + " OK");
                            }
                            else
                            {
                                fileNOK.WriteLine(palabra + " NOK");
                            }
                        }
                    }
                }
            }

            Console.WriteLine("Acabamos inventarios");
            Console.ReadKey();
        }
Example #19
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(MainForm));
     System.Configuration.AppSettingsReader configurationAppSettings = new System.Configuration.AppSettingsReader();
     this.statusBar = new System.Windows.Forms.StatusBar();
     this.mainMenu = new System.Windows.Forms.MainMenu();
     this.menuFile = new System.Windows.Forms.MenuItem();
     this.menuFileNew = new System.Windows.Forms.MenuItem();
     this.menuFileOpen = new System.Windows.Forms.MenuItem();
     this.menuItem1 = new System.Windows.Forms.MenuItem();
     this.menuFileDemoRtf = new System.Windows.Forms.MenuItem();
     this.menuItem2 = new System.Windows.Forms.MenuItem();
     this.menuFileExit = new System.Windows.Forms.MenuItem();
     this.menuWindow = new System.Windows.Forms.MenuItem();
     this.menuWindowHorizontal = new System.Windows.Forms.MenuItem();
     this.menuWindowVertical = new System.Windows.Forms.MenuItem();
     this.menuWindowCascade = new System.Windows.Forms.MenuItem();
     this.menuHelp = new System.Windows.Forms.MenuItem();
     this.menuHelpAbout = new System.Windows.Forms.MenuItem();
     this.editToolBar = new System.Windows.Forms.ToolBar();
     this.newBarButton = new System.Windows.Forms.ToolBarButton();
     this.openBarButton = new System.Windows.Forms.ToolBarButton();
     this.saveBarButton = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton4 = new System.Windows.Forms.ToolBarButton();
     this.printBarButton = new System.Windows.Forms.ToolBarButton();
     this.printPreviewBarButton = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton5 = new System.Windows.Forms.ToolBarButton();
     this.spellBarButton = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton1 = new System.Windows.Forms.ToolBarButton();
     this.cutBarButton = new System.Windows.Forms.ToolBarButton();
     this.copyBarButton = new System.Windows.Forms.ToolBarButton();
     this.pasteBarButton = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton8 = new System.Windows.Forms.ToolBarButton();
     this.undoBarButton = new System.Windows.Forms.ToolBarButton();
     this.redoBarButton = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton11 = new System.Windows.Forms.ToolBarButton();
     this.fontBarButton = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton2 = new System.Windows.Forms.ToolBarButton();
     this.boldBarButton = new System.Windows.Forms.ToolBarButton();
     this.italicBarButton = new System.Windows.Forms.ToolBarButton();
     this.underlineBarButton = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton6 = new System.Windows.Forms.ToolBarButton();
     this.leftBarButton = new System.Windows.Forms.ToolBarButton();
     this.centerBarButton = new System.Windows.Forms.ToolBarButton();
     this.rightBarButton = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton12 = new System.Windows.Forms.ToolBarButton();
     this.bulletsBarButton = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton3 = new System.Windows.Forms.ToolBarButton();
     this.fontColorBarButton = new System.Windows.Forms.ToolBarButton();
     this.toolBarImages = new System.Windows.Forms.ImageList(this.components);
     this.WordDictionary = new NetSpell.SpellChecker.Dictionary.WordDictionary(this.components);
     this.menuFileDemoHtml = new System.Windows.Forms.MenuItem();
     this.menuFileDemoXml = new System.Windows.Forms.MenuItem();
     this.menuFileDemoText = new System.Windows.Forms.MenuItem();
     this.SuspendLayout();
     //
     // statusBar
     //
     this.statusBar.Location = new System.Drawing.Point(0, 417);
     this.statusBar.Name = "statusBar";
     this.statusBar.Size = new System.Drawing.Size(640, 16);
     this.statusBar.TabIndex = 2;
     //
     // mainMenu
     //
     this.mainMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
                                                                              this.menuFile,
                                                                              this.menuWindow,
                                                                              this.menuHelp});
     //
     // menuFile
     //
     this.menuFile.Index = 0;
     this.menuFile.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
                                                                              this.menuFileNew,
                                                                              this.menuFileOpen,
                                                                              this.menuItem1,
                                                                              this.menuFileDemoRtf,
                                                                              this.menuFileDemoHtml,
                                                                              this.menuFileDemoXml,
                                                                              this.menuFileDemoText,
                                                                              this.menuItem2,
                                                                              this.menuFileExit});
     this.menuFile.MergeType = System.Windows.Forms.MenuMerge.MergeItems;
     this.menuFile.Text = "File";
     //
     // menuFileNew
     //
     this.menuFileNew.Index = 0;
     this.menuFileNew.Shortcut = System.Windows.Forms.Shortcut.CtrlN;
     this.menuFileNew.Text = "New";
     this.menuFileNew.Click += new System.EventHandler(this.menuFileNew_Click);
     //
     // menuFileOpen
     //
     this.menuFileOpen.Index = 1;
     this.menuFileOpen.MergeOrder = 1;
     this.menuFileOpen.Shortcut = System.Windows.Forms.Shortcut.CtrlO;
     this.menuFileOpen.Text = "Open...";
     this.menuFileOpen.Click += new System.EventHandler(this.menuFileOpen_Click);
     //
     // menuItem1
     //
     this.menuItem1.Index = 2;
     this.menuItem1.MergeOrder = 12;
     this.menuItem1.Text = "-";
     //
     // menuFileDemoRtf
     //
     this.menuFileDemoRtf.Index = 3;
     this.menuFileDemoRtf.MergeOrder = 13;
     this.menuFileDemoRtf.Text = "Demo Rich Text File";
     this.menuFileDemoRtf.Click += new System.EventHandler(this.menuFileDemoRtf_Click);
     //
     // menuItem2
     //
     this.menuItem2.Index = 7;
     this.menuItem2.MergeOrder = 17;
     this.menuItem2.Text = "-";
     //
     // menuFileExit
     //
     this.menuFileExit.Index = 8;
     this.menuFileExit.MergeOrder = 18;
     this.menuFileExit.Shortcut = System.Windows.Forms.Shortcut.CtrlX;
     this.menuFileExit.Text = "Exit";
     this.menuFileExit.Click += new System.EventHandler(this.menuFileExit_Click);
     //
     // menuWindow
     //
     this.menuWindow.Index = 1;
     this.menuWindow.MdiList = true;
     this.menuWindow.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
                                                                                this.menuWindowHorizontal,
                                                                                this.menuWindowVertical,
                                                                                this.menuWindowCascade});
     this.menuWindow.MergeOrder = 4;
     this.menuWindow.Text = "Window";
     //
     // menuWindowHorizontal
     //
     this.menuWindowHorizontal.Index = 0;
     this.menuWindowHorizontal.Text = "Tile Horizontal";
     this.menuWindowHorizontal.Click += new System.EventHandler(this.menuWindowHorizontal_Click);
     //
     // menuWindowVertical
     //
     this.menuWindowVertical.Index = 1;
     this.menuWindowVertical.Text = "Tile Vertical";
     this.menuWindowVertical.Click += new System.EventHandler(this.menuWindowVertical_Click);
     //
     // menuWindowCascade
     //
     this.menuWindowCascade.Index = 2;
     this.menuWindowCascade.Text = "Cascade";
     this.menuWindowCascade.Click += new System.EventHandler(this.menuWindowCascade_Click);
     //
     // menuHelp
     //
     this.menuHelp.Index = 2;
     this.menuHelp.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
                                                                              this.menuHelpAbout});
     this.menuHelp.MergeOrder = 5;
     this.menuHelp.Text = "Help";
     //
     // menuHelpAbout
     //
     this.menuHelpAbout.Index = 0;
     this.menuHelpAbout.Text = "About";
     this.menuHelpAbout.Click += new System.EventHandler(this.menuHelpAbout_Click);
     //
     // editToolBar
     //
     this.editToolBar.AutoSize = false;
     this.editToolBar.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
                                                                                    this.newBarButton,
                                                                                    this.openBarButton,
                                                                                    this.saveBarButton,
                                                                                    this.toolBarButton4,
                                                                                    this.printBarButton,
                                                                                    this.printPreviewBarButton,
                                                                                    this.toolBarButton5,
                                                                                    this.spellBarButton,
                                                                                    this.toolBarButton1,
                                                                                    this.cutBarButton,
                                                                                    this.copyBarButton,
                                                                                    this.pasteBarButton,
                                                                                    this.toolBarButton8,
                                                                                    this.undoBarButton,
                                                                                    this.redoBarButton,
                                                                                    this.toolBarButton11,
                                                                                    this.fontBarButton,
                                                                                    this.toolBarButton2,
                                                                                    this.boldBarButton,
                                                                                    this.italicBarButton,
                                                                                    this.underlineBarButton,
                                                                                    this.toolBarButton6,
                                                                                    this.leftBarButton,
                                                                                    this.centerBarButton,
                                                                                    this.rightBarButton,
                                                                                    this.toolBarButton12,
                                                                                    this.bulletsBarButton,
                                                                                    this.toolBarButton3,
                                                                                    this.fontColorBarButton});
     this.editToolBar.ButtonSize = new System.Drawing.Size(24, 24);
     this.editToolBar.DropDownArrows = true;
     this.editToolBar.ImageList = this.toolBarImages;
     this.editToolBar.Location = new System.Drawing.Point(0, 0);
     this.editToolBar.Name = "editToolBar";
     this.editToolBar.ShowToolTips = true;
     this.editToolBar.Size = new System.Drawing.Size(640, 32);
     this.editToolBar.TabIndex = 4;
     this.editToolBar.TextAlign = System.Windows.Forms.ToolBarTextAlign.Right;
     this.editToolBar.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.editToolBar_ButtonClick);
     //
     // newBarButton
     //
     this.newBarButton.ImageIndex = 4;
     this.newBarButton.ToolTipText = "New";
     //
     // openBarButton
     //
     this.openBarButton.ImageIndex = 5;
     this.openBarButton.ToolTipText = "Open";
     //
     // saveBarButton
     //
     this.saveBarButton.ImageIndex = 8;
     this.saveBarButton.ToolTipText = "Save";
     //
     // toolBarButton4
     //
     this.toolBarButton4.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // printBarButton
     //
     this.printBarButton.ImageIndex = 7;
     this.printBarButton.ToolTipText = "Print";
     //
     // printPreviewBarButton
     //
     this.printPreviewBarButton.ImageIndex = 3;
     this.printPreviewBarButton.ToolTipText = "Print Preview";
     //
     // toolBarButton5
     //
     this.toolBarButton5.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // spellBarButton
     //
     this.spellBarButton.ImageIndex = 9;
     this.spellBarButton.ToolTipText = "Spell Check";
     //
     // toolBarButton1
     //
     this.toolBarButton1.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // cutBarButton
     //
     this.cutBarButton.ImageIndex = 1;
     this.cutBarButton.ToolTipText = "Cut";
     //
     // copyBarButton
     //
     this.copyBarButton.ImageIndex = 0;
     this.copyBarButton.ToolTipText = "Copy";
     //
     // pasteBarButton
     //
     this.pasteBarButton.ImageIndex = 6;
     this.pasteBarButton.ToolTipText = "Paste";
     //
     // toolBarButton8
     //
     this.toolBarButton8.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // undoBarButton
     //
     this.undoBarButton.ImageIndex = 10;
     this.undoBarButton.ToolTipText = "Undo";
     //
     // redoBarButton
     //
     this.redoBarButton.ImageIndex = 11;
     this.redoBarButton.ToolTipText = "Redo";
     //
     // toolBarButton11
     //
     this.toolBarButton11.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // fontBarButton
     //
     this.fontBarButton.ImageIndex = 13;
     this.fontBarButton.ToolTipText = "Font";
     //
     // toolBarButton2
     //
     this.toolBarButton2.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // boldBarButton
     //
     this.boldBarButton.ImageIndex = 14;
     this.boldBarButton.Style = System.Windows.Forms.ToolBarButtonStyle.ToggleButton;
     this.boldBarButton.ToolTipText = "Bold";
     //
     // italicBarButton
     //
     this.italicBarButton.ImageIndex = 15;
     this.italicBarButton.Style = System.Windows.Forms.ToolBarButtonStyle.ToggleButton;
     this.italicBarButton.ToolTipText = "Italic";
     //
     // underlineBarButton
     //
     this.underlineBarButton.ImageIndex = 16;
     this.underlineBarButton.Style = System.Windows.Forms.ToolBarButtonStyle.ToggleButton;
     this.underlineBarButton.ToolTipText = "Underline";
     //
     // toolBarButton6
     //
     this.toolBarButton6.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // leftBarButton
     //
     this.leftBarButton.ImageIndex = 17;
     this.leftBarButton.Style = System.Windows.Forms.ToolBarButtonStyle.ToggleButton;
     this.leftBarButton.ToolTipText = "Align Left";
     //
     // centerBarButton
     //
     this.centerBarButton.ImageIndex = 18;
     this.centerBarButton.Style = System.Windows.Forms.ToolBarButtonStyle.ToggleButton;
     this.centerBarButton.ToolTipText = "Align Center";
     //
     // rightBarButton
     //
     this.rightBarButton.ImageIndex = 19;
     this.rightBarButton.Style = System.Windows.Forms.ToolBarButtonStyle.ToggleButton;
     this.rightBarButton.ToolTipText = "Align Right";
     //
     // toolBarButton12
     //
     this.toolBarButton12.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // bulletsBarButton
     //
     this.bulletsBarButton.ImageIndex = 20;
     this.bulletsBarButton.Style = System.Windows.Forms.ToolBarButtonStyle.ToggleButton;
     this.bulletsBarButton.ToolTipText = "Bullets";
     //
     // toolBarButton3
     //
     this.toolBarButton3.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // fontColorBarButton
     //
     this.fontColorBarButton.ImageIndex = 22;
     this.fontColorBarButton.ToolTipText = "Font Color";
     //
     // toolBarImages
     //
     this.toolBarImages.ImageSize = new System.Drawing.Size(16, 16);
     this.toolBarImages.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("toolBarImages.ImageStream")));
     this.toolBarImages.TransparentColor = System.Drawing.Color.Transparent;
     //
     // WordDictionary
     //
     this.WordDictionary.DictionaryFolder = ((string)(configurationAppSettings.GetValue("WordDictionary.DictionaryFolder", typeof(string))));
     this.WordDictionary.EnableUserFile = ((bool)(configurationAppSettings.GetValue("WordDictionary.EnableUserFile", typeof(bool))));
     this.WordDictionary.UserFile = ((string)(configurationAppSettings.GetValue("WordDictionary.UserFile", typeof(string))));
     //
     // menuFileDemoHtml
     //
     this.menuFileDemoHtml.Index = 4;
     this.menuFileDemoHtml.MergeOrder = 14;
     this.menuFileDemoHtml.Text = "Demo HTML File";
     this.menuFileDemoHtml.Click += new System.EventHandler(this.menuFileDemoHtml_Click);
     //
     // menuFileDemoXml
     //
     this.menuFileDemoXml.Index = 5;
     this.menuFileDemoXml.MergeOrder = 15;
     this.menuFileDemoXml.Text = "Demo XML File";
     this.menuFileDemoXml.Click += new System.EventHandler(this.menuFileDemoXml_Click);
     //
     // menuFileDemoText
     //
     this.menuFileDemoText.Index = 6;
     this.menuFileDemoText.MergeOrder = 16;
     this.menuFileDemoText.Text = "Demo Text File";
     this.menuFileDemoText.Click += new System.EventHandler(this.menuFileDemoText_Click);
     //
     // MainForm
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize = new System.Drawing.Size(640, 433);
     this.Controls.Add(this.editToolBar);
     this.Controls.Add(this.statusBar);
     this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.IsMdiContainer = true;
     this.Menu = this.mainMenu;
     this.Name = "MainForm";
     this.Text = "NetSpell Text Editor";
     this.Load += new System.EventHandler(this.MainForm_Load);
     this.ResumeLayout(false);
 }
Example #20
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.Resources.ResourceManager       resources = new System.Resources.ResourceManager(typeof(MainForm));
     System.Configuration.AppSettingsReader configurationAppSettings = new System.Configuration.AppSettingsReader();
     this.statusBar             = new System.Windows.Forms.StatusBar();
     this.mainMenu              = new System.Windows.Forms.MainMenu();
     this.menuFile              = new System.Windows.Forms.MenuItem();
     this.menuFileNew           = new System.Windows.Forms.MenuItem();
     this.menuFileOpen          = new System.Windows.Forms.MenuItem();
     this.menuItem1             = new System.Windows.Forms.MenuItem();
     this.menuFileDemoRtf       = new System.Windows.Forms.MenuItem();
     this.menuItem2             = new System.Windows.Forms.MenuItem();
     this.menuFileExit          = new System.Windows.Forms.MenuItem();
     this.menuWindow            = new System.Windows.Forms.MenuItem();
     this.menuWindowHorizontal  = new System.Windows.Forms.MenuItem();
     this.menuWindowVertical    = new System.Windows.Forms.MenuItem();
     this.menuWindowCascade     = new System.Windows.Forms.MenuItem();
     this.menuHelp              = new System.Windows.Forms.MenuItem();
     this.menuHelpAbout         = new System.Windows.Forms.MenuItem();
     this.editToolBar           = new System.Windows.Forms.ToolBar();
     this.newBarButton          = new System.Windows.Forms.ToolBarButton();
     this.openBarButton         = new System.Windows.Forms.ToolBarButton();
     this.saveBarButton         = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton4        = new System.Windows.Forms.ToolBarButton();
     this.printBarButton        = new System.Windows.Forms.ToolBarButton();
     this.printPreviewBarButton = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton5        = new System.Windows.Forms.ToolBarButton();
     this.spellBarButton        = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton1        = new System.Windows.Forms.ToolBarButton();
     this.cutBarButton          = new System.Windows.Forms.ToolBarButton();
     this.copyBarButton         = new System.Windows.Forms.ToolBarButton();
     this.pasteBarButton        = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton8        = new System.Windows.Forms.ToolBarButton();
     this.undoBarButton         = new System.Windows.Forms.ToolBarButton();
     this.redoBarButton         = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton11       = new System.Windows.Forms.ToolBarButton();
     this.fontBarButton         = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton2        = new System.Windows.Forms.ToolBarButton();
     this.boldBarButton         = new System.Windows.Forms.ToolBarButton();
     this.italicBarButton       = new System.Windows.Forms.ToolBarButton();
     this.underlineBarButton    = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton6        = new System.Windows.Forms.ToolBarButton();
     this.leftBarButton         = new System.Windows.Forms.ToolBarButton();
     this.centerBarButton       = new System.Windows.Forms.ToolBarButton();
     this.rightBarButton        = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton12       = new System.Windows.Forms.ToolBarButton();
     this.bulletsBarButton      = new System.Windows.Forms.ToolBarButton();
     this.toolBarButton3        = new System.Windows.Forms.ToolBarButton();
     this.fontColorBarButton    = new System.Windows.Forms.ToolBarButton();
     this.toolBarImages         = new System.Windows.Forms.ImageList(this.components);
     this.WordDictionary        = new NetSpell.SpellChecker.Dictionary.WordDictionary(this.components);
     this.menuFileDemoHtml      = new System.Windows.Forms.MenuItem();
     this.menuFileDemoXml       = new System.Windows.Forms.MenuItem();
     this.menuFileDemoText      = new System.Windows.Forms.MenuItem();
     this.SuspendLayout();
     //
     // statusBar
     //
     this.statusBar.Location = new System.Drawing.Point(0, 417);
     this.statusBar.Name     = "statusBar";
     this.statusBar.Size     = new System.Drawing.Size(640, 16);
     this.statusBar.TabIndex = 2;
     //
     // mainMenu
     //
     this.mainMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.menuFile,
         this.menuWindow,
         this.menuHelp
     });
     //
     // menuFile
     //
     this.menuFile.Index = 0;
     this.menuFile.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.menuFileNew,
         this.menuFileOpen,
         this.menuItem1,
         this.menuFileDemoRtf,
         this.menuFileDemoHtml,
         this.menuFileDemoXml,
         this.menuFileDemoText,
         this.menuItem2,
         this.menuFileExit
     });
     this.menuFile.MergeType = System.Windows.Forms.MenuMerge.MergeItems;
     this.menuFile.Text      = "File";
     //
     // menuFileNew
     //
     this.menuFileNew.Index    = 0;
     this.menuFileNew.Shortcut = System.Windows.Forms.Shortcut.CtrlN;
     this.menuFileNew.Text     = "New";
     this.menuFileNew.Click   += new System.EventHandler(this.menuFileNew_Click);
     //
     // menuFileOpen
     //
     this.menuFileOpen.Index      = 1;
     this.menuFileOpen.MergeOrder = 1;
     this.menuFileOpen.Shortcut   = System.Windows.Forms.Shortcut.CtrlO;
     this.menuFileOpen.Text       = "Open...";
     this.menuFileOpen.Click     += new System.EventHandler(this.menuFileOpen_Click);
     //
     // menuItem1
     //
     this.menuItem1.Index      = 2;
     this.menuItem1.MergeOrder = 12;
     this.menuItem1.Text       = "-";
     //
     // menuFileDemoRtf
     //
     this.menuFileDemoRtf.Index      = 3;
     this.menuFileDemoRtf.MergeOrder = 13;
     this.menuFileDemoRtf.Text       = "Demo Rich Text File";
     this.menuFileDemoRtf.Click     += new System.EventHandler(this.menuFileDemoRtf_Click);
     //
     // menuItem2
     //
     this.menuItem2.Index      = 7;
     this.menuItem2.MergeOrder = 17;
     this.menuItem2.Text       = "-";
     //
     // menuFileExit
     //
     this.menuFileExit.Index      = 8;
     this.menuFileExit.MergeOrder = 18;
     this.menuFileExit.Shortcut   = System.Windows.Forms.Shortcut.CtrlX;
     this.menuFileExit.Text       = "Exit";
     this.menuFileExit.Click     += new System.EventHandler(this.menuFileExit_Click);
     //
     // menuWindow
     //
     this.menuWindow.Index   = 1;
     this.menuWindow.MdiList = true;
     this.menuWindow.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.menuWindowHorizontal,
         this.menuWindowVertical,
         this.menuWindowCascade
     });
     this.menuWindow.MergeOrder = 4;
     this.menuWindow.Text       = "Window";
     //
     // menuWindowHorizontal
     //
     this.menuWindowHorizontal.Index  = 0;
     this.menuWindowHorizontal.Text   = "Tile Horizontal";
     this.menuWindowHorizontal.Click += new System.EventHandler(this.menuWindowHorizontal_Click);
     //
     // menuWindowVertical
     //
     this.menuWindowVertical.Index  = 1;
     this.menuWindowVertical.Text   = "Tile Vertical";
     this.menuWindowVertical.Click += new System.EventHandler(this.menuWindowVertical_Click);
     //
     // menuWindowCascade
     //
     this.menuWindowCascade.Index  = 2;
     this.menuWindowCascade.Text   = "Cascade";
     this.menuWindowCascade.Click += new System.EventHandler(this.menuWindowCascade_Click);
     //
     // menuHelp
     //
     this.menuHelp.Index = 2;
     this.menuHelp.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.menuHelpAbout
     });
     this.menuHelp.MergeOrder = 5;
     this.menuHelp.Text       = "Help";
     //
     // menuHelpAbout
     //
     this.menuHelpAbout.Index  = 0;
     this.menuHelpAbout.Text   = "About";
     this.menuHelpAbout.Click += new System.EventHandler(this.menuHelpAbout_Click);
     //
     // editToolBar
     //
     this.editToolBar.AutoSize = false;
     this.editToolBar.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
         this.newBarButton,
         this.openBarButton,
         this.saveBarButton,
         this.toolBarButton4,
         this.printBarButton,
         this.printPreviewBarButton,
         this.toolBarButton5,
         this.spellBarButton,
         this.toolBarButton1,
         this.cutBarButton,
         this.copyBarButton,
         this.pasteBarButton,
         this.toolBarButton8,
         this.undoBarButton,
         this.redoBarButton,
         this.toolBarButton11,
         this.fontBarButton,
         this.toolBarButton2,
         this.boldBarButton,
         this.italicBarButton,
         this.underlineBarButton,
         this.toolBarButton6,
         this.leftBarButton,
         this.centerBarButton,
         this.rightBarButton,
         this.toolBarButton12,
         this.bulletsBarButton,
         this.toolBarButton3,
         this.fontColorBarButton
     });
     this.editToolBar.ButtonSize     = new System.Drawing.Size(24, 24);
     this.editToolBar.DropDownArrows = true;
     this.editToolBar.ImageList      = this.toolBarImages;
     this.editToolBar.Location       = new System.Drawing.Point(0, 0);
     this.editToolBar.Name           = "editToolBar";
     this.editToolBar.ShowToolTips   = true;
     this.editToolBar.Size           = new System.Drawing.Size(640, 32);
     this.editToolBar.TabIndex       = 4;
     this.editToolBar.TextAlign      = System.Windows.Forms.ToolBarTextAlign.Right;
     this.editToolBar.ButtonClick   += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.editToolBar_ButtonClick);
     //
     // newBarButton
     //
     this.newBarButton.ImageIndex  = 4;
     this.newBarButton.ToolTipText = "New";
     //
     // openBarButton
     //
     this.openBarButton.ImageIndex  = 5;
     this.openBarButton.ToolTipText = "Open";
     //
     // saveBarButton
     //
     this.saveBarButton.ImageIndex  = 8;
     this.saveBarButton.ToolTipText = "Save";
     //
     // toolBarButton4
     //
     this.toolBarButton4.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // printBarButton
     //
     this.printBarButton.ImageIndex  = 7;
     this.printBarButton.ToolTipText = "Print";
     //
     // printPreviewBarButton
     //
     this.printPreviewBarButton.ImageIndex  = 3;
     this.printPreviewBarButton.ToolTipText = "Print Preview";
     //
     // toolBarButton5
     //
     this.toolBarButton5.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // spellBarButton
     //
     this.spellBarButton.ImageIndex  = 9;
     this.spellBarButton.ToolTipText = "Spell Check";
     //
     // toolBarButton1
     //
     this.toolBarButton1.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // cutBarButton
     //
     this.cutBarButton.ImageIndex  = 1;
     this.cutBarButton.ToolTipText = "Cut";
     //
     // copyBarButton
     //
     this.copyBarButton.ImageIndex  = 0;
     this.copyBarButton.ToolTipText = "Copy";
     //
     // pasteBarButton
     //
     this.pasteBarButton.ImageIndex  = 6;
     this.pasteBarButton.ToolTipText = "Paste";
     //
     // toolBarButton8
     //
     this.toolBarButton8.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // undoBarButton
     //
     this.undoBarButton.ImageIndex  = 10;
     this.undoBarButton.ToolTipText = "Undo";
     //
     // redoBarButton
     //
     this.redoBarButton.ImageIndex  = 11;
     this.redoBarButton.ToolTipText = "Redo";
     //
     // toolBarButton11
     //
     this.toolBarButton11.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // fontBarButton
     //
     this.fontBarButton.ImageIndex  = 13;
     this.fontBarButton.ToolTipText = "Font";
     //
     // toolBarButton2
     //
     this.toolBarButton2.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // boldBarButton
     //
     this.boldBarButton.ImageIndex  = 14;
     this.boldBarButton.Style       = System.Windows.Forms.ToolBarButtonStyle.ToggleButton;
     this.boldBarButton.ToolTipText = "Bold";
     //
     // italicBarButton
     //
     this.italicBarButton.ImageIndex  = 15;
     this.italicBarButton.Style       = System.Windows.Forms.ToolBarButtonStyle.ToggleButton;
     this.italicBarButton.ToolTipText = "Italic";
     //
     // underlineBarButton
     //
     this.underlineBarButton.ImageIndex  = 16;
     this.underlineBarButton.Style       = System.Windows.Forms.ToolBarButtonStyle.ToggleButton;
     this.underlineBarButton.ToolTipText = "Underline";
     //
     // toolBarButton6
     //
     this.toolBarButton6.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // leftBarButton
     //
     this.leftBarButton.ImageIndex  = 17;
     this.leftBarButton.Style       = System.Windows.Forms.ToolBarButtonStyle.ToggleButton;
     this.leftBarButton.ToolTipText = "Align Left";
     //
     // centerBarButton
     //
     this.centerBarButton.ImageIndex  = 18;
     this.centerBarButton.Style       = System.Windows.Forms.ToolBarButtonStyle.ToggleButton;
     this.centerBarButton.ToolTipText = "Align Center";
     //
     // rightBarButton
     //
     this.rightBarButton.ImageIndex  = 19;
     this.rightBarButton.Style       = System.Windows.Forms.ToolBarButtonStyle.ToggleButton;
     this.rightBarButton.ToolTipText = "Align Right";
     //
     // toolBarButton12
     //
     this.toolBarButton12.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // bulletsBarButton
     //
     this.bulletsBarButton.ImageIndex  = 20;
     this.bulletsBarButton.Style       = System.Windows.Forms.ToolBarButtonStyle.ToggleButton;
     this.bulletsBarButton.ToolTipText = "Bullets";
     //
     // toolBarButton3
     //
     this.toolBarButton3.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
     //
     // fontColorBarButton
     //
     this.fontColorBarButton.ImageIndex  = 22;
     this.fontColorBarButton.ToolTipText = "Font Color";
     //
     // toolBarImages
     //
     this.toolBarImages.ImageSize        = new System.Drawing.Size(16, 16);
     this.toolBarImages.ImageStream      = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("toolBarImages.ImageStream")));
     this.toolBarImages.TransparentColor = System.Drawing.Color.Transparent;
     //
     // WordDictionary
     //
     this.WordDictionary.DictionaryFolder = ((string)(configurationAppSettings.GetValue("WordDictionary.DictionaryFolder", typeof(string))));
     this.WordDictionary.EnableUserFile   = ((bool)(configurationAppSettings.GetValue("WordDictionary.EnableUserFile", typeof(bool))));
     this.WordDictionary.UserFile         = ((string)(configurationAppSettings.GetValue("WordDictionary.UserFile", typeof(string))));
     //
     // menuFileDemoHtml
     //
     this.menuFileDemoHtml.Index      = 4;
     this.menuFileDemoHtml.MergeOrder = 14;
     this.menuFileDemoHtml.Text       = "Demo HTML File";
     this.menuFileDemoHtml.Click     += new System.EventHandler(this.menuFileDemoHtml_Click);
     //
     // menuFileDemoXml
     //
     this.menuFileDemoXml.Index      = 5;
     this.menuFileDemoXml.MergeOrder = 15;
     this.menuFileDemoXml.Text       = "Demo XML File";
     this.menuFileDemoXml.Click     += new System.EventHandler(this.menuFileDemoXml_Click);
     //
     // menuFileDemoText
     //
     this.menuFileDemoText.Index      = 6;
     this.menuFileDemoText.MergeOrder = 16;
     this.menuFileDemoText.Text       = "Demo Text File";
     this.menuFileDemoText.Click     += new System.EventHandler(this.menuFileDemoText_Click);
     //
     // MainForm
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(640, 433);
     this.Controls.Add(this.editToolBar);
     this.Controls.Add(this.statusBar);
     this.Icon           = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.IsMdiContainer = true;
     this.Menu           = this.mainMenu;
     this.Name           = "MainForm";
     this.Text           = "NetSpell Text Editor";
     this.Load          += new System.EventHandler(this.MainForm_Load);
     this.ResumeLayout(false);
 }
        /// <summary>
        /// creats a valid spellcheck object
        /// </summary>
        private NetSpell.SpellChecker.Spelling SpellCheckObject(string sDicName, string sFolder, string sUserFile)
        {
            if (sDicName == null)
            {
                throw new Exception("doSpellCheck - dicname was null.");
            }
            if (sFolder == null)
            {
                throw new Exception("doSpellCheck - sFolder was null.");
            }
            if (sUserFile == null)
            {
                throw new Exception("doSpellCheck - userfile was null.");
            }
            if (File.Exists(sFolder + "\\" + sDicName) == false)
            {
                throw new Exception(String.Format("doSpellCheck - Dictionoary {0} does not exist", sFolder + "\\" + sDicName
                    ));
            }
            NetSpell.SpellChecker.Spelling SpellChecker2;
            SpellChecker2 = new NetSpell.SpellChecker.Spelling();

            SpellChecker2.ShowDialog = true;
            NetSpell.SpellChecker.Dictionary.WordDictionary dictionary = new NetSpell.SpellChecker.Dictionary.WordDictionary();
            dictionary.DictionaryFile = sDicName;
            dictionary.DictionaryFolder = sFolder;
            dictionary.UserFile = sUserFile;
            SpellChecker2.Dictionary = dictionary;

            return SpellChecker2;
        }