当前位置: 首页>>代码示例>>C#>>正文


C# ISilDataAccess类代码示例

本文整理汇总了C#中ISilDataAccess的典型用法代码示例。如果您正苦于以下问题:C# ISilDataAccess类的具体用法?C# ISilDataAccess怎么用?C# ISilDataAccess使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ISilDataAccess类属于命名空间,在下文中一共展示了ISilDataAccess类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SimpleDataParser

		public SimpleDataParser(IFwMetaDataCache mdc, IVwCacheDa cda)
		{
			m_mdc = mdc;
			m_cda = cda;
			m_sda = cda as ISilDataAccess;
			m_wsf = m_sda.WritingSystemFactory;
		}
开发者ID:sillsdev,项目名称:FieldWorks,代码行数:7,代码来源:SimpleDataParser.cs

示例2: HFSetView

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Creates a new HFSetView
		/// </summary>
		/// <param name="sda">The ISilDataAccess for the view</param>
		/// <param name="vc">The view constructor used to create the view</param>
		/// <param name="hvoHeader">The id of the PubHeader used to get the Header/Footer
		/// information to display in the view</param>
		/// ------------------------------------------------------------------------------------
		public HFSetView(ISilDataAccess sda, HeaderFooterVc vc, int hvoHeader) : base()
		{
			m_sda = sda;
			WritingSystemFactory = m_sda.WritingSystemFactory;
			m_vc = vc;
			m_hvoHeader = hvoHeader;
		}
开发者ID:sillsdev,项目名称:FieldWorks,代码行数:16,代码来源:HFSetView.cs

