Skip to content

Commit

Permalink
Add Menu to set TabStrip orientation and remember windows position
Browse files Browse the repository at this point in the history
  • Loading branch information
eloaders committed Jan 4, 2014
1 parent 6f27618 commit 2154cd0
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 9 deletions.
2 changes: 2 additions & 0 deletions src/i-nex/.src/About.class
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
Public Sub Form_Open()

Me.Center
Me.X = Settings["Window/X", Me.X]
Me.Y = Settings["Window/Y", Me.Y]

End

Expand Down
4 changes: 3 additions & 1 deletion src/i-nex/.src/FReport_Gen.class
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ Public Sub Form_Open()
'ComboBox1.Add("dpaste.com")
'ComboBox1.Add("hpaste.org")

Me.Center
Me.Center
Me.X = Settings["Window/X", Me.X]
Me.Y = Settings["Window/Y", Me.Y]

End

Expand Down
67 changes: 65 additions & 2 deletions src/i-nex/.src/Finfosys.class
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Public Sub Form_Open()
If User.Name = "root" Then
Message.Error(("Running as root is not allowed!\n " & User.Home & ""))
Endif
Print Settings.Path
Print Settings.DefaultDir
Finfosys.TabStrip1[9].Visible = False
Debug "Call to MInit for copy nedded files to I-Nex config dir in User.Home"
Object.Call(MInit, "_inits")
Expand Down Expand Up @@ -129,6 +131,8 @@ Public Sub Form_Open()
Debug Label25.Text
''Okno na środku
Me.Center
Me.X = Settings["Window/X", Me.X]
Me.Y = Settings["Window/Y", Me.Y]
End

Public Sub ComboBox1_Click()
Expand Down Expand Up @@ -412,7 +416,8 @@ Public Sub Button2_Click()
End

Public Sub Button1_Click()

Settings["Window/X"] = Me.X
Settings["Window/Y"] = Me.Y
Me.Close
Debug "Good bye!"
End
Expand Down Expand Up @@ -457,7 +462,7 @@ Public Sub dospam_uptime()
Try ProgressBar1.Value = Replace(Replace(dospam, " ", ""), "\n", "") / Replace(Replace(totpam, " ", ""), "\n", "")
Try ProgressBar4.Value = Replace(Replace(usedswap, " ", ""), "\n", "") / Replace(Replace(totalswap, " ", ""), "\n", "")
Try TextArea2.Text = File.Load("/proc/mtrr")

End

Public Sub battery_info()
Expand Down Expand Up @@ -670,3 +675,61 @@ Public Sub Button15_Click()
Clipboard.Copy(TextBox58.Text)

End

Public Sub Orientation_Top_Click()

TabStrip1.Orientation = Align.Top

End

Public Sub Orientation_Bottom_Click()

TabStrip1.Orientation = Align.Bottom

End

Public Sub Orientation_Left_Click()

TabStrip1.Orientation = Align.Left

End

Public Sub Orientation_Right_Click()

TabStrip1.Orientation = Align.Right

End

Public Sub Reportthisw_Click()
Select Case TabStrip1.Current.Text
Case "CPU"
FReport_Gen.CheckBox1.Value = True
Case "GPU"
FReport_Gen.CheckBox3.Value = True
Case "Mobo"
FReport_Gen.CheckBox2.Value = True
Case "Audio"
FReport_Gen.CheckBox4.Value = True
Case "Drives"
FReport_Gen.CheckBox14.Value = True
Case "System"
FReport_Gen.CheckBox5.Value = True
Case "Kernel"
FReport_Gen.CheckBox12.Value = True
End Select
FReport_Gen.Show

End

Public Sub TabStrip1_Click()

Me.Text = "I-Nex / " & TabStrip1.Current.Text

End

Public Sub Form_Move()

Settings["Window/X"] = Me.X
Settings["Window/Y"] = Me.Y

End
43 changes: 39 additions & 4 deletions src/i-nex/.src/Finfosys.form
Original file line number Diff line number Diff line change
@@ -1,16 +1,49 @@
# Gambas Form File 3.0

{ Form Form
Move(0,0,476,525)
Move(0,0,469,525)
#Scaled = False
#Translate = False
Font = Font["Bold,8"]
PopupMenu = "Orientation"
Text = "I-Nex"
Icon = Picture["logo/i-nex.0.4.x.png"]
Resizable = False
Padding = 3
{ Orientation Menu
Text = ("Orientation")
Visible = False
{ Orientation_Top Menu
Text = ("Orientation Top")
Picture = Picture["icon:/16/top"]
Shortcut = "Ctrl+Alt+Up"
}
{ Orientation_Bottom Menu
Text = ("Orientation Bottom")
Picture = Picture["icon:/16/bottom"]
Shortcut = "Ctrl+Alt+Down"
}
{ Orientation_Left Menu
Text = ("Orientation Left")
Picture = Picture["icon:/16/left"]
Shortcut = "Ctrl+Alt+Left"
}
{ Orientation_Right Menu
Text = ("Orientation Right")
Picture = Picture["icon:/16/right"]
Shortcut = "Ctrl+Alt+Right"
}
}
{ Menu1 Menu
Text = ("Menu1")
Visible = False
{ Reportthisw Menu
Text = ("Save as report")
Picture = Picture["icon:/16/make"]
}
}
{ HBox11 HBox
Move(140,497,245,28)
Move(140,497,231,28)
{ Label25 Label
Move(78,6,48,24)
Foreground = &HFF0000&
Expand All @@ -34,7 +67,7 @@
Picture = Picture["icon:/16/help"]
}
{ Button1 Button
Move(399,497,77,28)
Move(385,497,77,28)
#Translate = False
Font = Font["8"]
ToolTip = "Close this program"
Expand All @@ -56,8 +89,9 @@
Picture = Picture["icon:/16/important"]
}
{ TabStrip1 TabStrip
Move(7,0,476,497)
Move(0,0,469,497)
Font = Font["Bold,8"]
PopupMenu = "Menu1"
Padding = 3
Count = 11
TextFont = Font["8"]
Expand Down Expand Up @@ -246,6 +280,7 @@
Move(98,7,245,28)
#Translate = False
Font = Font["Bold,8"]
PopupMenu = "Copying"
Padding = 3
Text = "Label14"
Border = Border.Raised
Expand Down
4 changes: 3 additions & 1 deletion src/i-nex/.src/ScreenShot.class
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Public Sub Form_Open()
ButtonBox1.Text = Desktop.Path
Endif
Me.Center
Me.X = Settings["Window/X", Me.X]
Me.Y = Settings["Window/Y", Me.Y]
PictureBox1.Picture = ScreenShotM.pic
TextBox1.Text = Date & Time
TextBox1.Text = Replace(TextBox1.Text, "/", "")
Expand Down Expand Up @@ -67,4 +69,4 @@ Public Sub ComboBox1_Click()
SliderBox1.Value = 70
Endif

End
End
2 changes: 1 addition & 1 deletion src/i-nex/.src/Settings.class
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
' Gambas class file


Create Static
Static Property Read DefaultDir As String

Private $sPath As String
Expand Down

0 comments on commit 2154cd0

Please sign in to comment.