1
0
mirror of https://github.com/romanlryji/EventLogLoader.git synced 2024-11-24 08:32:52 +02:00

UI changes

This commit is contained in:
Alex Bochkov 2016-12-29 14:21:40 -08:00
parent 2f9b1245ab
commit 426dc3baed
7 changed files with 283 additions and 168 deletions

View File

@ -34,6 +34,8 @@ Partial Class AddPath
Me.Button2 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button()
Me.FolderBrowserDialog = New System.Windows.Forms.FolderBrowserDialog() Me.FolderBrowserDialog = New System.Windows.Forms.FolderBrowserDialog()
Me.ButtonChoosePath = New System.Windows.Forms.Button() Me.ButtonChoosePath = New System.Windows.Forms.Button()
Me.Label5 = New System.Windows.Forms.Label()
Me.ESServerNameTextBox = New System.Windows.Forms.TextBox()
Me.SuspendLayout() Me.SuspendLayout()
' '
'IBName 'IBName
@ -57,7 +59,7 @@ Partial Class AddPath
'Label2 'Label2
' '
Me.Label2.AutoSize = True Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(12, 40) Me.Label2.Location = New System.Drawing.Point(12, 67)
Me.Label2.Name = "Label2" Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(57, 13) Me.Label2.Size = New System.Drawing.Size(57, 13)
Me.Label2.TabIndex = 1 Me.Label2.TabIndex = 1
@ -67,7 +69,7 @@ Partial Class AddPath
' '
Me.Description.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ Me.Description.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Description.Location = New System.Drawing.Point(145, 37) Me.Description.Location = New System.Drawing.Point(145, 64)
Me.Description.Name = "Description" Me.Description.Name = "Description"
Me.Description.Size = New System.Drawing.Size(268, 20) Me.Description.Size = New System.Drawing.Size(268, 20)
Me.Description.TabIndex = 0 Me.Description.TabIndex = 0
@ -76,7 +78,7 @@ Partial Class AddPath
' '
Me.IBGUID.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ Me.IBGUID.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.IBGUID.Location = New System.Drawing.Point(145, 62) Me.IBGUID.Location = New System.Drawing.Point(145, 89)
Me.IBGUID.Name = "IBGUID" Me.IBGUID.Name = "IBGUID"
Me.IBGUID.ReadOnly = True Me.IBGUID.ReadOnly = True
Me.IBGUID.Size = New System.Drawing.Size(268, 20) Me.IBGUID.Size = New System.Drawing.Size(268, 20)
@ -85,7 +87,7 @@ Partial Class AddPath
'Label3 'Label3
' '
Me.Label3.AutoSize = True Me.Label3.AutoSize = True
Me.Label3.Location = New System.Drawing.Point(12, 65) Me.Label3.Location = New System.Drawing.Point(12, 92)
Me.Label3.Name = "Label3" Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(34, 13) Me.Label3.Size = New System.Drawing.Size(34, 13)
Me.Label3.TabIndex = 1 Me.Label3.TabIndex = 1
@ -95,7 +97,7 @@ Partial Class AddPath
' '
Me.Path.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ Me.Path.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Path.Location = New System.Drawing.Point(145, 88) Me.Path.Location = New System.Drawing.Point(145, 115)
Me.Path.Name = "Path" Me.Path.Name = "Path"
Me.Path.Size = New System.Drawing.Size(244, 20) Me.Path.Size = New System.Drawing.Size(244, 20)
Me.Path.TabIndex = 0 Me.Path.TabIndex = 0
@ -103,7 +105,7 @@ Partial Class AddPath
'Label4 'Label4
' '
Me.Label4.AutoSize = True Me.Label4.AutoSize = True
Me.Label4.Location = New System.Drawing.Point(12, 91) Me.Label4.Location = New System.Drawing.Point(12, 118)
Me.Label4.Name = "Label4" Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(119, 13) Me.Label4.Size = New System.Drawing.Size(119, 13)
Me.Label4.TabIndex = 1 Me.Label4.TabIndex = 1
@ -112,7 +114,7 @@ Partial Class AddPath
'Button1 'Button1
' '
Me.Button1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(204, Byte)) Me.Button1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(204, Byte))
Me.Button1.Location = New System.Drawing.Point(12, 114) Me.Button1.Location = New System.Drawing.Point(12, 141)
Me.Button1.Name = "Button1" Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(200, 43) Me.Button1.Size = New System.Drawing.Size(200, 43)
Me.Button1.TabIndex = 2 Me.Button1.TabIndex = 2
@ -122,7 +124,7 @@ Partial Class AddPath
'Button2 'Button2
' '
Me.Button2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(204, Byte)) Me.Button2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(204, Byte))
Me.Button2.Location = New System.Drawing.Point(218, 114) Me.Button2.Location = New System.Drawing.Point(218, 141)
Me.Button2.Name = "Button2" Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(200, 43) Me.Button2.Size = New System.Drawing.Size(200, 43)
Me.Button2.TabIndex = 2 Me.Button2.TabIndex = 2
@ -135,18 +137,39 @@ Partial Class AddPath
' '
'ButtonChoosePath 'ButtonChoosePath
' '
Me.ButtonChoosePath.Location = New System.Drawing.Point(391, 88) Me.ButtonChoosePath.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.ButtonChoosePath.Location = New System.Drawing.Point(391, 115)
Me.ButtonChoosePath.Name = "ButtonChoosePath" Me.ButtonChoosePath.Name = "ButtonChoosePath"
Me.ButtonChoosePath.Size = New System.Drawing.Size(24, 20) Me.ButtonChoosePath.Size = New System.Drawing.Size(24, 20)
Me.ButtonChoosePath.TabIndex = 3 Me.ButtonChoosePath.TabIndex = 3
Me.ButtonChoosePath.Text = "..." Me.ButtonChoosePath.Text = "..."
Me.ButtonChoosePath.UseVisualStyleBackColor = True Me.ButtonChoosePath.UseVisualStyleBackColor = True
' '
'Label5
'
Me.Label5.AutoSize = True
Me.Label5.Location = New System.Drawing.Point(12, 41)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(112, 13)
Me.Label5.TabIndex = 5
Me.Label5.Text = "Имя сервера для ES"
'
'ESServerNameTextBox
'
Me.ESServerNameTextBox.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.ESServerNameTextBox.Location = New System.Drawing.Point(145, 38)
Me.ESServerNameTextBox.Name = "ESServerNameTextBox"
Me.ESServerNameTextBox.Size = New System.Drawing.Size(268, 20)
Me.ESServerNameTextBox.TabIndex = 4
'
'AddPath 'AddPath
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(425, 163) Me.ClientSize = New System.Drawing.Size(425, 188)
Me.Controls.Add(Me.Label5)
Me.Controls.Add(Me.ESServerNameTextBox)
Me.Controls.Add(Me.ButtonChoosePath) Me.Controls.Add(Me.ButtonChoosePath)
Me.Controls.Add(Me.Button2) Me.Controls.Add(Me.Button2)
Me.Controls.Add(Me.Button1) Me.Controls.Add(Me.Button1)
@ -177,4 +200,6 @@ Partial Class AddPath
Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button
Friend WithEvents FolderBrowserDialog As System.Windows.Forms.FolderBrowserDialog Friend WithEvents FolderBrowserDialog As System.Windows.Forms.FolderBrowserDialog
Friend WithEvents ButtonChoosePath As System.Windows.Forms.Button Friend WithEvents ButtonChoosePath As System.Windows.Forms.Button
Friend WithEvents Label5 As Label
Friend WithEvents ESServerNameTextBox As TextBox
End Class End Class

