SIL.FieldWorks.Common.Controls.FieldComboItem.ToString C# (CSharp) Method

ToString() public method

public ToString ( ) : string
return string
		public override string ToString()
		{
			return m_name;
		}

Usage Example

コード例 #1
0
ファイル: BulkEditBar.cs プロジェクト: sillsdev/FieldWorks
		private FieldComboItem AddStringFieldItemsToCombo(ComboBox combo, FieldComboItem selectedItem, bool fIsSourceCombo)
		{
			FieldComboItem newSelection = null;
			int icol = -1;
			foreach (XmlNode node in m_bv.ColumnSpecs)
			{
				icol++;
				FieldReadWriter accessor = null;
				string optionLabel = GetColumnLabel(m_mediator, node);
				try
				{
					if (fIsSourceCombo)
						accessor = new ManyOnePathSortItemReadWriter(m_cache, node, m_bv, (IApp)m_mediator.PropertyTable.GetValue("App"));
					else
						accessor = FieldReadWriter.Create(node, m_cache, m_bv.RootObjectHvo);
					if (accessor == null)
						continue;
					// Use the decorated data access - see FWR-376.
					accessor.DataAccess = m_bv.SpecialCache;
				}
				catch
				{
					Debug.Fail(String.Format("There was an error creating Delete combo item for column ({0})"), optionLabel);
					// skip buggy column
					continue;
				}

				FieldComboItem item = new FieldComboItem(optionLabel, icol, accessor);
				combo.Items.Add(item);
				if (selectedItem != null && selectedItem.ToString() == item.ToString())
					newSelection = item;
			}
			return newSelection;
		}
All Usage Examples Of SIL.FieldWorks.Common.Controls.FieldComboItem::ToString