79 lines
2.2 KiB
Plaintext
79 lines
2.2 KiB
Plaintext
' Gambas class file
|
|
|
|
|
|
Public Sub Form_Open()
|
|
Dim unity_support_test As Boolean = Exist("/usr/lib/nux/unity_support_test")
|
|
ButtonBox1.Text = Desktop.Path & "/report.txt"
|
|
If unity_support_test = True Then
|
|
CheckBox10.Visible = True
|
|
Endif
|
|
ComboBox1.Add("cxg.de")
|
|
ComboBox1.Add("fpaste.org")
|
|
ComboBox1.Add("paste2.org")
|
|
ComboBox1.Add("pastebin.com")
|
|
ComboBox1.Add("paste.debian.net")
|
|
ComboBox1.Add("paste.debian.net")
|
|
ComboBox1.Add("paste.drizzle.org")
|
|
ComboBox1.Add("paste.kde.org")
|
|
ComboBox1.Add("paste.openstack.org")
|
|
ComboBox1.Add("paste.pocoo.org")
|
|
ComboBox1.Add("paste.pound-python.org")
|
|
ComboBox1.Add("paste.ubuntu.com")
|
|
ComboBox1.Add("paste.ubuntu.org.cn")
|
|
ComboBox1.Add("pastie.org")
|
|
ComboBox1.Add("pb.daviey.com")
|
|
ComboBox1.Add("p.defau.lt")
|
|
ComboBox1.Add("slexy.org")
|
|
ComboBox1.Add("sprunge.us")
|
|
ComboBox1.Add("yourpaste.net")
|
|
|
|
Me.Center
|
|
|
|
End
|
|
|
|
Public Sub Button1_Click()
|
|
|
|
If ButtonBox1.Text = Null Then
|
|
Message.Warning("Please select directory to save the report about your hardware")
|
|
Else
|
|
Shell "rm " & ButtonBox1.Text & ""
|
|
Reportm._generate(CheckBox1.Value, CheckBox2.Value, CheckBox3.Value, CheckBox4.Value, ButtonBox1.Text)
|
|
Reportm.desktop_support(CheckBox10.Value, ButtonBox1.Text)
|
|
Reportm.include(CheckBox6.Value, CheckBox7.Value, CheckBox8.Value, CheckBox9.Value, ButtonBox1.Text)
|
|
TextBox1.Text = Reportm.pastebin(CheckBox11.Value, ButtonBox1.Text, ComboBox1.Text)
|
|
Endif
|
|
If (Application.Args[1] = "--gen_report") Then
|
|
Finfosys.Close
|
|
Endif
|
|
If CheckBox11.Value = False Then
|
|
Try Me.Close
|
|
Endif
|
|
End
|
|
|
|
Public Sub ButtonBox1_Click()
|
|
Dialog.Title = "Choose a file"
|
|
Dialog.Filter = ["*.txt", "Text files"]
|
|
Dialog.SaveFile
|
|
ButtonBox1.Text = Dialog.Path
|
|
If Exist(ButtonBox1.Text, True) Then
|
|
Shell "rm " & Dialog.Path & "" Wait
|
|
Endif
|
|
End
|
|
|
|
Public Sub Button2_Click()
|
|
If (Application.Args[1] = "--gen_report") Then
|
|
Finfosys.Close
|
|
Endif
|
|
Me.Close
|
|
|
|
End
|
|
|
|
Public Sub Button3_Click()
|
|
If TextBox1.Text Like "*http*" Then
|
|
Desktop.Open(TextBox1.Text)
|
|
Else
|
|
Debug "Pastebin link not detect"
|
|
Message.Warning("Please select the Send to pastebin and then click on the generate button.\nThis will take you to pastebin site. ")
|
|
Endif
|
|
End
|