Exemplo n.º 1
0
        private void SetCells()
        {
            bool isPassThru = VGpuType.IsPassthrough();

            nameColumn.Value = isPassThru ? Messages.VGPU_PASSTHRU_TOSTRING : VGpuType.model_name;

            if (!isPassThru)
            {
                vGpusPerGpuColumn.Value = VGpuType.Capacity();
            }
            else
            {
                vGpusPerGpuColumn.Value = string.Empty;
            }

            if (!isPassThru)
            {
                var maxRes = VGpuType.MaxResolution();
                maxResolutionColumn.Value = maxRes == "0x0" || String.IsNullOrEmpty(maxRes) ? "" : maxRes;
            }

            if (!isPassThru)
            {
                maxDisplaysColumn.Value = VGpuType.max_heads < 1 ? "" : String.Format("{0}", VGpuType.max_heads);
            }
            else
            {
                maxDisplaysColumn.Value = string.Empty;
            }

            videoRamColumn.Value = VGpuType.framebuffer_size != 0 ? Util.MemorySizeStringSuitableUnits(VGpuType.framebuffer_size, true) : string.Empty;
        }
Exemplo n.º 2
0
        private void SetCells()
        {
            checkBoxCell.Value = allowed;

            bool isPassThru = VGpuType.IsPassthrough();

            nameColumn.Value = isPassThru ? Messages.VGPU_PASSTHRU_TOSTRING : VGpuType.model_name;

            if (!isPassThru)
            {
                vGpusPerGpuColumn.Value = VGpuType.Capacity();
            }
            else
            {
                vGpusPerGpuColumn.Value = string.Empty;
            }

            videoRamColumn.Value = VGpuType.framebuffer_size != 0 ? Util.MemorySizeStringSuitableUnits(VGpuType.framebuffer_size, true) : string.Empty;
        }