ToString() публичный Метод

public ToString ( ) : string
Результат string
Пример #1
0
		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;
		}
Пример #2
0
		private void OnTargetComboItemChanged(FieldComboItem selectedItem)
		{
			if (TargetComboSelectedIndexChanged == null)
				return;
			int flid;
			m_expectedListItemsClassId = GetExpectedListItemsClassAndTargetFieldFromSelectedItem(selectedItem, out flid);
			if (m_expectedListItemsClassId != 0)
			{
				using (var targetFieldItem = new TargetFieldItem(selectedItem.ToString(),
					selectedItem.ColumnIndex, m_expectedListItemsClassId, flid))
				{
					var args = new TargetColumnChangedEventArgs(targetFieldItem);
					//REFACTOR: the BrowseView should not know about BulkEdit - They appear to be too highly coupled.
					m_bv.BulkEditTargetComboSelectedIndexChanged(args); // may set ForceReload flag on args.
					if (TargetComboSelectedIndexChanged != null)
						TargetComboSelectedIndexChanged(this, args);
				}
			}
		}
Пример #3
0
		private void OnTargetComboItemChanged(FieldComboItem selectedItem)
		{
			if (TargetComboSelectedIndexChanged == null)
				return;
			m_expectedListItemsClassId = GetExpectedListItemsClassFromSelectedItem(selectedItem);
			if (m_expectedListItemsClassId != 0)
			{
				TargetColumnChangedEventArgs args =
					new TargetColumnChangedEventArgs(new TargetFieldItem(selectedItem.ToString(), selectedItem.ColumnIndex,
																		 m_expectedListItemsClassId));
				m_bv.BulkEditTargetComboSelectedIndexChanged(args); // may set ForceReload flag on args.
				if (TargetComboSelectedIndexChanged != null)
					TargetComboSelectedIndexChanged(this, args);
			}
		}