Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 10 additions & 18 deletions OmniRig_VB_DEMO/Form1.vb
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@

RadioButton1.Checked = True

If (My.Settings.TransverterEnabled = True) Then
TransverterOffsetToolStripMenuItem.Checked = True
End If
TransverterOffsetToolStripMenuItem.Checked = My.Settings.TransverterEnabled

StartOmniRig()
End Sub
Expand Down Expand Up @@ -135,17 +133,13 @@

Dim RadioName As String = ""

If RadioButton1.Checked Then
RadioName = "OmniRig 1"
Else
RadioName = "OmniRig 2"
End If
RadioName = Rig.RigType

Dim myString As String = "{""radio"": """ + RadioName + """, ""frequency"": """ + newfreq.ToString + """, ""mode"": """ + Label6.Text + """, ""key"": """ + My.Settings.CloudlogAPIKey + """}"

Try
Dim responsebytes = client.UploadString(My.Settings.CloudlogURL + "/index.php/api/radio", myString)
ToolStripStatusLabel1.Text = "Cloudlog Synced: " + DateTime.UtcNow
Dim responsebytes = client.UploadString(New Uri(New Uri(My.Settings.CloudlogURL), "index.php/api/radio").ToString(), myString)
ToolStripStatusLabel1.Text = "Cloudlog Synced: " + Date.UtcNow
Catch ex As Exception
ToolStripStatusLabel1.Text = "Cloudlog Synced: Failed, check URL/API"
End Try
Expand All @@ -163,15 +157,13 @@
OmniRigEngine = CreateObject("OmniRig.OmniRigX")
' we want OmniRig interface V.1.1 to 1.99
' as V2.0 will likely be incompatible with 1.x
If OmniRigEngine.InterfaceVersion < &H101 Then GoTo Error1
If OmniRigEngine.InterfaceVersion > &H299 Then GoTo Error1
If OmniRigEngine.InterfaceVersion < &H101 Or OmniRigEngine.InterfaceVersion > &H299 Then
' report problems
OmniRigEngine = Nothing
MsgBox("OmniRig Is Not installed Or has a wrong version number")
Exit Sub
End If
SelectRig(1)
Exit Sub
Error1:
' report problems
OmniRigEngine = Nothing
MsgBox("OmniRig Is Not installed Or has a wrong version number")

End Sub

Private Sub StopOmniRig()
Expand Down
38 changes: 36 additions & 2 deletions OmniRig_VB_DEMO/Form2.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions OmniRig_VB_DEMO/Form2.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,7 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="StatusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
31 changes: 30 additions & 1 deletion OmniRig_VB_DEMO/Form2.vb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,37 @@
Me.Close()
End Sub

Private Function ValidateSettings() As Boolean
ToolStripStatusLabel1.Text = String.Empty
Try
Dim url = New Uri(TextBox1.Text)
If Not url.Scheme.ToUpper.StartsWith("HTTP") Then
Throw New UriFormatException("Need 'https://' or 'http://'")
End If
My.Settings.CloudlogURL = url.ToString()
Catch ex As UriFormatException
ToolStripStatusLabel1.Text = ex.Message
Return False
End Try
Return True
End Function

Private Sub CloudlogSettingsForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load
TextBox1.Text = My.Settings.CloudlogURL
TextBox2.Text = My.Settings.CloudlogAPIKey
StatusStrip1.Text = String.Empty
Button1.Enabled = ValidateSettings()
End Sub

Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
Button1.Enabled = ValidateSettings()
End Sub

Private Sub TextBox2_TextChanged(sender As Object, e As EventArgs) Handles TextBox2.TextChanged
Button1.Enabled = ValidateSettings()
End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Me.Close()
End Sub
End Class
End Class
12 changes: 0 additions & 12 deletions OmniRig_VB_DEMO/obj/Debug/CloudlogCAT.TrustInfo.xml

This file was deleted.

21 changes: 0 additions & 21 deletions OmniRig_VB_DEMO/obj/Debug/CloudlogCAT.application

This file was deleted.

Binary file removed OmniRig_VB_DEMO/obj/Debug/CloudlogCAT.exe
Binary file not shown.
92 changes: 0 additions & 92 deletions OmniRig_VB_DEMO/obj/Debug/CloudlogCAT.exe.manifest

This file was deleted.

Binary file removed OmniRig_VB_DEMO/obj/Debug/CloudlogCAT.pdb
Binary file not shown.

This file was deleted.

43 changes: 0 additions & 43 deletions OmniRig_VB_DEMO/obj/Debug/CloudlogCAT.vbproj.FileListAbsolute.txt

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed OmniRig_VB_DEMO/obj/Debug/Interop.OmniRig.dll
Binary file not shown.