Skip to content

Commit

Permalink
Dynamic uptade for cpu Mhz
Browse files Browse the repository at this point in the history
  • Loading branch information
eloaders committed Sep 8, 2016
1 parent 5af1878 commit e2c8669
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion I-Nex/i-nex/.src/Finfosys.class
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ Public Sub Wykrywanie_procesorow()
Try Label14.Tooltip = Replace(CPU_MODEL_NAME[CFloat(ComboBox1.Index)], "\n", "")
Try Label71.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 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", "")
Expand Down Expand Up @@ -676,6 +676,35 @@ Public Sub Wykrywanie_procesorow()
Object.Call(FCpudb, "_inits")
End

Public Sub Refresh_CPU_MHZ()
Dim CPUINFO_PROC As File
Dim sLine As String
Dim iPos As Integer
Dim sKey As String
Dim sVal As String
Dim CPU_CPU_MHZ As New String[]
CPUINFO_PROC = Open "/proc/cpuinfo"

For Each sLine In CPUINFO_PROC.Lines
sLine = Trim(sLine)
If Not sLine Then Continue

iPos = InStr(sLine, ":")
If iPos = 0 Then Continue

sKey = Trim(Left$(sLine, iPos - 1))
sVal = Trim(Mid$(sLine, iPos + 1))

Select Case sKey
Case "cpu MHz"
CPU_CPU_MHZ.Add(sVal)
End Select
Next
Label12.text = CPU_CPU_MHZ[(Mid$(ComboBox1.Current.Text, 4))]
End



Public Sub Button2_Click()
ScreenShot.pic = Desktop.Screenshot(Me.X, Me.Y, Me.W + 12, Me.H + 30)
ScreenShot.Show
Expand Down Expand Up @@ -1020,6 +1049,7 @@ Public Sub Timer1_Timer()
Try LCDLabel3.Visible = VCore.Visible
'Fix me if english translation is wrong.
MCPUSAGE.proc_stat()
Refresh_CPU_MHZ()
End

Public Sub Button6_Click()
Expand Down

0 comments on commit e2c8669

Please sign in to comment.