Skip to content

Commit

Permalink
Very Big Changes
Browse files Browse the repository at this point in the history
System Tab. Change labels to GridView
CPU Tab. CHange Labels to GridView
CPU Tab. Change labels to textarea "Can copy data"

Reports is now break. Fix it soon...
  • Loading branch information
eloaders committed Oct 26, 2016
1 parent fe5373b commit a0dc054
Show file tree
Hide file tree
Showing 11 changed files with 313 additions and 399 deletions.
91 changes: 56 additions & 35 deletions I-Nex/i-nex/.src/CPU/FCpudb.module
Original file line number Diff line number Diff line change
Expand Up @@ -31,54 +31,54 @@ Function _inits()
' The use Of the database In JSON format.To decode the information about the processor.
' The database Is Divided into several parts To the model processor manufacturer.
'
If Finfosys.Label14.Text Like "*Opteron*" Then 'Use Opteron databese if TextBox Like Opteron
If Finfosys.TextBox32.Text Like "*Opteron*" Then 'Use Opteron databese if TextBox Like Opteron
Logs("Use AMD Opteron CPU Database", Logger.Info)
buffer = File.Load("Database/Opteron.json") 'Load the database to a temporary buffer
Finfosys.Label14.Text = Replace(Finfosys.Label14.Text, "AMD", "")
Finfosys.Label14.Text = Replace(Finfosys.TextBox32.Text, "AMD", "")
'
'
Else If Finfosys.Label14.Text Like "*amd*A6*" Then
Else If Finfosys.TextBox32.Text Like "*amd*A6*" Then
Logs("Use AMD A6 CPU Database", Logger.Info)
buffer = File.Load("Database/A6.json") 'Load the database to a temporary buffer
Finfosys.Label14.Text = Replace(Finfosys.Label14.Text, "AMD", "")
Finfosys.TextBox32.Text = Replace(Finfosys.TextBox32.Text, "AMD", "")
'
'
Else If Finfosys.Label14.Text Like "*amd*" Then
Else If Finfosys.TextBox32.Text Like "*amd*" Then
Logs("Use AMD CPU Database", Logger.Info)
buffer = File.Load("Database/amd.json") 'Load the database to a temporary buffer
Finfosys.Label14.Text = Replace(Finfosys.Label14.Text, "AMD", "")
Else If Finfosys.Label14.Text Like "*Xeon*" Then 'Use Xeon databese if TextBox Like Xeon
Finfosys.TextBox32.Text = Replace(Finfosys.TextBox32.Text, "AMD", "")
Else If Finfosys.TextBox32.Text Like "*Xeon*" Then 'Use Xeon databese if TextBox Like Xeon
Logs("Use Intel Xeon CPU Database", Logger.Info)
buffer = File.Load("Database/Xeon.json") 'Load the database to a temporary buffer
Finfosys.Label14.Text = Replace(Finfosys.Label14.Text, "Intel", "")
Finfosys.TextBox32.Text = Replace(Finfosys.TextBox32.Text, "Intel", "")
'
'
Else If Finfosys.Label14.Text Like "*i3*" Then
Else If Finfosys.TextBox32.Text Like "*i3*" Then
Logs("Use Intel i3 CPU Database", Logger.Info)
buffer = File.Load("Database/i3.json") 'Load the database to a temporary buffer
Finfosys.Label14.Text = Replace(Finfosys.Label14.Text, "Intel", "")
Else If Finfosys.Label14.Text Like "*i5*" Then
Finfosys.TextBox32.Text = Replace(Finfosys.TextBox32.Text, "Intel", "")
Else If Finfosys.TextBox32.Text Like "*i5*" Then
Logs("Use Intel i5 CPU Database", Logger.Info)
buffer = File.Load("Database/i5.json") 'Load the database to a temporary buffer
Finfosys.Label14.Text = Replace(Finfosys.Label14.Text, "Intel", "")
Else If Finfosys.Label14.Text Like "*i7*" Then
Finfosys.TextBox32.Text = Replace(Finfosys.TextBox32.Text, "Intel", "")
Else If Finfosys.TextBox32.Text Like "*i7*" Then
Logs("Use Intel i7 CPU Database", Logger.Info)
buffer = File.Load("Database/i7.json") 'Load the database to a temporary buffer
Finfosys.Label14.Text = Replace(Finfosys.Label14.Text, "Intel", "")
Finfosys.TextBox32.Text = Replace(Finfosys.Label14.Text, "Intel", "")
'
'
Else If Finfosys.Label14.Text Like "*atom*" Then
Else If Finfosys.TextBox32.Text Like "*atom*" Then
Logs("Use Intel CPU Database (Atom)", Logger.Info)
buffer = File.Load("Database/atom.json") 'Load the database to a temporary buffer
Finfosys.Label14.Text = Replace(Finfosys.Label14.Text, "Intel", "")
Else If Finfosys.Label14.Text Like "*intel*" Then
Finfosys.TextBox32.Text = Replace(Finfosys.TextBox32.Text, "Intel", "")
Else If Finfosys.TextBox32.Text Like "*intel*" Then
Logs("Use Intel CPU Database (Intel All)", Logger.Info)
buffer = File.Load("Database/intel.json") 'Load the database to a temporary buffer
Finfosys.Label14.Text = Replace(Finfosys.Label14.Text, "Intel", "")
Else If Finfosys.Label14.Text Like "*Pentium*" Then
Finfosys.TextBox32.Text = Replace(Finfosys.TextBox32.Text, "Intel", "")
Else If Finfosys.TextBox32.Text Like "*Pentium*" Then
Logs("Use Intel CPU Database (Pentium)", Logger.Info)
buffer = File.Load("Database/intel.json") 'Load the database to a temporary buffer
Else If Finfosys.Label14.Text Like "*Celeron*" Then
Else If Finfosys.TextBox32.Text Like "*Celeron*" Then
Logs("Use Intel CPU Database (Celeron)", Logger.Info)
buffer = File.Load("Database/intel.json") 'Load the database to a temporary buffer
Endif
Expand All @@ -87,7 +87,7 @@ Function _inits()
Logs("Decode CPU Database", Logger.Info)
database = JSON.Decode(buffer) 'Convert JSON data to Collection
buffer = Null
cpucache = Finfosys.Label14.Text & "*"
cpucache = Finfosys.TextBox32.Text & "*"
Logs("Replace CPU Strings to Null", Logger.Info)

'For the purpose of the database, certain words have to be converted to an empty value.
Expand Down Expand Up @@ -127,20 +127,41 @@ Function _inits()
Print database["DATABASE"][z]["PROCESSOR_MODEL_NAME"]
Finfosys.PictureBox3.Name = database["DATABASE"][z]["PROCESSOR_SOCKET_IMAGE"]
Finfosys.PictureBox3.Picture = Picture["Database/Logos/" & database["DATABASE"][z]["PROCESSOR_SOCKET_IMAGE"] & ""]
Finfosys.Label103.Text = " Integrated GPU: " & database["DATABASE"][z]["PROCESSOR_INTEGRATEDGRAPHIC"]
Finfosys.Label104.Text = " TDP: " & database["DATABASE"][z]["PROCESSOR_TDP"]
Finfosys.Label110.Text = " PPS: " & database["DATABASE"][z]["PROCESSOR_PROCESS_SIZE"]
Finfosys.Label111.Text = " Socket: " & database["DATABASE"][z]["PROCESSOR_SOCKET"]
Finfosys.Label112.Text = " Transistors: " & database["DATABASE"][z]["PROCESSOR_TRANSISTORS"]
Finfosys.Label113.Text = " Die size: " & database["DATABASE"][z]["PROCESSOR_DIE_SIZE"]
Finfosys.Label114.Text = " Package: " & database["DATABASE"][z]["PROCESSOR_PACKAGE"]
Finfosys.Label115.Text = " TCaseMax: " & database["DATABASE"][z]["PROCESSOR_TCASEMAX"]
Finfosys.Label116.Text = " Turboclock: " & database["DATABASE"][z]["PROCESSOR_TURBOCLOCK"]
Finfosys.Label117.Text = " Multiplier: " & database["DATABASE"][z]["PROCESSOR_MULTIPLIER"]
Finfosys.Label118.Text = " Voltage: " & database["DATABASE"][z]["PROCESSOR_VOLTAGE"]
Finfosys.Label119.Text = " Codename: " & database["DATABASE"][z]["PROCESSOR_CODENAME"]
Finfosys.Label120.Text = " Part: " & database["DATABASE"][z]["PROCESSOR_PART"]
Finfosys.Label121.Text = " Memory support: " & database["DATABASE"][z]["PROCESSOR_MEMORYSUPPORT"]
Finfosys.GridView1.Columns.Count = 2
Finfosys.GridView1.Rows.Count = 7
Finfosys.GridView1.Columns.Width = 220
Finfosys.GridView1.Rows.Height = 21
Finfosys.GridView1[0, 0].Text = "Integrated GPU: " & database["DATABASE"][z]["PROCESSOR_INTEGRATEDGRAPHIC"]
Finfosys.GridView1[1, 0].Text = "TDP: " & database["DATABASE"][z]["PROCESSOR_TDP"]
Finfosys.GridView1[2, 0].Text = " PPS: " & database["DATABASE"][z]["PROCESSOR_PROCESS_SIZE"]
Finfosys.GridView1[3, 0].Text = " Socket: " & database["DATABASE"][z]["PROCESSOR_SOCKET"]
Finfosys.GridView1[4, 0].Text = " Transistors: " & database["DATABASE"][z]["PROCESSOR_TRANSISTORS"]
Finfosys.GridView1[5, 0].Text = " Die size: " & database["DATABASE"][z]["PROCESSOR_DIE_SIZE"]
Finfosys.GridView1[6, 0].Text = " Part: " & database["DATABASE"][z]["PROCESSOR_PART"]