示例3: GetBoolean

		/// <summary>
		/// Get the boolean or integer model property as a boolean.
		/// </summary>
		/// <returns>
		/// The regular boolean value for boolean properties.
		/// For int model properties: 'false' for a '0' int value,
		/// or 'true' for all other int values.
		/// </returns>
		public static bool GetBoolean(ISilDataAccess sda, int hvo, int tag)
		{
			if (sda == null) throw new ArgumentNullException("sda");

			return (CellarPropertyType)sda.MetaDataCache.GetFieldType(tag) == CellarPropertyType.Boolean
					? sda.get_BooleanProp(hvo, tag)
					: sda.get_IntProp(hvo, tag) != 0;
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:16,代码来源:IntBoolPropertyConverter.cs

示例4: MaxStringWidthForChartColumn

		public MaxStringWidthForChartColumn(ConstChartVc vc, IVwStylesheet stylesheet, ISilDataAccess sda, int hvoRoot,
			System.Drawing.Graphics graphics, int icolumn)
			: base(stylesheet, sda, hvoRoot, graphics, icolumn)
		{
			m_vc = vc;
			m_cLines = m_vc.LineChoices.Count;
			m_paraWidths = new int[m_cLines];
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:8,代码来源:MaxStringWidthForChartColumn.cs

示例5: TestSetup

		public void TestSetup()
		{
			RegistryHelper.CompanyName = "SIL";
			m_ISilDataAccess = VwCacheDaClass.Create();
			ILgWritingSystemFactory wsf = new PalasoWritingSystemManager();
			m_ISilDataAccess.WritingSystemFactory = wsf;
			m_IVwCacheDa = (IVwCacheDa)m_ISilDataAccess;
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:8,代码来源:IVwCacheDaTests.cs

示例6: PrintRootSite

		/// ------------------------------------------------------------------------------------
		/// <summary>
		///
		/// </summary>
		/// <param name="sda"></param>
		/// <param name="hvo"></param>
		/// <param name="vc"></param>
		/// <param name="frags"></param>
		/// <param name="styleSheet"></param>
		/// ------------------------------------------------------------------------------------
		public PrintRootSite(ISilDataAccess sda, int hvo, IVwViewConstructor vc, int frags,
			IVwStylesheet styleSheet)
		{
			m_sda = sda;
			m_hvo = hvo;
			m_vc = vc;
			m_frags = frags;
			m_styleSheet = styleSheet;
		}
开发者ID:sillsdev,项目名称:FieldWorks,代码行数:19,代码来源:PrintRootSite.cs

示例7: SetValueFromBoolean

		/// <summary>
		/// Set the given boolean to either a boolean or integer model property.
		/// </summary>
		public static void SetValueFromBoolean(ISilDataAccess sda, int hvo, int tag, bool newValue)
		{
			if (sda == null) throw new ArgumentNullException("sda");

			if ((CellarPropertyType)sda.MetaDataCache.GetFieldType(tag) == CellarPropertyType.Boolean)
				sda.SetBoolean(hvo, tag, newValue);
			else
				sda.SetInt(hvo, tag, newValue ? 1 : 0);
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:12,代码来源:IntBoolPropertyConverter.cs

示例8: Init

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializer
		/// </summary>
		/// <param name="cache">The instance of the DB connection representing the channel
		/// through which notifications come</param>
		/// <param name="tag">The property tag that the caller wants to be notified about
		/// </param>
		/// ------------------------------------------------------------------------------------
		internal void Init(FdoCache cache, int tag)
		{
			m_cache = cache;
			if (cache.AddChangeWatcher(this))
			{
				m_sda = m_cache.MainCacheAccessor;
				m_sda.AddNotification(this); // register this in the ISilDataAccess
			}
			m_Tag = tag;
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:19,代码来源:ChangeWatcher.cs

示例9: AddAndInvokeIfRedo

		internal int m_chvoDel; // On Do, Redo; #inserted on Undo.

		/// <summary>
		/// Make an instance and add it to the undo stack. Also, if it's the 'redo' action added after the
		/// actual changes (fForRedo is true), issue the propchanged at once to complete the original action.
		/// </summary>
		public static ExtraPropChangedAction AddAndInvokeIfRedo(IActionHandler actionHandler, ISilDataAccess sda, int hvo, int tag, int
			ihvo, int chvoIns, int chvoDel, bool fForRedo)
		{

			ExtraPropChangedAction action = new ExtraPropChangedAction(sda, hvo, tag, ihvo, chvoIns, chvoDel, fForRedo);
			actionHandler.AddAction(action);
			if (fForRedo)
				action.Redo();
			return action;
		}
开发者ID:sillsdev,项目名称:FieldWorks,代码行数:16,代码来源:ExtraPropChangedAction.cs

示例10: FindReplaceCollectorEnvBase

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="T:FindReplaceCollectorEnvBase"/> class.
		/// </summary>
		/// <param name="vc">The view constructor.</param>
		/// <param name="sda">Date access to get prop values etc.</param>
		/// <param name="hvoRoot">The root object to display.</param>
		/// <param name="frag">The fragment.</param>
		/// <param name="vwPattern">The find/replace pattern.</param>
		/// <param name="searchKiller">Used to interrupt a find/replace</param>
		/// <remarks>If the base environment is not null, it is used for various things,
		/// such as obtaining 'outer object' information.</remarks>
		/// ------------------------------------------------------------------------------------
		public FindReplaceCollectorEnvBase(IVwViewConstructor vc, ISilDataAccess sda,
			int hvoRoot, int frag, IVwPattern vwPattern, IVwSearchKiller searchKiller)
			: base(null, sda, hvoRoot)
		{
			m_vc = vc;
			m_frag = frag;
			m_Pattern = vwPattern;
			m_searchKiller = searchKiller;
			m_textSourceInit = VwMappedTxtSrcClass.Create();
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:23,代码来源:FindReplaceCollectorEnv.cs

示例11: ExtraPropChangedAction

		/// <summary>
		/// Make one.
		/// </summary>

		public ExtraPropChangedAction(ISilDataAccess sda, int hvo, int tag, int
			ihvo, int chvoIns, int chvoDel, bool fForRedo)
		{
			m_sda = sda;
			m_hvo = hvo;
			m_tag = tag;
			m_ihvo = ihvo;
			m_chvoIns = chvoIns;
			m_chvoDel = chvoDel;
			m_fForRedo = fForRedo;
		}
开发者ID:sillsdev,项目名称:FieldWorks,代码行数:15,代码来源:ExtraPropChangedAction.cs

示例12: FilterSdaDecorator

		/// <summary>
		/// Make one that wraps the specified cache and passes items in the specified property of the specified root object.
		/// </summary>
		public FilterSdaDecorator(ISilDataAccess domainDataByFlid, int mainFlid, int hvoRoot)
			: base(domainDataByFlid)
		{
			m_mainFlid = mainFlid;
			m_hvoRoot = hvoRoot;
			int chvoReal = BaseSda.get_VecSize(m_hvoRoot, m_mainFlid);
			using (ArrayPtr arrayPtr = MarshalEx.ArrayToNative(chvoReal, typeof (int)))
			{
				BaseSda.VecProp(m_hvoRoot, m_mainFlid, chvoReal, out chvoReal, arrayPtr);
				m_validHvos = new Set<int>((int[])MarshalEx.NativeToArray(arrayPtr, chvoReal, typeof(int)));
			}
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:15,代码来源:FilterSdaDecorator.cs

示例13: FixtureSetup

		public override void FixtureSetup()
		{
			base.FixtureSetup();

			m_sda = Cache.DomainDataByFlid;
			m_objectsToDispose = new DisposableObjectsSet<object>();
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:7,代码来源:TestPersistence.cs

示例14: AtomicReferenceSlice

		/// -----------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="AtomicReferenceSlice"/> class.
		/// </summary>
		/// -----------------------------------------------------------------------------------
		public AtomicReferenceSlice(FdoCache cache, ICmObject obj, int flid,
			XmlNode configurationNode, IPersistenceProvider persistenceProvider,
			Mediator mediator, StringTable stringTbl)
			: base(cache, obj, flid, configurationNode, persistenceProvider, mediator, stringTbl)
		{
			m_sda = m_cache.MainCacheAccessor;
			m_sda.AddNotification(this);
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:13,代码来源:AtomicReferenceSlice.cs

示例15: SyncWatcher

		/// <summary>
		/// Create one.
		/// </summary>
		/// <param name="cache"></param>
		/// <param name="appGuid"></param>
		public SyncWatcher(FdoCache cache, Guid appGuid)
		{
			m_cache = cache;
			m_appGuid = appGuid;

			m_sda = m_cache.MainCacheAccessor;
			m_sda.AddNotification(this);
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:13,代码来源:SyncWatcher.cs


注:本文中的ISilDataAccess类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。