• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# ISilDataAccess类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



ISilDataAccess类属于命名空间,在下文中一共展示了ISilDataAccess类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: BulletsPreview

		/// -------------------------------------------------------------------------------------
		/// <summary>
		/// Default constructor
		/// </summary>
		/// -------------------------------------------------------------------------------------
		public BulletsPreview()
		{
			m_CacheDa = VwCacheDaClass.Create();
			m_DataAccess = (ISilDataAccess)m_CacheDa;
			m_vc = new BulletsPreviewVc();

			// So many things blow up so badly if we don't have one of these that I finally decided to just
			// make one, even though it won't always, perhaps not often, be the one we want.
			CreateTempWritingSystemFactory();
			m_DataAccess.WritingSystemFactory = WritingSystemFactory;
			VScroll = false; // no vertical scroll bar visible.
			AutoScroll = false; // not even if the root box is bigger than the window.
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:18,代码来源:FwBulletsPreview.cs


示例14: GetTimeProperty

		/// <summary>
		/// Get a Time property value coverted to a DateTime value.
		/// </summary>
		public static DateTime GetTimeProperty(ISilDataAccess sda, int hvo, int flid)
		{
			long silTime;
			try
			{
				silTime = sda.get_TimeProp(hvo, flid);
				return ConvertFromSilTime(silTime);
			}
			catch
			{
				return DateTime.MinValue;
			}
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:16,代码来源:SilTime.cs


示例15: FixtureSetup

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

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


示例16: 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


示例17: 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


示例18: InnerLabeledMultiStringControl

		public InnerLabeledMultiStringControl(FdoCache cache, int wsMagic)
		{
			m_realCache = cache;
			m_sda = new TextBoxDataAccess { WritingSystemFactory = cache.WritingSystemFactory };
			m_rgws = WritingSystemServices.GetWritingSystemList(cache, wsMagic, 0, false);

			AutoScroll = true;
			IsTextBox = true;	// range selection not shown when not in focus
		}
开发者ID:sillsdev,项目名称:FieldWorks,代码行数:9,代码来源:InnerLabeledMultiStringControl.cs


示例19: FixtureSetup

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// If a test overrides this, it should call this base implementation.
		/// </summary>
		/// ------------------------------------------------------------------------------------
		public override void FixtureSetup()
		{
			base.FixtureSetup();

			m_sda = Cache.DomainDataByFlid;
			m_entryFactory = Cache.ServiceLocator.GetInstance<ILexEntryFactory>();
			m_senseFactory = Cache.ServiceLocator.GetInstance<ILexSenseFactory>();
			m_possFact = Cache.ServiceLocator.GetInstance<ICmPossibilityFactory>();
			m_possRepo = Cache.ServiceLocator.GetInstance<ICmPossibilityRepository>();
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:15,代码来源:LexEntryTests.cs


示例20: CreateModifyTimeManager

		/// <summary>
		/// Create one and install it to work on a particular cache.
		/// </summary>
		/// <param name="cache"></param>
		public CreateModifyTimeManager(FdoCache cache)
		{
			m_cache = cache;
			Debug.Assert(cache.CreateModifyManager == null);
			cache.CreateModifyManager = this;

			m_sda = cache.MainCacheAccessor;
			m_sda.AddNotification(this);

			m_mdc = cache.MetaDataCacheAccessor;
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:15,代码来源:CreateModifyTimeManager.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ISimpleDeobfuscator类代码示例发布时间:2022-05-24
下一篇:
C# ISigner类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap