private void AfterDeleted(object sender, PLMOperationArgs e) { if ((this.lvwTSD.Items.Count != 0) && (((e != null) && (e.BizItems != null)) && (e.BizItems.Length != 0))) { ArrayList list = new ArrayList(e.BizItems); for (int i = 0; i < this.lvwTSD.Items.Count; i++) { ListViewItem item = this.lvwTSD.Items[i]; DEBusinessItem dest = null; if (item.Tag is DEBusinessItem) { dest = (DEBusinessItem)item.Tag; } else if (item.Tag is DERelationBizItem) { dest = ((DERelationBizItem)item.Tag).BizItem; } if (dest != null) { if (PSStart.EqualMaster((IBizItem[])list.ToArray(typeof(IBizItem)), dest) != null) { this.lvwTSD.Items.RemoveAt(i); i--; } this.CloseTsdTab(dest.Id); } } } }
private void SmartSelectAttr() { double num = 0.0; int num2 = 0; if ((this.BlurLabel != null) && (this.BlurLabel != "")) { for (int i = 0; i < this.cobAttrList.Items.Count; i++) { GenericAttribute attribute = this.cobAttrList.Items[i] as GenericAttribute; double num4 = PSStart.BlurCompare(attribute.Label, this.BlurLabel); if (num4 > num) { num = num4; num2 = i; } } } if (num == 0.0) { this.cobAttrList.SelectedIndex = -1; this.cobIndex = -1; this.txtType.Text = ""; } else { this.cobIndex = num2; this.cobAttrList.SelectedIndex = num2; this.txtType.Text = ((GenericAttribute)this.cobAttrList.SelectedItem).DataTypeLabel; this.DisplayTypePanel(((GenericAttribute)this.cobAttrList.SelectedItem).DataType); } }