Перейти из форума на сайт.

НовостиФайловые архивы
ПоискАктивные темыТоп лист
ПравилаКто в on-line?
Вход Забыли пароль? Первый раз на этом сайте? Регистрация
Компьютерный форум Ru.Board » Компьютеры » Прикладное программирование » Использование DevExpress (часть 4)

Модерирует : ShIvADeSt

 Версия для печати • ПодписатьсяДобавить в закладки
На первую страницук этому сообщениюк последнему сообщению

Открыть новую тему     Написать ответ в эту тему

Cryogen2003



Advanced Member
Редактировать | Профиль | Сообщение | ICQ | Цитировать | Сообщить модератору
Procedure TdmdMain.SetSpellChecker(IsUse: Boolean);
Var
  Temp: TdxSpellCheckerDictionaryItem;
  TempPath: String;
Begin
  If IsUse Then
  Begin
    Try
      TempPath := dmdMain.IniOptions.MyDocFolder + ReportLocalDir + DelimChar;
 
      dxSpellChecker1.AutoLoadDictionaries := False;
      dxSpellChecker1.CheckAsYouTypeOptions.Active := False;
 
      dxSpellChecker1.DictionaryItems.Clear;
      {$I-}
      If (FileExists(TempPath + EnglishAff)) And
        (FileExists(TempPath + EnglishDic)) Then
      Begin
        Temp := dxSpellChecker1.DictionaryItems.Add;
        Temp.DictionaryTypeClass := TdxOpenOfficeDictionary;
        TdxOpenOfficeDictionary(Temp.DictionaryType).DictionaryPath :=
          TempPath + EnglishDic;
        TdxOpenOfficeDictionary(Temp.DictionaryType).GrammarPath :=
          TempPath + EnglishAff;
        TdxOpenOfficeDictionary(Temp.DictionaryType).Enabled := True;
      End;
 
      If (FileExists(TempPath + RussianAff)) And
        (FileExists(TempPath + RussianDic)) Then
      Begin
        Temp := dxSpellChecker1.DictionaryItems.Add;
        Temp.DictionaryTypeClass := TdxOpenOfficeDictionary;
        TdxOpenOfficeDictionary(Temp.DictionaryType).DictionaryPath :=
          TempPath + RussianDic;
        TdxOpenOfficeDictionary(Temp.DictionaryType).GrammarPath :=
          TempPath + RussianAff;
        TdxOpenOfficeDictionary(Temp.DictionaryType).Enabled := True;
      End;
 
      If ((FileExists(TempPath + RussianAff)) And
        (FileExists(TempPath + RussianDic))) Or
        ((FileExists(TempPath + EnglishAff)) And
        (FileExists(TempPath + EnglishDic))) Then
      Begin
        Temp := dxSpellChecker1.DictionaryItems.Add;
        Temp.DictionaryTypeClass := TdxUserSpellCheckerDictionary;
        TdxUserSpellCheckerDictionary(Temp.DictionaryType).Enabled := False;
        TdxUserSpellCheckerDictionary(Temp.DictionaryType).DictionaryPath :=
          TempPath + UserDic;
        TdxUserSpellCheckerDictionary(Temp.DictionaryType).Enabled := True;
 
        dxSpellChecker1.AutoLoadDictionaries := True;
        dxSpellChecker1.CheckAsYouTypeOptions.Active := True;
        dxSpellChecker1.UseThreadedLoad := True;
        dxSpellChecker1.LoadDictionaries;
 
        dxSpellCheckerSpellingOptionsDialogClass := TSpellingOptionsForm;
      End;
      {$I+}
    Except
 
    End;
  End
  Else
  Begin
    dxSpellChecker1.AutoLoadDictionaries := False;
    dxSpellChecker1.CheckAsYouTypeOptions.Active := False;
    dxSpellChecker1.DictionaryItems.Clear;
    dxSpellChecker1.UnloadDictionaries;
  End;
End;

Всего записей: 745 | Зарегистр. 08-12-2004 | Отправлено: 09:29 18-02-2010
Открыть новую тему     Написать ответ в эту тему

На первую страницук этому сообщениюк последнему сообщению

Компьютерный форум Ru.Board » Компьютеры » Прикладное программирование » Использование DevExpress (часть 4)


Реклама на форуме Ru.Board.

Powered by Ikonboard "v2.1.7b" © 2000 Ikonboard.com
Modified by Ru.B0ard
© Ru.B0ard 2000-2024

BitCoin: 1NGG1chHtUvrtEqjeerQCKDMUi6S6CG4iC

Рейтинг.ru