Finfosys.GridView1[0, 1].Text = " Codename: " & database["DATABASE"][z]["PROCESSOR_CODENAME"]
Finfosys.GridView1[1, 1].Text = " Package: " & database["DATABASE"][z]["PROCESSOR_PACKAGE"]
Finfosys.GridView1[2, 1].Text = " TCaseMax: " & database["DATABASE"][z]["PROCESSOR_TCASEMAX"]
Finfosys.GridView1[3, 1].Text = " Turboclock: " & database["DATABASE"][z]["PROCESSOR_TURBOCLOCK"]
Finfosys.GridView1[4, 1].Text = " Multiplier: " & database["DATABASE"][z]["PROCESSOR_MULTIPLIER"]
Finfosys.GridView1[5, 1].Text = " Voltage: " & database["DATABASE"][z]["PROCESSOR_VOLTAGE"]
Finfosys.GridView1[6, 1].Text = " Memory support: " & database["DATABASE"][z]["PROCESSOR_MEMORYSUPPORT"]

'Finfosys.ColumnView1.Rows.Count = 2
' Finfosys.Label103.Text = " Integrated GPU: " & database["DATABASE"][z]["PROCESSOR_INTEGRATEDGRAPHIC"]
' Finfosys.Label104.Text = " TDP: " & database["DATABASE"][z]["PROCESSOR_TDP"]
' Finfosys.Label110.Text = " PPS: " & database["DATABASE"][z]["PROCESSOR_PROCESS_SIZE"]
' Finfosys.Label111.Text = " Socket: " & database["DATABASE"][z]["PROCESSOR_SOCKET"]
' Finfosys.Label112.Text = " Transistors: " & database["DATABASE"][z]["PROCESSOR_TRANSISTORS"]
' Finfosys.Label113.Text = " Die size: " & database["DATABASE"][z]["PROCESSOR_DIE_SIZE"]
' Finfosys.Label114.Text = " Package: " & database["DATABASE"][z]["PROCESSOR_PACKAGE"]
' Finfosys.Label115.Text = " TCaseMax: " & database["DATABASE"][z]["PROCESSOR_TCASEMAX"]
' Finfosys.Label116.Text = " Turboclock: " & database["DATABASE"][z]["PROCESSOR_TURBOCLOCK"]
' Finfosys.Label117.Text = " Multiplier: " & database["DATABASE"][z]["PROCESSOR_MULTIPLIER"]
' Finfosys.Label118.Text = " Voltage: " & database["DATABASE"][z]["PROCESSOR_VOLTAGE"]
' Finfosys.Label119.Text = " Codename: " & database["DATABASE"][z]["PROCESSOR_CODENAME"]
' Finfosys.Label120.Text = " Part: " & database["DATABASE"][z]["PROCESSOR_PART"]
' Finfosys.Label121.Text = " Memory support: " & database["DATABASE"][z]["PROCESSOR_MEMORYSUPPORT"]
i = z
Endif
Next
Expand Down
71 changes: 71 additions & 0 deletions I-Nex/i-nex/.src/CPU/LIBCPUID.module
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
' Gambas module file

