protected override void OnAddCommand() { var newGPU = new GPU(); var newDevice = new Device(); newGPU.Device = newDevice; this.Context.GPUs.Add(newGPU); this.GPUsView.MoveCurrentTo(newGPU); }
private bool FilterGPU(GPU entity) { return (entity.Id == this.GPUId); }
private bool FilterGPUs(GPU entity) { return (entity.GraphicChipId == this.Id); }
private void DetachGPUs(GPU entity) { entity.GraphicChip = null; }
private void AttachGPUs(GPU entity) { entity.GraphicChip = this; }
private bool FilterGPUs(GPU entity) { return (entity.DeviceId == this.Id); }
private void DetachGPUs(GPU entity) { entity.Device = null; }
private void AttachGPUs(GPU entity) { entity.Device = this; }
private bool FilterGPUs(GPU entity) { return (entity.CoolerId == this.Id); }
private void DetachGPUs(GPU entity) { entity.Cooler = null; }
private void AttachGPUs(GPU entity) { entity.Cooler = this; }
/// <summary> /// Deprecated Method for adding a new object to the GPUs EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToGPUs(GPU gPU) { base.AddObject("GPUs", gPU); }
/// <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; }