public object GetListViewExItemPropertyValue(ListViewEmbeddedControls.ListViewEx p_oListViewEx, int p_intItem, string p_strPropName, bool p_bCallback) { if (p_bCallback == false) { m_oReturnValue = null; } if (p_oListViewEx.InvokeRequired) { GetListViewExItemPropertyValueCallback d = new GetListViewExItemPropertyValueCallback(GetListViewExItemPropertyValue); p_oListViewEx.Invoke(d, new object[] { p_oListViewEx, p_intItem, p_strPropName, true }); } else { Type t = p_oListViewEx.Items[p_intItem].GetType(); System.Reflection.PropertyInfo[] props = t.GetProperties(); foreach (System.Reflection.PropertyInfo p in props) { if (p.Name.Trim().ToUpper() == p_strPropName.Trim().ToUpper()) { m_oReturnValue = p.GetValue(p_oListViewEx.Items[p_intItem], null); break; } } } if (m_oReturnValue == null && p_bCallback == false) { m_oReturnValue = false; } return(m_oReturnValue); }
public void SetListViewExTextValue(ListViewEmbeddedControls.ListViewEx p_oListViewEx, int p_intRow, int p_intCol, string p_strValue) { if (p_oListViewEx.InvokeRequired) { SetListViewExTextValueCallback d = new SetListViewExTextValueCallback(SetListViewExTextValue); p_oListViewEx.Invoke(d, new object[] { p_oListViewEx, p_intRow, p_intCol, p_strValue }); } else { p_oListViewEx.Items[p_intRow].SubItems[p_intCol].Text = p_strValue; } }
public void EnsureListViewExItemVisible( ListViewEmbeddedControls.ListViewEx p_oListViewEx, int p_intItem) { if (p_oListViewEx.InvokeRequired) { EnsureListViewExItemVisibleCallback d = new EnsureListViewExItemVisibleCallback(EnsureListViewExItemVisible); p_oListViewEx.Invoke( d, new object[] { p_oListViewEx, p_intItem }); } else { p_oListViewEx.EnsureVisible(p_intItem); } }
public void SetListViewExItemPropertyValue(ListViewEmbeddedControls.ListViewEx p_oListViewEx, int p_intItem, string p_strPropName, object p_oPropValue) { if (p_oListViewEx.InvokeRequired) { SetListViewExItemPropertyValueCallback d = new SetListViewExItemPropertyValueCallback(SetListViewExItemPropertyValue); p_oListViewEx.Invoke(d, new object[] { p_oListViewEx, p_intItem, p_strPropName, p_oPropValue }); } else { Type t = p_oListViewEx.Items[p_intItem].GetType(); System.Reflection.PropertyInfo[] props = t.GetProperties(); foreach (System.Reflection.PropertyInfo p in props) { if (p.Name.Trim().ToUpper() == p_strPropName.Trim().ToUpper()) { p.SetValue(p_oListViewEx.Items[p_intItem], p_oPropValue, null); } } } }
public int GetListViewExCheckedItemsCount(ListViewEmbeddedControls.ListViewEx p_oListViewEx, bool p_bCallback) { if (p_bCallback == false) { m_intReturnValue = -1; } if (p_oListViewEx.InvokeRequired) { GetListViewExCheckedItemsCountCallback d = new GetListViewExCheckedItemsCountCallback(GetListViewExCheckedItemsCount); p_oListViewEx.Invoke(d, new object[] { p_oListViewEx, true }); } else { m_intReturnValue = p_oListViewEx.CheckedItems.Count; } if (m_intReturnValue == -1 && p_bCallback == false) { m_intReturnValue = 0; } return(m_intReturnValue); }
public string GetListViewExTextValue(ListViewEmbeddedControls.ListViewEx p_oListViewEx, int p_intRow, int p_intCol, bool p_bCallback) { if (p_bCallback == false) { m_strPropertyValue = "?"; } if (p_oListViewEx.InvokeRequired) { GetListViewExTextValueCallback d = new GetListViewExTextValueCallback(GetListViewExTextValue); p_oListViewEx.Invoke(d, new object[] { p_oListViewEx, p_intRow, p_intCol, true }); } else { m_strPropertyValue = p_oListViewEx.Items[p_intRow].SubItems[p_intCol].Text.Trim(); } if (m_strPropertyValue == "?" && p_bCallback == false) { m_strPropertyValue = ""; } return(m_strPropertyValue); }