View File

@ -112,12 +112,12 @@
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="FolderBrowserDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="FolderBrowserDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
</root> </root>

View File

@ -29,11 +29,12 @@ Partial Class Form1
Me.InfobaseDescription = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) Me.InfobaseDescription = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
Me.IBEvLogSize = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) Me.IBEvLogSize = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
Me.InfobaseLogPath = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) Me.InfobaseLogPath = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
Me.ESServerName = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
Me.ConnectionStringBox = New System.Windows.Forms.TextBox() Me.ConnectionStringBox = New System.Windows.Forms.TextBox()
Me.Label1 = New System.Windows.Forms.Label() Me.Label1 = New System.Windows.Forms.Label()
Me.Button4 = New System.Windows.Forms.Button() Me.Button4 = New System.Windows.Forms.Button()
Me.TabControl1 = New System.Windows.Forms.TabControl() Me.Label3 = New System.Windows.Forms.Label()
Me.TabPage2 = New System.Windows.Forms.TabPage() Me.ESIndexNameTextBox = New System.Windows.Forms.TextBox()
Me.DBType = New System.Windows.Forms.ComboBox() Me.DBType = New System.Windows.Forms.ComboBox()
Me.Button6 = New System.Windows.Forms.Button() Me.Button6 = New System.Windows.Forms.Button()
Me.GroupBox1 = New System.Windows.Forms.GroupBox() Me.GroupBox1 = New System.Windows.Forms.GroupBox()
@ -43,24 +44,24 @@ Partial Class Form1
Me.ButtonAddPath = New System.Windows.Forms.Button() Me.ButtonAddPath = New System.Windows.Forms.Button()
Me.Button2 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button()
Me.RepeatTime = New System.Windows.Forms.TextBox() Me.RepeatTime = New System.Windows.Forms.TextBox()
Me.TabPage1 = New System.Windows.Forms.TabPage() Me.Label4 = New System.Windows.Forms.Label()
Me.RichTextBox1 = New System.Windows.Forms.RichTextBox() Me.LinkLabel2 = New System.Windows.Forms.LinkLabel()
Me.TabControl1.SuspendLayout() Me.LinkLabel1 = New System.Windows.Forms.LinkLabel()
Me.TabPage2.SuspendLayout() Me.LinkLabel3 = New System.Windows.Forms.LinkLabel()
Me.Label5 = New System.Windows.Forms.Label()
Me.GroupBox1.SuspendLayout() Me.GroupBox1.SuspendLayout()
Me.TabPage1.SuspendLayout()
Me.SuspendLayout() Me.SuspendLayout()
' '
'ListView 'ListView
' '
Me.ListView.CheckBoxes = True Me.ListView.CheckBoxes = True
Me.ListView.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.InfobaseName, Me.InfobaseGUID, Me.InfobaseDescription, Me.IBEvLogSize, Me.InfobaseLogPath}) Me.ListView.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.InfobaseName, Me.InfobaseGUID, Me.InfobaseDescription, Me.IBEvLogSize, Me.InfobaseLogPath, Me.ESServerName})
Me.ListView.Dock = System.Windows.Forms.DockStyle.Fill Me.ListView.Dock = System.Windows.Forms.DockStyle.Fill
Me.ListView.FullRowSelect = True Me.ListView.FullRowSelect = True
Me.ListView.GridLines = True Me.ListView.GridLines = True
Me.ListView.Location = New System.Drawing.Point(3, 20) Me.ListView.Location = New System.Drawing.Point(3, 20)
Me.ListView.Name = "ListView" Me.ListView.Name = "ListView"
Me.ListView.Size = New System.Drawing.Size(755, 241) Me.ListView.Size = New System.Drawing.Size(744, 327)
Me.ListView.TabIndex = 1 Me.ListView.TabIndex = 1
Me.ListView.UseCompatibleStateImageBehavior = False Me.ListView.UseCompatibleStateImageBehavior = False
Me.ListView.View = System.Windows.Forms.View.Details Me.ListView.View = System.Windows.Forms.View.Details
@ -77,27 +78,36 @@ Partial Class Form1
' '
'InfobaseDescription 'InfobaseDescription
' '
Me.InfobaseDescription.DisplayIndex = 3
Me.InfobaseDescription.Text = "Описание" Me.InfobaseDescription.Text = "Описание"
Me.InfobaseDescription.Width = 225 Me.InfobaseDescription.Width = 225
' '
'IBEvLogSize 'IBEvLogSize
' '
Me.IBEvLogSize.DisplayIndex = 4
Me.IBEvLogSize.Text = "Размер ЖР (Мб)" Me.IBEvLogSize.Text = "Размер ЖР (Мб)"
Me.IBEvLogSize.TextAlign = System.Windows.Forms.HorizontalAlignment.Right Me.IBEvLogSize.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
Me.IBEvLogSize.Width = 129 Me.IBEvLogSize.Width = 129
' '
'InfobaseLogPath 'InfobaseLogPath
' '
Me.InfobaseLogPath.DisplayIndex = 5
Me.InfobaseLogPath.Text = "Каталог ЖР" Me.InfobaseLogPath.Text = "Каталог ЖР"
Me.InfobaseLogPath.Width = 300 Me.InfobaseLogPath.Width = 300
' '
'ESServerName
'
Me.ESServerName.DisplayIndex = 2
Me.ESServerName.Text = "Имя сервера для ES"
Me.ESServerName.Width = 180
'
'ConnectionStringBox 'ConnectionStringBox
' '
Me.ConnectionStringBox.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ Me.ConnectionStringBox.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.ConnectionStringBox.Location = New System.Drawing.Point(127, 29) Me.ConnectionStringBox.Location = New System.Drawing.Point(123, 24)
Me.ConnectionStringBox.Name = "ConnectionStringBox" Me.ConnectionStringBox.Name = "ConnectionStringBox"
Me.ConnectionStringBox.Size = New System.Drawing.Size(561, 20) Me.ConnectionStringBox.Size = New System.Drawing.Size(525, 20)
Me.ConnectionStringBox.TabIndex = 2 Me.ConnectionStringBox.TabIndex = 2
' '
'Label1 'Label1
@ -105,7 +115,7 @@ Partial Class Form1
Me.Label1.AutoSize = True Me.Label1.AutoSize = True
Me.Label1.Font = New System.Drawing.Font("Tahoma", 10.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(204, Byte)) Me.Label1.Font = New System.Drawing.Font("Tahoma", 10.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(204, Byte))
Me.Label1.ForeColor = System.Drawing.Color.Maroon Me.Label1.ForeColor = System.Drawing.Color.Maroon
Me.Label1.Location = New System.Drawing.Point(8, 9) Me.Label1.Location = New System.Drawing.Point(4, 4)
Me.Label1.Name = "Label1" Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(450, 17) Me.Label1.Size = New System.Drawing.Size(450, 17)
Me.Label1.TabIndex = 3 Me.Label1.TabIndex = 3
@ -114,51 +124,38 @@ Partial Class Form1
'Button4 'Button4
' '
Me.Button4.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.Button4.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Button4.Location = New System.Drawing.Point(691, 27) Me.Button4.Location = New System.Drawing.Point(654, 24)
Me.Button4.Name = "Button4" Me.Button4.Name = "Button4"
Me.Button4.Size = New System.Drawing.Size(75, 23) Me.Button4.Size = New System.Drawing.Size(75, 23)
Me.Button4.TabIndex = 4 Me.Button4.TabIndex = 4
Me.Button4.Text = "Проверить" Me.Button4.Text = "Проверить"
Me.Button4.UseVisualStyleBackColor = True Me.Button4.UseVisualStyleBackColor = True
' '
'TabControl1 'Label3
' '
Me.TabControl1.Controls.Add(Me.TabPage2) Me.Label3.AutoSize = True
Me.TabControl1.Controls.Add(Me.TabPage1) Me.Label3.Font = New System.Drawing.Font("Tahoma", 10.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(204, Byte))
Me.TabControl1.Dock = System.Windows.Forms.DockStyle.Fill Me.Label3.ForeColor = System.Drawing.Color.Maroon
Me.TabControl1.Location = New System.Drawing.Point(0, 0) Me.Label3.Location = New System.Drawing.Point(4, 74)
Me.TabControl1.Name = "TabControl1" Me.Label3.Name = "Label3"
Me.TabControl1.SelectedIndex = 0 Me.Label3.Size = New System.Drawing.Size(197, 17)
Me.TabControl1.Size = New System.Drawing.Size(783, 424) Me.Label3.TabIndex = 10
Me.TabControl1.TabIndex = 5 Me.Label3.Text = "Имя индекса ElasticSearch"
' '
'TabPage2 'ESIndexNameTextBox
' '
Me.TabPage2.Controls.Add(Me.DBType) Me.ESIndexNameTextBox.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
Me.TabPage2.Controls.Add(Me.Button6) Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.TabPage2.Controls.Add(Me.GroupBox1) Me.ESIndexNameTextBox.Location = New System.Drawing.Point(449, 74)
Me.TabPage2.Controls.Add(Me.Label2) Me.ESIndexNameTextBox.Name = "ESIndexNameTextBox"
Me.TabPage2.Controls.Add(Me.Label1) Me.ESIndexNameTextBox.Size = New System.Drawing.Size(199, 20)
Me.TabPage2.Controls.Add(Me.Button1) Me.ESIndexNameTextBox.TabIndex = 9
Me.TabPage2.Controls.Add(Me.Button3)
Me.TabPage2.Controls.Add(Me.Button4)
Me.TabPage2.Controls.Add(Me.ButtonAddPath)
Me.TabPage2.Controls.Add(Me.Button2)
Me.TabPage2.Controls.Add(Me.RepeatTime)
Me.TabPage2.Controls.Add(Me.ConnectionStringBox)
Me.TabPage2.Location = New System.Drawing.Point(4, 22)
Me.TabPage2.Name = "TabPage2"
Me.TabPage2.Padding = New System.Windows.Forms.Padding(3)
Me.TabPage2.Size = New System.Drawing.Size(775, 398)
Me.TabPage2.TabIndex = 1
Me.TabPage2.Text = "Настройка параметров"
Me.TabPage2.UseVisualStyleBackColor = True
' '
'DBType 'DBType
' '
Me.DBType.FormattingEnabled = True Me.DBType.FormattingEnabled = True
Me.DBType.Items.AddRange(New Object() {"MS SQL Server", "MySQL", "ElasticSearch"}) Me.DBType.Items.AddRange(New Object() {"MS SQL Server", "MySQL", "ElasticSearch"})
Me.DBType.Location = New System.Drawing.Point(9, 29) Me.DBType.Location = New System.Drawing.Point(5, 24)
Me.DBType.Name = "DBType" Me.DBType.Name = "DBType"
Me.DBType.Size = New System.Drawing.Size(112, 21) Me.DBType.Size = New System.Drawing.Size(112, 21)
Me.DBType.TabIndex = 8 Me.DBType.TabIndex = 8
@ -168,7 +165,7 @@ Partial Class Form1
Me.Button6.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) Me.Button6.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
Me.Button6.Image = Global.EventLogLoaderManager.My.Resources.Resources.info Me.Button6.Image = Global.EventLogLoaderManager.My.Resources.Resources.info
Me.Button6.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft Me.Button6.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button6.Location = New System.Drawing.Point(644, 348) Me.Button6.Location = New System.Drawing.Point(639, 456)
Me.Button6.Name = "Button6" Me.Button6.Name = "Button6"
Me.Button6.Size = New System.Drawing.Size(123, 48) Me.Button6.Size = New System.Drawing.Size(123, 48)
Me.Button6.TabIndex = 7 Me.Button6.TabIndex = 7
@ -184,9 +181,9 @@ Partial Class Form1
Me.GroupBox1.Controls.Add(Me.ListView) Me.GroupBox1.Controls.Add(Me.ListView)
Me.GroupBox1.Font = New System.Drawing.Font("Tahoma", 10.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(204, Byte)) Me.GroupBox1.Font = New System.Drawing.Font("Tahoma", 10.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(204, Byte))
Me.GroupBox1.ForeColor = System.Drawing.Color.Maroon Me.GroupBox1.ForeColor = System.Drawing.Color.Maroon
Me.GroupBox1.Location = New System.Drawing.Point(8, 78) Me.GroupBox1.Location = New System.Drawing.Point(4, 100)
Me.GroupBox1.Name = "GroupBox1" Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(761, 264) Me.GroupBox1.Size = New System.Drawing.Size(750, 350)
Me.GroupBox1.TabIndex = 5 Me.GroupBox1.TabIndex = 5
Me.GroupBox1.TabStop = False Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "Обнаруженные информационные базы 1С" Me.GroupBox1.Text = "Обнаруженные информационные базы 1С"
@ -196,7 +193,7 @@ Partial Class Form1
Me.Label2.AutoSize = True Me.Label2.AutoSize = True
Me.Label2.Font = New System.Drawing.Font("Tahoma", 10.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(204, Byte)) Me.Label2.Font = New System.Drawing.Font("Tahoma", 10.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(204, Byte))
Me.Label2.ForeColor = System.Drawing.Color.Maroon Me.Label2.ForeColor = System.Drawing.Color.Maroon
Me.Label2.Location = New System.Drawing.Point(8, 52) Me.Label2.Location = New System.Drawing.Point(4, 49)
Me.Label2.Name = "Label2" Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(439, 17) Me.Label2.Size = New System.Drawing.Size(439, 17)
Me.Label2.TabIndex = 3 Me.Label2.TabIndex = 3
@ -207,7 +204,7 @@ Partial Class Form1
Me.Button1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) Me.Button1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
Me.Button1.Image = Global.EventLogLoaderManager.My.Resources.Resources.save_all Me.Button1.Image = Global.EventLogLoaderManager.My.Resources.Resources.save_all
Me.Button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft Me.Button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button1.Location = New System.Drawing.Point(475, 348) Me.Button1.Location = New System.Drawing.Point(470, 456)
Me.Button1.Name = "Button1" Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(163, 47) Me.Button1.Size = New System.Drawing.Size(163, 47)
Me.Button1.TabIndex = 0 Me.Button1.TabIndex = 0
@ -220,7 +217,7 @@ Partial Class Form1
Me.Button3.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) Me.Button3.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
Me.Button3.Image = Global.EventLogLoaderManager.My.Resources.Resources.edit_delete_5986 Me.Button3.Image = Global.EventLogLoaderManager.My.Resources.Resources.edit_delete_5986
Me.Button3.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft Me.Button3.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button3.Location = New System.Drawing.Point(330, 348) Me.Button3.Location = New System.Drawing.Point(325, 456)
Me.Button3.Name = "Button3" Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(139, 47) Me.Button3.Size = New System.Drawing.Size(139, 47)
Me.Button3.TabIndex = 0 Me.Button3.TabIndex = 0
@ -233,7 +230,7 @@ Partial Class Form1
Me.ButtonAddPath.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) Me.ButtonAddPath.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
Me.ButtonAddPath.Image = Global.EventLogLoaderManager.My.Resources.Resources.edit_add_3860 Me.ButtonAddPath.Image = Global.EventLogLoaderManager.My.Resources.Resources.edit_add_3860
Me.ButtonAddPath.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft Me.ButtonAddPath.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.ButtonAddPath.Location = New System.Drawing.Point(9, 348) Me.ButtonAddPath.Location = New System.Drawing.Point(4, 456)
Me.ButtonAddPath.Name = "ButtonAddPath" Me.ButtonAddPath.Name = "ButtonAddPath"
Me.ButtonAddPath.Size = New System.Drawing.Size(162, 47) Me.ButtonAddPath.Size = New System.Drawing.Size(162, 47)
Me.ButtonAddPath.TabIndex = 0 Me.ButtonAddPath.TabIndex = 0
@ -246,7 +243,7 @@ Partial Class Form1
Me.Button2.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) Me.Button2.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
Me.Button2.Image = Global.EventLogLoaderManager.My.Resources.Resources.edit_add_3860 Me.Button2.Image = Global.EventLogLoaderManager.My.Resources.Resources.edit_add_3860
Me.Button2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft Me.Button2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button2.Location = New System.Drawing.Point(177, 348) Me.Button2.Location = New System.Drawing.Point(172, 456)
Me.Button2.Name = "Button2" Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(147, 47) Me.Button2.Size = New System.Drawing.Size(147, 47)
Me.Button2.TabIndex = 0 Me.Button2.TabIndex = 0
@ -258,49 +255,95 @@ Partial Class Form1
' '
Me.RepeatTime.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ Me.RepeatTime.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.RepeatTime.Location = New System.Drawing.Point(453, 52) Me.RepeatTime.Location = New System.Drawing.Point(449, 49)
Me.RepeatTime.Name = "RepeatTime" Me.RepeatTime.Name = "RepeatTime"
Me.RepeatTime.Size = New System.Drawing.Size(235, 20) Me.RepeatTime.Size = New System.Drawing.Size(199, 20)
Me.RepeatTime.TabIndex = 2 Me.RepeatTime.TabIndex = 2
' '
'TabPage1 'Label4
' '
Me.TabPage1.Controls.Add(Me.RichTextBox1) Me.Label4.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
Me.TabPage1.Location = New System.Drawing.Point(4, 22) Me.Label4.AutoSize = True
Me.TabPage1.Name = "TabPage1" Me.Label4.Location = New System.Drawing.Point(1, 513)
Me.TabPage1.Padding = New System.Windows.Forms.Padding(3) Me.Label4.Name = "Label4"
Me.TabPage1.Size = New System.Drawing.Size(775, 398) Me.Label4.Size = New System.Drawing.Size(223, 13)
Me.TabPage1.TabIndex = 0 Me.Label4.TabIndex = 22
Me.TabPage1.Text = "Описание" Me.Label4.Text = "Описание и страница для обратной связи:"
Me.TabPage1.UseVisualStyleBackColor = True
' '
'RichTextBox1 'LinkLabel2
' '
Me.RichTextBox1.Dock = System.Windows.Forms.DockStyle.Fill Me.LinkLabel2.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.RichTextBox1.Font = New System.Drawing.Font("Tahoma", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(204, Byte)) Me.LinkLabel2.AutoSize = True
Me.RichTextBox1.ForeColor = System.Drawing.Color.Maroon Me.LinkLabel2.Location = New System.Drawing.Point(660, 530)
Me.RichTextBox1.Location = New System.Drawing.Point(3, 3) Me.LinkLabel2.Name = "LinkLabel2"
Me.RichTextBox1.Name = "RichTextBox1" Me.LinkLabel2.Size = New System.Drawing.Size(102, 13)
Me.RichTextBox1.Size = New System.Drawing.Size(769, 392) Me.LinkLabel2.TabIndex = 20
Me.RichTextBox1.TabIndex = 0 Me.LinkLabel2.TabStop = True
Me.RichTextBox1.Text = resources.GetString("RichTextBox1.Text") Me.LinkLabel2.Text = "© Aleksey.Bochkov"
'
'LinkLabel1
'
Me.LinkLabel1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
Me.LinkLabel1.AutoSize = True
Me.LinkLabel1.Location = New System.Drawing.Point(228, 513)
Me.LinkLabel1.Name = "LinkLabel1"
Me.LinkLabel1.Size = New System.Drawing.Size(166, 13)
Me.LinkLabel1.TabIndex = 21
Me.LinkLabel1.TabStop = True
Me.LinkLabel1.Text = "http://infostart.ru/public/182820/"
'
'LinkLabel3
'
Me.LinkLabel3.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
Me.LinkLabel3.AutoSize = True
Me.LinkLabel3.Location = New System.Drawing.Point(228, 530)
Me.LinkLabel3.Name = "LinkLabel3"
Me.LinkLabel3.Size = New System.Drawing.Size(262, 13)
Me.LinkLabel3.TabIndex = 21
Me.LinkLabel3.TabStop = True
Me.LinkLabel3.Text = "https://github.com/alekseybochkov/EventLogLoader"
'
'Label5
'
Me.Label5.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
Me.Label5.AutoSize = True
Me.Label5.Location = New System.Drawing.Point(1, 530)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(186, 13)
Me.Label5.TabIndex = 22
Me.Label5.Text = "Исходные коды (по GPL лицензии):"
' '
'Form1 'Form1
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(783, 424) Me.ClientSize = New System.Drawing.Size(766, 547)
Me.Controls.Add(Me.TabControl1) Me.Controls.Add(Me.Label5)
Me.Controls.Add(Me.Label4)
Me.Controls.Add(Me.LinkLabel2)
Me.Controls.Add(Me.LinkLabel3)
Me.Controls.Add(Me.LinkLabel1)
Me.Controls.Add(Me.Label3)
Me.Controls.Add(Me.ESIndexNameTextBox)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.DBType)
Me.Controls.Add(Me.ConnectionStringBox)
Me.Controls.Add(Me.Button6)
Me.Controls.Add(Me.RepeatTime)
Me.Controls.Add(Me.GroupBox1)
Me.Controls.Add(Me.Button2)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.ButtonAddPath)
Me.Controls.Add(Me.Button4)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.Button3)
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.Name = "Form1" Me.Name = "Form1"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "Form1" Me.Text = "Form1"
Me.TabControl1.ResumeLayout(False)
Me.TabPage2.ResumeLayout(False)
Me.TabPage2.PerformLayout()
Me.GroupBox1.ResumeLayout(False) Me.GroupBox1.ResumeLayout(False)
Me.TabPage1.ResumeLayout(False)
Me.ResumeLayout(False) Me.ResumeLayout(False)
Me.PerformLayout()
End Sub End Sub
Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents Button1 As System.Windows.Forms.Button
@ -314,10 +357,6 @@ Partial Class Form1
Friend WithEvents ConnectionStringBox As System.Windows.Forms.TextBox Friend WithEvents ConnectionStringBox As System.Windows.Forms.TextBox
Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Button4 As System.Windows.Forms.Button Friend WithEvents Button4 As System.Windows.Forms.Button
Friend WithEvents TabControl1 As System.Windows.Forms.TabControl
Friend WithEvents TabPage1 As System.Windows.Forms.TabPage
Friend WithEvents RichTextBox1 As System.Windows.Forms.RichTextBox
Friend WithEvents TabPage2 As System.Windows.Forms.TabPage
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents Button6 As System.Windows.Forms.Button Friend WithEvents Button6 As System.Windows.Forms.Button
Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label
@ -325,5 +364,12 @@ Partial Class Form1
Friend WithEvents InfobaseLogPath As System.Windows.Forms.ColumnHeader Friend WithEvents InfobaseLogPath As System.Windows.Forms.ColumnHeader
Friend WithEvents DBType As System.Windows.Forms.ComboBox Friend WithEvents DBType As System.Windows.Forms.ComboBox
Friend WithEvents ButtonAddPath As System.Windows.Forms.Button Friend WithEvents ButtonAddPath As System.Windows.Forms.Button
Friend WithEvents Label3 As Label
Friend WithEvents ESIndexNameTextBox As TextBox
Friend WithEvents ESServerName As ColumnHeader
Friend WithEvents Label4 As Label
Friend WithEvents LinkLabel2 As LinkLabel
Friend WithEvents LinkLabel1 As LinkLabel
Friend WithEvents LinkLabel3 As LinkLabel
Friend WithEvents Label5 As Label
End Class End Class