' Gambas module file

Library "libcpuid:14"

Public Struct cpu_id_t
vendor_str As String
brand_str As String
vendor As Integer
family As Integer
model As Integer
stepping As Integer
ext_family As Integer
ext_model As Integer
num_cores As Integer
num_logical_cpus As Integer
total_logical_cpus As Integer
l1_data_cache As Integer
l1_instruction_cache As Integer
l2_cache As Long
l3_cache As Long
l4_cache As Long
l1_assoc As Long
l2_assoc As Long
l3_assoc As Long
l4_assoc As Long
l1_cacheline As Long
l2_cacheline As Long
l3_cacheline As Long
l4_cacheline As Long
cpu_codename As String
sse_size As Integer
detection_hints As Integer
End Struct

Public Struct cpu_mark_t
tsc As Long
sys_clock As Long
End Struct
' int sysinfo (struct sysinfo *__info)
' Returns information on overall system statistics.
Private Extern cpuid_get_total_cpus() As Integer
Private Extern cpu_mark_t() As Integer
Private Extern cpu_id_t() As Integer
Public Logs As New Logger

Public Sub Main()

Dim si As New Cpu_id_t
Dim err As Integer

' err = cpu_id_t(si)
' If err < 0 Then
' Logs("Libcpuid cpu_id_t Error", Logger.Error)
' Elsepu_exec_cpuid()
Print cpuid_get_total_cpus()
Print si.brand_str
Print si.cpu_codename
Print si.detection_hints
Print si.ext_family
Print si.ext_model
Print si.family
Print si.l1_assoc
Print si.l1_cacheline
Print si.l1_data_cache
Print si.l1_instruction_cache
Print si.l2_assoc
Print si.l2_cache
'Endif
End
2 changes: 2 additions & 0 deletions I-Nex/i-nex/.src/CPU/MCPUID_TOOL.module
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
' Gambas module file

7 changes: 4 additions & 3 deletions I-Nex/i-nex/.src/CPU/MCPUSAGE.module
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
'
' You should have received a copy of the GNU General Public License
' along with this program. If not, see <http://www.gnu.org/licenses/>.

Fast
Public Sub proc_stat()
Dim PREV_STAT_PROC As File
Dim CURRENT_STAT_PROC As File
Expand Down Expand Up @@ -117,6 +117,7 @@ Public Sub proc_stat()
Total = (Idle + NonIdle)
totald = (Total - PrevTotal)
idled = (Idle - PrevIdle)

If totald > 0 Then Finfosys.ProgressBar7.Value = (totald - idled) / totald

If totald > 0 Then Finfosys.ProgressBar6.Value = (totald - idled) / totald

End
32 changes: 11 additions & 21 deletions I-Nex/i-nex/.src/MAIN/Finfosys.class
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ Public INDEX2 As String
Public INDEX3 As String
Public MEMINFO_FILE As File
Public Sub Form_Open()
Dim default_display_manager As Boolean = Exist("/etc/X11/default-display-manager")

Dim data As Stream
Dim MaxCount As Integer
Dim sLine As String
Expand Down Expand Up @@ -143,14 +141,6 @@ Public Sub Form_Open()
Object.Call(FGraphic, "_check")
Logs("Check sound cards", Logger.Info)
Object.Call(Asound_Drives, "_inits")
Logs("Check for default display manager", Logger.Info)
If default_display_manager = True Then
Label4.Visible = True
Label143.Visible = True
Label143.Text = File.Load("/etc/X11/default-display-manager")
Label143.Text = "Deafult DM: " & Replace(Label143.Text, "\n", "")
Logs("Default display manager is " & Label143.Text, Logger.Info)
Endif
'Check temperature. If temterature is OK then timer start 1500/ms. Check temp 1500/ms
Timer1.Start
Timer1.Delay = 1500
Expand Down Expand Up @@ -378,18 +368,18 @@ Public Sub Wykrywanie_procesorow()

