private static List<string> GetWritingSystemIdsWithSpellCheckingInstalled()
		{
			List<string> writingSystemIdsWithSpellCheckingInstalled = new List<string>();
			try
			{
				using (Broker broker = new Broker())
				{
					foreach (WritingSystem ws in BasilProject.Project.WritingSystems.Values)
					{
						if (broker.DictionaryExists(ws.Id))
						{
							writingSystemIdsWithSpellCheckingInstalled.Add(ws.Id);
						}
					}
				}
			}
			catch (DllNotFoundException)
			{
				//If Enchant is not installed we expect an exception.
			}
			return writingSystemIdsWithSpellCheckingInstalled;
		}
        public List<SpellCheckInfo> GetSpellCheckComboBoxItems()
        {
            _spellCheckerItems.Clear();

            // add None option
            _spellCheckerItems.Add(new SpellCheckInfo(""));

            try
            {
                using (Broker broker = new Broker())
                {
                    // add installed dictionaries
                    _spellCheckerItems.AddRange(broker.Dictionaries.Select(dictionaryInfo => new SpellCheckInfo(dictionaryInfo)));

                    // add current dictionary, if not installed
                    if (!string.IsNullOrEmpty(CurrentSpellCheckingId))
                    {
                        if (!broker.DictionaryExists(CurrentSpellCheckingId))
                        {
                            _spellCheckerItems.Add(new SpellCheckInfo(CurrentSpellCheckingId));
                        }
                    }
                }
            }
            catch (DllNotFoundException)
            {
                //If Enchant is not installed we expect an exception.
            }
            catch (Exception e)//there are other errors we can get from the enchant binding
            {
                ErrorReport.NotifyUserOfProblem(new ShowOncePerSessionBasedOnExactMessagePolicy(),
                                                "The Enchant Spelling engine encountered an error: " + e.Message);
            }

            return _spellCheckerItems;
        }