View File

@ -112,29 +112,12 @@
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="RichTextBox1.Text" xml:space="preserve"> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<value>Порядок настройки:
1) Программа должна быть запущена под административными правами на сервере приложений.
2) Создать на сервере СУБД пустую базу.
3) Заполнить строку соединения с сервером. Можно использовать шаблоны:
для windows-авторизации Data Source=MSSQL1;Server=имя сервера;Database=имя базы;Integrated Security=true;
для обычной авторизации Data Source=MSSQL1;Server=имя сервера;Database=имя базы;Password=Пароль;User ID=Имя пользователя;
4) Указать интервал между циклами чтения событий из ЖР. Допустимо ставить несколько секунд - на производительности сервера не скажется.
5) Отметить те БД, события из которых необходимо периодически загружать в базу.
6) Нажать "Сохранить параметры".
7) Установить службу по кнопке.
8) Через "Панель управления" - "Администрирование" - "Службы" запустить службу "EventLog loader service".
Примечание.
* Полученную информацию в базе удобно просматривать через внешние источники данных в 1С.
* Любой feedback приветствуется в комментариях к публикации http://infostart.ru/public/182820/.</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
AAABAAYAAAAAAAEAGABrfgAAZgAAAICAAAABABgAKMgAANF+AAAwMAAAAQAYAKgcAAD5RgEAICAAAAEA AAABAAYAAAAAAAEAGABrfgAAZgAAAICAAAABABgAKMgAANF+AAAwMAAAAQAYAKgcAAD5RgEAICAAAAEA

