Exemple #1
0
        private Aspell()
        {
            AspellConfigHandle config = AspellConfigHandle.Default;

            AspellCanHaveErrorHandle result = new AspellCanHaveErrorHandle(config);

            if (NativeMethods.aspell_error_number(result) != 0)
            {
                IntPtr ptr = NativeMethods.aspell_error_message(result);
                throw new AspellException(Marshal.PtrToStringAnsi(ptr));
            }

            m_speller = new AspellSpellerHandle(result);

            DoAdd("exe");
            DoAdd("mdb");
            DoAdd("stdout");
            DoAdd("xml");

            if (Settings.Has("ignoreList"))
            {
                Console.Error.WriteLine("the ignoreList setting is no longer supported: use dictionary instead");                       // TODO: remove this (eventually)
            }
            string path = Settings.Get("dictionary", string.Empty);

            string[] entries = path.Split(':');
            foreach (string s in entries)
            {
                DoAddDictFile(s);
            }
        }
Exemple #2
0
		private Aspell()
		{
			AspellConfigHandle config = AspellConfigHandle.Default;
			
			AspellCanHaveErrorHandle result = new AspellCanHaveErrorHandle(config);
			if (NativeMethods.aspell_error_number(result) != 0)
			{
				IntPtr ptr = NativeMethods.aspell_error_message(result);
				throw new AspellException(Marshal.PtrToStringAnsi(ptr));
			}
			
			m_speller = new AspellSpellerHandle(result);
				
			DoAdd("exe");		
			DoAdd("mdb");
			DoAdd("stdout");
			DoAdd("xml");
			
			if (Settings.Has("ignoreList"))
				Console.Error.WriteLine("the ignoreList setting is no longer supported: use dictionary instead");	// TODO: remove this (eventually)
			
			string path = Settings.Get("dictionary", string.Empty);
			string[] entries = path.Split(':');
			foreach (string s in entries)
				DoAddDictFile(s);
		}
Exemple #3
0
 public static extern void delete_aspell_speller(AspellSpellerHandle ths);
Exemple #4
0
 public static extern int aspell_speller_add_to_session(AspellSpellerHandle ths, string word, int wordSize);
Exemple #5
0
 public static extern int aspell_speller_check(AspellSpellerHandle ths, string word, int wordSize);
Exemple #6
0
 public static extern IntPtr aspell_speller_error_message(AspellSpellerHandle ths);
Exemple #7
0
		public static extern void delete_aspell_speller(AspellSpellerHandle ths);
Exemple #8
0
		public static extern int aspell_speller_add_to_session(AspellSpellerHandle ths, string word, int wordSize);
Exemple #9
0
		public static extern int aspell_speller_check(AspellSpellerHandle ths, string word, int wordSize);
Exemple #10
0
		public static extern IntPtr aspell_speller_error_message(AspellSpellerHandle ths);