//**************************************** private string GetValue(int column) { //**************************************** ColumnBinding MyBinding = _Parent._Columns[column]; object PropertyValue; //**************************************** if (_ItemValue == null) { return(string.Empty); } PropertyValue = WinBindingSource.GetFromPath(_ItemValue, MyBinding.SourceSegments); if (PropertyValue != null && MyBinding.Converter != null) { PropertyValue = MyBinding.Converter.ConvertTo(PropertyValue, typeof(string), null); } if (PropertyValue is string) { return((string)PropertyValue); } else if (PropertyValue != null) { return(PropertyValue.ToString()); } else { return(string.Empty); } }
//**************************************** public override string ToString() { //**************************************** object PropertyValue = WinBindingSource.GetFromPath(_Value, _Parent._DisplayPath); //**************************************** if (_Parent._Converter != null) { return((string)_Parent._Converter.ConvertTo(PropertyValue, typeof(string), null)); } else if (PropertyValue is string) { return((string)PropertyValue); } else if (PropertyValue != null) { return(PropertyValue.ToString()); } else { return(""); } }
//**************************************** private string GetTitle(GuiChildPresenter presenter) { //**************************************** object PropertyValue = WinBindingSource.GetFromPath(presenter, _DisplayPath); //**************************************** if (_Converter != null) { return((string)_Converter.ConvertTo(PropertyValue, typeof(string), null)); } else if (PropertyValue is string) { return((string)PropertyValue); } else if (PropertyValue != null) { return(PropertyValue.ToString()); } else { return(""); } }