示例#1
0
        private void btnAddListItem_Click(object sender, System.EventArgs e)
        {
            var item = new InformationType();
            item.Name = txtItemName.Text.Trim();
            item.BaseType = chkItemIsOptions.Checked ? BaseType.Options : (BaseType?)null;
            item.Details = new List<InformationTypeDetail>();
            foreach (ListViewItem i in lstItemDetails.Items)
                item.Details.Add(i.Tag as InformationTypeDetail);

            lstList.Items.Insert(0, CreateListViewItem(lstList, item, item.Name, item.GetDetailsString())).Selected = true;
            InformationTypes.Types.Add(item.Name, item);
            ResetExistingItem();
            SetEnabled();
        }
示例#2
0
 public MainForm(InformationType mainType)
 {
     InitializeComponent();
     lstMainList.ItemType = mainType;
 }
示例#3
0
 public Information(InformationType type)
 {
     _type = type;
 }