' Copy document or code depending on TabPane selection
If TabPane.SelectedItem.Text.Trim = "Doc" Then
Try
' Copy HTML-editor content to the clipboard
fx.Clipboard.SetString(HTMLEditor1.HtmlText)
' Show Notification
FXnotify.ShowNotification3("Athena", "Documentation was copied to the clipboard.", FXnotify.ICON_INFORMATION, MainForm, "CENTER", 3000)
Catch
Log(LastException)
End Try
End If
' Copy from Codeview instead
If TabPane.SelectedItem.Text.Trim = "Code" Then
Try
' Nothing was selected
If CodeArea1.GetSelectedText.Length <= 0 Then
' Copy all content
fx.Clipboard.SetString(CodeArea1.GetText)
' Show Notification
FXnotify.ShowNotification3("Athena", "Code view content copied to clipboard.", FXnotify.ICON_INFORMATION, MainForm, "CENTER", 3000)
' Something was selected
else if CodeArea1.GetSelectedText.Length >=1 Then
' Copy text to clipboard
fx.Clipboard.SetString(CodeArea1.GetSelectedText)
' Show Notification
FXnotify.ShowNotification3("Athena", "Code view Selection was copied to the clipboard.", FXnotify.ICON_INFORMATION, MainForm, "CENTER", 3000)
End If
Catch
Log(LastException)
End Try
End If