You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
281 lines
13 KiB
281 lines
13 KiB
Public Class frmNotes
|
|
Inherits System.Windows.Forms.Form
|
|
|
|
#Region " Vom Windows Form Designer generierter Code "
|
|
|
|
Public Sub New()
|
|
MyBase.New()
|
|
|
|
' Dieser Aufruf ist für den Windows Form-Designer erforderlich.
|
|
InitializeComponent()
|
|
|
|
' Initialisierungen nach dem Aufruf InitializeComponent() hinzufügen
|
|
|
|
End Sub
|
|
|
|
' Die Form überschreibt den Löschvorgang der Basisklasse, um Komponenten zu bereinigen.
|
|
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
|
|
If disposing Then
|
|
If Not (components Is Nothing) Then
|
|
components.Dispose()
|
|
End If
|
|
End If
|
|
MyBase.Dispose(disposing)
|
|
End Sub
|
|
|
|
' Für Windows Form-Designer erforderlich
|
|
Private components As System.ComponentModel.IContainer
|
|
|
|
'HINWEIS: Die folgende Prozedur ist für den Windows Form-Designer erforderlich
|
|
'Sie kann mit dem Windows Form-Designer modifiziert werden.
|
|
'Verwenden Sie nicht den Code-Editor zur Bearbeitung.
|
|
Friend WithEvents BtnNew As System.Windows.Forms.Button
|
|
Friend WithEvents BtnDelete As System.Windows.Forms.Button
|
|
Friend WithEvents NoteList As C1.Win.C1TrueDBGrid.C1TrueDBGrid
|
|
Friend WithEvents ContextMenu1 As System.Windows.Forms.ContextMenu
|
|
Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem
|
|
Friend WithEvents MenuItem2 As System.Windows.Forms.MenuItem
|
|
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
|
|
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmNotes))
|
|
Dim GridLines1 As C1.Win.C1TrueDBGrid.Util.GridLines = New C1.Win.C1TrueDBGrid.Util.GridLines()
|
|
Me.BtnNew = New System.Windows.Forms.Button()
|
|
Me.BtnDelete = New System.Windows.Forms.Button()
|
|
Me.NoteList = New C1.Win.C1TrueDBGrid.C1TrueDBGrid()
|
|
Me.ContextMenu1 = New System.Windows.Forms.ContextMenu()
|
|
Me.MenuItem1 = New System.Windows.Forms.MenuItem()
|
|
Me.MenuItem2 = New System.Windows.Forms.MenuItem()
|
|
CType(Me.NoteList, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
Me.SuspendLayout()
|
|
'
|
|
'BtnNew
|
|
'
|
|
Me.BtnNew.Location = New System.Drawing.Point(544, 8)
|
|
Me.BtnNew.Name = "BtnNew"
|
|
Me.BtnNew.Size = New System.Drawing.Size(112, 24)
|
|
Me.BtnNew.TabIndex = 1
|
|
Me.BtnNew.Text = "Neue Notiz"
|
|
'
|
|
'BtnDelete
|
|
'
|
|
Me.BtnDelete.Location = New System.Drawing.Point(544, 312)
|
|
Me.BtnDelete.Name = "BtnDelete"
|
|
Me.BtnDelete.Size = New System.Drawing.Size(112, 24)
|
|
Me.BtnDelete.TabIndex = 2
|
|
Me.BtnDelete.Text = "Fenster schliessen"
|
|
'
|
|
'NoteList
|
|
'
|
|
Me.NoteList.AllowFilter = True
|
|
Me.NoteList.AllowRowSizing = C1.Win.C1TrueDBGrid.RowSizingEnum.AllRows
|
|
Me.NoteList.AllowSort = True
|
|
Me.NoteList.AllowUpdate = False
|
|
Me.NoteList.AllowUpdateOnBlur = False
|
|
Me.NoteList.AlternatingRows = True
|
|
Me.NoteList.BackColor = System.Drawing.Color.FromArgb(CType(224, Byte), CType(224, Byte), CType(224, Byte))
|
|
Me.NoteList.CaptionHeight = 17
|
|
Me.NoteList.CollapseColor = System.Drawing.Color.Black
|
|
Me.NoteList.ContextMenu = Me.ContextMenu1
|
|
Me.NoteList.DataChanged = False
|
|
Me.NoteList.DeadAreaBackColor = System.Drawing.Color.Empty
|
|
Me.NoteList.ExpandColor = System.Drawing.Color.Black
|
|
Me.NoteList.GroupByCaption = "Drag a column header here to group by that column"
|
|
Me.NoteList.Images.Add(CType(resources.GetObject("resource.Images"), System.Drawing.Bitmap))
|
|
Me.NoteList.Location = New System.Drawing.Point(8, 8)
|
|
Me.NoteList.MarqueeStyle = C1.Win.C1TrueDBGrid.MarqueeEnum.DottedCellBorder
|
|
Me.NoteList.Name = "NoteList"
|
|
Me.NoteList.PreviewInfo.Location = New System.Drawing.Point(0, 0)
|
|
Me.NoteList.PreviewInfo.Size = New System.Drawing.Size(0, 0)
|
|
Me.NoteList.PreviewInfo.ZoomFactor = 75
|
|
Me.NoteList.PrintInfo.ShowOptionsDialog = False
|
|
Me.NoteList.RecordSelectorWidth = 17
|
|
GridLines1.Color = System.Drawing.Color.DarkGray
|
|
GridLines1.Style = C1.Win.C1TrueDBGrid.LineStyleEnum.Single
|
|
Me.NoteList.RowDivider = GridLines1
|
|
Me.NoteList.RowHeight = 15
|
|
Me.NoteList.RowSubDividerColor = System.Drawing.Color.DarkGray
|
|
Me.NoteList.ScrollTips = False
|
|
Me.NoteList.Size = New System.Drawing.Size(528, 328)
|
|
Me.NoteList.TabIndex = 13
|
|
Me.NoteList.Text = "C1TrueDBGrid1"
|
|
Me.NoteList.PropBag = "<?xml version=""1.0""?><Blob><Styles type=""C1.Win.C1TrueDBGrid.Design.ContextWrappe" & _
|
|
"r""><Data>Group{BackColor:ControlDark;Border:None,,0, 0, 0, 0;AlignVert:Center;}E" & _
|
|
"ditor{}Style2{}Style5{}Style4{}Style7{}Style6{}EvenRow{BackColor:White;}Selected" & _
|
|
"{ForeColor:HighlightText;BackColor:Highlight;}Style3{}Inactive{ForeColor:Inactiv" & _
|
|
"eCaptionText;BackColor:InactiveCaption;}FilterBar{BackColor:255, 255, 192;}Foote" & _
|
|
"r{}Caption{AlignHorz:Center;}Normal{BackColor:224, 224, 224;}HighlightRow{ForeCo" & _
|
|
"lor:HighlightText;BackColor:Highlight;}Style9{}OddRow{BackColor:224, 224, 224;}R" & _
|
|
"ecordSelector{AlignImage:Center;}Heading{Wrap:True;AlignVert:Center;Border:Raise" & _
|
|
"d,,1, 1, 1, 1;ForeColor:ControlText;BackColor:Control;}Style8{}Style10{AlignHorz" & _
|
|
":Near;}Style11{}Style12{}Style13{}Style1{}</Data></Styles><Splits><C1.Win.C1True" & _
|
|
"DBGrid.MergeView Name="""" AlternatingRowStyle=""True"" CaptionHeight=""17"" ColumnCap" & _
|
|
"tionHeight=""17"" ColumnFooterHeight=""17"" MarqueeStyle=""DottedCellBorder"" RecordSe" & _
|
|
"lectorWidth=""17"" DefRecSelWidth=""17"" VerticalScrollGroup=""1"" HorizontalScrollGro" & _
|
|
"up=""1""><ClientRect>0, 0, 524, 324</ClientRect><BorderSide>0</BorderSide><Caption" & _
|
|
"Style parent=""Style2"" me=""Style10"" /><EditorStyle parent=""Editor"" me=""Style5"" />" & _
|
|
"<EvenRowStyle parent=""EvenRow"" me=""Style8"" /><FilterBarStyle parent=""FilterBar"" " & _
|
|
"me=""Style13"" /><FooterStyle parent=""Footer"" me=""Style3"" /><GroupStyle parent=""Gr" & _
|
|
"oup"" me=""Style12"" /><HeadingStyle parent=""Heading"" me=""Style2"" /><HighLightRowSt" & _
|
|
"yle parent=""HighlightRow"" me=""Style7"" /><InactiveStyle parent=""Inactive"" me=""Sty" & _
|
|
"le4"" /><OddRowStyle parent=""OddRow"" me=""Style9"" /><RecordSelectorStyle parent=""R" & _
|
|
"ecordSelector"" me=""Style11"" /><SelectedStyle parent=""Selected"" me=""Style6"" /><St" & _
|
|
"yle parent=""Normal"" me=""Style1"" /></C1.Win.C1TrueDBGrid.MergeView></Splits><Name" & _
|
|
"dStyles><Style parent="""" me=""Normal"" /><Style parent=""Normal"" me=""Heading"" /><St" & _
|
|
"yle parent=""Heading"" me=""Footer"" /><Style parent=""Heading"" me=""Caption"" /><Style" & _
|
|
" parent=""Heading"" me=""Inactive"" /><Style parent=""Normal"" me=""Selected"" /><Style " & _
|
|
"parent=""Normal"" me=""Editor"" /><Style parent=""Normal"" me=""HighlightRow"" /><Style " & _
|
|
"parent=""Normal"" me=""EvenRow"" /><Style parent=""Normal"" me=""OddRow"" /><Style paren" & _
|
|
"t=""Heading"" me=""RecordSelector"" /><Style parent=""Normal"" me=""FilterBar"" /><Style" & _
|
|
" parent=""Caption"" me=""Group"" /></NamedStyles><vertSplits>1</vertSplits><horzSpli" & _
|
|
"ts>1</horzSplits><Layout>None</Layout><DefaultRecSelWidth>17</DefaultRecSelWidth" & _
|
|
"><ClientArea>0, 0, 524, 324</ClientArea></Blob>"
|
|
'
|
|
'ContextMenu1
|
|
'
|
|
Me.ContextMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem1, Me.MenuItem2})
|
|
'
|
|
'MenuItem1
|
|
'
|
|
Me.MenuItem1.Index = 0
|
|
Me.MenuItem1.Text = "&Notiz anzeigen"
|
|
'
|
|
'MenuItem2
|
|
'
|
|
Me.MenuItem2.Index = 1
|
|
Me.MenuItem2.Text = "&Neue Notiz erfassen"
|
|
'
|
|
'frmNotes
|
|
'
|
|
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
|
|
Me.ClientSize = New System.Drawing.Size(664, 342)
|
|
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.NoteList, Me.BtnDelete, Me.BtnNew})
|
|
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
|
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
|
Me.Name = "frmNotes"
|
|
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
|
Me.Text = "Notizen"
|
|
CType(Me.NoteList, System.ComponentModel.ISupportInitialize).EndInit()
|
|
Me.ResumeLayout(False)
|
|
|
|
End Sub
|
|
|
|
#End Region
|
|
|
|
Public ondemand As AxARSOLELib.AxArsOle
|
|
Public zf As Short = 100
|
|
Public o As Object
|
|
Public k As Object
|
|
|
|
Dim txtuser As String = ""
|
|
Dim txtdatetime As String = ""
|
|
Dim txttext As String = ""
|
|
Dim page As Object
|
|
Dim publ As Object
|
|
Dim copied As Object
|
|
Dim numnote As Object
|
|
Dim ret As Short
|
|
|
|
|
|
Dim m_notes As DataTable
|
|
Property notes() As DataTable
|
|
Get
|
|
Return m_notes
|
|
End Get
|
|
Set(ByVal Value As DataTable)
|
|
m_notes = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
|
|
Me.NoteList.DataSource = Me.notes
|
|
Me.NoteList.DataMember = Me.notes.TableName
|
|
DivFnkt.SpaltenTitel_Aktualisieren(Me.NoteList, Me.notes, "notizlist")
|
|
End Sub
|
|
|
|
Private Sub BtnNew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnNew.Click
|
|
Dim f As New frmNewNote()
|
|
f.ondemand = Me.ondemand
|
|
f.ShowDialog()
|
|
If f.DialogResult = DialogResult.OK Then
|
|
get_annotations()
|
|
End If
|
|
End Sub
|
|
|
|
Public Function get_annotations()
|
|
Me.notes.Rows.Clear()
|
|
Dim rc As DataRowCollection
|
|
Dim newrow As DataRow()
|
|
rc = notes.Rows
|
|
Dim rowvals(7) As Object
|
|
Dim i As Integer
|
|
Me.numnote = Nothing
|
|
ret = Me.ondemand.GetNumDocAnnotations(Me.numnote)
|
|
|
|
For i = 0 To Me.numnote - 1
|
|
page = Nothing
|
|
publ = Nothing
|
|
copied = Nothing
|
|
ret = Me.ondemand.GetAnnotationForDoc(i, txttext, txtuser, txtdatetime, page, publ, copied)
|
|
rowvals(0) = i
|
|
rowvals(1) = txttext
|
|
rowvals(3) = txtuser
|
|
rowvals(2) = txtdatetime
|
|
rowvals(4) = page
|
|
rowvals(5) = publ
|
|
rowvals(6) = copied
|
|
rowvals(7) = ""
|
|
notes.Rows.Add(rowvals)
|
|
Next
|
|
Me.NoteList.DataSource = Me.notes
|
|
Me.NoteList.DataMember = Me.notes.TableName
|
|
DivFnkt.SpaltenTitel_Aktualisieren(Me.NoteList, Me.notes, "notizlist")
|
|
For i = 0 To Me.notes.Rows.Count - 1
|
|
Me.NoteList.Splits(0).Rows(i).AutoSize()
|
|
Next
|
|
End Function
|
|
|
|
Private Sub BtnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnDelete.Click
|
|
Me.Close()
|
|
End Sub
|
|
|
|
Private Sub frmNotes_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
|
|
Me.DialogResult = DialogResult.OK
|
|
End Sub
|
|
|
|
Private Sub NoteList_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles NoteList.DoubleClick
|
|
Try
|
|
Dim f As New frmNoteDetail()
|
|
f.TextBox2.Text = Me.NoteList.Columns(2).Text
|
|
f.TextBox1.Text = Me.NoteList.Columns(1).Text
|
|
f.ShowDialog()
|
|
f.Dispose()
|
|
Catch
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub MenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem1.Click
|
|
Try
|
|
Dim f As New frmNoteDetail()
|
|
f.TextBox2.Text = Me.NoteList.Columns(2).Text
|
|
f.TextBox1.Text = Me.NoteList.Columns(1).Text
|
|
f.ShowDialog()
|
|
f.Dispose()
|
|
Catch
|
|
End Try
|
|
|
|
End Sub
|
|
|
|
Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click
|
|
Dim f As New frmNewNote()
|
|
f.ondemand = Me.ondemand
|
|
f.ShowDialog()
|
|
If f.DialogResult = DialogResult.OK Then
|
|
get_annotations()
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub ContextMenu1_Popup(ByVal sender As Object, ByVal e As System.EventArgs) Handles ContextMenu1.Popup
|
|
If Me.notes.Rows.Count = 0 Then Me.MenuItem1.Enabled = False Else Me.MenuItem1.Enabled = True
|
|
End Sub
|
|
End Class
|