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; }
public WordChecker() { oDict = new NetSpell.SpellChecker.Dictionary.WordDictionary(); oDict.DictionaryFile = "en-US.dic"; oDict.Initialize(); oSpell = new NetSpell.SpellChecker.Spelling(); oSpell.Dictionary = oDict; }
/// <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); }
/// <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); }
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 }
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; }
public AYTTextBox() { // This call is required by the Windows.Forms Form Designer. InitializeComponent(); _format.FormatFlags=StringFormatFlags.FitBlackBox; _spell=new NetSpell.SpellChecker.Spelling(); Application.Idle+=new EventHandler(OnIdle); }
public AYTTextBox() { // This call is required by the Windows.Forms Form Designer. InitializeComponent(); _format.FormatFlags = StringFormatFlags.FitBlackBox; _spell = new NetSpell.SpellChecker.Spelling(); Application.Idle += new EventHandler(OnIdle); }
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; }
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); }
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); }
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(); }
//-//////////////////////////////////////////////////////// // 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(); }
private void EditNetSpell_Load(object sender, EventArgs e) { this.MistakeFont = new Font(TextBox.Font, FontStyle.Underline); //this.TextBox.Document.TextEditorProperties.LineViewerStyle = ICSharpCode.TextEditor.Document.LineViewerStyle.None; this.components = new System.ComponentModel.Container(); this.spelling = new NetSpell.SpellChecker.Spelling(components); this.spelling.ShowDialog = false; this.spelling.IgnoreAllCapsWords = true; this.spelling.IgnoreWordsWithDigits = true; // // spelling // 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); this.spelling.MisspelledWord += new NetSpell.SpellChecker.Spelling.MisspelledWordEventHandler(spelling_MisspelledWord); // // wordDictionary // LoadDictionary(); SpellCheckContextMenu.ItemClicked += new ToolStripItemClickedEventHandler(SpellCheckContextMenu_ItemClicked); TextBox.MouseDown += new MouseEventHandler(TextBox_MouseDown); }
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 }
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(); }
/// <summary> /// Default Constructor /// </summary> public OptionForm(ref Spelling spell) { this.SpellChecker = spell; InitializeComponent(); }
/// <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(DocumentForm)); System.Configuration.AppSettingsReader configurationAppSettings = new System.Configuration.AppSettingsReader(); this.mainMenu = new System.Windows.Forms.MainMenu(); this.menuFile = new System.Windows.Forms.MenuItem(); this.menuFileClose = new System.Windows.Forms.MenuItem(); this.menuFileCloseAll = new System.Windows.Forms.MenuItem(); this.menuItem16 = new System.Windows.Forms.MenuItem(); this.menuFileSave = new System.Windows.Forms.MenuItem(); this.menuFileSaveAs = new System.Windows.Forms.MenuItem(); this.menuFileSaveAll = new System.Windows.Forms.MenuItem(); this.menuItem5 = new System.Windows.Forms.MenuItem(); this.menuFilePrint = new System.Windows.Forms.MenuItem(); this.menuFilePrintPrivew = new System.Windows.Forms.MenuItem(); this.menuFilePageSetup = new System.Windows.Forms.MenuItem(); this.menuEdit = new System.Windows.Forms.MenuItem(); this.menuEditUndo = new System.Windows.Forms.MenuItem(); this.menuEditRedo = new System.Windows.Forms.MenuItem(); this.menuItem3 = new System.Windows.Forms.MenuItem(); this.menuEditCut = new System.Windows.Forms.MenuItem(); this.menuEditCopy = new System.Windows.Forms.MenuItem(); this.menuEditPaste = new System.Windows.Forms.MenuItem(); this.menuItem7 = new System.Windows.Forms.MenuItem(); this.menuEditSelectAll = new System.Windows.Forms.MenuItem(); this.menuFormat = new System.Windows.Forms.MenuItem(); this.menuFormatWrap = new System.Windows.Forms.MenuItem(); this.menuFormatFont = new System.Windows.Forms.MenuItem(); this.menuTools = new System.Windows.Forms.MenuItem(); this.menuToolsSpelling = new System.Windows.Forms.MenuItem(); this.fontDialog = new System.Windows.Forms.FontDialog(); this.printDialog = new System.Windows.Forms.PrintDialog(); this.printDocument = new System.Drawing.Printing.PrintDocument(); this.printPreviewDialog = new System.Windows.Forms.PrintPreviewDialog(); this.Document = new System.Windows.Forms.RichTextBox(); this.contextMenu = new System.Windows.Forms.ContextMenu(); this.contextMenuUndo = new System.Windows.Forms.MenuItem(); this.menuItem1 = new System.Windows.Forms.MenuItem(); this.menuItem2 = new System.Windows.Forms.MenuItem(); this.contextMenuCut = new System.Windows.Forms.MenuItem(); this.contextMenuCopy = new System.Windows.Forms.MenuItem(); this.contextMenuPaste = new System.Windows.Forms.MenuItem(); this.menuItem8 = new System.Windows.Forms.MenuItem(); this.contextMenuSelectAll = new System.Windows.Forms.MenuItem(); this.SpellChecker = new NetSpell.SpellChecker.Spelling(this.components); this.saveDialog = new System.Windows.Forms.SaveFileDialog(); this.openDialog = new System.Windows.Forms.OpenFileDialog(); this.pageSetupDialog = new System.Windows.Forms.PageSetupDialog(); this.colorDialog = new System.Windows.Forms.ColorDialog(); this.SuspendLayout(); // // mainMenu // this.mainMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuFile, this.menuEdit, this.menuFormat, this.menuTools}); // // menuFile // this.menuFile.Index = 0; this.menuFile.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuFileClose, this.menuFileCloseAll, this.menuItem16, this.menuFileSave, this.menuFileSaveAs, this.menuFileSaveAll, this.menuItem5, this.menuFilePrint, this.menuFilePrintPrivew, this.menuFilePageSetup}); this.menuFile.MergeType = System.Windows.Forms.MenuMerge.MergeItems; this.menuFile.Text = "File"; // // menuFileClose // this.menuFileClose.Index = 0; this.menuFileClose.MergeOrder = 2; this.menuFileClose.Text = "Close"; this.menuFileClose.Click += new System.EventHandler(this.menuFileClose_Click); // // menuFileCloseAll // this.menuFileCloseAll.Index = 1; this.menuFileCloseAll.MergeOrder = 3; this.menuFileCloseAll.Text = "Close All"; this.menuFileCloseAll.Click += new System.EventHandler(this.menuFileCloseAll_Click); // // menuItem16 // this.menuItem16.Index = 2; this.menuItem16.MergeOrder = 4; this.menuItem16.Text = "-"; // // menuFileSave // this.menuFileSave.Index = 3; this.menuFileSave.MergeOrder = 5; this.menuFileSave.Shortcut = System.Windows.Forms.Shortcut.CtrlS; this.menuFileSave.Text = "Save"; this.menuFileSave.Click += new System.EventHandler(this.menuFileSave_Click); // // menuFileSaveAs // this.menuFileSaveAs.Index = 4; this.menuFileSaveAs.MergeOrder = 6; this.menuFileSaveAs.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftS; this.menuFileSaveAs.Text = "Save As..."; this.menuFileSaveAs.Click += new System.EventHandler(this.menuFileSaveAs_Click); // // menuFileSaveAll // this.menuFileSaveAll.Index = 5; this.menuFileSaveAll.MergeOrder = 7; this.menuFileSaveAll.Text = "Save All"; this.menuFileSaveAll.Click += new System.EventHandler(this.menuFileSaveAll_Click); // // menuItem5 // this.menuItem5.Index = 6; this.menuItem5.MergeOrder = 8; this.menuItem5.Text = "-"; // // menuFilePrint // this.menuFilePrint.Index = 7; this.menuFilePrint.MergeOrder = 9; this.menuFilePrint.Shortcut = System.Windows.Forms.Shortcut.CtrlP; this.menuFilePrint.Text = "Print..."; this.menuFilePrint.Click += new System.EventHandler(this.menuFilePrint_Click); // // menuFilePrintPrivew // this.menuFilePrintPrivew.Index = 8; this.menuFilePrintPrivew.MergeOrder = 10; this.menuFilePrintPrivew.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftP; this.menuFilePrintPrivew.Text = "Print Preview"; this.menuFilePrintPrivew.Click += new System.EventHandler(this.menuFilePrintPrivew_Click); // // menuFilePageSetup // this.menuFilePageSetup.Index = 9; this.menuFilePageSetup.MergeOrder = 11; this.menuFilePageSetup.Text = "Page Setup"; this.menuFilePageSetup.Click += new System.EventHandler(this.menuFilePageSetup_Click); // // menuEdit // this.menuEdit.Index = 1; this.menuEdit.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuEditUndo, this.menuEditRedo, this.menuItem3, this.menuEditCut, this.menuEditCopy, this.menuEditPaste, this.menuItem7, this.menuEditSelectAll}); this.menuEdit.MergeOrder = 1; this.menuEdit.Text = "Edit"; // // menuEditUndo // this.menuEditUndo.Index = 0; this.menuEditUndo.Shortcut = System.Windows.Forms.Shortcut.CtrlZ; this.menuEditUndo.Text = "Undo"; this.menuEditUndo.Click += new System.EventHandler(this.menuEditUndo_Click); // // menuEditRedo // this.menuEditRedo.Index = 1; this.menuEditRedo.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftZ; this.menuEditRedo.Text = "Redo"; this.menuEditRedo.Click += new System.EventHandler(this.menuEditRedo_Click); // // menuItem3 // this.menuItem3.Index = 2; this.menuItem3.Text = "-"; // // menuEditCut // this.menuEditCut.Index = 3; this.menuEditCut.Shortcut = System.Windows.Forms.Shortcut.CtrlX; this.menuEditCut.Text = "Cut"; this.menuEditCut.Click += new System.EventHandler(this.menuEditCut_Click); // // menuEditCopy // this.menuEditCopy.Index = 4; this.menuEditCopy.Shortcut = System.Windows.Forms.Shortcut.CtrlC; this.menuEditCopy.Text = "Copy"; this.menuEditCopy.Click += new System.EventHandler(this.menuEditCopy_Click); // // menuEditPaste // this.menuEditPaste.Index = 5; this.menuEditPaste.Shortcut = System.Windows.Forms.Shortcut.CtrlV; this.menuEditPaste.Text = "Paste"; this.menuEditPaste.Click += new System.EventHandler(this.menuEditPaste_Click); // // menuItem7 // this.menuItem7.Index = 6; this.menuItem7.Text = "-"; // // menuEditSelectAll // this.menuEditSelectAll.Index = 7; this.menuEditSelectAll.Shortcut = System.Windows.Forms.Shortcut.CtrlA; this.menuEditSelectAll.Text = "Select All"; this.menuEditSelectAll.Click += new System.EventHandler(this.menuEditSelectAll_Click); // // menuFormat // this.menuFormat.Index = 2; this.menuFormat.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuFormatWrap, this.menuFormatFont}); this.menuFormat.MergeOrder = 2; this.menuFormat.Text = "Format"; // // menuFormatWrap // this.menuFormatWrap.Checked = true; this.menuFormatWrap.Index = 0; this.menuFormatWrap.Text = "Word Wrap"; this.menuFormatWrap.Click += new System.EventHandler(this.menuFormatWrap_Click); // // menuFormatFont // this.menuFormatFont.Index = 1; this.menuFormatFont.Text = "Font..."; this.menuFormatFont.Click += new System.EventHandler(this.menuFormatFont_Click); // // menuTools // this.menuTools.Index = 3; this.menuTools.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuToolsSpelling}); this.menuTools.MergeOrder = 3; this.menuTools.Text = "Tools"; // // menuToolsSpelling // this.menuToolsSpelling.Index = 0; this.menuToolsSpelling.Shortcut = System.Windows.Forms.Shortcut.F7; this.menuToolsSpelling.Text = "Spelling ..."; this.menuToolsSpelling.Click += new System.EventHandler(this.menuToolsSpelling_Click); // // printDialog // this.printDialog.AllowSomePages = true; this.printDialog.Document = this.printDocument; // // printDocument // this.printDocument.BeginPrint += new System.Drawing.Printing.PrintEventHandler(this.printDocument_BeginPrint); this.printDocument.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printDocument_PrintPage); // // printPreviewDialog // this.printPreviewDialog.AutoScrollMargin = new System.Drawing.Size(0, 0); this.printPreviewDialog.AutoScrollMinSize = new System.Drawing.Size(0, 0); this.printPreviewDialog.ClientSize = new System.Drawing.Size(400, 300); this.printPreviewDialog.Document = this.printDocument; this.printPreviewDialog.Enabled = true; this.printPreviewDialog.Icon = ((System.Drawing.Icon)(resources.GetObject("printPreviewDialog.Icon"))); this.printPreviewDialog.Location = new System.Drawing.Point(120, 17); this.printPreviewDialog.MinimumSize = new System.Drawing.Size(375, 250); this.printPreviewDialog.Name = "printPreviewDialog"; this.printPreviewDialog.TransparencyKey = System.Drawing.Color.Empty; this.printPreviewDialog.UseAntiAlias = true; this.printPreviewDialog.Visible = false; // // Document // this.Document.AcceptsTab = true; this.Document.AutoWordSelection = true; this.Document.BorderStyle = System.Windows.Forms.BorderStyle.None; this.Document.ContextMenu = this.contextMenu; this.Document.Dock = System.Windows.Forms.DockStyle.Fill; this.Document.Location = new System.Drawing.Point(0, 0); this.Document.Name = "Document"; this.Document.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.ForcedBoth; this.Document.ShowSelectionMargin = true; this.Document.Size = new System.Drawing.Size(520, 446); this.Document.TabIndex = 0; this.Document.Text = ""; this.Document.TextChanged += new System.EventHandler(this.Document_TextChanged); this.Document.SelectionChanged += new System.EventHandler(this.Document_SelectionChanged); // // contextMenu // this.contextMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.contextMenuUndo, this.menuItem1, this.menuItem2, this.contextMenuCut, this.contextMenuCopy, this.contextMenuPaste, this.menuItem8, this.contextMenuSelectAll}); // // contextMenuUndo // this.contextMenuUndo.Index = 0; this.contextMenuUndo.Text = "Undo"; this.contextMenuUndo.Click += new System.EventHandler(this.menuEditUndo_Click); // // menuItem1 // this.menuItem1.Index = 1; this.menuItem1.Text = "Redo"; this.menuItem1.Click += new System.EventHandler(this.menuEditRedo_Click); // // menuItem2 // this.menuItem2.Index = 2; this.menuItem2.Text = "-"; // // contextMenuCut // this.contextMenuCut.Index = 3; this.contextMenuCut.Text = "Cut"; this.contextMenuCut.Click += new System.EventHandler(this.menuEditCut_Click); // // contextMenuCopy // this.contextMenuCopy.Index = 4; this.contextMenuCopy.Text = "Copy"; this.contextMenuCopy.Click += new System.EventHandler(this.menuEditCopy_Click); // // contextMenuPaste // this.contextMenuPaste.Index = 5; this.contextMenuPaste.Text = "Paste"; this.contextMenuPaste.Click += new System.EventHandler(this.menuEditPaste_Click); // // menuItem8 // this.menuItem8.Index = 6; this.menuItem8.Text = "-"; // // contextMenuSelectAll // this.contextMenuSelectAll.Index = 7; this.contextMenuSelectAll.Text = "Select All"; this.contextMenuSelectAll.Click += new System.EventHandler(this.menuEditSelectAll_Click); // // SpellChecker // this.SpellChecker.Dictionary = null; this.SpellChecker.IgnoreAllCapsWords = ((bool)(configurationAppSettings.GetValue("SpellChecker.IgnoreAllCapsWords", typeof(bool)))); this.SpellChecker.IgnoreHtml = ((bool)(configurationAppSettings.GetValue("SpellChecker.IgnoreHtml", typeof(bool)))); this.SpellChecker.IgnoreWordsWithDigits = ((bool)(configurationAppSettings.GetValue("SpellChecker.IgnoreWordsWithDigits", typeof(bool)))); this.SpellChecker.MaxSuggestions = ((int)(configurationAppSettings.GetValue("SpellChecker.MaxSuggestions", typeof(int)))); this.SpellChecker.ReplacedWord += new NetSpell.SpellChecker.Spelling.ReplacedWordEventHandler(this.SpellChecker_ReplacedWord); this.SpellChecker.DeletedWord += new NetSpell.SpellChecker.Spelling.DeletedWordEventHandler(this.SpellChecker_DeletedWord); // // saveDialog // this.saveDialog.DefaultExt = "*.txt"; this.saveDialog.FileName = "untitled"; this.saveDialog.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*"; // // openDialog // this.openDialog.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*"; // // pageSetupDialog // this.pageSetupDialog.Document = this.printDocument; // // DocumentForm // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(520, 446); this.Controls.Add(this.Document); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Menu = this.mainMenu; this.Name = "DocumentForm"; this.Text = "untitled"; this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.Closing += new System.ComponentModel.CancelEventHandler(this.DocumentForm_Closing); this.Load += new System.EventHandler(this.DocumentForm_Load); this.Activated += new System.EventHandler(this.DocumentForm_Activated); this.Deactivate += new System.EventHandler(this.DocumentForm_Deactivate); this.ResumeLayout(false); }
public List <string> kelimeDuzelt(List <string> kelimeler, Uri urlDomain) { ingSozluk.DictionaryFile = "en-US.dic"; ingSozluk.Initialize(); NetSpell.SpellChecker.Spelling oSpell = new NetSpell.SpellChecker.Spelling(); oSpell.Dictionary = ingSozluk; for (int j = 0; j < kelimeler.Count; j++) { for (int i = 0; i < kelimeler[j].Length; i++) { if (Char.IsPunctuation(kelimeler[j][i])) { kelimeler[j] = kelimeler[j].Remove(i, 1); } } } for (int i = 0; i < kelimeler.Count; i++) { string silincekMi = kelimeler[i]; kelimeler[i] = kelimeler[i].RemoveStopWords("en"); if (silincekMi != kelimeler[i]) { kelimeler.RemoveAt(i); i -= 1; } } for (int i = 0; i < kelimeler.Count; i++) { if (String.IsNullOrEmpty(kelimeler[i]) || String.IsNullOrWhiteSpace(kelimeler[i])) { kelimeler.RemoveAt(i); i -= 1; } if (urlDomain.Host.Contains(kelimeler[i]) == true) { kelimeler.RemoveAt(i); i -= 1; } } List <string> kelimelerSon = new List <string>(); foreach (string item in kelimeler) { try { if (oSpell.TestWord(item)) { //Console.WriteLine(item); kelimelerSon.Add(item); } } catch { // Console.WriteLine("Devam"); } } return(kelimelerSon); }
/// <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; }
/// <summary> /// some routines need to do setup. We pass the path in case they need it /// </summary> /// <param name="_path"></param> public override void Setup(string _path, NamingFileClass namingFile) { path = _path; speller = SpellCheckObject("en-US.dic", _path, Path.Combine(_path, "UserDic.dic")); try { speller.Dictionary.Initialize(); } catch (Exception ex) { NewMessage.Show(ex.ToString()); } try { randomwordhash = speller.Dictionary.BaseWords; } catch(Exception ex) { NewMessage.Show(ex.ToString()); } // namingFile is ignored here used in erarulelanguage }
/// <summary> /// Default Constructor /// </summary> public SuggestionForm(Spelling spell) { this.SpellChecker = spell; this.AttachEvents(); InitializeComponent(); }
/// <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(DocumentForm)); System.Configuration.AppSettingsReader configurationAppSettings = new System.Configuration.AppSettingsReader(); this.mainMenu = new System.Windows.Forms.MainMenu(); this.menuFile = new System.Windows.Forms.MenuItem(); this.menuFileClose = new System.Windows.Forms.MenuItem(); this.menuFileCloseAll = new System.Windows.Forms.MenuItem(); this.menuItem16 = new System.Windows.Forms.MenuItem(); this.menuFileSave = new System.Windows.Forms.MenuItem(); this.menuFileSaveAs = new System.Windows.Forms.MenuItem(); this.menuFileSaveAll = new System.Windows.Forms.MenuItem(); this.menuItem5 = new System.Windows.Forms.MenuItem(); this.menuFilePrint = new System.Windows.Forms.MenuItem(); this.menuFilePrintPrivew = new System.Windows.Forms.MenuItem(); this.menuFilePageSetup = new System.Windows.Forms.MenuItem(); this.menuEdit = new System.Windows.Forms.MenuItem(); this.menuEditUndo = new System.Windows.Forms.MenuItem(); this.menuEditRedo = new System.Windows.Forms.MenuItem(); this.menuItem3 = new System.Windows.Forms.MenuItem(); this.menuEditCut = new System.Windows.Forms.MenuItem(); this.menuEditCopy = new System.Windows.Forms.MenuItem(); this.menuEditPaste = new System.Windows.Forms.MenuItem(); this.menuItem7 = new System.Windows.Forms.MenuItem(); this.menuEditSelectAll = new System.Windows.Forms.MenuItem(); this.menuFormat = new System.Windows.Forms.MenuItem(); this.menuFormatWrap = new System.Windows.Forms.MenuItem(); this.menuFormatFont = new System.Windows.Forms.MenuItem(); this.menuTools = new System.Windows.Forms.MenuItem(); this.menuToolsSpelling = new System.Windows.Forms.MenuItem(); this.fontDialog = new System.Windows.Forms.FontDialog(); this.printDialog = new System.Windows.Forms.PrintDialog(); this.printDocument = new System.Drawing.Printing.PrintDocument(); this.printPreviewDialog = new System.Windows.Forms.PrintPreviewDialog(); this.Document = new System.Windows.Forms.RichTextBox(); this.contextMenu = new System.Windows.Forms.ContextMenu(); this.contextMenuUndo = new System.Windows.Forms.MenuItem(); this.menuItem1 = new System.Windows.Forms.MenuItem(); this.menuItem2 = new System.Windows.Forms.MenuItem(); this.contextMenuCut = new System.Windows.Forms.MenuItem(); this.contextMenuCopy = new System.Windows.Forms.MenuItem(); this.contextMenuPaste = new System.Windows.Forms.MenuItem(); this.menuItem8 = new System.Windows.Forms.MenuItem(); this.contextMenuSelectAll = new System.Windows.Forms.MenuItem(); this.SpellChecker = new NetSpell.SpellChecker.Spelling(this.components); this.saveDialog = new System.Windows.Forms.SaveFileDialog(); this.openDialog = new System.Windows.Forms.OpenFileDialog(); this.pageSetupDialog = new System.Windows.Forms.PageSetupDialog(); this.colorDialog = new System.Windows.Forms.ColorDialog(); this.SuspendLayout(); // // mainMenu // this.mainMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuFile, this.menuEdit, this.menuFormat, this.menuTools }); // // menuFile // this.menuFile.Index = 0; this.menuFile.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuFileClose, this.menuFileCloseAll, this.menuItem16, this.menuFileSave, this.menuFileSaveAs, this.menuFileSaveAll, this.menuItem5, this.menuFilePrint, this.menuFilePrintPrivew, this.menuFilePageSetup }); this.menuFile.MergeType = System.Windows.Forms.MenuMerge.MergeItems; this.menuFile.Text = "File"; // // menuFileClose // this.menuFileClose.Index = 0; this.menuFileClose.MergeOrder = 2; this.menuFileClose.Text = "Close"; this.menuFileClose.Click += new System.EventHandler(this.menuFileClose_Click); // // menuFileCloseAll // this.menuFileCloseAll.Index = 1; this.menuFileCloseAll.MergeOrder = 3; this.menuFileCloseAll.Text = "Close All"; this.menuFileCloseAll.Click += new System.EventHandler(this.menuFileCloseAll_Click); // // menuItem16 // this.menuItem16.Index = 2; this.menuItem16.MergeOrder = 4; this.menuItem16.Text = "-"; // // menuFileSave // this.menuFileSave.Index = 3; this.menuFileSave.MergeOrder = 5; this.menuFileSave.Shortcut = System.Windows.Forms.Shortcut.CtrlS; this.menuFileSave.Text = "Save"; this.menuFileSave.Click += new System.EventHandler(this.menuFileSave_Click); // // menuFileSaveAs // this.menuFileSaveAs.Index = 4; this.menuFileSaveAs.MergeOrder = 6; this.menuFileSaveAs.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftS; this.menuFileSaveAs.Text = "Save As..."; this.menuFileSaveAs.Click += new System.EventHandler(this.menuFileSaveAs_Click); // // menuFileSaveAll // this.menuFileSaveAll.Index = 5; this.menuFileSaveAll.MergeOrder = 7; this.menuFileSaveAll.Text = "Save All"; this.menuFileSaveAll.Click += new System.EventHandler(this.menuFileSaveAll_Click); // // menuItem5 // this.menuItem5.Index = 6; this.menuItem5.MergeOrder = 8; this.menuItem5.Text = "-"; // // menuFilePrint // this.menuFilePrint.Index = 7; this.menuFilePrint.MergeOrder = 9; this.menuFilePrint.Shortcut = System.Windows.Forms.Shortcut.CtrlP; this.menuFilePrint.Text = "Print..."; this.menuFilePrint.Click += new System.EventHandler(this.menuFilePrint_Click); // // menuFilePrintPrivew // this.menuFilePrintPrivew.Index = 8; this.menuFilePrintPrivew.MergeOrder = 10; this.menuFilePrintPrivew.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftP; this.menuFilePrintPrivew.Text = "Print Preview"; this.menuFilePrintPrivew.Click += new System.EventHandler(this.menuFilePrintPrivew_Click); // // menuFilePageSetup // this.menuFilePageSetup.Index = 9; this.menuFilePageSetup.MergeOrder = 11; this.menuFilePageSetup.Text = "Page Setup"; this.menuFilePageSetup.Click += new System.EventHandler(this.menuFilePageSetup_Click); // // menuEdit // this.menuEdit.Index = 1; this.menuEdit.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuEditUndo, this.menuEditRedo, this.menuItem3, this.menuEditCut, this.menuEditCopy, this.menuEditPaste, this.menuItem7, this.menuEditSelectAll }); this.menuEdit.MergeOrder = 1; this.menuEdit.Text = "Edit"; // // menuEditUndo // this.menuEditUndo.Index = 0; this.menuEditUndo.Shortcut = System.Windows.Forms.Shortcut.CtrlZ; this.menuEditUndo.Text = "Undo"; this.menuEditUndo.Click += new System.EventHandler(this.menuEditUndo_Click); // // menuEditRedo // this.menuEditRedo.Index = 1; this.menuEditRedo.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftZ; this.menuEditRedo.Text = "Redo"; this.menuEditRedo.Click += new System.EventHandler(this.menuEditRedo_Click); // // menuItem3 // this.menuItem3.Index = 2; this.menuItem3.Text = "-"; // // menuEditCut // this.menuEditCut.Index = 3; this.menuEditCut.Shortcut = System.Windows.Forms.Shortcut.CtrlX; this.menuEditCut.Text = "Cut"; this.menuEditCut.Click += new System.EventHandler(this.menuEditCut_Click); // // menuEditCopy // this.menuEditCopy.Index = 4; this.menuEditCopy.Shortcut = System.Windows.Forms.Shortcut.CtrlC; this.menuEditCopy.Text = "Copy"; this.menuEditCopy.Click += new System.EventHandler(this.menuEditCopy_Click); // // menuEditPaste // this.menuEditPaste.Index = 5; this.menuEditPaste.Shortcut = System.Windows.Forms.Shortcut.CtrlV; this.menuEditPaste.Text = "Paste"; this.menuEditPaste.Click += new System.EventHandler(this.menuEditPaste_Click); // // menuItem7 // this.menuItem7.Index = 6; this.menuItem7.Text = "-"; // // menuEditSelectAll // this.menuEditSelectAll.Index = 7; this.menuEditSelectAll.Shortcut = System.Windows.Forms.Shortcut.CtrlA; this.menuEditSelectAll.Text = "Select All"; this.menuEditSelectAll.Click += new System.EventHandler(this.menuEditSelectAll_Click); // // menuFormat // this.menuFormat.Index = 2; this.menuFormat.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuFormatWrap, this.menuFormatFont }); this.menuFormat.MergeOrder = 2; this.menuFormat.Text = "Format"; // // menuFormatWrap // this.menuFormatWrap.Checked = true; this.menuFormatWrap.Index = 0; this.menuFormatWrap.Text = "Word Wrap"; this.menuFormatWrap.Click += new System.EventHandler(this.menuFormatWrap_Click); // // menuFormatFont // this.menuFormatFont.Index = 1; this.menuFormatFont.Text = "Font..."; this.menuFormatFont.Click += new System.EventHandler(this.menuFormatFont_Click); // // menuTools // this.menuTools.Index = 3; this.menuTools.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuToolsSpelling }); this.menuTools.MergeOrder = 3; this.menuTools.Text = "Tools"; // // menuToolsSpelling // this.menuToolsSpelling.Index = 0; this.menuToolsSpelling.Shortcut = System.Windows.Forms.Shortcut.F7; this.menuToolsSpelling.Text = "Spelling ..."; this.menuToolsSpelling.Click += new System.EventHandler(this.menuToolsSpelling_Click); // // printDialog // this.printDialog.AllowSomePages = true; this.printDialog.Document = this.printDocument; // // printDocument // this.printDocument.BeginPrint += new System.Drawing.Printing.PrintEventHandler(this.printDocument_BeginPrint); this.printDocument.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printDocument_PrintPage); // // printPreviewDialog // this.printPreviewDialog.AutoScrollMargin = new System.Drawing.Size(0, 0); this.printPreviewDialog.AutoScrollMinSize = new System.Drawing.Size(0, 0); this.printPreviewDialog.ClientSize = new System.Drawing.Size(400, 300); this.printPreviewDialog.Document = this.printDocument; this.printPreviewDialog.Enabled = true; this.printPreviewDialog.Icon = ((System.Drawing.Icon)(resources.GetObject("printPreviewDialog.Icon"))); this.printPreviewDialog.Location = new System.Drawing.Point(120, 17); this.printPreviewDialog.MinimumSize = new System.Drawing.Size(375, 250); this.printPreviewDialog.Name = "printPreviewDialog"; this.printPreviewDialog.TransparencyKey = System.Drawing.Color.Empty; this.printPreviewDialog.UseAntiAlias = true; this.printPreviewDialog.Visible = false; // // Document // this.Document.AcceptsTab = true; this.Document.AutoWordSelection = true; this.Document.BorderStyle = System.Windows.Forms.BorderStyle.None; this.Document.ContextMenu = this.contextMenu; this.Document.Dock = System.Windows.Forms.DockStyle.Fill; this.Document.Location = new System.Drawing.Point(0, 0); this.Document.Name = "Document"; this.Document.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.ForcedBoth; this.Document.ShowSelectionMargin = true; this.Document.Size = new System.Drawing.Size(520, 446); this.Document.TabIndex = 0; this.Document.Text = ""; this.Document.TextChanged += new System.EventHandler(this.Document_TextChanged); this.Document.SelectionChanged += new System.EventHandler(this.Document_SelectionChanged); // // contextMenu // this.contextMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.contextMenuUndo, this.menuItem1, this.menuItem2, this.contextMenuCut, this.contextMenuCopy, this.contextMenuPaste, this.menuItem8, this.contextMenuSelectAll }); // // contextMenuUndo // this.contextMenuUndo.Index = 0; this.contextMenuUndo.Text = "Undo"; this.contextMenuUndo.Click += new System.EventHandler(this.menuEditUndo_Click); // // menuItem1 // this.menuItem1.Index = 1; this.menuItem1.Text = "Redo"; this.menuItem1.Click += new System.EventHandler(this.menuEditRedo_Click); // // menuItem2 // this.menuItem2.Index = 2; this.menuItem2.Text = "-"; // // contextMenuCut // this.contextMenuCut.Index = 3; this.contextMenuCut.Text = "Cut"; this.contextMenuCut.Click += new System.EventHandler(this.menuEditCut_Click); // // contextMenuCopy // this.contextMenuCopy.Index = 4; this.contextMenuCopy.Text = "Copy"; this.contextMenuCopy.Click += new System.EventHandler(this.menuEditCopy_Click); // // contextMenuPaste // this.contextMenuPaste.Index = 5; this.contextMenuPaste.Text = "Paste"; this.contextMenuPaste.Click += new System.EventHandler(this.menuEditPaste_Click); // // menuItem8 // this.menuItem8.Index = 6; this.menuItem8.Text = "-"; // // contextMenuSelectAll // this.contextMenuSelectAll.Index = 7; this.contextMenuSelectAll.Text = "Select All"; this.contextMenuSelectAll.Click += new System.EventHandler(this.menuEditSelectAll_Click); // // SpellChecker // this.SpellChecker.Dictionary = null; this.SpellChecker.IgnoreAllCapsWords = ((bool)(configurationAppSettings.GetValue("SpellChecker.IgnoreAllCapsWords", typeof(bool)))); this.SpellChecker.IgnoreHtml = ((bool)(configurationAppSettings.GetValue("SpellChecker.IgnoreHtml", typeof(bool)))); this.SpellChecker.IgnoreWordsWithDigits = ((bool)(configurationAppSettings.GetValue("SpellChecker.IgnoreWordsWithDigits", typeof(bool)))); this.SpellChecker.MaxSuggestions = ((int)(configurationAppSettings.GetValue("SpellChecker.MaxSuggestions", typeof(int)))); this.SpellChecker.ReplacedWord += new NetSpell.SpellChecker.Spelling.ReplacedWordEventHandler(this.SpellChecker_ReplacedWord); this.SpellChecker.DeletedWord += new NetSpell.SpellChecker.Spelling.DeletedWordEventHandler(this.SpellChecker_DeletedWord); // // saveDialog // this.saveDialog.DefaultExt = "*.txt"; this.saveDialog.FileName = "untitled"; this.saveDialog.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*"; // // openDialog // this.openDialog.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*"; // // pageSetupDialog // this.pageSetupDialog.Document = this.printDocument; // // DocumentForm // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(520, 446); this.Controls.Add(this.Document); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Menu = this.mainMenu; this.Name = "DocumentForm"; this.Text = "untitled"; this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.Closing += new System.ComponentModel.CancelEventHandler(this.DocumentForm_Closing); this.Load += new System.EventHandler(this.DocumentForm_Load); this.Activated += new System.EventHandler(this.DocumentForm_Activated); this.Deactivate += new System.EventHandler(this.DocumentForm_Deactivate); this.ResumeLayout(false); }