Show last modified date for templates
This commit is contained in:
parent
8a1bb6911f
commit
16ace2c242
@ -22,6 +22,11 @@ Namespace Templates
|
|||||||
Public Property OutputDirectory As String
|
Public Property OutputDirectory As String
|
||||||
Public Property ArchiveDirectory As String
|
Public Property ArchiveDirectory As String
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Last modified date of the template file
|
||||||
|
''' </summary>
|
||||||
|
Public Property LastModified As Date
|
||||||
|
|
||||||
Public ReadOnly Property DocType As DocumentType
|
Public ReadOnly Property DocType As DocumentType
|
||||||
Get
|
Get
|
||||||
Dim oDocType As String = GetParameter("DOCTYPE")
|
Dim oDocType As String = GetParameter("DOCTYPE")
|
||||||
|
|||||||
12
MultiTool.Form/frmMain.Designer.vb
generated
12
MultiTool.Form/frmMain.Designer.vb
generated
@ -45,6 +45,7 @@ Partial Class frmMain
|
|||||||
Me.colName = New DevExpress.XtraGrid.Columns.GridColumn()
|
Me.colName = New DevExpress.XtraGrid.Columns.GridColumn()
|
||||||
Me.colDescription = New DevExpress.XtraGrid.Columns.GridColumn()
|
Me.colDescription = New DevExpress.XtraGrid.Columns.GridColumn()
|
||||||
Me.colFileName = New DevExpress.XtraGrid.Columns.GridColumn()
|
Me.colFileName = New DevExpress.XtraGrid.Columns.GridColumn()
|
||||||
|
Me.colChangedWhen = New DevExpress.XtraGrid.Columns.GridColumn()
|
||||||
Me.SplashScreenManager = New DevExpress.XtraSplashScreen.SplashScreenManager(Me, GetType(Global.MultiTool.Form.frmWaitForm), True, True)
|
Me.SplashScreenManager = New DevExpress.XtraSplashScreen.SplashScreenManager(Me, GetType(Global.MultiTool.Form.frmWaitForm), True, True)
|
||||||
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
CType(Me.SvgImageCollection1, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.SvgImageCollection1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
@ -204,7 +205,7 @@ Partial Class frmMain
|
|||||||
'
|
'
|
||||||
'GridViewTemplates
|
'GridViewTemplates
|
||||||
'
|
'
|
||||||
Me.GridViewTemplates.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.colName, Me.colDescription, Me.colFileName})
|
Me.GridViewTemplates.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.colName, Me.colDescription, Me.colFileName, Me.colChangedWhen})
|
||||||
Me.GridViewTemplates.GridControl = Me.GridControlTemplates
|
Me.GridViewTemplates.GridControl = Me.GridControlTemplates
|
||||||
Me.GridViewTemplates.Name = "GridViewTemplates"
|
Me.GridViewTemplates.Name = "GridViewTemplates"
|
||||||
'
|
'
|
||||||
@ -232,6 +233,14 @@ Partial Class frmMain
|
|||||||
Me.colFileName.Visible = True
|
Me.colFileName.Visible = True
|
||||||
Me.colFileName.VisibleIndex = 2
|
Me.colFileName.VisibleIndex = 2
|
||||||
'
|
'
|
||||||
|
'colChangedWhen
|
||||||
|
'
|
||||||
|
Me.colChangedWhen.Caption = "Letzte Änderung"
|
||||||
|
Me.colChangedWhen.FieldName = "LastModified"
|
||||||
|
Me.colChangedWhen.Name = "colChangedWhen"
|
||||||
|
Me.colChangedWhen.Visible = True
|
||||||
|
Me.colChangedWhen.VisibleIndex = 3
|
||||||
|
'
|
||||||
'SplashScreenManager
|
'SplashScreenManager
|
||||||
'
|
'
|
||||||
Me.SplashScreenManager.ClosingDelay = 500
|
Me.SplashScreenManager.ClosingDelay = 500
|
||||||
@ -283,4 +292,5 @@ Partial Class frmMain
|
|||||||
Friend WithEvents btnOpenSchemaDirectory As DevExpress.XtraBars.BarButtonItem
|
Friend WithEvents btnOpenSchemaDirectory As DevExpress.XtraBars.BarButtonItem
|
||||||
Friend WithEvents RibbonPageGroup4 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
|
Friend WithEvents RibbonPageGroup4 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
|
||||||
Friend WithEvents btnReloadWinlineData As DevExpress.XtraBars.BarButtonItem
|
Friend WithEvents btnReloadWinlineData As DevExpress.XtraBars.BarButtonItem
|
||||||
|
Friend WithEvents colChangedWhen As DevExpress.XtraGrid.Columns.GridColumn
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@ -124,6 +124,19 @@ Public Class frmMain
|
|||||||
|
|
||||||
Dim oBindingSource = New BindingList(Of Template)
|
Dim oBindingSource = New BindingList(Of Template)
|
||||||
For Each oTemplate As Template In TemplateLoader.TemplateList
|
For Each oTemplate As Template In TemplateLoader.TemplateList
|
||||||
|
|
||||||
|
' Check template files and update modified date
|
||||||
|
Try
|
||||||
|
Dim oFilePath = IO.Path.Combine(My.GeneralConfiguration.TemplateDirectory, oTemplate.FileName)
|
||||||
|
Dim oFileInfo = New FileInfo(oFilePath)
|
||||||
|
|
||||||
|
If oFileInfo.Exists Then
|
||||||
|
oTemplate.LastModified = oFileInfo.LastWriteTime
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
Logger.Error(ex)
|
||||||
|
End Try
|
||||||
|
|
||||||
oBindingSource.Add(oTemplate)
|
oBindingSource.Add(oTemplate)
|
||||||
Next
|
Next
|
||||||
Return oBindingSource
|
Return oBindingSource
|
||||||
@ -287,4 +300,8 @@ Public Class frmMain
|
|||||||
RibbonPageGroupStart.Enabled = True
|
RibbonPageGroupStart.Enabled = True
|
||||||
SplashScreenManager.CloseWaitForm()
|
SplashScreenManager.CloseWaitForm()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub RibbonControl1_Click(sender As Object, e As EventArgs) Handles RibbonControl1.Click
|
||||||
|
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
Loading…
x
Reference in New Issue
Block a user