예제 #1
0
        private void PopulateSecondListView(SelectedVector selVector)
        {
            Cursor = Cursors.WaitCursor;
            m_lvDetails.Clear();
            SuspendLayout();
            m_lvDetails.Sorting        = SortOrder.None;
            m_lvDetails.View           = View.List;
            m_lvDetails.SmallImageList = m_ilSmall;
            int count = selVector.m_hvos.Count;

            ListViewItem[] lvis = new ListViewItem[count];
            for (int i = 0; i < count; ++i)
            {
                int            hvo       = selVector.m_hvos[i];
                uint           clid      = (uint)m_cache.get_IntProp(hvo, (int)CmObjectFields.kflidCmObject_Class);
                string         classname = m_cache.MetaDataCache.GetClassName(clid);
                ListViewItem   lvi       = new ListViewItem(String.Format("{0}: ({1} of {2})", classname, i + 1, count), 0);
                SelectedObject so        = new SelectedObject(0, hvo, clid);
                lvi.Tag = so;
                lvis[i] = lvi;
            }
            m_lvDetails.Items.AddRange(lvis);
            ResumeLayout();
            Cursor = Cursors.Default;
        }
예제 #2
0
		private void PopulateSecondListView(SelectedVector selVector)
		{
			Cursor = Cursors.WaitCursor;
			m_lvDetails.Clear();
			SuspendLayout();
			m_lvDetails.Sorting = SortOrder.None;
			m_lvDetails.View = View.List;
			m_lvDetails.SmallImageList = m_ilSmall;
			int count = selVector.m_hvos.Count;
			ListViewItem[] lvis = new ListViewItem[count];
			for (int i = 0; i < count; ++i)
			{
				int hvo = selVector.m_hvos[i];
				uint clid = (uint)m_cache.get_IntProp(hvo, (int)CmObjectFields.kflidCmObject_Class);
				string classname = m_cache.MetaDataCache.GetClassName(clid);
				ListViewItem lvi = new ListViewItem(String.Format("{0}: ({1} of {2})", classname, i + 1, count), 0);
				SelectedObject so = new SelectedObject(0, hvo, clid);
				lvi.Tag = so;
				lvis[i] = lvi;
			}
			m_lvDetails.Items.AddRange(lvis);
			ResumeLayout();
			Cursor = Cursors.Default;
		}