Mehrere Module (`ChatAddUser`, `ChatControl`, `ChatNewConv`) und deren zugehörige Dateien wurden vollständig aus dem Projekt entfernt. Dies umfasst Designer-, Ressourcen- und Projektdateien sowie Backup-Dateien. Zusätzlich wurden nicht mehr benötigte Bilder, Lizenzdateien (`licenses.licx`), Konfigurationsdateien (`app.config`, `packages.config`) und generierte Dateien entfernt. Die Abhängigkeiten in `App.config` wurden aktualisiert, und neue Bibliotheken wie `System.Threading.Tasks.Extensions` wurden hinzugefügt. Eine Methode in `Annotations.vb` wurde angepasst, um Änderungen in der zugrunde liegenden API zu berücksichtigen. Diese Änderungen sind Teil einer umfassenden Bereinigung und Modernisierung des Projekts.
71 lines
2.8 KiB
VB.net
71 lines
2.8 KiB
VB.net
Imports DigitalData.Modules.Base
|
|
Imports DigitalData.Modules.Logging
|
|
Imports GdPicture14
|
|
Imports GdPicture14.Annotations
|
|
|
|
Public Class Annotations
|
|
Inherits BaseClass
|
|
|
|
Private Const DEFAULT_LEFT = 10
|
|
Private Const DEFAULT_TOP = 10
|
|
Private Const DEFAULT_WIDTH = 200
|
|
Private Const DEFAULT_HEIGHT = 50
|
|
|
|
Public Sub New(pLogConfig As LogConfig)
|
|
MyBase.New(pLogConfig)
|
|
End Sub
|
|
|
|
Public Function AddAnnotationInteractive(pGDViewer As GDViewer, pText As String) As Boolean
|
|
pGDViewer.AddTextAnnotationInteractive(pText, Color.Black, "Arial", Drawing.FontStyle.Bold Or Drawing.FontStyle.Underline, 12, True, Color.Red, Color.White, 1, 0)
|
|
If pGDViewer.GetStat = GdPictureStatus.OK Then
|
|
Return True
|
|
Else
|
|
Return False
|
|
End If
|
|
End Function
|
|
|
|
Public Function AddAnnotation(pGDViewer As GdViewer, pText As String) As Boolean
|
|
Try
|
|
Dim oStatus As GdPictureStatus = GdPictureStatus.OK
|
|
Using oManager As AnnotationManager = pGDViewer.GetAnnotationManager()
|
|
If oManager.InitFromGdViewer(pGDViewer) = GdPictureStatus.OK AndAlso oManager.PageCount > 0 AndAlso oManager.SelectPage(1) = GdPictureStatus.OK Then
|
|
Using oAnnotation As AnnotationText = oManager.AddTextAnnot(0, 0, 0, 0, pText)
|
|
If oManager.GetStat = GdPictureStatus.OK AndAlso oAnnotation IsNot Nothing Then
|
|
oAnnotation.Alignment = StringAlignment.Near
|
|
oAnnotation.Author = Environment.UserName
|
|
oAnnotation.Fill = True
|
|
oAnnotation.FillColor = Color.LightYellow
|
|
oAnnotation.FontSize = 16
|
|
oAnnotation.ForeColor = Color.Black
|
|
oAnnotation.Opacity = 0.7F
|
|
oAnnotation.StrokeColor = Color.Yellow
|
|
oAnnotation.Top = DEFAULT_TOP
|
|
oAnnotation.Left = DEFAULT_LEFT
|
|
oAnnotation.Width = DEFAULT_WIDTH
|
|
oAnnotation.Height = DEFAULT_HEIGHT
|
|
oAnnotation.Text = pText
|
|
|
|
'pGDViewer.ann
|
|
|
|
If oManager.SaveAnnotationsToPage() = GdPictureStatus.OK Then
|
|
oManager.BurnAnnotationsToPage(True)
|
|
End If
|
|
End If
|
|
End Using
|
|
End If
|
|
oStatus = oManager.GetStat()
|
|
End Using
|
|
|
|
If oStatus = GdPictureStatus.OK Then
|
|
Return True
|
|
Else
|
|
Return False
|
|
End If
|
|
Catch ex As Exception
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
|
|
End Class
|