Exemple #1
0
        protected override void PageLoadedCore(PageLoadedDirection direction)
        {
            if (direction == PageLoadedDirection.Back)
            {
                return;
            }

            colNic.Visible = ShowNicColumn;
            dataGridView.Rows.Clear();

            var vendorGroups = from device in FCDevices
                               group device by device.Vendor into g
                               orderby g.Key
                               select new { VendorName = g.Key, Devices = g.OrderBy(x => x.Serial) };

            foreach (var vGroup in vendorGroups)
            {
                var vendorRow = new VendorRow(vGroup.VendorName);
                dataGridView.Rows.Add(vendorRow);

                using (var font = new Font(dataGridView.DefaultCellStyle.Font, FontStyle.Bold))
                    vendorRow.DefaultCellStyle = new DataGridViewCellStyle(dataGridView.DefaultCellStyle)
                    {
                        Font = font,
                        SelectionBackColor = dataGridView.DefaultCellStyle.BackColor,
                        SelectionForeColor = dataGridView.DefaultCellStyle.ForeColor
                    };

                var deviceRows = from device in vGroup.Devices select new FCDeviceRow(device, ShowNicColumn);
                dataGridView.Rows.AddRange(deviceRows.ToArray());
            }
        }
        private void PopulatePage()
        {
            dataGridView.Rows.Clear();

            var vendorGroups = from device in FCDevices
                               group device by device.Vendor into g
                               orderby g.Key
                               select new { VendorName = g.Key, Devices = g.OrderBy(x => x.Serial) };

            foreach (var vGroup in vendorGroups)
            {
                var vendorRow = new VendorRow(vGroup.VendorName);
                dataGridView.Rows.Add(vendorRow);

                using (var font = new Font(dataGridView.DefaultCellStyle.Font, FontStyle.Bold))
                    vendorRow.DefaultCellStyle = new DataGridViewCellStyle(dataGridView.DefaultCellStyle)
                    {
                        Font = font,
                        SelectionBackColor = dataGridView.DefaultCellStyle.BackColor,
                        SelectionForeColor = dataGridView.DefaultCellStyle.ForeColor
                    };

                var deviceRows = from device in vGroup.Devices select new FCDeviceRow(device);
                dataGridView.Rows.AddRange(deviceRows.ToArray());
            }
            addButton.Enabled = false;
        }
Exemple #3
0
        public override void PopulatePage()
        {
            dataGridView.Rows.Clear();
            _selectedDevices.Clear();
            List <FibreChannelDevice> all = new List <FibreChannelDevice>();

            this.FCDevices.ForEach(device => all.Add(device));
            all.Remove(LVMoMirror.two_devices[0]);
            all.Remove(LVMoMirror.two_devices[1]);
            var vendorGroups = from device in all
                               group device by device.Vendor into g
                               orderby g.Key
                               select new { VendorName = g.Key, Devices = g.OrderBy(x => x.Serial) };

            foreach (var vGroup in vendorGroups)
            {
                var vendorRow = new VendorRow(vGroup.VendorName);
                dataGridView.Rows.Add(vendorRow);

                using (var font = new Font(dataGridView.DefaultCellStyle.Font, FontStyle.Bold))
                    vendorRow.DefaultCellStyle = new DataGridViewCellStyle(dataGridView.DefaultCellStyle)
                    {
                        Font = font,
                        SelectionBackColor = dataGridView.DefaultCellStyle.BackColor,
                        SelectionForeColor = dataGridView.DefaultCellStyle.ForeColor
                    };

                var deviceRows = from device in vGroup.Devices select new FCDeviceRow(device);
                dataGridView.Rows.AddRange(deviceRows.ToArray());
            }
        }
Exemple #4
0
        public override void PopulatePage()
        {
            LVMoMirrorChooseLogPage.three_devices.Clear();
            two_devices.Clear();
            dataGridView.Rows.Clear();
            var vendorGroups = from device in FCDevices
                               group device by device.Vendor into g
                               orderby g.Key
                               select new { VendorName = g.Key, Devices = g.OrderBy(x => x.Serial) };

            foreach (var vGroup in vendorGroups)
            {
                var vendorRow = new VendorRow(vGroup.VendorName);
                dataGridView.Rows.Add(vendorRow);

                using (var font = new Font(dataGridView.DefaultCellStyle.Font, FontStyle.Bold))
                    vendorRow.DefaultCellStyle = new DataGridViewCellStyle(dataGridView.DefaultCellStyle)
                    {
                        Font = font,
                        SelectionBackColor = dataGridView.DefaultCellStyle.BackColor,
                        SelectionForeColor = dataGridView.DefaultCellStyle.ForeColor
                    };

                var deviceRows = from device in vGroup.Devices select new FCDeviceRow(device);
                dataGridView.Rows.AddRange(deviceRows.ToArray());
            }
        }
Exemple #5
0
        public override void PopulatePage()
        {
            colNic.Visible = ShowNicColumn;
            dataGridView.Rows.Clear();

            var vendorGroups = from device in FCDevices
                         group device by device.Vendor into g
                         orderby g.Key
                         select new { VendorName = g.Key, Devices = g.OrderBy(x => x.Serial) };

            foreach (var vGroup in vendorGroups)
            {
                var vendorRow = new VendorRow(vGroup.VendorName);
                dataGridView.Rows.Add(vendorRow);

                using (var font = new Font(dataGridView.DefaultCellStyle.Font, FontStyle.Bold))
                    vendorRow.DefaultCellStyle = new DataGridViewCellStyle(dataGridView.DefaultCellStyle)
                        {
                            Font = font,
                            SelectionBackColor = dataGridView.DefaultCellStyle.BackColor,
                            SelectionForeColor = dataGridView.DefaultCellStyle.ForeColor
                        };

                var deviceRows = from device in vGroup.Devices select new FCDeviceRow(device, ShowNicColumn);
                dataGridView.Rows.AddRange(deviceRows.ToArray());
            }
        }
 public VendorRowChangeEvent(VendorRow row, global::System.Data.DataRowAction action) {
     this.eventRow = row;
     this.eventAction = action;
 }
 public void RemoveVendorRow(VendorRow row) {
     this.Rows.Remove(row);
 }
 public void AddVendorRow(VendorRow row) {
     this.Rows.Add(row);
 }