MS windreamKlasse
This commit is contained in:
parent
b6aea106ca
commit
ed6a7ea246
62
EDMI_ClientSuite/frmUserBasics.Designer.vb
generated
62
EDMI_ClientSuite/frmUserBasics.Designer.vb
generated
@ -25,15 +25,15 @@ Partial Class frmUserBasics
|
|||||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmUserBasics))
|
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmUserBasics))
|
||||||
Me.TabControl1 = New System.Windows.Forms.TabControl()
|
Me.TabControl1 = New System.Windows.Forms.TabControl()
|
||||||
Me.TabPage1 = New System.Windows.Forms.TabPage()
|
Me.TabPage1 = New System.Windows.Forms.TabPage()
|
||||||
|
Me.Label1 = New System.Windows.Forms.Label()
|
||||||
|
Me.Button3 = New System.Windows.Forms.Button()
|
||||||
|
Me.cmbLanguage = New System.Windows.Forms.ComboBox()
|
||||||
Me.Button4 = New System.Windows.Forms.Button()
|
Me.Button4 = New System.Windows.Forms.Button()
|
||||||
Me.btnApplicationFolder = New System.Windows.Forms.Button()
|
Me.btnApplicationFolder = New System.Windows.Forms.Button()
|
||||||
Me.chkLogErrorsOnly = New System.Windows.Forms.CheckBox()
|
Me.chkLogErrorsOnly = New System.Windows.Forms.CheckBox()
|
||||||
Me.LinkLabel1 = New System.Windows.Forms.LinkLabel()
|
Me.LinkLabel1 = New System.Windows.Forms.LinkLabel()
|
||||||
Me.Button1 = New System.Windows.Forms.Button()
|
Me.Button1 = New System.Windows.Forms.Button()
|
||||||
Me.TabPage2 = New System.Windows.Forms.TabPage()
|
Me.TabPage2 = New System.Windows.Forms.TabPage()
|
||||||
Me.Button3 = New System.Windows.Forms.Button()
|
|
||||||
Me.cmbLanguage = New System.Windows.Forms.ComboBox()
|
|
||||||
Me.Label1 = New System.Windows.Forms.Label()
|
|
||||||
Me.TabControl1.SuspendLayout()
|
Me.TabControl1.SuspendLayout()
|
||||||
Me.TabPage1.SuspendLayout()
|
Me.TabPage1.SuspendLayout()
|
||||||
Me.SuspendLayout()
|
Me.SuspendLayout()
|
||||||
@ -67,6 +67,34 @@ Partial Class frmUserBasics
|
|||||||
Me.TabPage1.Text = "Logging und Support"
|
Me.TabPage1.Text = "Logging und Support"
|
||||||
Me.TabPage1.UseVisualStyleBackColor = True
|
Me.TabPage1.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
|
'Label1
|
||||||
|
'
|
||||||
|
Me.Label1.AutoSize = True
|
||||||
|
Me.Label1.Location = New System.Drawing.Point(5, 125)
|
||||||
|
Me.Label1.Name = "Label1"
|
||||||
|
Me.Label1.Size = New System.Drawing.Size(91, 13)
|
||||||
|
Me.Label1.TabIndex = 50
|
||||||
|
Me.Label1.Text = "Aktuelle Sprache:"
|
||||||
|
'
|
||||||
|
'Button3
|
||||||
|
'
|
||||||
|
Me.Button3.ImeMode = System.Windows.Forms.ImeMode.NoControl
|
||||||
|
Me.Button3.Location = New System.Drawing.Point(148, 139)
|
||||||
|
Me.Button3.Name = "Button3"
|
||||||
|
Me.Button3.Size = New System.Drawing.Size(134, 23)
|
||||||
|
Me.Button3.TabIndex = 49
|
||||||
|
Me.Button3.Text = "Sprache jetzt wechseln"
|
||||||
|
Me.Button3.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'cmbLanguage
|
||||||
|
'
|
||||||
|
Me.cmbLanguage.FormattingEnabled = True
|
||||||
|
Me.cmbLanguage.Items.AddRange(New Object() {"de-DE", "en-US"})
|
||||||
|
Me.cmbLanguage.Location = New System.Drawing.Point(8, 141)
|
||||||
|
Me.cmbLanguage.Name = "cmbLanguage"
|
||||||
|
Me.cmbLanguage.Size = New System.Drawing.Size(134, 21)
|
||||||
|
Me.cmbLanguage.TabIndex = 48
|
||||||
|
'
|
||||||
'Button4
|
'Button4
|
||||||
'
|
'
|
||||||
Me.Button4.Image = Global.EDMI_ClientSuite.My.Resources.Resources.email_go
|
Me.Button4.Image = Global.EDMI_ClientSuite.My.Resources.Resources.email_go
|
||||||
@ -139,34 +167,6 @@ Partial Class frmUserBasics
|
|||||||
Me.TabPage2.Text = "TabPage2"
|
Me.TabPage2.Text = "TabPage2"
|
||||||
Me.TabPage2.UseVisualStyleBackColor = True
|
Me.TabPage2.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
'Button3
|
|
||||||
'
|
|
||||||
Me.Button3.ImeMode = System.Windows.Forms.ImeMode.NoControl
|
|
||||||
Me.Button3.Location = New System.Drawing.Point(148, 139)
|
|
||||||
Me.Button3.Name = "Button3"
|
|
||||||
Me.Button3.Size = New System.Drawing.Size(134, 23)
|
|
||||||
Me.Button3.TabIndex = 49
|
|
||||||
Me.Button3.Text = "Sprache jetzt wechseln"
|
|
||||||
Me.Button3.UseVisualStyleBackColor = True
|
|
||||||
'
|
|
||||||
'cmbLanguage
|
|
||||||
'
|
|
||||||
Me.cmbLanguage.FormattingEnabled = True
|
|
||||||
Me.cmbLanguage.Items.AddRange(New Object() {"de-DE", "en-US"})
|
|
||||||
Me.cmbLanguage.Location = New System.Drawing.Point(8, 141)
|
|
||||||
Me.cmbLanguage.Name = "cmbLanguage"
|
|
||||||
Me.cmbLanguage.Size = New System.Drawing.Size(134, 21)
|
|
||||||
Me.cmbLanguage.TabIndex = 48
|
|
||||||
'
|
|
||||||
'Label1
|
|
||||||
'
|
|
||||||
Me.Label1.AutoSize = True
|
|
||||||
Me.Label1.Location = New System.Drawing.Point(5, 125)
|
|
||||||
Me.Label1.Name = "Label1"
|
|
||||||
Me.Label1.Size = New System.Drawing.Size(91, 13)
|
|
||||||
Me.Label1.TabIndex = 50
|
|
||||||
Me.Label1.Text = "Aktuelle Sprache:"
|
|
||||||
'
|
|
||||||
'frmUserBasics
|
'frmUserBasics
|
||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
|
|||||||
@ -24,4 +24,8 @@ Public Class frmUserBasics
|
|||||||
_MyLogger = New LogConfig(LogConfig.PathType.CustomPath, oUserAppdata)
|
_MyLogger = New LogConfig(LogConfig.PathType.CustomPath, oUserAppdata)
|
||||||
_Logger = _MyLogger.GetLogger()
|
_Logger = _MyLogger.GetLogger()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnApplicationFolder_Click(sender As Object, e As EventArgs) Handles btnApplicationFolder.Click
|
||||||
|
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
@ -379,6 +379,7 @@ Public Class Windream2
|
|||||||
|
|
||||||
Try
|
Try
|
||||||
oSession = oConnect.Login(oCredentials)
|
oSession = oConnect.Login(oCredentials)
|
||||||
|
_logger.Info("Connected..Session created")
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
_logger.Error(ex, "Error while logging in")
|
_logger.Error(ex, "Error while logging in")
|
||||||
Return Nothing
|
Return Nothing
|
||||||
@ -415,7 +416,7 @@ Public Class Windream2
|
|||||||
Dim oWMObject As WMObject
|
Dim oWMObject As WMObject
|
||||||
Try
|
Try
|
||||||
oWMObject = GetFileByPath(wmfilepath)
|
oWMObject = GetFileByPath(wmfilepath)
|
||||||
_logger.Info($"Changing the archive end-date for file ' & oWMObject.aName & ' Items: {dateFrom_value},{date_period} {date_unit} ")
|
_logger.Info($"Changing the archive end-date for file '{oWMObject.aName}', Items: {dateFrom_value},{date_period},{date_unit}")
|
||||||
Try
|
Try
|
||||||
' die Datei sperren
|
' die Datei sperren
|
||||||
oWMObject.LockFor(WMObjectEditModeLifeCycleEdit)
|
oWMObject.LockFor(WMObjectEditModeLifeCycleEdit)
|
||||||
@ -439,6 +440,7 @@ Public Class Windream2
|
|||||||
|
|
||||||
Dim oArchUntil = DateAdd(oIntervalType, date_period, dateFrom_value)
|
Dim oArchUntil = DateAdd(oIntervalType, date_period, dateFrom_value)
|
||||||
_logger.Debug("New date shall be: " & oArchUntil.ToString)
|
_logger.Debug("New date shall be: " & oArchUntil.ToString)
|
||||||
|
|
||||||
oObjectLifecycle.SetPeriodEndDate(2, oArchUntil)
|
oObjectLifecycle.SetPeriodEndDate(2, oArchUntil)
|
||||||
_logger.Info("Archive end-date has been changed!")
|
_logger.Info("Archive end-date has been changed!")
|
||||||
oWMObject.Save()
|
oWMObject.Save()
|
||||||
@ -456,6 +458,63 @@ Public Class Windream2
|
|||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
''' <summary>
|
''' <summary>
|
||||||
|
''' changes the archive end date
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="wmfilepath">WM Filepath</param>
|
||||||
|
''' <param name="date_period">number/count of period (if </param>
|
||||||
|
''' <param name="date_unit">date_unity (d,m,y or day(s),month(s),years(s)</param>
|
||||||
|
''' <param name="dateFrom_value">dateFrom_value</param>
|
||||||
|
''' <returns>Returns true when date was set, false if not</returns>
|
||||||
|
''' <remarks></remarks>
|
||||||
|
Public Function NewLifecycle_PeriodTEST(ByVal wmfilepath As String, ByVal oArchUntil As String)
|
||||||
|
Dim oWMObject As WMObject
|
||||||
|
Try
|
||||||
|
oWMObject = GetFileByPath(wmfilepath)
|
||||||
|
_logger.Info($"Changing the archive end-date for file '{oWMObject.aName}', Items: {oArchUntil}")
|
||||||
|
Try
|
||||||
|
' die Datei sperren
|
||||||
|
oWMObject.LockFor(WMObjectEditModeLifeCycleEdit)
|
||||||
|
_logger.Debug(">> object locked")
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
_logger.Error(ex)
|
||||||
|
' nichts tun (Datei ist bereits gesperrt)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Dim oObjectLifecycle = oWMObject.aWMLifeCycle
|
||||||
|
' Dim oDate = CDate(oArchUntil)
|
||||||
|
' Dim omMyFormattedDate = oDate.ToString("dd.MM.yyyy")
|
||||||
|
|
||||||
|
If oArchUntil <> String.Empty Then
|
||||||
|
If IsDate(oArchUntil) Then
|
||||||
|
If CDate(oArchUntil) < CDate(Now) Then
|
||||||
|
_logger.Debug("oArchUntil < today so direct move to archivepool")
|
||||||
|
Else
|
||||||
|
_logger.Debug("New date shall be: " & oArchUntil)
|
||||||
|
oObjectLifecycle.SetPeriodEndDate(2, oArchUntil)
|
||||||
|
_logger.Info("Archive end-date has been changed!")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
_logger.Debug("oArchUntil is empty so direct move to archivepool")
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim result = SetArchive_Active(oWMObject)
|
||||||
|
oWMObject.Save()
|
||||||
|
oWMObject.unlock()
|
||||||
|
Return result
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
_logger.Warn($"Unexpected Error in NewLifecycle_PeriodTEST {ex.Message}")
|
||||||
|
If Not IsNothing(oWMObject) Then
|
||||||
|
If oWMObject.aLocked = True Then
|
||||||
|
oWMObject.unlock()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
''' <summary>
|
||||||
''' Archives windream object immediately
|
''' Archives windream object immediately
|
||||||
''' </summary>
|
''' </summary>
|
||||||
''' <returns>Returns true when archiving was set, false if not</returns>
|
''' <returns>Returns true when archiving was set, false if not</returns>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user