Close #CPUINFO_PROC

Try Label14.Text = Replace(CPU_MODEL_NAME[CFloat(ComboBox1.Index)], "\n", "")
Try Label14.Tooltip = Replace(CPU_MODEL_NAME[CFloat(ComboBox1.Index)], "\n", "")
Try Label71.Text = "Flags: " & FFlags.instructions
Try TextBox32.Text = Replace(CPU_MODEL_NAME[CFloat(ComboBox1.Index)], "\n", "")
Try TextBox32.Tooltip = Replace(CPU_MODEL_NAME[CFloat(ComboBox1.Index)], "\n", "")
Try TextBox36.Text = "Flags: " & FFlags.instructions
Try Label13.Text = UCase$(Replace(Replace(Replace(CPU_VENDOR_ID[CFloat(ComboBox1.Index)], "Authentic", ""), "Genuine", ""), "\n", ""))
Try Label12.Text = Replace(CPU_CPU_MHZ[CFloat(ComboBox1.Index)], "\n", "") & " MHz"
Try Label97.Text = "Family: " & Replace(CPU_FAMILYz[CFloat(ComboBox1.Index)], "\n", "")
Try Label6.Text = "Model: " & Replace(CPU_MODEL[CFloat(ComboBox1.Index)], "\n", "")
Try Label7.Text = "Stepping: " & Replace(CPU_STEPPING[CFloat(ComboBox1.Index)], "\n", "")
Try Label8.Text = "Cores: " & Replace(CPU_SIBLINGS[CFloat(ComboBox1.Index)], "\n", "")
Try Label19.Text = "Phy id: " & Replace(CPU_PHYSICAL_ID[CFloat(ComboBox1.Index)], "\n", "")
Try TextBox33.Text = Replace(CPU_CPU_MHZ[CFloat(ComboBox1.Index)], "\n", "") & " MHz"
Try TextBox34.Text &= "Family: " & Replace(CPU_FAMILYz[CFloat(ComboBox1.Index)], "\n", "")
Try TextBox34.Text &= " | Model: " & Replace(CPU_MODEL[CFloat(ComboBox1.Index)], "\n", "")
Try TextBox34.Text &= " | Stepping: " & Replace(CPU_STEPPING[CFloat(ComboBox1.Index)], "\n", "")
Try TextBox34.Text &= " | Cores: " & Replace(CPU_SIBLINGS[CFloat(ComboBox1.Index)], "\n", "")
Try TextBox34.Text &= " | Phy id: " & Replace(CPU_PHYSICAL_ID[CFloat(ComboBox1.Index)], "\n", "")
Try Label10.Text = "Bogomips: " & Replace(CPU_BOGOMIPS[CFloat(ComboBox1.Index)], "\n", "")
Try Label11.Text = "Address sizes: " & Replace(CPU_ADRESS_SIZES[CFloat(ComboBox1.Index)], "\n", "")
Try TextBox35.Text = "Address sizes: " & Replace(CPU_ADRESS_SIZES[CFloat(ComboBox1.Index)], "\n", "")
Try Label15.Text = "Power mangament: " & Replace(CPU_POWER_MANAGEMENT[CFloat(ComboBox1.Index)], "\n", "")

Try INDEX0 = Replace(File.Load("/sys/devices/system/cpu/" & Subst(ComboBox1.Current.Text) & "/cache/index0/size"), "\n", "")
Expand Down Expand Up @@ -508,7 +498,7 @@ Public Sub Refresh_CPU_MHZ()
CPU_CPU_MHZ.Add(sVal)
End Select
Next
Try Label12.text = CPU_CPU_MHZ[(Mid$(ComboBox1.Current.Text, 4))] & " MHz"
Try TextBox33.text = CPU_CPU_MHZ[(Mid$(ComboBox1.Current.Text, 4))] & " MHz"
End


Expand Down

0 comments on commit a0dc054

Please sign in to comment.