コード例 #1
0
        private void ResourceListView_SelectedIndexChanged(object sender, EventArgs e)
        {
            ListView listView = sender as ListView;

            if (listView != null && listView.SelectedItems.Count > 0)
            {
                ResourceListViewItem selectItem = listView.SelectedItems[0] as ResourceListViewItem;
                if (selectItem != null && selectItem.resObject != null)
                {
                    ActivePropertyPanel(selectItem.resObject);
                }
            }
        }
コード例 #2
0
        private void OnRemoveResource(RayTracerNet.ResourceObject resourceObject)
        {
            int i = 0;

            while (i < this.resourceListView.Items.Count)
            {
                ResourceListViewItem item = this.resourceListView.Items[i] as ResourceListViewItem;
                if (item != null && item.resObject == resourceObject)
                {
                    this.resourceListView.Items.RemoveAt(i);
                }
                else
                {
                    i++;
                }
            }
        }