View File

@ -14,13 +14,29 @@ Public Class Form1
Dim ConfigSetting As ConfigSetting = New ConfigSetting Dim ConfigSetting As ConfigSetting = New ConfigSetting
Sub LoadFromIniFile() Sub LoadConfigSetting()
ConfigSetting = ConfigSettingsModule.LoadConfigSettingFromFile(PathConfigFile) ConfigSetting = ConfigSettingsModule.LoadConfigSettingFromFile(PathConfigFile)
If ConfigSetting.RepeatTime = 0 Then
ConfigSetting.RepeatTime = 60
End If
If String.IsNullOrEmpty(ConfigSetting.ESIndexName) Then
ConfigSetting.ESIndexName = "event-log"
End If
If String.IsNullOrEmpty(ConfigSetting.DBType) Then
ConfigSetting.DBType = "ElasticSearch"
If String.IsNullOrEmpty(ConfigSetting.ConnectionString) Then
ConfigSetting.ConnectionString = "http://localhost:9200/"
End If
End If
ConnectionStringBox.Text = ConfigSetting.ConnectionString ConnectionStringBox.Text = ConfigSetting.ConnectionString
DBType.Text = ConfigSetting.DBType DBType.Text = ConfigSetting.DBType
RepeatTime.Text = ConfigSetting.RepeatTime.ToString RepeatTime.Text = ConfigSetting.RepeatTime.ToString
ESIndexNameTextBox.Text = ConfigSetting.ESIndexName
End Sub End Sub
@ -43,17 +59,17 @@ Public Class Form1
End Function End Function
Function FindInfobaseInSavedParams(Guid As String) As Boolean Function FindInfobaseInSavedParams(Guid As String) As InfobaseSetting
FindInfobaseInSavedParams = False
For Each IB In ConfigSetting.Infobases For Each IB In ConfigSetting.Infobases
If IB.DatabaseID = Guid Then If IB.DatabaseID = Guid Then
IB.Found = True IB.Found = True
Return True Return IB
End If End If
Next Next
Return New InfobaseSetting
End Function End Function
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
@ -69,6 +85,7 @@ Public Class Form1
IBSetting.DatabaseID = Item.SubItems(1).Text IBSetting.DatabaseID = Item.SubItems(1).Text
IBSetting.DatabaseName = Item.SubItems(0).Text IBSetting.DatabaseName = Item.SubItems(0).Text
IBSetting.DatabaseCatalog = Item.SubItems(4).Text IBSetting.DatabaseCatalog = Item.SubItems(4).Text
IBSetting.ESServerName = Item.SubItems(5).Text
ConfigSetting.Infobases.Add(IBSetting) ConfigSetting.Infobases.Add(IBSetting)
@ -92,9 +109,11 @@ Public Class Form1
sc.Start() sc.Start()
sc.WaitForStatus(ServiceProcess.ServiceControllerStatus.Running) sc.WaitForStatus(ServiceProcess.ServiceControllerStatus.Running)
End If End If
Else
MsgBox("Параметры успешно изменены.", MsgBoxStyle.OkOnly, Text)
End If End If
Catch ex As Exception Catch ex As Exception
MsgBox("Параметры успешно изменены.", MsgBoxStyle.OkOnly, Text)
End Try End Try
@ -145,14 +164,10 @@ Public Class Form1
Text = My.Application.Info.ProductName + " / " + My.Application.Info.Copyright Text = My.Application.Info.ProductName + " / " + My.Application.Info.Copyright
LoadFromIniFile() LoadConfigSetting()
RefreshInfobaseList() RefreshInfobaseList()
If RepeatTime.Text = String.Empty Then
RepeatTime.Text = 60
End If
End Sub End Sub
@ -188,12 +203,15 @@ Public Class Form1
If Not Serv.ArrayInfobases Is Nothing Then If Not Serv.ArrayInfobases Is Nothing Then
For Each a In Serv.ArrayInfobases For Each a In Serv.ArrayInfobases
Dim SavedIB As InfobaseSetting = FindInfobaseInSavedParams(a.GUID)
Dim item1 = New ListViewItem(a.Name, Group) Dim item1 = New ListViewItem(a.Name, Group)
item1.Checked = FindInfobaseInSavedParams(a.GUID) item1.Checked = (Not String.IsNullOrEmpty(SavedIB.DatabaseID))
item1.SubItems.Add(a.GUID) item1.SubItems.Add(a.GUID)
item1.SubItems.Add(a.Description) item1.SubItems.Add(a.Description)
item1.SubItems.Add(a.SizeEventLog.ToString) item1.SubItems.Add(a.SizeEventLog.ToString)
item1.SubItems.Add(a.CatalogEventLog) item1.SubItems.Add(a.CatalogEventLog)
item1.SubItems.Add(SavedIB.ESServerName) 'ESServerName
ListView.Items.Add(item1) ListView.Items.Add(item1)
@ -209,12 +227,15 @@ Public Class Form1
For Each a In FileIbases For Each a In FileIbases
Dim SavedIB As InfobaseSetting = FindInfobaseInSavedParams(a.GUID)
Dim item1 = New ListViewItem(a.Name, Group) Dim item1 = New ListViewItem(a.Name, Group)
item1.Checked = FindInfobaseInSavedParams(a.GUID) item1.Checked = (Not String.IsNullOrEmpty(SavedIB.DatabaseID))
item1.SubItems.Add(a.GUID) item1.SubItems.Add(a.GUID)
item1.SubItems.Add(a.Description) item1.SubItems.Add(a.Description)
item1.SubItems.Add(a.SizeEventLog.ToString) item1.SubItems.Add(a.SizeEventLog.ToString)
item1.SubItems.Add(a.CatalogEventLog) item1.SubItems.Add(a.CatalogEventLog)
item1.SubItems.Add(SavedIB.ESServerName) 'ESServerName
ListView.Items.Add(item1) ListView.Items.Add(item1)
@ -233,6 +254,7 @@ Public Class Form1
item1.SubItems.Add("") item1.SubItems.Add("")
item1.SubItems.Add(CalcullateFolderSize(IB.DatabaseCatalog)) item1.SubItems.Add(CalcullateFolderSize(IB.DatabaseCatalog))
item1.SubItems.Add(IB.DatabaseCatalog) item1.SubItems.Add(IB.DatabaseCatalog)
item1.SubItems.Add(IB.ESServerName)
ListView.Items.Add(item1) ListView.Items.Add(item1)
End If End If
@ -400,6 +422,7 @@ Public Class Form1
item1.SubItems.Add(AddPath.Description.Text) item1.SubItems.Add(AddPath.Description.Text)
item1.SubItems.Add(CalcullateFolderSize(AddPath.Path.Text)) item1.SubItems.Add(CalcullateFolderSize(AddPath.Path.Text))
item1.SubItems.Add(AddPath.Path.Text) item1.SubItems.Add(AddPath.Path.Text)
item1.SubItems.Add(AddPath.ESServerNameTextBox.Text)
ListView.Items.Add(item1) ListView.Items.Add(item1)
@ -415,31 +438,48 @@ Public Class Form1
Dim item As ListViewItem = sender.SelectedItems(0) Dim item As ListViewItem = sender.SelectedItems(0)
If item.Group Is GroupExtraPath Then 'If item.Group Is GroupExtraPath Then
Dim AddPath = New AddPath Dim AddPath = New AddPath
AddPath.IBName.Text = item.Text AddPath.IBName.Text = item.Text
AddPath.IBGUID.Text = item.SubItems(1).Text AddPath.IBGUID.Text = item.SubItems(1).Text
AddPath.Description.Text = item.SubItems(2).Text AddPath.ESServerNameTextBox.Text = item.SubItems(5).Text
AddPath.Path.Text = item.SubItems(4).Text AddPath.Description.Text = item.SubItems(2).Text
AddPath.ExistedRow = True AddPath.Path.Text = item.SubItems(4).Text
AddPath.ShowDialog() AddPath.ExistedRow = True
AddPath.ShowDialog()
If AddPath.Success Then If AddPath.Success Then
item.SubItems.Clear()
item.Text = AddPath.IBName.Text
item.SubItems.Add(AddPath.IBGUID.Text)
item.SubItems.Add(AddPath.Description.Text)
item.SubItems.Add(CalcullateFolderSize(AddPath.Path.Text))
item.SubItems.Add(AddPath.Path.Text)
End If
item.SubItems.Clear()
item.Text = AddPath.IBName.Text
item.SubItems.Add(AddPath.IBGUID.Text)
item.SubItems.Add(AddPath.Description.Text)
item.SubItems.Add(CalcullateFolderSize(AddPath.Path.Text))
item.SubItems.Add(AddPath.Path.Text)
item.SubItems.Add(AddPath.ESServerNameTextBox.Text)
End If End If
'End If
End Sub End Sub
Private Sub LinkLabel2_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel2.LinkClicked
Process.Start("https://github.com/alekseybochkov/")
End Sub
Private Sub LinkLabel1_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
Process.Start("http://infostart.ru/public/182820/")
End Sub
Private Sub LinkLabel3_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel3.LinkClicked
Process.Start("https://github.com/alekseybochkov/EventLogLoader/")
End Sub
End Class End Class

