private void RefreshMembersList() { ListViewItem item = null; if (lstMembers.FocusedItem != null) { item = lstMembers.FocusedItem; } else if (lstMembers.SelectedItems.Count > 0) { item = lstMembers.SelectedItems[0]; } if (item != null && member != null) { item.ImageIndex = Icons.GetImageIndex(member); item.SubItems[1].Text = txtName.Text; item.SubItems[2].Text = cboType.Text; item.SubItems[3].Text = cboAccess.Text; if (member is Field) { item.SubItems[4].Text = member.Language.GetFieldModifierString( ((Field)member).Modifier); } else if (member is Operation) { item.SubItems[4].Text = member.Language.GetOperationModifierString( ((Operation)member).Modifier); } } }
private ListViewItem AddOperationToList(Operation operation) { ListViewItem item = lstMembers.Items.Add(""); item.Tag = operation; item.ImageIndex = Icons.GetImageIndex(operation); item.SubItems.Add(operation.Name); item.SubItems.Add(operation.Type); item.SubItems.Add(SyntaxHelper.GetAccessModifier( operation.AccessModifier, parent.Language, false)); item.SubItems.Add(SyntaxHelper.GetOperationModifier( operation.Modifier, parent.Language, false)); return(item); }
private ListViewItem AddFieldToList(Field field) { ListViewItem item = lstMembers.Items.Insert(attributeCount, ""); item.Tag = field; item.ImageIndex = Icons.GetImageIndex(field); item.SubItems.Add(field.Name); item.SubItems.Add(field.Type); item.SubItems.Add(SyntaxHelper.GetAccessModifier( field.AccessModifier, parent.Language, false)); item.SubItems.Add(""); attributeCount++; return(item); }
/// <exception cref="ArgumentNullException"> /// <paramref name="operation"/> is null. /// </exception> private ListViewItem AddOperationToList(Operation operation) { if (operation == null) { throw new ArgumentNullException("operation"); } ListViewItem item = lstMembers.Items.Add(""); item.Tag = operation; item.ImageIndex = Icons.GetImageIndex(operation); item.SubItems.Add(operation.Name); item.SubItems.Add(operation.Type); item.SubItems.Add(parent.Language.GetAccessString(operation.AccessModifier)); item.SubItems.Add(parent.Language.GetOperationModifierString(operation.Modifier)); return(item); }
/// <exception cref="ArgumentNullException"> /// <paramref name="field"/> is null. /// </exception> private ListViewItem AddFieldToList(Field field) { if (field == null) { throw new ArgumentNullException("field"); } ListViewItem item = lstMembers.Items.Insert(attributeCount, ""); item.Tag = field; item.ImageIndex = Icons.GetImageIndex(field); item.SubItems.Add(field.Name); item.SubItems.Add(field.Type); item.SubItems.Add(parent.Language.GetAccessString(field.AccessModifier)); item.SubItems.Add(parent.Language.GetFieldModifierString(field.Modifier)); item.SubItems.Add(""); attributeCount++; return(item); }
/// <exception cref="ArgumentNullException"> /// <paramref name="parentNode"/> is null.-or- /// <paramref name="operation"/> is null. /// </exception> protected TreeNode CreateOperationNode(TreeNode parentNode, Operation operation) { if (parentNode == null) { throw new ArgumentNullException("parentNode"); } if (operation == null) { throw new ArgumentNullException("operation"); } TreeNode child = parentNode.Nodes.Add(operation.GetCaption()); int imageIndex = Icons.GetImageIndex(operation); child.Tag = operation; child.ImageIndex = imageIndex; child.SelectedImageIndex = imageIndex; child.ToolTipText = operation.ToString(); return(child); }
private void RefreshMembersList() { ListViewItem item = null; if (lstMembers.FocusedItem != null) { item = lstMembers.FocusedItem; } else if (lstMembers.SelectedItems.Count > 0) { item = lstMembers.SelectedItems[0]; } if (item != null && member != null) { item.ImageIndex = Icons.GetImageIndex(member); item.SubItems[1].Text = txtName.Text; item.SubItems[2].Text = cboType.Text; item.SubItems[3].Text = cboAccess.Text; item.SubItems[4].Text = cboModifier.Text; } }