C# Class SIL.FieldWorks.XWorks.LexText.FlexStylesXmlAccessor

Specialization of StylesXmlAccessor for loading the Flex factory styles.
Inheritance: SIL.FieldWorks.Common.Framework.StylesXmlAccessor
Exibir arquivo Open project: sillsdev/FieldWorks Class Usage Examples

Public Methods

Method Description
EnsureCurrentStylesheet ( ILangProject lp, IThreadedProgress progressDlg ) : void

If the current stylesheet version in the Db doesn't match that of the current XML file, update the DB.

FlexStylesXmlAccessor ( ILexDb lexicon ) : System

Constructor

Protected Methods

Method Description
StyleIsInUse ( IStStyle style ) : bool

Determines whether the given style is (possibly) in use.

This override is needed because previously hotlinks in FLEx were not have made good use of the InUse property of styles.

StyleReplacementAllowed ( string styleName, string replStyleName ) : bool

Special overridable method to allow application-specific overrides to allow a particular style to be renamed.

ValidateContext ( ContextValues context, string styleName ) : void

Complain if the context is not valid for the tool that is loading the styles. Flex currently allows general styles and its own special one.

Method Details

EnsureCurrentStylesheet() public static method

If the current stylesheet version in the Db doesn't match that of the current XML file, update the DB.
public static EnsureCurrentStylesheet ( ILangProject lp, IThreadedProgress progressDlg ) : void
lp ILangProject The language project
progressDlg IThreadedProgress The progress dialog.
return void

FlexStylesXmlAccessor() public method

Constructor
public FlexStylesXmlAccessor ( ILexDb lexicon ) : System
lexicon ILexDb The lexical database
return System

StyleIsInUse() protected method

Determines whether the given style is (possibly) in use.
This override is needed because previously hotlinks in FLEx were not have made good use of the InUse property of styles.
protected StyleIsInUse ( IStStyle style ) : bool
style IStStyle The style.
return bool

StyleReplacementAllowed() protected method

Special overridable method to allow application-specific overrides to allow a particular style to be renamed.
protected StyleReplacementAllowed ( string styleName, string replStyleName ) : bool
styleName string Name of the original style.
replStyleName string Name of the replacement style.
return bool

ValidateContext() protected method

Complain if the context is not valid for the tool that is loading the styles. Flex currently allows general styles and its own special one.
protected ValidateContext ( ContextValues context, string styleName ) : void
context ContextValues
styleName string
return void