View File

@ -3,18 +3,18 @@
Public Module ConfigSettingsModule Public Module ConfigSettingsModule
Class InfobaseSetting Class InfobaseSetting
Public ESServerName As String Public ESServerName As String = ""
Public DatabaseID As String Public DatabaseID As String = ""
Public DatabaseName As String Public DatabaseName As String = ""
Public DatabaseCatalog As String Public DatabaseCatalog As String = ""
Public Found As Boolean Public Found As Boolean = False
End Class End Class
Class ConfigSetting Class ConfigSetting
Public ConnectionString As String Public ConnectionString As String = ""
Public DBType As String Public DBType As String = ""
Public RepeatTime As Integer Public RepeatTime As Integer = 0
Public ESIndexName As String Public ESIndexName As String = ""
Public Infobases As List(Of InfobaseSetting) Public Infobases As List(Of InfobaseSetting)
Sub New() Sub New()
Infobases = New List(Of InfobaseSetting) Infobases = New List(Of InfobaseSetting)
@ -33,7 +33,7 @@ Public Module ConfigSettingsModule
End If End If
Return Nothing Return New ConfigSetting
End Function End Function
@ -43,7 +43,6 @@ Public Module ConfigSettingsModule
My.Computer.FileSystem.WriteAllText(ConfigFilePath, JsonText, False) My.Computer.FileSystem.WriteAllText(ConfigFilePath, JsonText, False)
End Sub End Sub

