示例#1
0
        protected override void OnAddCommand()
        {
            var newGPU = new GPU();
            var newDevice = new Device();
            newGPU.Device = newDevice;

            this.Context.GPUs.Add(newGPU);
            this.GPUsView.MoveCurrentTo(newGPU);
        }
示例#2
0
 private bool FilterGPU(GPU entity)
 {
     return (entity.Id == this.GPUId);
 }
示例#3
0
 private bool FilterGPUs(GPU entity)
 {
     return (entity.GraphicChipId == this.Id);
 }
示例#4
0
 private void DetachGPUs(GPU entity)
 {
     entity.GraphicChip = null;
 }
示例#5
0
 private void AttachGPUs(GPU entity)
 {
     entity.GraphicChip = this;
 }
示例#6
0
 private bool FilterGPUs(GPU entity)
 {
     return (entity.DeviceId == this.Id);
 }
示例#7
0
 private void DetachGPUs(GPU entity)
 {
     entity.Device = null;
 }
示例#8
0
 private void AttachGPUs(GPU entity)
 {
     entity.Device = this;
 }
示例#9
0
 private bool FilterGPUs(GPU entity)
 {
     return (entity.CoolerId == this.Id);
 }
示例#10
0
 private void DetachGPUs(GPU entity)
 {
     entity.Cooler = null;
 }
示例#11
0
 private void AttachGPUs(GPU entity)
 {
     entity.Cooler = this;
 }
示例#12
0
 /// <summary>
 /// Deprecated Method for adding a new object to the GPUs EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToGPUs(GPU gPU)
 {
     base.AddObject("GPUs", gPU);
 }
示例#13
0
 /// <summary>
 /// Create a new GPU object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="size">Initial value of the Size property.</param>
 /// <param name="power">Initial value of the Power property.</param>
 /// <param name="additionalPower">Initial value of the AdditionalPower property.</param>
 /// <param name="graphicChipId">Initial value of the GraphicChipId property.</param>
 /// <param name="coolerId">Initial value of the CoolerId property.</param>
 /// <param name="deviceId">Initial value of the DeviceId property.</param>
 public static GPU CreateGPU(global::System.Int32 id, global::System.Int16 size, global::System.Int16 power, global::System.Boolean additionalPower, global::System.Int32 graphicChipId, global::System.Int32 coolerId, global::System.Int32 deviceId)
 {
     GPU gPU = new GPU();
     gPU.Id = id;
     gPU.Size = size;
     gPU.Power = power;
     gPU.AdditionalPower = additionalPower;
     gPU.GraphicChipId = graphicChipId;
     gPU.CoolerId = coolerId;
     gPU.DeviceId = deviceId;
     return gPU;
 }