Here are the examples of the csharp api class System.Windows.Forms.CurrencyManager.GetItemProperties() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
33 Examples
0
1. Example
View licenseprivate bool PrepareDescriptors() { if (_listManager.GetItemProperties().Count > 0 && _identifierMember.Length != 0 && _displayMember.Length != 0 && _parentIdentifierMember.Length != 0) { if (_identifierProperty == null) _identifierProperty = _listManager.GetItemProperties()[_identifierMember]; if (_displayProperty == null) _displayProperty = _listManager.GetItemProperties()[_displayMember]; if (_parentIdentifierProperty == null) _parentIdentifierProperty = _listManager.GetItemProperties()[_parentIdentifierMember]; if (_readOnlyMember != null && _readOnlyProperty == null) _readOnlyProperty = _listManager.GetItemProperties()[_readOnlyMember]; if (_toolTipTextMember != null && _toolTipTextProperty == null) { _toolTipTextProperty = _listManager.GetItemProperties()[_toolTipTextMember]; if (_toolTipTextProperty != null) ShowNodeToolTips = true; } } return (_identifierProperty != null && _displayProperty != null && _parentIdentifierProperty != null); }
0
2. Example
View licenseprivate bool PrepareValueDescriptor() { if (_valueProperty == null) { if (_valueMember == string.Empty) _valueMember = _identifierMember; _valueProperty = _listManager.GetItemProperties()[_valueMember]; } return (_valueProperty != null); }
0
3. Example
View licenseprivate bool PrepareDescriptors() { if (_listManager.GetItemProperties().Count > 0 && _identifierMember.Length != 0 && _displayMember.Length != 0 && _parentIdentifierMember.Length != 0) { if (_identifierProperty == null) _identifierProperty = _listManager.GetItemProperties()[_identifierMember]; if (_displayProperty == null) _displayProperty = _listManager.GetItemProperties()[_displayMember]; if (_parentIdentifierProperty == null) _parentIdentifierProperty = _listManager.GetItemProperties()[_parentIdentifierMember]; if (_readOnlyMember != null && _readOnlyProperty == null) _readOnlyProperty = _listManager.GetItemProperties()[_readOnlyMember]; if (_toolTipTextMember != null && _toolTipTextProperty == null) { _toolTipTextProperty = _listManager.GetItemProperties()[_toolTipTextMember]; if (_toolTipTextProperty != null) ShowNodeToolTips = true; } } return (_identifierProperty != null && _displayProperty != null && _parentIdentifierProperty != null); }
0
4. Example
View licenseprivate bool PrepareValueDescriptor() { if (_valueProperty == null) { if (_valueMember == string.Empty) _valueMember = _identifierMember; _valueProperty = _listManager.GetItemProperties()[_valueMember]; } return (_valueProperty != null); }
0
5. Example
View licenseprivate bool PrepareDescriptors() { if (_listManager.GetItemProperties().Count > 0 && _identifierMember.Length != 0 && _displayMember.Length != 0 && _parentIdentifierMember.Length != 0) { if (_identifierProperty == null) _identifierProperty = _listManager.GetItemProperties()[_identifierMember]; if (_displayProperty == null) _displayProperty = _listManager.GetItemProperties()[_displayMember]; if (_parentIdentifierProperty == null) _parentIdentifierProperty = _listManager.GetItemProperties()[_parentIdentifierMember]; if (_readOnlyMember != null && _readOnlyProperty == null) _readOnlyProperty = _listManager.GetItemProperties()[_readOnlyMember]; if (_toolTipTextMember != null && _toolTipTextProperty == null) { _toolTipTextProperty = _listManager.GetItemProperties()[_toolTipTextMember]; if (_toolTipTextProperty != null) ShowNodeToolTips = true; } } return (_identifierProperty != null && _displayProperty != null && _parentIdentifierProperty != null); }
0
6. Example
View licenseprivate bool PrepareValueDescriptor() { if (_valueProperty == null) { if (_valueMember == string.Empty) _valueMember = _identifierMember; _valueProperty = _listManager.GetItemProperties()[_valueMember]; } return (_valueProperty != null); }
0
7. Example
View licenseprivate bool PrepareDescriptors() { if (_listManager.GetItemProperties().Count > 0 && _identifierMember.Length != 0 && _displayMember.Length != 0 && _parentIdentifierMember.Length != 0) { if (_identifierProperty == null) _identifierProperty = _listManager.GetItemProperties()[_identifierMember]; if (_displayProperty == null) _displayProperty = _listManager.GetItemProperties()[_displayMember]; if (_parentIdentifierProperty == null) _parentIdentifierProperty = _listManager.GetItemProperties()[_parentIdentifierMember]; if (_readOnlyMember != null && _readOnlyProperty == null) _readOnlyProperty = _listManager.GetItemProperties()[_readOnlyMember]; if (_toolTipTextMember != null && _toolTipTextProperty == null) { _toolTipTextProperty = _listManager.GetItemProperties()[_toolTipTextMember]; if (_toolTipTextProperty != null) ShowNodeToolTips = true; } } return (_identifierProperty != null && _displayProperty != null && _parentIdentifierProperty != null); }
0
8. Example
View licenseprivate bool PrepareValueDescriptor() { if (_valueProperty == null) { if (_valueMember == string.Empty) _valueMember = _identifierMember; _valueProperty = _listManager.GetItemProperties()[_valueMember]; } return (_valueProperty != null); }
0
9. Example
View licenseprivate void CalculateColumns() { if (_listManager == null) return; if (Columns.Count == 0) { foreach (PropertyDescriptor prop in _listManager.GetItemProperties()) { var column = new ColumnHeader {Text = prop.Name, Name = prop.Name}; Columns.Add(column); } } }
0
10. Example
View licenseprivate void CalculateColumns() { if (_listManager == null) return; if (Columns.Count == 0) { foreach (PropertyDescriptor prop in _listManager.GetItemProperties()) { var column = new ColumnHeader {Text = prop.Name, Name = prop.Name}; Columns.Add(column); } } }
0
11. Example
View licenseprivate void CalculateColumns() { if (_listManager == null) return; if (Columns.Count == 0) { foreach (PropertyDescriptor prop in _listManager.GetItemProperties()) { var column = new ColumnHeader {Text = prop.Name, Name = prop.Name}; Columns.Add(column); } } }
0
12. Example
View licenseprivate void CalculateColumns() { if (_listManager == null) return; if (Columns.Count == 0) { foreach (PropertyDescriptor prop in _listManager.GetItemProperties()) { var column = new ColumnHeader {Text = prop.Name, Name = prop.Name}; Columns.Add(column); } } }
0
13. Example
View licenseprotected virtual void CreateColumnsFromSource() { if (this.CurrencyManager == null) return; // Don't generate any columns in design mode. If we do, the user will see them, // but the Designer won't know about them and won't persist them, which is very confusing if (this.ListView.IsDesignMode) return; // Don't create columns if we've been told not to if (!this.AutoGenerateColumns) return; // Use a Generator to create columns Generator generator = Generator.Instance as Generator ?? new Generator(); PropertyDescriptorCollection properties = this.CurrencyManager.GetItemProperties(); if (properties.Count == 0) return; foreach (PropertyDescriptor property in properties) { if (!this.ShouldCreateColumn(property)) continue; // Create a column OLVColumn column = generator.MakeColumnFromPropertyDescriptor(property); this.ConfigureColumn(column, property); // Add it to our list this.ListView.AllColumns.Add(column); } generator.PostCreateColumns(this.ListView); }
0
14. Example
View licenseprotected virtual void CreateColumnsFromSource() { if (this.CurrencyManager == null) return; // Don't generate any columns in design mode. If we do, the user will see them, // but the Designer won't know about them and won't persist them, which is very confusing if (this.ListView.IsDesignMode) return; // Don't create columns if we've been told not to if (!this.AutoGenerateColumns) return; // Use a Generator to create columns Generator generator = Generator.Instance as Generator ?? new Generator(); PropertyDescriptorCollection properties = this.CurrencyManager.GetItemProperties(); if (properties.Count == 0) return; bool wereColumnsAdded = false; foreach (PropertyDescriptor property in properties) { if (!this.ShouldCreateColumn(property)) continue; // Create a column OLVColumn column = generator.MakeColumnFromPropertyDescriptor(property); this.ConfigureColumn(column, property); // Add it to our list this.ListView.AllColumns.Add(column); wereColumnsAdded = true; } if (wereColumnsAdded) generator.PostCreateColumns(this.ListView); }
0
15. Example
View licenseprotected virtual void CreateColumnsFromSource() { if (this.CurrencyManager == null) return; // Don't generate any columns in design mode. If we do, the user will see them, // but the Designer won't know about them and won't persist them, which is very confusing if (this.ListView.IsDesignMode) return; // Don't create columns if we've been told not to if (!this.AutoGenerateColumns) return; // Use a Generator to create columns Generator generator = Generator.Instance as Generator ?? new Generator(); PropertyDescriptorCollection properties = this.CurrencyManager.GetItemProperties(); if (properties.Count == 0) return; foreach (PropertyDescriptor property in properties) { if (!this.ShouldCreateColumn(property)) continue; // Create a column OLVColumn column = generator.MakeColumnFromPropertyDescriptor(property); this.ConfigureColumn(column, property); // Add it to our list this.ListView.AllColumns.Add(column); } generator.PostCreateColumns(this.ListView); }
0
16. Example
View licenseprotected virtual void CreateColumnsFromSource() { if (CurrencyManager == null |/n ..... /n //View Source file for more details /n }
0
17. Example
View licenseprotected virtual void CreateColumnsFromSource() { if (CurrencyManager == null |/n ..... /n //View Source file for more details /n }
0
18. Example
View licenseprotected override void FillListBox(ListBox listBox, ITypeDescriptorContext context, object value) { var selectedField = (string) value; if (selectedField == null) selectedField = string.Empty; var dataSourceDescriptor = TypeDescriptor.GetProperties(context.Instance)["DataSource"]; if (dataSourceDescriptor == null) { return; } var dataSource = dataSourceDescriptor.GetValue(context.Instance); if (dataSource != null) { var currencyManager = new BindingContext()[dataSource] as CurrencyManager; if (currencyManager != null) { foreach (PropertyDescriptor descriptor in currencyManager.GetItemProperties()) { int lastIndex = listBox.Items.Add(descriptor.Name); if (string.Compare(descriptor.Name, selectedField) == 0) { listBox.SelectedIndex = lastIndex; } } } } }
0
19. Example
View licenseprotected override void FillListBox(ListBox listBox, ITypeDescriptorContext context, object value) { var selectedField = (string) value; if (selectedField == null) selectedField = string.Empty; var dataSourceDescriptor = TypeDescriptor.GetProperties(context.Instance)["DataSource"]; if (dataSourceDescriptor == null) { return; } var dataSource = dataSourceDescriptor.GetValue(context.Instance); if (dataSource != null) { var currencyManager = new BindingContext()[dataSource] as CurrencyManager; if (currencyManager != null) { foreach (PropertyDescriptor descriptor in currencyManager.GetItemProperties()) { int lastIndex = listBox.Items.Add(descriptor.Name); if (string.Compare(descriptor.Name, selectedField) == 0) { listBox.SelectedIndex = lastIndex; } } } } }
0
20. Example
View licenseprotected override void FillListBox(ListBox listBox, ITypeDescriptorContext context, object value) { var selectedField = (string) value; if (selectedField == null) selectedField = string.Empty; var dataSourceDescriptor = TypeDescriptor.GetProperties(context.Instance)["DataSource"]; if (dataSourceDescriptor == null) { return; } var dataSource = dataSourceDescriptor.GetValue(context.Instance); if (dataSource != null) { var currencyManager = new BindingContext()[dataSource] as CurrencyManager; if (currencyManager != null) { foreach (PropertyDescriptor descriptor in currencyManager.GetItemProperties()) { int lastIndex = listBox.Items.Add(descriptor.Name); if (string.Compare(descriptor.Name, selectedField) == 0) { listBox.SelectedIndex = lastIndex; } } } } }
0
21. Example
View licenseprotected override void FillListBox(ListBox listBox, ITypeDescriptorContext context, object value) { var selectedField = (string) value; if (selectedField == null) selectedField = string.Empty; var dataSourceDescriptor = TypeDescriptor.GetProperties(context.Instance)["DataSource"]; if (dataSourceDescriptor == null) { return; } var dataSource = dataSourceDescriptor.GetValue(context.Instance); if (dataSource != null) { var currencyManager = new BindingContext()[dataSource] as CurrencyManager; if (currencyManager != null) { foreach (PropertyDescriptor descriptor in currencyManager.GetItemProperties()) { int lastIndex = listBox.Items.Add(descriptor.Name); if (string.Compare(descriptor.Name, selectedField) == 0) { listBox.SelectedIndex = lastIndex; } } } } }
0
22. Example
View licenseprivate void BuildListColumns() { // remember column widths Dictionary<string, int> columnWidths = new Dictionary<string, int>(); foreach (ColumnHeader column in Columns) columnWidths[column.Text] = column.Width; Columns.Clear(); if (m_currencyManager == null) return; m_adjustingColumnWidths = true; m_propertyDescriptors = m_currencyManager.GetItemProperties(); foreach (PropertyDescriptor pd in m_propertyDescriptors) { ColumnHeader column = new ColumnHeader(); column.Name = pd.Name; column.Text = pd.DisplayName; if (columnWidths.ContainsKey(column.Text)) column.Width = columnWidths[column.Text]; Columns.Add(column); } if (AutoSize) ResizeToContent(); m_adjustingColumnWidths = false; }
0
23. Example
View licenseprivate void InitializeColumns() { if (!Convert.ToBoolean(_ColumnNameString.Leng/n ..... /n //View Source file for more details /n }
0
24. Example
View licenseprotected virtual void CreateColumnsFromSource() { if (this.CurrencyManager == null) return; // Don't generate any columns in design mode. If we do, the user will see them, // but the Designer won't know about them and won't persist them, which is very confusing if (this.ListView.IsDesignMode) return; // Don't create columns if we've been told not to if (!this.AutoGenerateColumns) return; // Use a Generator to create columns Generator generator = Generator.Instance as Generator ?? new Generator(); PropertyDescriptorCollection properties = this.CurrencyManager.GetItemProperties(); if (properties.Count == 0) return; bool wereColumnsAdded = false; foreach (PropertyDescriptor property in properties) { if (!this.ShouldCreateColumn(property)) continue; // Create a column OLVColumn column = generator.MakeColumnFromPropertyDescriptor(property); this.ConfigureColumn(column, property); // Add it to our list this.ListView.AllColumns.Add(column); wereColumnsAdded = true; } if (wereColumnsAdded) generator.PostCreateColumns(this.ListView); }
0
25. Example
View licenseprivate ListViewItem GetListViewItem(int index) { var row = _listManager.List[index]; var propColl = _listManager.GetItemProperties(); var items = new ArrayList(); // Fill value for each column foreach (ColumnHeader column in Columns) { var prop = propColl.Find(column.Name, false); if (prop != null) { var value = prop.GetValue(row); if (value != null) items.Add(value.ToString()); else items.Add(string.Empty); } } var item = new ListViewItem((string[]) items.ToArray(typeof (string))); item.Tag = row; return item; }
0
26. Example
View licenseprivate ListViewItem GetListViewItem(int index) { var row = _listManager.List[index]; var propColl = _listManager.GetItemProperties(); var items = new ArrayList(); // Fill value for each column foreach (ColumnHeader column in Columns) { var prop = propColl.Find(column.Name, false); if (prop != null) { var value = prop.GetValue(row); if (value != null) items.Add(value.ToString()); else items.Add(string.Empty); } } var item = new ListViewItem((string[]) items.ToArray(typeof (string))); item.Tag = row; return item; }
0
27. Example
View licenseprivate ListViewItem GetListViewItem(int index) { var row = _listManager.List[index]; var propColl = _listManager.GetItemProperties(); var items = new ArrayList(); // Fill value for each column foreach (ColumnHeader column in Columns) { var prop = propColl.Find(column.Name, false); if (prop != null) { var value = prop.GetValue(row); if (value != null) items.Add(value.ToString()); else items.Add(string.Empty); } } var item = new ListViewItem((string[]) items.ToArray(typeof (string))); item.Tag = row; return item; }
0
28. Example
View licenseprivate ListViewItem GetListViewItem(int index) { var row = _listManager.List[index]; var propColl = _listManager.GetItemProperties(); var items = new ArrayList(); // Fill value for each column foreach (ColumnHeader column in Columns) { var prop = propColl.Find(column.Name, false); if (prop != null) { var value = prop.GetValue(row); if (value != null) items.Add(value.ToString()); else items.Add(string.Empty); } } var item = new ListViewItem((string[]) items.ToArray(typeof (string))); item.Tag = row; return item; }
0
29. Example
View licenseprivate ListViewItem ListViewItemFromDataSource(int index) { PropertyDescriptorCollection pds = m_currencyManager.GetItemProperties(); ArrayList items = new ArrayList(); object dataItem = m_currencyManager.List[index]; foreach (ColumnHeader column in Columns) { //PropertyDescriptor pd = pds.Find(column.Text, false); PropertyDescriptor pd = null; foreach (PropertyDescriptor member in pds) { if (member.DisplayName == column.Text) { pd = member; break; } } if (pd != null) { items.Add(pd.GetValue(dataItem).ToString()); } } return new ListViewItem((string[])items.ToArray(typeof(string)), GroupingDataItem(dataItem)); }
0
30. Example
View licenseprotected override void OnAfterLabelEdit(LabelEditEventArgs e) { if (e.Label == null) { // If you press ESC while editing. e.CancelEdit = true; return; } #if WINFORMS var index = e.Item; #else var index = e.Item.Index; #endif if (_listManager.List.Count > index) { var row = _listManager.List[index]; // In a ListView you are only able to edit the first Column. var col = _listManager.GetItemProperties().Find(Columns[0].Text, false); try { if (row != null && col != null) col.SetValue(row, e.Label); _listManager.EndCurrentEdit(); base.OnAfterLabelEdit(e); } catch (Exception ex) { // If you try to enter strings in number-columns, too long strings or something // else wich is not allowed by the DataSource. MessageBox.Show(Resources.EditFailed + ": " + ex.Message, Resources.EditFailed, MessageBoxButtons.OK, MessageBoxIcon.Error); _listManager.CancelCurrentEdit(); e.CancelEdit = true; } } }
0
31. Example
View licenseprotected override void OnAfterLabelEdit(LabelEditEventArgs e) { if (e.Label == null) { // If you press ESC while editing. e.CancelEdit = true; return; } #if WINFORMS var index = e.Item; #else var index = e.Item.Index; #endif if (_listManager.List.Count > index) { var row = _listManager.List[index]; // In a ListView you are only able to edit the first Column. var col = _listManager.GetItemProperties().Find(Columns[0].Text, false); try { if (row != null && col != null) col.SetValue(row, e.Label); _listManager.EndCurrentEdit(); base.OnAfterLabelEdit(e); } catch (Exception ex) { // If you try to enter strings in number-columns, too long strings or something // else wich is not allowed by the DataSource. MessageBox.Show(Resources.EditFailed + ": " + ex.Message, Resources.EditFailed, MessageBoxButtons.OK, MessageBoxIcon.Error); _listManager.CancelCurrentEdit(); e.CancelEdit = true; } } }
0
32. Example
View licenseprotected override void OnAfterLabelEdit(LabelEditEventArgs e) { if (e.Label == null) { // If you press ESC while editing. e.CancelEdit = true; return; } #if WINFORMS var index = e.Item; #else var index = e.Item.Index; #endif if (_listManager.List.Count > index) { var row = _listManager.List[index]; // In a ListView you are only able to edit the first Column. var col = _listManager.GetItemProperties().Find(Columns[0].Text, false); try { if (row != null && col != null) col.SetValue(row, e.Label); _listManager.EndCurrentEdit(); base.OnAfterLabelEdit(e); } catch (Exception ex) { // If you try to enter strings in number-columns, too long strings or something // else wich is not allowed by the DataSource. MessageBox.Show(Resources.EditFailed + ": " + ex.Message, Resources.EditFailed, MessageBoxButtons.OK, MessageBoxIcon.Error); _listManager.CancelCurrentEdit(); e.CancelEdit = true; } } }
0
33. Example
View licenseprotected override void OnAfterLabelEdit(LabelEditEventArgs e) { if (e.Label == null) { // If you press ESC while editing. e.CancelEdit = true; return; } #if WINFORMS var index = e.Item; #else var index = e.Item.Index; #endif if (_listManager.List.Count > index) { var row = _listManager.List[index]; // In a ListView you are only able to edit the first Column. var col = _listManager.GetItemProperties().Find(Columns[0].Text, false); try { if (row != null && col != null) col.SetValue(row, e.Label); _listManager.EndCurrentEdit(); base.OnAfterLabelEdit(e); } catch (Exception ex) { // If you try to enter strings in number-columns, too long strings or something // else wich is not allowed by the DataSource. MessageBox.Show(Resources.EditFailed + ": " + ex.Message, Resources.EditFailed, MessageBoxButtons.OK, MessageBoxIcon.Error); _listManager.CancelCurrentEdit(); e.CancelEdit = true; } } }