Beispiel #1
0
        protected override void OnAddCommand()
        {
            var newCPU = new CPU();
            var newDevice = new Device();
            newCPU.Device = newDevice;

            this.Context.CPUs.Add(newCPU);
            this.CPUsView.MoveCurrentTo(newCPU);
        }
Beispiel #2
0
 private bool FilterCPU(CPU entity)
 {
     return (entity.Id == this.CPUId);
 }
Beispiel #3
0
 private bool FilterCPUs(CPU entity)
 {
     return (entity.SocketId == this.Id);
 }
Beispiel #4
0
 private void DetachCPUs(CPU entity)
 {
     entity.Socket = null;
 }
Beispiel #5
0
 private void AttachCPUs(CPU entity)
 {
     entity.Socket = this;
 }
Beispiel #6
0
 private void DetachCPUs(CPU entity)
 {
     entity.GPU = null;
 }
Beispiel #7
0
 private void AttachCPUs(CPU entity)
 {
     entity.GPU = this;
 }
Beispiel #8
0
 private bool FilterCPUs(CPU entity)
 {
     return (entity.DeviceId == this.Id);
 }
Beispiel #9
0
 private void DetachCPUs(CPU entity)
 {
     entity.Device = null;
 }
Beispiel #10
0
 private void AttachCPUs(CPU entity)
 {
     entity.Device = this;
 }
Beispiel #11
0
 /// <summary>
 /// Deprecated Method for adding a new object to the CPUs EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToCPUs(CPU cPU)
 {
     base.AddObject("CPUs", cPU);
 }
Beispiel #12
0
 /// <summary>
 /// Create a new CPU object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="frequency">Initial value of the Frequency property.</param>
 /// <param name="сacheOne">Initial value of the СacheOne property.</param>
 /// <param name="сacheTwo">Initial value of the СacheTwo property.</param>
 /// <param name="сacheThree">Initial value of the СacheThree property.</param>
 /// <param name="cores">Initial value of the Cores property.</param>
 /// <param name="socketId">Initial value of the SocketId property.</param>
 /// <param name="deviceId">Initial value of the DeviceId property.</param>
 public static CPU CreateCPU(global::System.Int32 id, global::System.Double frequency, global::System.Int16 сacheOne, global::System.Int16 сacheTwo, global::System.Int16 сacheThree, global::System.Int16 cores, global::System.Int32 socketId, global::System.Int32 deviceId)
 {
     CPU cPU = new CPU();
     cPU.Id = id;
     cPU.Frequency = frequency;
     cPU.СacheOne = сacheOne;
     cPU.СacheTwo = сacheTwo;
     cPU.СacheThree = сacheThree;
     cPU.Cores = cores;
     cPU.SocketId = socketId;
     cPU.DeviceId = deviceId;
     return cPU;
 }