static ControlService() { string appdir = ConfigurationManager.AppSettings["ProWriteFontFile"]; if (appdir.IndexOf(@":") == -1) { appdir = Application.StartupPath + @"\" + appdir; } else { appdir = ConfigurationManager.AppSettings["ProWriteFontFile"]; } FontManager.Initialize(appdir); _libraryTree = new LibraryTree(); _signCombo = new SignRepositoryItemLookUpEdit(); _propertyGrid = new PropertyGridControl(); _effectTree = new EffectTreeControl(); _toolBox = new ToolBoxControl(); _timeSliceControl = new TimeSliceGroupControl(); _signImage = new SignImage(); _signStatus = new SignStatus(); _barButtonPosition = new BarButtonItem(); //_barButtonPosition.CategoryGuid = new System.Guid("77795bb7-9bc5-4dd2-a297-cc758682e23d"); //_barButtonPosition.Id = 0; //_barButtonPosition.Name = "siPosition"; _statusBar = new RibbonStatusBar(); _currentClip = new CurrentClip(); _spellChecker = new DevExpress.XtraSpellChecker.SpellChecker(); _signStorageIndicator = new SignStorageIndicator(); _pictureBox = new PictureEdit(); _pictureBox.Properties.ShowMenu = false; _pictureBox.Properties.SizeMode = DevExpress.XtraEditors.Controls.PictureSizeMode.Zoom; if (_libraryTree != null) { _libraryTree.Controller.RemoveLibraryItemEvent += new EventHandler <RemoveLibraryEventArgs>(Controller_RemoveLibraryItemEvent); } _fonts = new List <PWFont>(); _fontsBitMap = new List <PWFont>(); _fontsTrueType = new List <PWFont>(); spellCheckTask = Task.Create((p) => { CultureInfo engCulture = new CultureInfo("En-us"); dictionary = new SpellCheckerISpellDictionary(DemoUtils.GetRelativePath("american.xlg"), DemoUtils.GetRelativePath("english.aff"), engCulture); dictionary.AlphabetPath = DemoUtils.GetRelativePath("EnglishAlphabet.txt"); customDictorary = new SpellCheckerCustomDictionary(); customDictorary.Culture = engCulture; SpellCheckerList.Load(); customDictorary.AddWords(ServiceManager.Get <SpellCheckerList>()); }); }
protected override object CreateSpellCheckerComponent(object parentContainer) { var result = new DevExpress.XtraSpellChecker.SpellChecker(); result.ParentContainer = (Form)parentContainer; result.SpellCheckMode = SpellCheckMode.AsYouType; result.CheckAsYouTypeOptions.ShowSpellCheckForm = true; result.CheckAsYouTypeOptions.CheckControlsInParentContainer = true; result.Culture = CultureInfo.CurrentUICulture; result.UseSharedDictionaries = true; return(result); }