public CustomizeCellEventArgs(Resco.Controls.AdvancedComboBox.Cell cell, object data, ListItem dataItem) { this.m_cell = cell.Clone(); this.m_cell.Owner = cell.Owner; this.m_data = data; this.m_dataItem = dataItem; }
public CellEventArgs(ListItem i, Resco.Controls.AdvancedComboBox.Cell c, int ii, int ci, int yoff) : base(i, ii, yoff) { this.CellIndex = ci; this.Cell = c; if (c != null) { this.CellData = c[i, ci]; } else { this.CellData = null; } }
public LinkEventArgs(ListItem item, Cell c, int ri, int ci, int yoff) : base(item, c, ri, ci, yoff) { this.Target = ((LinkCell) base.Cell).GetLink(base.CellData); }
public ListItem(ListItem toCopy) : this(toCopy.TemplateIndex, toCopy.SelectedTemplateIndex, toCopy.AlternateTemplateIndex, toCopy.TextBoxTemplateIndex, toCopy, toCopy.FieldNames) { }
public int Add(ListItem item) { if (item.Parent != null) { throw new ApplicationException("ListItem can't be in more collections"); } return base.List.Add(item); }
protected override void OnRemoveComplete(int index, object value) { base.OnRemoveComplete(index, value); for (int i = index; i < base.Count; i++) { ListItem item1 = this[i]; item1.m_index--; } ListItem item = value as ListItem; if (item != null) { if (this.Parent != null) { this.Parent.OnItemRemoved(item, index); } item.Parent = null; if (this.m_selectedItem == item) { this.m_selectedItem = null; } } }
protected override void OnClearComplete() { base.OnClearComplete(); this.LastDrawnItem = 0; this.LastDrawnItemOffset = 0; this.m_selectedItem = null; if (this.m_parent != null) { this.m_parent.OnClear(this); } this.OnChanged(this, ComboBoxEventArgsType.Refresh, ComboBoxArgs.Default); }
internal void OnItemChange(object sender, ItemEventArgsType e, ComboBoxArgs args) { ListItem item = (ListItem) sender; ItemTemplate template = this.GetTemplate(item); switch (e) { case ItemEventArgsType.Selection: if (this.m_selectedItem != null) { ListItem selectedItem = this.m_selectedItem; this.m_selectedItem = null; if (selectedItem != item) { selectedItem.Selected = false; } } this.m_selectedItem = item; return; case ItemEventArgsType.TemplateIndex: { ComboBoxIndexChangedArgs args2 = args as ComboBoxIndexChangedArgs; if (args2 == null) { throw new ArgumentException("Wrong argument type. args must be of type ComboBoxIndexChangedArgs.", "args"); } int d = -this.GetTemplate(item, args2.OldTemplateIndex).GetHeight(item); item.ResetCachedBounds(); d += template.GetHeight(item); this.OnChanged(this, ComboBoxEventArgsType.Resize, new ComboBoxScrollArgs(d, base.List.IndexOf(item))); return; } } if (template.AutoHeight) { int actualHeight = item.ActualHeight; item.ResetCachedBounds(); int height = template.GetHeight(item); if (height != actualHeight) { this.OnChanged(this, ComboBoxEventArgsType.Resize, new ComboBoxScrollArgs(height - actualHeight, base.List.IndexOf(item))); return; } } this.OnChanged(this, ComboBoxEventArgsType.ItemChange, new ComboBoxScrollArgs(0, base.List.IndexOf(item))); }
internal ItemTemplate GetTemplate(ListItem item, int ix) { TemplateSet templates = this.m_parent.Templates; int count = templates.Count; if ((ix < 0) || (ix >= count)) { return this.m_parent.DefaultTemplates[item.Selected ? 1 : 0]; } return templates[ix]; }
internal ItemTemplate GetTemplate(ListItem item) { TemplateSet templates = this.m_parent.Templates; int count = templates.Count; int currentTemplateIndex = item.CurrentTemplateIndex; if ((currentTemplateIndex < 0) || (currentTemplateIndex >= count)) { return this.m_parent.DefaultTemplates[item.Selected ? 1 : 0]; } return templates[currentTemplateIndex]; }
public void Remove(ListItem item) { base.List.Remove(item); }
public void Insert(int index, ListItem item) { if (item.Parent != null) { throw new ApplicationException("ListItem can't be in more collections"); } base.List.Insert(index, item); }
public int IndexOf(ListItem item) { return base.List.IndexOf(item); }
public bool Contains(ListItem value) { return base.List.Contains(value); }