View File

@ -185,7 +185,6 @@ Public Class EventLogProcessor
Public DateTime As Date Public DateTime As Date
Public Severity As String Public Severity As String
Public EventType As EventType Public EventType As EventType
Public EventTypeString As String
Public Computer As String Public Computer As String
Public Application As String Public Application As String
Public Metadata As Metadata Public Metadata As Metadata
@ -836,7 +835,7 @@ Public Class EventLogProcessor
ESRecord.DataStructure = EventRecord.DataStructure ESRecord.DataStructure = EventRecord.DataStructure
ESRecord.DataString = EventRecord.DataString ESRecord.DataString = EventRecord.DataString
ESRecord.Comment = EventRecord.Comment ESRecord.Comment = EventRecord.Comment
ESRecord.EventTypeString = EventRecord.EventType 'ESRecord.EventTypeString = EventRecord.EventType - this is severity
ESRecord.SessionDataSplitCode = EventRecord.SessionDataSplitCode ESRecord.SessionDataSplitCode = EventRecord.SessionDataSplitCode
@ -1171,6 +1170,7 @@ Public Class EventLogProcessor
Dim OneEvent = New OneEventRecord Dim OneEvent = New OneEventRecord
OneEvent.RowID = rs("rowID") OneEvent.RowID = rs("rowID")
OneEvent.Severity = rs("severity") OneEvent.Severity = rs("severity")
OneEvent.ConnectID = rs("connectID") OneEvent.ConnectID = rs("connectID")
OneEvent.DateTime = New Date().AddSeconds(Convert.ToInt64(rs("date") / 10000)) OneEvent.DateTime = New Date().AddSeconds(Convert.ToInt64(rs("date") / 10000))
OneEvent.TransactionStatus = rs("transactionStatus") OneEvent.TransactionStatus = rs("transactionStatus")
@ -1408,14 +1408,6 @@ Public Class EventLogProcessor
End Sub End Sub
Function DeleteQuote(Str As String)
Dim SubStr = Str.Substring(1, Str.Length - 2)
Return SubStr
End Function
Function From16To10(Str As String) Function From16To10(Str As String)
From16To10 = 0 From16To10 = 0
@ -1466,10 +1458,10 @@ Public Class EventLogProcessor
OneEvent.Field2 = Array(6) OneEvent.Field2 = Array(6)
OneEvent.EventID = Convert.ToInt32(Array(7)) OneEvent.EventID = Convert.ToInt32(Array(7))
OneEvent.EventType = Array(8) OneEvent.EventType = Array(8)
OneEvent.Comment = DeleteQuote(Array(9)) OneEvent.Comment = RemoveQuotes(Array(9))
OneEvent.MetadataID = Convert.ToInt32(Array(10)) OneEvent.MetadataID = Convert.ToInt32(Array(10))
OneEvent.DataStructure = Array(11) OneEvent.DataStructure = Array(11)
OneEvent.DataString = DeleteQuote(Array(12)) OneEvent.DataString = RemoveQuotes(Array(12))
OneEvent.ServerID = Convert.ToInt32(Array(13)) OneEvent.ServerID = Convert.ToInt32(Array(13))
OneEvent.MainPortID = Convert.ToInt32(Array(14)) OneEvent.MainPortID = Convert.ToInt32(Array(14))
OneEvent.SecondPortID = Convert.ToInt32(Array(15)) OneEvent.SecondPortID = Convert.ToInt32(Array(15))
@ -1477,6 +1469,36 @@ Public Class EventLogProcessor
OneEvent.Field7 = Array(17) OneEvent.Field7 = Array(17)
OneEvent.Field8 = Array(18) OneEvent.Field8 = Array(18)
'*************************************************************************
'Additional parsing to make sure that data looks the same between old and new EventLog formats
If OneEvent.DataStructure = "{""U""}" Then 'empty reference
OneEvent.DataStructure = ""
ElseIf OneEvent.DataStructure.StartsWith("{") Then
'internal representation for different objects.
Dim ParsedObject = ParserServices.ParseEventlogString(OneEvent.DataStructure)
If ParsedObject.Length = 2 Then
If ParsedObject(0) = """S""" _
Or ParsedObject(0) = """R""" Then 'this is string or reference
OneEvent.DataStructure = RemoveQuotes(ParsedObject(1)) 'string value
End If
End If
End If
Select Case OneEvent.EventType
Case "I"
OneEvent.Severity = 1 '"Information"
Case "W"
OneEvent.Severity = 2 '"Warning"
Case "E"
OneEvent.Severity = 3'"Error"
Case "N"
OneEvent.Severity = 4 '"Note"
End Select
'************************************************************************* '*************************************************************************