Пример #1
0
        private void MoveExtentForm_Load(object sender, EventArgs e)
        {
            listSuffixes.SelectedIndex = 0;
            BindDiskList(m_diskGroup);
            int diskIndex = DiskHelper.IndexOfDisk(m_diskGroup, m_extent.Disk);

            if (diskIndex >= 0)
            {
                listDisks.SelectedIndex = diskIndex;
            }
        }
Пример #2
0
        private void CreateVolumeForm_Load(object sender, EventArgs e)
        {
            BindDiskList(m_diskGroup);
            int diskIndex = DiskHelper.IndexOfDisk(m_diskGroup, m_extent.Disk);

            if (diskIndex >= 0)
            {
                listDisks.SetItemChecked(diskIndex, true);
            }

            UpdateExtentSize();
        }
        private void BindDiskList()
        {
            List <DynamicDisk> disks = new List <DynamicDisk>(m_diskGroup);

            foreach (DynamicDiskExtent extent in m_volume.DynamicExtents)
            {
                // Remove disks that already have extents of this volume on them.
                int diskIndex = DiskHelper.IndexOfDisk(disks, extent.Disk);
                if (diskIndex >= 0)
                {
                    disks.RemoveAt(diskIndex);
                }
            }
            BindDiskList(disks);
        }