コード例 #1
0
ファイル: VgpuComboBox.cs プロジェクト: ywscr/xenadmin
        /// <summary>
        /// Create a GpuTuple that refers to a vGPU type which is a sub-item of a GPU group
        /// </summary>
        public GpuTuple(GPU_group gpuGroup, VGPU_type vgpuType, VGPU_type[] disabledVGpuTypes)
        {
            GpuGroup  = gpuGroup;
            VgpuTypes = vgpuType == null ? null : new[] { vgpuType };
            if (vgpuType != null)
            {
                IsVgpuSubitem = gpuGroup.HasVGpu();

                if (disabledVGpuTypes != null && disabledVGpuTypes.Select(t => t.opaque_ref).Contains(vgpuType.opaque_ref))
                {
                    Enabled = false;
                }
            }
            UpdateDisplayName();
        }
コード例 #2
0
ファイル: VgpuComboBox.cs プロジェクト: wranders/xenadmin
 /// <summary>
 /// Create a GpuTuple that refers to a vGPU type which is a subitem of a GPU group
 /// </summary>
 public GpuTuple(GPU_group gpuGroup, VGPU_type vgpuType, VGPU_type[] disabledVGpuTypes)
 {
     GpuGroup  = gpuGroup;
     VgpuTypes = vgpuType == null ? null : new[] { vgpuType };
     if (vgpuType != null)
     {
         IsVgpuSubitem    = gpuGroup.HasVGpu();
         IsFractionalVgpu = !vgpuType.IsPassthrough();
         if (disabledVGpuTypes != null && disabledVGpuTypes.Select(t => t.opaque_ref).Contains(vgpuType.opaque_ref))
         {
             IsNotEnabledVgpu = true;
         }
     }
     UpdateDisplayName();
 }