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


C# XCore.List类代码示例

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


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

示例1: LoadDataFromInventory

		/// <summary>
		/// Get protected and user-stored dictionary configurations to load into the dialog.
		/// Tests will override this to load the manager in their own fashion.
		/// </summary>
		private void LoadDataFromInventory(XmlNode current)
		{
			// Tuples are <uniqueCode, dispName, IsProtected>
			var configList = new List<Tuple<string, string, bool>>();

			// put them in configList and feed them into the Manager's dictionary.
			foreach (var xnView in m_originalViewConfigNodes)
			{
				var sLabel = XmlUtils.GetManditoryAttributeValue(xnView, "label");
				var sLayout = XmlUtils.GetManditoryAttributeValue(xnView, "layout");
				var fProtected = !sLayout.Contains(Inventory.kcMarkLayoutCopy);
				configList.Add(new Tuple<string, string, bool>(sLayout, sLabel, fProtected));
			}

			LoadInternalDictionary(configList);

			var sLayoutCurrent = XmlUtils.GetManditoryAttributeValue(current, "layout");
			m_originalView = sLayoutCurrent;
			m_currentView = m_originalView;

			if (m_configList.Count == 0)
				return;

			// Now set up the actual dialog's contents
			RefreshView();
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:30,代码来源:DictionaryConfigManager.cs

示例2: PossibilityAutoComplete

		public PossibilityAutoComplete(FdoCache cache, Mediator mediator, ICmPossibilityList list, Control control,
			string displayNameProperty, string displayWs)
		{
			m_cache = cache;
			m_mediator = mediator;
			m_control = control;
			m_displayNameProperty = displayNameProperty;
			m_displayWs = displayWs;

			m_listBox = new ComboListBox {DropDownStyle = ComboBoxStyle.DropDownList, ActivateOnShow = false};
			m_listBox.SelectedIndexChanged += HandleSelectedIndexChanged;
			m_listBox.SameItemSelected += HandleSameItemSelected;
			m_listBox.StyleSheet = FontHeightAdjuster.StyleSheetFromMediator(mediator);
			m_listBox.WritingSystemFactory = cache.WritingSystemFactory;
			m_searcher = new StringSearcher<ICmPossibility>(SearchType.Prefix, cache.ServiceLocator.WritingSystemManager);
			m_possibilities = new List<ICmPossibility>();
			var stack = new Stack<ICmPossibility>(list.PossibilitiesOS);
			while (stack.Count > 0)
			{
				ICmPossibility poss = stack.Pop();
				m_possibilities.Add(poss);
				foreach (ICmPossibility child in poss.SubPossibilitiesOS)
					stack.Push(child);
			}

			m_control.KeyDown += HandleKeyDown;
			m_control.KeyPress += HandleKeyPress;
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:28,代码来源:PossibilityAutoComplete.cs

示例3: SetDlgInfo

		/// <summary>
		/// Set up the dlg in preparation to showing it.
		/// </summary>
		/// <param name="cache">FDO cache.</param>
		/// <param name="wp">Strings used for various items in this dialog.</param>
		public void SetDlgInfo(FdoCache cache, Mediator mediator, WindowParams wp, DummyCmObject mainObj, List<DummyCmObject> mergeCandidates,
			string guiControl, string helpTopic)
		{
			CheckDisposed();

			Debug.Assert(cache != null);

			m_mediator = mediator;
			m_cache = cache;
			m_mainObj = mainObj;
			m_tsf = cache.TsStrFactory;

			m_fwTextBoxBottomMsg.WritingSystemFactory = m_cache.WritingSystemFactory;
			m_fwTextBoxBottomMsg.WritingSystemCode = m_cache.WritingSystemFactory.UserWs;

			InitBrowseView(guiControl, mergeCandidates);

			Text = wp.m_title;
			label2.Text = wp.m_label;

			m_helpTopic = helpTopic;

			if(m_helpTopic != null && m_helpTopicProvider != null) // m_helpTopicProvider could be null for testing
			{
				helpProvider = new HelpProvider();
				helpProvider.HelpNamespace = m_helpTopicProvider.HelpFile;
				helpProvider.SetHelpKeyword(this, m_helpTopicProvider.GetHelpString(m_helpTopic));
				helpProvider.SetHelpNavigator(this, HelpNavigator.Topic);
			}

			MoveWindowToPreviousPosition();
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:37,代码来源:MergeObjectDlg.cs

示例4: MakeMenuItems

		protected override TreeNode MakeMenuItems(PopupTree popupTree, int hvoTarget)
		{
			int tagNamePOS = UseAbbr ?
				CmPossibilityTags.kflidAbbreviation :
				CmPossibilityTags.kflidName;


			List<HvoTreeNode> relevantPartsOfSpeech = new List<HvoTreeNode>();
			GatherPartsOfSpeech(Cache, List.Hvo, CmPossibilityListTags.kflidPossibilities,
				CmPossibilityTags.kflidSubPossibilities,
				PartOfSpeechTags.kflidInflectionClasses,
				tagNamePOS, WritingSystem,
				relevantPartsOfSpeech);
			relevantPartsOfSpeech.Sort();
			int tagNameClass = UseAbbr ?
				MoInflClassTags.kflidAbbreviation :
				MoInflClassTags.kflidName;
			TreeNode match = null;
			foreach(HvoTreeNode item in relevantPartsOfSpeech)
			{
				popupTree.Nodes.Add(item);
				TreeNode match1 = AddNodes(item.Nodes, item.Hvo,
					PartOfSpeechTags.kflidInflectionClasses,
					MoInflClassTags.kflidSubclasses,
					hvoTarget, tagNameClass);
				if (match1 != null)
					match = match1;
			}
			return match;
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:30,代码来源:InflectionClassPopupTreeManager.cs

示例5: MakeMenuItems

		protected override TreeNode MakeMenuItems(PopupTree popupTree, int hvoTarget)
		{
			int tagNamePOS = UseAbbr ?
				(int)CmPossibility.CmPossibilityTags.kflidAbbreviation :
				(int)CmPossibility.CmPossibilityTags.kflidName;

			List<HvoTreeNode> relevantPartsOfSpeech = new List<HvoTreeNode>();
			InflectionClassPopupTreeManager.GatherPartsOfSpeech(Cache, List.Hvo,
				(int)CmPossibilityList.CmPossibilityListTags.kflidPossibilities,
				(int)CmPossibility.CmPossibilityTags.kflidSubPossibilities,
				(int)PartOfSpeech.PartOfSpeechTags.kflidInflectableFeats,
				tagNamePOS, WritingSystem,
				relevantPartsOfSpeech);
			relevantPartsOfSpeech.Sort();
			TreeNode match = null;
			foreach(HvoTreeNode item in relevantPartsOfSpeech)
			{
				popupTree.Nodes.Add(item);
				IPartOfSpeech pos = (IPartOfSpeech)PartOfSpeech.CreateFromDBObject(Cache, item.Hvo, false);
				foreach(IFsFeatStruc fs in pos.ReferenceFormsOC)
				{
					// Note: beware of using fs.ShortName. That can be
					// absolutely EMPTY (if the user has turned off the 'Show Abbreviation as its label'
					// field for both the feature category and value).
					// ChooserName shows the short name if it is non-empty, otherwise the long name.
					HvoTreeNode node = new HvoTreeNode(fs.ChooserNameTS, fs.Hvo);
					item.Nodes.Add(node);
					if (fs.Hvo == hvoTarget)
						match = node;
				}
				item.Nodes.Add(new HvoTreeNode(Cache.MakeUserTss(LexTextControls.ksChooseInflFeats), kMore));
			}
			return match;
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:34,代码来源:InflectionFeaturePopupTreeManager.cs

示例6: FixedOrphanFootnoteReportDlg

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="T:FixedOrphanFootnoteReportDlg"/> class.
		/// </summary>
		/// <param name="issues">List of styles that the user has modified.</param>
		/// <param name="projectName">Name of the project.</param>
		/// <param name="helpTopicProvider">context sensitive help</param>
		/// ------------------------------------------------------------------------------------
		public FixedOrphanFootnoteReportDlg(List<string> issues, string projectName,
			IHelpTopicProvider helpTopicProvider) :
			base(issues, projectName, helpTopicProvider)
		{
			InitializeComponent();
			RepeatTitleOnEveryPage = true;
			RepeatColumnHeaderOnEveryPage = false;
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:16,代码来源:FixedOrphanFootnoteReportDlg.cs

示例7: PopulateCtrlTabTargetCandidateList

		public Control PopulateCtrlTabTargetCandidateList(List<Control> targetCandidates)
		{
			CheckDisposed();
			if (targetCandidates == null)
				throw new ArgumentNullException("targetCandidates");
			targetCandidates.Add(this);
			return ContainsFocus ? this : null;
		}
开发者ID:sillsdev,项目名称:FieldWorks,代码行数:8,代码来源:ConcordanceControlBase.cs

示例8: GetMessageTargets

		/// <summary>
		/// return an array of all of the objects which should
		/// 1) be queried when looking for someone to deliver a message to
		/// 2) be potential recipients of a broadcast
		/// </summary>
		/// <returns></returns>
		public IxCoreColleague[] GetMessageTargets()
		{
			List<IxCoreColleague> colleagues = new List<IxCoreColleague>();
			colleagues.Add(this);
			// Add current FindComboFiller & UsedByFiller.
			// Those
			return colleagues.ToArray();
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:14,代码来源:ConcorderControl.cs

示例9: PopulateCtrlTabTargetCandidateList

		public Control PopulateCtrlTabTargetCandidateList(List<Control> targetCandidates)
		{
			if (targetCandidates == null)
				throw new ArgumentNullException("'targetCandidates' is null.");

			targetCandidates.Add(this);

			return ContainsFocus ? this : null;
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:9,代码来源:Ticker.cs

示例10: DictionaryConfigManager

		/// <summary>
		/// Create the Manager for stored dictionary configurations.
		/// </summary>
		public DictionaryConfigManager(IDictConfigViewer viewer, List<XmlNode> configViews,
			XmlNode current)
		{
			m_viewer = viewer;
			m_originalViewConfigNodes = configViews;

			m_configList = new Dictionary<string, DictConfigItem>();
			m_fPersisted = false;

			LoadDataFromInventory(current);
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:14,代码来源:DictionaryConfigManager.cs

示例11: TePageSetupDlg

//		private decimal m_standardLeadingFactor;
		#endregion

		#region Constructor
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="T:TePageSetupDlg"/> class.
		/// </summary>
		/// <param name="pgLayout">The page layout.</param>
		/// <param name="scr">The Scripture object (which owns the publications).</param>
		/// <param name="publication">The publication.</param>
		/// <param name="division">The division. The NumberOfColumns in the division should be
		/// set before calling this dialog.</param>
		/// <param name="teMainWnd">TE main window (provides callbacks).</param>
		/// <param name="helpTopicProvider">The help topic provider.</param>
		/// <param name="app">The app.</param>
		/// <param name="fIsTrialPub">if set to <c>true</c> view from which this dialog
		/// was brought up is Trial Publication view.</param>
		/// <param name="pubPageSizes">The page sizes available for publication.</param>
		/// ------------------------------------------------------------------------------------
		public TePageSetupDlg(IPubPageLayout pgLayout, IScripture scr,
			IPublication publication, IPubDivision division, IPageSetupCallbacks teMainWnd,
			IHelpTopicProvider helpTopicProvider, IApp app, bool fIsTrialPub,
			List<PubPageInfo> pubPageSizes) :
			base(pgLayout, scr, publication, division, teMainWnd, helpTopicProvider,
				app, pubPageSizes)
		{
			m_fIsTrialPublication = fIsTrialPub;
//			if (!m_chkNonStdChoices.Checked) // following the standard
//				m_standardLeadingFactor = m_nudLineSpacing.Value / m_nudBaseCharSize.Value;
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:31,代码来源:TePageSetupDlg.cs

示例12: InterestingTextList

        public InterestingTextList(PropertyTable propertyTable, ITextRepository repo,
			IStTextRepository stTextRepo, bool includeScripture)
        {
            m_textRepository = repo;
            m_propertyTable = propertyTable;
            m_stTextRepository = stTextRepo;
            CoreTexts = GetCoreTexts();
            m_scriptureTexts = GetScriptureTexts();
            IncludeScripture = includeScripture;
            GetCache();
        }
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:11,代码来源:InterestingTextList.cs

示例13: SummaryDialogForm

		private bool m_fOtherClicked;	// set true by btnOther_Click, caller should call OtherButtonClicked after dialog closes.
		#endregion

		#region Constructor/destructor
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Constructor for a single LexEntry object.
		/// </summary>
		/// <param name="leui">The lex entry ui.</param>
		/// <param name="tssForm">The TSS form.</param>
		/// <param name="helpProvider">The help provider.</param>
		/// <param name="helpFileKey">string key to get the help file name</param>
		/// <param name="styleSheet">The stylesheet.</param>
		/// ------------------------------------------------------------------------------------
		internal SummaryDialogForm(LexEntryUi leui, ITsString tssForm, IHelpTopicProvider helpProvider,
			string helpFileKey, IVwStylesheet styleSheet)
		{
			InitializeComponent();
			AccessibleName = GetType().Name;

			m_rghvo = new List<int>(1);
			m_rghvo.Add(leui.Object.Hvo);
			m_cache = leui.Object.Cache;
			m_mediator = leui.Mediator;
			Initialize(tssForm, helpProvider, helpFileKey, styleSheet);
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:26,代码来源:SummaryDialogForm.cs

示例14: FwUpdateReportDlg

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Constructor for FwUpdateReportDlg
		/// </summary>
		/// <param name="itemsToReport">List of items to report in the list.</param>
		/// <param name="projectName">Name of the project.</param>
		/// <param name="helpTopicProvider">context sensitive help</param>
		/// ------------------------------------------------------------------------------------
		public FwUpdateReportDlg(List<string> itemsToReport, string projectName,
			IHelpTopicProvider helpTopicProvider) : this()
		{
			lblProjectName.Text = String.Format(lblProjectName.Text, projectName);

			m_helpTopicProvider = helpTopicProvider;

			// show list of names
			foreach (string item in itemsToReport)
				lvItems.Items.Add(item);

			TopMost = true;
		}
开发者ID:sillsdev,项目名称:FieldWorks,代码行数:21,代码来源:FwUpdateReportDlg.cs

示例15: SetDlgInfo

		/// <summary>
		/// Set up the dlg in preparation to showing it.
		/// </summary>
		/// <param name="cache">FDO cache.</param>
		/// <param name="wp">Strings used for various items in this dialog.</param>
		public void SetDlgInfo(FdoCache cache, Mediator mediator, WindowParams wp, DummyCmObject mainObj, List<DummyCmObject> mergeCandidates,
			string guiControl, string helpTopic)
		{
			CheckDisposed();

			Debug.Assert(cache != null);

			m_mediator = mediator;
			m_cache = cache;
			m_mainObj = mainObj;
			m_tsf = TsStrFactoryClass.Create();

			m_fwTextBoxBottomMsg.WritingSystemFactory = m_cache.LanguageWritingSystemFactoryAccessor;
			m_fwTextBoxBottomMsg.WritingSystemCode = m_cache.LangProject.DefaultUserWritingSystem;

			InitBrowseView(guiControl, mergeCandidates);

			// Get location to the stored values, if any.
			object locWnd = m_mediator.PropertyTable.GetValue("mergeDlgLocation");
			// JohnT: this dialog can't be resized. So it doesn't make sense to
			// remember a size. If we do, we need to override OnLoad (as in SimpleListChooser)
			// to prevent the dialog growing every time at 120 dpi. But such an override
			// makes it too small to show all the controls at the default size.
			// It's better just to use the default size until it's resizeable for some reason.
			//m_mediator.PropertyTable.GetValue("msaCreatorDlgSize");
			// And when I do this, it works the first time, but later times the window is
			// too small and doesn't show all the controls. Give up on smart location for now.
			//object szWnd = this.Size;
			object szWnd = null; // suppresses the smart location stuff.
			if (locWnd != null && szWnd != null)
			{
				Rectangle rect = new Rectangle((Point)locWnd, (Size)szWnd);
				ScreenUtils.EnsureVisibleRect(ref rect);
				DesktopBounds = rect;
				StartPosition = FormStartPosition.Manual;
			}

			Text = wp.m_title;
			label2.Text = wp.m_label;

			m_helpTopic = helpTopic;

			if(m_helpTopic != null && FwApp.App != null) // FwApp.App could be null for testing
			{
				helpProvider = new System.Windows.Forms.HelpProvider();
				helpProvider.HelpNamespace = FwApp.App.HelpFile;
				helpProvider.SetHelpKeyword(this, FwApp.App.GetHelpString(m_helpTopic, 0));
				helpProvider.SetHelpNavigator(this, System.Windows.Forms.HelpNavigator.Topic);
			}
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:55,代码来源:MergeObjectDlg.cs


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