當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。