forked from Irwin1985/underscore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_Test.prg
79 lines (57 loc) · 1.76 KB
/
_Test.prg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
Public omypc && check later on your debugger
omypc = Createobject('empty')
With _( omypc ) && simply pass object you want to modify, any referenced property will be added to passed object if does not exist:
.madeby = 'Marco Plaza, 2018 - nfTools'
.manufacturer = 'custom'
.baseprice = 699
.casetype = 'ATX'
.modelname = 'Ryzen Performance Plus'
With _( .cpu ) && cpu will be a new object for oMyPc - check we pass ".cpu" ( dot cpu ) because it's inside with - endwith
.processorcount = 6
.brand = 'AMD'
.model = 'Ryzen 7'
.clockspeed = 4.3
.processorcount = 8
Endwith
With _(.motherboard)
.manufacturer = 'Asus'
.model = 'Prime B350-Plus AMD'
.formfactor = 'ATX'
.cpusocket = 'AM4'
.power = .newList('CPU','CASE1','CASE2','CASE3') && creating a list with 4 items
.SPECS = .newCollection()
with .newItemFor('specs','memory')
.type = 'DDR4'
.MAXSIZE = '64GB'
.slots = 4
endwith
with .newItemFor('specs','usb')
.internal = '3 @ PCIe 3.0 x2'
.front = 'x1 Type-C'
.rear = 'x2 Type-A'
endwith
Endwith
.storage = .newList()
with .newItemFor( 'storage' ) && adding objects to list
.manufacturer = 'Samsung'
.model = '960 evo Series'
.Type = 'internal'
.connectivity = 'PCIe NVMe M.2'
.capacity = '250gb'
Endwith
with .newItemFor( 'storage' )
.manufacturer = 'Seagate'
.model = 'Barracuda ST3000DM008'
.Type = 'Internal'
.formfactor = 3.5
.capacity = '3tb'
.connectivity = 'Sata 6.0'
.rotationspeed = 7200
Endwith
endwith
clear
? oMypc.motherboard.power[1]
? oMypc.storage[1].connectivity
? omypc.motherboard.specs('memory').maxsize
? omypc.motherboard.specs('memory').slots
? omypc.motherboard.specs('usb').front