MS Json
This commit is contained in:
parent
03f9c33a49
commit
f656df112a
@ -58,6 +58,9 @@
|
||||
<HintPath>..\..\..\Bibliotheken\DLL\windreamDLL\64bit\Interop.WINDREAMLib.dll</HintPath>
|
||||
<EmbedInteropTypes>False</EmbedInteropTypes>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Oracle.ManagedDataAccess">
|
||||
<HintPath>P:\Visual Studio Projekte\Bibliotheken\Oracle.ManagedDataAccess.dll</HintPath>
|
||||
</Reference>
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="EntityFramework" version="6.1.1" targetFramework="net451" />
|
||||
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net451" />
|
||||
<package id="System.Data.SQLite" version="1.0.94.1" targetFramework="net451" />
|
||||
<package id="System.Data.SQLite.Core" version="1.0.94.0" targetFramework="net451" />
|
||||
<package id="System.Data.SQLite.EF6" version="1.0.94.0" targetFramework="net451" />
|
||||
|
||||
39
app/ResultHandler_Konfig/MyDataset.Designer.vb
generated
39
app/ResultHandler_Konfig/MyDataset.Designer.vb
generated
@ -869,6 +869,8 @@ Partial Public Class MyDataset
|
||||
|
||||
Private columnGEAENDERTWANN As Global.System.Data.DataColumn
|
||||
|
||||
Private Shared columnLetzter_Durchlauf_defaultValue As Date = Date.Parse("1900-01-01T00:00:00")
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Sub New()
|
||||
@ -1147,8 +1149,9 @@ Partial Public Class MyDataset
|
||||
Me.columnDay.AllowDBNull = false
|
||||
Me.columnDay.MaxLength = 100
|
||||
Me.columnRun.AllowDBNull = false
|
||||
Me.columnRun.DefaultValue = CType("",String)
|
||||
Me.columnRun.MaxLength = 100
|
||||
Me.columnLetzter_Durchlauf.AllowDBNull = false
|
||||
Me.columnLetzter_Durchlauf.DefaultValue = CType(TBWMRH_PROFILDataTable.columnLetzter_Durchlauf_defaultValue,Date)
|
||||
Me.columnRunning.AllowDBNull = false
|
||||
Me.columnRunning.DefaultValue = CType(false,Boolean)
|
||||
Me.columnReihenfolge.AllowDBNull = false
|
||||
@ -2684,7 +2687,11 @@ Partial Public Class MyDataset
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Property Letzter_Durchlauf() As Date
|
||||
Get
|
||||
Return CType(Me(Me.tableTBWMRH_PROFIL.Letzter_DurchlaufColumn),Date)
|
||||
Try
|
||||
Return CType(Me(Me.tableTBWMRH_PROFIL.Letzter_DurchlaufColumn),Date)
|
||||
Catch e As Global.System.InvalidCastException
|
||||
Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte Letzter_Durchlauf in Tabelle TBWMRH_PROFIL ist DBNull.", e)
|
||||
End Try
|
||||
End Get
|
||||
Set
|
||||
Me(Me.tableTBWMRH_PROFIL.Letzter_DurchlaufColumn) = value
|
||||
@ -2785,6 +2792,18 @@ Partial Public Class MyDataset
|
||||
Me(Me.tableTBWMRH_PROFIL.AktivColumn) = Global.System.Convert.DBNull
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Function IsLetzter_DurchlaufNull() As Boolean
|
||||
Return Me.IsNull(Me.tableTBWMRH_PROFIL.Letzter_DurchlaufColumn)
|
||||
End Function
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Sub SetLetzter_DurchlaufNull()
|
||||
Me(Me.tableTBWMRH_PROFIL.Letzter_DurchlaufColumn) = Global.System.Convert.DBNull
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
|
||||
Public Function IsERSTELLTWERNull() As Boolean
|
||||
@ -4385,7 +4404,7 @@ Namespace MyDatasetTableAdapters
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
|
||||
Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
|
||||
Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
|
||||
Public Overloads Overridable Function Insert(ByVal Profilname As String, ByVal Aktiv As Global.System.Nullable(Of Boolean), ByVal Objekttyp As String, ByVal WindreamSuche As String, ByVal Day As String, ByVal Run As String, ByVal Letzter_Durchlauf As Date, ByVal Running As Boolean, ByVal Reihenfolge As Integer, ByVal ERSTELLTWER As String) As Integer
|
||||
Public Overloads Overridable Function Insert(ByVal Profilname As String, ByVal Aktiv As Global.System.Nullable(Of Boolean), ByVal Objekttyp As String, ByVal WindreamSuche As String, ByVal Day As String, ByVal Run As String, ByVal Letzter_Durchlauf As Global.System.Nullable(Of Date), ByVal Running As Boolean, ByVal Reihenfolge As Integer, ByVal ERSTELLTWER As String) As Integer
|
||||
If (Profilname Is Nothing) Then
|
||||
Throw New Global.System.ArgumentNullException("Profilname")
|
||||
Else
|
||||
@ -4416,7 +4435,11 @@ Namespace MyDatasetTableAdapters
|
||||
Else
|
||||
Me.Adapter.InsertCommand.Parameters(5).Value = CType(Run,String)
|
||||
End If
|
||||
Me.Adapter.InsertCommand.Parameters(6).Value = CType(Letzter_Durchlauf,Date)
|
||||
If (Letzter_Durchlauf.HasValue = true) Then
|
||||
Me.Adapter.InsertCommand.Parameters(6).Value = CType(Letzter_Durchlauf.Value,Date)
|
||||
Else
|
||||
Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value
|
||||
End If
|
||||
Me.Adapter.InsertCommand.Parameters(7).Value = CType(Running,Boolean)
|
||||
Me.Adapter.InsertCommand.Parameters(8).Value = CType(Reihenfolge,Integer)
|
||||
If (ERSTELLTWER Is Nothing) Then
|
||||
@ -4443,7 +4466,7 @@ Namespace MyDatasetTableAdapters
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
|
||||
Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
|
||||
Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
|
||||
Public Overloads Overridable Function Update(ByVal Profilname As String, ByVal Aktiv As Global.System.Nullable(Of Boolean), ByVal Objekttyp As String, ByVal WindreamSuche As String, ByVal Day As String, ByVal Run As String, ByVal Letzter_Durchlauf As Date, ByVal Running As Boolean, ByVal Reihenfolge As Integer, ByVal GEAENDERTWER As String, ByVal Original_GUID As Integer, ByVal GUID As Integer) As Integer
|
||||
Public Overloads Overridable Function Update(ByVal Profilname As String, ByVal Aktiv As Global.System.Nullable(Of Boolean), ByVal Objekttyp As String, ByVal WindreamSuche As String, ByVal Day As String, ByVal Run As String, ByVal Letzter_Durchlauf As Global.System.Nullable(Of Date), ByVal Running As Boolean, ByVal Reihenfolge As Integer, ByVal GEAENDERTWER As String, ByVal Original_GUID As Integer, ByVal GUID As Integer) As Integer
|
||||
If (Profilname Is Nothing) Then
|
||||
Throw New Global.System.ArgumentNullException("Profilname")
|
||||
Else
|
||||
@ -4474,7 +4497,11 @@ Namespace MyDatasetTableAdapters
|
||||
Else
|
||||
Me.Adapter.UpdateCommand.Parameters(5).Value = CType(Run,String)
|
||||
End If
|
||||
Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Letzter_Durchlauf,Date)
|
||||
If (Letzter_Durchlauf.HasValue = true) Then
|
||||
Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Letzter_Durchlauf.Value,Date)
|
||||
Else
|
||||
Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value
|
||||
End If
|
||||
Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Running,Boolean)
|
||||
Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Reihenfolge,Integer)
|
||||
If (GEAENDERTWER Is Nothing) Then
|
||||
|
||||
@ -87,7 +87,7 @@ SELECT GUID, Profilname, Aktiv, Objekttyp, WindreamSuche, Day, Run, Letzter_Durc
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="WindreamSuche" ColumnName="WindreamSuche" DataSourceName="DD_ECM_RENOLIT.dbo.TBWMRH_PROFIL" DataTypeServer="varchar(100)" DbType="AnsiString" Direction="Input" ParameterName="@WindreamSuche" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="WindreamSuche" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="Day" ColumnName="Day" DataSourceName="DD_ECM_RENOLIT.dbo.TBWMRH_PROFIL" DataTypeServer="varchar(100)" DbType="AnsiString" Direction="Input" ParameterName="@Day" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="Day" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="Run" ColumnName="Run" DataSourceName="DD_ECM_RENOLIT.dbo.TBWMRH_PROFIL" DataTypeServer="varchar(100)" DbType="AnsiString" Direction="Input" ParameterName="@Run" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="Run" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="Letzter_Durchlauf" ColumnName="Letzter_Durchlauf" DataSourceName="DD_ECM_RENOLIT.dbo.TBWMRH_PROFIL" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@Letzter_Durchlauf" Precision="0" ProviderType="DateTime" Scale="0" Size="8" SourceColumn="Letzter_Durchlauf" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="Letzter_Durchlauf" ColumnName="Letzter_Durchlauf" DataSourceName="DD_ECM_RENOLIT.dbo.TBWMRH_PROFIL" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@Letzter_Durchlauf" Precision="0" ProviderType="DateTime" Scale="0" Size="8" SourceColumn="Letzter_Durchlauf" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="Running" ColumnName="Running" DataSourceName="DD_ECM_RENOLIT.dbo.TBWMRH_PROFIL" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@Running" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="Running" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="Reihenfolge" ColumnName="Reihenfolge" DataSourceName="DD_ECM_RENOLIT.dbo.TBWMRH_PROFIL" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Reihenfolge" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Reihenfolge" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="ERSTELLTWER" ColumnName="ERSTELLTWER" DataSourceName="DD_ECM_RENOLIT.dbo.TBWMRH_PROFIL" DataTypeServer="varchar(50)" DbType="AnsiString" Direction="Input" ParameterName="@ERSTELLTWER" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="ERSTELLTWER" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
@ -115,7 +115,7 @@ SELECT GUID, Profilname, Aktiv, Objekttyp, WindreamSuche, Day, Run, Letzter_Durc
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="WindreamSuche" ColumnName="WindreamSuche" DataSourceName="DD_ECM_RENOLIT.dbo.TBWMRH_PROFIL" DataTypeServer="varchar(100)" DbType="AnsiString" Direction="Input" ParameterName="@WindreamSuche" Precision="0" ProviderType="VarChar" Scale="0" Size="500" SourceColumn="WindreamSuche" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="Day" ColumnName="Day" DataSourceName="DD_ECM_RENOLIT.dbo.TBWMRH_PROFIL" DataTypeServer="varchar(100)" DbType="AnsiString" Direction="Input" ParameterName="@Day" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="Day" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="Run" ColumnName="Run" DataSourceName="DD_ECM_RENOLIT.dbo.TBWMRH_PROFIL" DataTypeServer="varchar(100)" DbType="AnsiString" Direction="Input" ParameterName="@Run" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="Run" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="Letzter_Durchlauf" ColumnName="Letzter_Durchlauf" DataSourceName="DD_ECM_RENOLIT.dbo.TBWMRH_PROFIL" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@Letzter_Durchlauf" Precision="0" ProviderType="DateTime" Scale="0" Size="8" SourceColumn="Letzter_Durchlauf" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="Letzter_Durchlauf" ColumnName="Letzter_Durchlauf" DataSourceName="DD_ECM_RENOLIT.dbo.TBWMRH_PROFIL" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@Letzter_Durchlauf" Precision="0" ProviderType="DateTime" Scale="0" Size="8" SourceColumn="Letzter_Durchlauf" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="Running" ColumnName="Running" DataSourceName="DD_ECM_RENOLIT.dbo.TBWMRH_PROFIL" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@Running" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="Running" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="false" AutogeneratedName="Reihenfolge" ColumnName="Reihenfolge" DataSourceName="DD_ECM_RENOLIT.dbo.TBWMRH_PROFIL" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Reihenfolge" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Reihenfolge" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="GEAENDERTWER" ColumnName="GEAENDERTWER" DataSourceName="DD_ECM_RENOLIT.dbo.TBWMRH_PROFIL" DataTypeServer="varchar(50)" DbType="AnsiString" Direction="Input" ParameterName="@GEAENDERTWER" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="GEAENDERTWER" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
@ -493,14 +493,14 @@ WHERE PROFIL_ID = @PID</CommandText>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="Run" msprop:Generator_ColumnVarNameInTable="columnRun" msprop:Generator_ColumnPropNameInRow="Run" msprop:Generator_ColumnPropNameInTable="RunColumn" msprop:Generator_UserColumnName="Run">
|
||||
<xs:element name="Run" msprop:Generator_ColumnVarNameInTable="columnRun" msprop:Generator_ColumnPropNameInRow="Run" msprop:Generator_ColumnPropNameInTable="RunColumn" msprop:Generator_UserColumnName="Run" default="">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="100" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="Letzter_Durchlauf" msprop:Generator_ColumnVarNameInTable="columnLetzter_Durchlauf" msprop:Generator_ColumnPropNameInRow="Letzter_Durchlauf" msprop:Generator_ColumnPropNameInTable="Letzter_DurchlaufColumn" msprop:Generator_UserColumnName="Letzter_Durchlauf" type="xs:dateTime" />
|
||||
<xs:element name="Letzter_Durchlauf" msprop:Generator_ColumnVarNameInTable="columnLetzter_Durchlauf" msprop:Generator_ColumnPropNameInRow="Letzter_Durchlauf" msprop:Generator_ColumnPropNameInTable="Letzter_DurchlaufColumn" msprop:Generator_UserColumnName="Letzter_Durchlauf" type="xs:dateTime" default="1900-01-01T00:00:00+01:00" minOccurs="0" />
|
||||
<xs:element name="Running" msprop:Generator_ColumnVarNameInTable="columnRunning" msprop:Generator_ColumnPropNameInRow="Running" msprop:Generator_ColumnPropNameInTable="RunningColumn" msprop:Generator_UserColumnName="Running" type="xs:boolean" default="false" />
|
||||
<xs:element name="Reihenfolge" msprop:Generator_ColumnVarNameInTable="columnReihenfolge" msprop:Generator_ColumnPropNameInRow="Reihenfolge" msprop:Generator_ColumnPropNameInTable="ReihenfolgeColumn" msprop:Generator_UserColumnName="Reihenfolge" type="xs:int" default="1" />
|
||||
<xs:element name="ERSTELLTWER" msprop:Generator_ColumnVarNameInTable="columnERSTELLTWER" msprop:Generator_ColumnPropNameInRow="ERSTELLTWER" msprop:Generator_ColumnPropNameInTable="ERSTELLTWERColumn" msprop:Generator_UserColumnName="ERSTELLTWER" minOccurs="0">
|
||||
|
||||
@ -76,6 +76,9 @@
|
||||
<HintPath>P:\Visual Studio Projekte\Bibliotheken\windream\Interop.WMOTOOLLib.dll</HintPath>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Oracle.ManagedDataAccess">
|
||||
<HintPath>P:\Visual Studio Projekte\Bibliotheken\Oracle.ManagedDataAccess.dll</HintPath>
|
||||
</Reference>
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
Imports WINDREAMLib
|
||||
Imports System.IO
|
||||
Imports System.Text
|
||||
Imports Newtonsoft.Json
|
||||
|
||||
Public Class clsProfil
|
||||
|
||||
#Region "***** Variablen *****"
|
||||
@ -53,82 +56,103 @@ Public Class clsProfil
|
||||
Dim _error As Boolean = False
|
||||
'Try
|
||||
Dim Run_Profile As Boolean = False
|
||||
'Soll die Verarbeitung heute durchgeführt werden??
|
||||
Dim Dayofweek As Integer = My.Computer.Clock.LocalTime.DayOfWeek
|
||||
If _profDay.Substring(Dayofweek - 1, 1) = 1 Then
|
||||
'Verarbeitung soll heute durchgeführt werden
|
||||
clsLogger.AddDetailLog("Verarbeitung soll heute durchgeführt werden!")
|
||||
clsLogger.AddDetailLog("_RunType: " & _profRunType)
|
||||
Dim arr As String()
|
||||
arr = _profRunType.Split(";")
|
||||
clsLogger.AddDetailLog("arr(1): " & arr(1).ToString)
|
||||
Select Case arr(0)
|
||||
Case "TIME"
|
||||
' Dim intervall As Integer = clsSQLITE.konf_intervall / 60
|
||||
clsLogger.AddDetailLog("Intervall: 1 Minute")
|
||||
Dim Time_next As DateTime = _proflastRun.AddMinutes(1)
|
||||
Dim _RunTime As Date = CDate(arr(1))
|
||||
clsLogger.AddDetailLog("ProfilTime: " & _RunTime)
|
||||
clsLogger.AddDetailLog("_RunTime.ToShortTimeString: " & _RunTime.ToShortTimeString & " # " & "Now.ToShortTimeString: " & Now.ToShortTimeString)
|
||||
If Time_next.ToString.StartsWith("11.11.1911") Then
|
||||
clsLogger.AddDetailLog("Manueller Durchlauf des Profils - 11.11.1911")
|
||||
Run_Profile = True
|
||||
Else
|
||||
'Ist die Uhrzeit in der Range
|
||||
If _RunTime.ToShortTimeString = Now.ToShortTimeString Then
|
||||
Run_Profile = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Case "INTV"
|
||||
'Die Differenz berechnen
|
||||
Dim DiffMin As Integer = DateDiff(DateInterval.Minute, _proflastRun, Date.Now)
|
||||
Dim msg As String
|
||||
msg = "Minutenangaben: " & vbNewLine
|
||||
msg = msg & "DiffMin: " & DiffMin & vbNewLine
|
||||
msg = msg & "Intervall: " & arr(1)
|
||||
clsLogger.AddDetailLog(msg)
|
||||
If DiffMin >= CInt(arr(1)) Then
|
||||
'Den Durchlauf erlauben
|
||||
Run_Profile = True
|
||||
End If
|
||||
Case Else
|
||||
clsLogger.Add(">> _profRunType konnte nicht ausgewertet werden - " & arr(0), False)
|
||||
End Select
|
||||
If Run_Profile = True Then
|
||||
clsLogger.Add(">> Start des Durchlaufes für Profil '" & _Profilname & "'", False)
|
||||
'den Durchlaufszeitpunkt speichern
|
||||
clsDatatabase.Execute_non_Query("Update TBWMRH_PROFIL SET Running = 1 WHERE GUID = " & _profGUID)
|
||||
clsLogger.AddDetailLog("Prüfen der windream-Suche.......")
|
||||
If File.Exists(_profwdSuche) = False Then
|
||||
clsLogger.Add("Die Windream-Suche '" & _profwdSuche & "' existiert nicht!", True, "clsProfil.Profil_Durchlauf")
|
||||
'wenn die gesuchte File eine Suche ist: per MAil informierne und Indexierung abbrechen
|
||||
clsDatatabase.Execute_non_Query("Update TBWMRH_PROFIL SET Running = 0 WHERE GUID = " & _profGUID)
|
||||
clsLogger.WriteLog()
|
||||
Return False
|
||||
'Soll die Verarbeitung heute durchgeführt werden??
|
||||
Dim Dayofweek As Integer = My.Computer.Clock.LocalTime.DayOfWeek
|
||||
If _profDay.Substring(Dayofweek - 1, 1) = 1 Then
|
||||
'Verarbeitung soll heute durchgeführt werden
|
||||
clsLogger.AddDetailLog("Verarbeitung soll heute durchgeführt werden!")
|
||||
clsLogger.AddDetailLog("_RunType: " & _profRunType)
|
||||
Dim arr As String()
|
||||
arr = _profRunType.Split(";")
|
||||
clsLogger.AddDetailLog("arr(1): " & arr(1).ToString)
|
||||
Select Case arr(0)
|
||||
Case "TIME"
|
||||
' Dim intervall As Integer = clsSQLITE.konf_intervall / 60
|
||||
clsLogger.AddDetailLog("Intervall: 1 Minute")
|
||||
Dim Time_next As DateTime = _proflastRun.AddMinutes(1)
|
||||
Dim _RunTime As Date = CDate(arr(1))
|
||||
clsLogger.AddDetailLog("ProfilTime: " & _RunTime)
|
||||
clsLogger.AddDetailLog("_RunTime.ToShortTimeString: " & _RunTime.ToShortTimeString & " # " & "Now.ToShortTimeString: " & Now.ToShortTimeString)
|
||||
If Time_next.ToString.StartsWith("11.11.1911") Then
|
||||
clsLogger.AddDetailLog("Manueller Durchlauf des Profils - 11.11.1911")
|
||||
Run_Profile = True
|
||||
Else
|
||||
' windream-Suche für Profil starten
|
||||
clsLogger.AddDetailLog("GetSearchDocuments für Suche '" & _profwdSuche & "' starten: ")
|
||||
Dim windreamSucheErgebnisse As WMObjects = clsWindream_allgemein.GetSearchDocuments(_profwdSuche)
|
||||
'Ist die Uhrzeit in der Range
|
||||
If _RunTime.ToShortTimeString = Now.ToShortTimeString Then
|
||||
Run_Profile = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Case "INTV"
|
||||
'Die Differenz berechnen
|
||||
Dim DiffMin As Integer = DateDiff(DateInterval.Minute, _proflastRun, Date.Now)
|
||||
Dim msg As String
|
||||
msg = "Minutenangaben: " & vbNewLine
|
||||
msg = msg & "DiffMin: " & DiffMin & vbNewLine
|
||||
msg = msg & "Intervall: " & arr(1)
|
||||
clsLogger.AddDetailLog(msg)
|
||||
If DiffMin >= CInt(arr(1)) Then
|
||||
'Den Durchlauf erlauben
|
||||
Run_Profile = True
|
||||
End If
|
||||
Case Else
|
||||
clsLogger.Add(">> _profRunType konnte nicht ausgewertet werden - " & arr(0), False)
|
||||
End Select
|
||||
If Run_Profile = True Then
|
||||
clsLogger.Add(">> Start des Durchlaufes für Profil '" & _Profilname & "'", False)
|
||||
'den Durchlaufszeitpunkt speichern
|
||||
clsDatatabase.Execute_non_Query("Update TBWMRH_PROFIL SET Running = 1 WHERE GUID = " & _profGUID)
|
||||
clsLogger.AddDetailLog("Prüfen der windream-Suche.......")
|
||||
If File.Exists(_profwdSuche) = False Then
|
||||
clsLogger.Add("Die Windream-Suche '" & _profwdSuche & "' existiert nicht!", True, "clsProfil.Profil_Durchlauf")
|
||||
'wenn die gesuchte File eine Suche ist: per MAil informierne und Indexierung abbrechen
|
||||
clsDatatabase.Execute_non_Query("Update TBWMRH_PROFIL SET Running = 0 WHERE GUID = " & _profGUID)
|
||||
clsLogger.WriteLog()
|
||||
Return False
|
||||
Else
|
||||
' windream-Suche für Profil starten
|
||||
clsLogger.AddDetailLog("GetSearchDocuments für Suche '" & _profwdSuche & "' starten: ")
|
||||
Dim windreamSucheErgebnisse As WMObjects = clsWindream_allgemein.GetSearchDocuments(_profwdSuche)
|
||||
If windreamSucheErgebnisse Is Nothing Then
|
||||
clsLogger.Add("windreamSucheErgebnisse is nothing!", True, "clsProfil.Profil_Durchlauf")
|
||||
clsLogger.WriteLog()
|
||||
Return False
|
||||
End If
|
||||
If windreamSucheErgebnisse.Count > 0 Then
|
||||
clsLogger.Add("- Insgesamt sollen '" & windreamSucheErgebnisse.Count & "' Dateien bearbeitet werden", False)
|
||||
clsLogger.AddDetailLog("SELECT * FROM TBWMRH_PROFIL_JOB WHERE AKTIV = 1 AND PROFIL_ID = " & _profGUID & " ORDER BY REIHENFOLGE")
|
||||
Dim DT_PROFIL_JOB As DataTable = clsDatatabase.Return_Datatable("SELECT * FROM TBWMRH_PROFIL_JOB WHERE AKTIV = 1 AND PROFIL_ID = " & _profGUID & " ORDER BY REIHENFOLGE")
|
||||
Dim DT_PROFIL_FILE_JOB As DataTable = clsDatatabase.Return_Datatable("SELECT * FROM TBWMRH_PROFIL_FILE_JOB WHERE AKTIV = 1 AND PROFIL_ID = " & _profGUID & " ORDER BY REIHENFOLGE")
|
||||
clsLogger.AddDetailLog("DT_PROFIL_JOB und DT_PROFIL_FILE_JOB generiert ")
|
||||
If DT_PROFIL_JOB.Rows.Count > 0 Then
|
||||
clsLogger.AddDetailLog("DT_PROFIL_JOB.Rows.Count > 0")
|
||||
If clsDateiverarbeitung.InitProfilData = True Then
|
||||
clsLogger.Add("- Insgesamt sollen '" & windreamSucheErgebnisse.Count & "' Dateien bearbeitet werden", False)
|
||||
clsLogger.AddDetailLog("SELECT * FROM TBWMRH_PROFIL_JOB WHERE AKTIV = 1 AND PROFIL_ID = " & _profGUID & " ORDER BY REIHENFOLGE")
|
||||
Dim DT_PROFIL_JOB As DataTable = clsDatatabase.Return_Datatable("SELECT * FROM TBWMRH_PROFIL_JOB WHERE AKTIV = 1 AND PROFIL_ID = " & _profGUID & " ORDER BY REIHENFOLGE")
|
||||
Dim DT_PROFIL_FILE_JOB As DataTable = clsDatatabase.Return_Datatable("SELECT * FROM TBWMRH_PROFIL_FILE_JOB WHERE AKTIV = 1 AND PROFIL_ID = " & _profGUID & " ORDER BY REIHENFOLGE")
|
||||
clsLogger.AddDetailLog("DT_PROFIL_JOB und DT_PROFIL_FILE_JOB generiert ")
|
||||
If DT_PROFIL_JOB.Rows.Count > 0 Then
|
||||
clsLogger.AddDetailLog("DT_PROFIL_JOB.Rows.Count > 0")
|
||||
If clsDateiverarbeitung.InitProfilData = True Then
|
||||
clsLogger.AddDetailLog("clsDateiverarbeitung.InitProfilData = True")
|
||||
For Each DR_PR_JB As DataRow In DT_PROFIL_JOB.Rows
|
||||
Dim result = DR_PR_JB.Item("JOB_TYP").ToString.ToUpper
|
||||
Select Case DR_PR_JB.Item("JOB_TYP").ToString.ToUpper
|
||||
Case "BNS json Download".ToLower
|
||||
Case "BNS json Download".ToUpper
|
||||
'ARRAY oder Äqivalent bilden
|
||||
Dim sb As New StringBuilder()
|
||||
Dim sw As New StringWriter(sb)
|
||||
Using writer As JsonWriter = New JsonTextWriter(sw)
|
||||
writer.Formatting = Formatting.Indented
|
||||
|
||||
writer.WriteStartObject()
|
||||
writer.WritePropertyName("CPU")
|
||||
writer.WriteValue("Intel")
|
||||
writer.WritePropertyName("PSU")
|
||||
writer.WriteValue("500W")
|
||||
writer.WritePropertyName("Drives")
|
||||
writer.WriteStartArray()
|
||||
writer.WriteValue("DVD read/writer")
|
||||
writer.WriteComment("(broken)")
|
||||
writer.WriteValue("500 gigabyte hard drive")
|
||||
writer.WriteValue("200 gigabype hard drive")
|
||||
writer.WriteEnd()
|
||||
writer.WriteEndObject()
|
||||
End Using
|
||||
Console.WriteLine(sb.ToString())
|
||||
End Select
|
||||
Next
|
||||
|
||||
@ -239,7 +263,7 @@ Public Class clsProfil
|
||||
clsDatatabase.Execute_non_Query("UPDATE TBWMRH_PROFIL SET Running = 0, LETZTER_DURCHLAUF = Getdate() WHERE GUID = " & _profGUID)
|
||||
End If
|
||||
'Next
|
||||
Case "BNS json Download".ToLower
|
||||
Case "BNS json Download".ToUpper
|
||||
clsDateiverarbeitung.BNSjsonDownload(WMdok)
|
||||
|
||||
End Select
|
||||
@ -250,37 +274,37 @@ Public Class clsProfil
|
||||
Next
|
||||
For Each DR_PR_JB As DataRow In DT_PROFIL_JOB.Rows
|
||||
Select Case DR_PR_JB.Item("JOB_TYP").ToString.ToUpper
|
||||
Case "BNS json Download".ToLower
|
||||
Case "BNS json Download".ToUpper
|
||||
'ARRAY Exportieren
|
||||
Dim Export_Path = DR_PR_JB.Item("STRING1")
|
||||
|
||||
End Select
|
||||
Next
|
||||
Else
|
||||
clsLogger.Add(">> Initialisierung Profil nicht erfolgreich", True)
|
||||
clsLogger.WriteLog()
|
||||
End If
|
||||
Else
|
||||
clsLogger.Add(">> KEINE JOBS für Profil '" & _Profilname & "' angelegt!", False, "clsProfil.Profil_Durchlauf")
|
||||
clsLogger.Add(">> Initialisierung Profil nicht erfolgreich", True)
|
||||
clsLogger.WriteLog()
|
||||
End If
|
||||
Else
|
||||
' keine Dateien zum Importieren
|
||||
clsLogger.Add(">> Keine windream-Dokumente für Profil '" & _Profilname & "' vorhanden/gefunden.", False)
|
||||
clsLogger.Add("", False)
|
||||
clsLogger.Add(">> KEINE JOBS für Profil '" & _Profilname & "' angelegt!", False, "clsProfil.Profil_Durchlauf")
|
||||
clsLogger.WriteLog()
|
||||
End If
|
||||
Else
|
||||
' keine Dateien zum Importieren
|
||||
clsLogger.Add(">> Keine windream-Dokumente für Profil '" & _Profilname & "' vorhanden/gefunden.", False)
|
||||
clsLogger.Add("", False)
|
||||
clsLogger.WriteLog()
|
||||
End If
|
||||
|
||||
End If
|
||||
Else
|
||||
clsLogger.AddDetailLog("Verarbeitung für heute NICHT konfiguriert")
|
||||
clsLogger.WriteLog()
|
||||
|
||||
End If
|
||||
Else
|
||||
clsLogger.AddDetailLog("Verarbeitung für heute NICHT konfiguriert")
|
||||
clsLogger.WriteLog()
|
||||
End If
|
||||
'Abschluss des Profiles
|
||||
clsDatatabase.Execute_non_Query("UPDATE TBWMRH_PROFIL SET Running = 0, LETZTER_DURCHLAUF = GETDATE() WHERE GUID = " & _profGUID)
|
||||
clsLogger.AddDetailLog("'UPDATE TBWMRH_PROFIL SET Running = 0' ausgeführt")
|
||||
clsLogger.WriteLog()
|
||||
clsLogger.WriteLog()
|
||||
Return True
|
||||
'Catch ex As Exception
|
||||
' clsLogger.AddError("Unvorhergesehener Fehler: " & ex.Message, "clsProfil.Profil_Durchlauf")
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="EntityFramework" version="6.1.1" targetFramework="net451" />
|
||||
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net451" />
|
||||
<package id="System.Data.SQLite" version="1.0.94.1" targetFramework="net461" />
|
||||
</packages>
|
||||
20
app/packages/Newtonsoft.Json.10.0.3/LICENSE.md
vendored
Normal file
20
app/packages/Newtonsoft.Json.10.0.3/LICENSE.md
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2007 James Newton-King
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
BIN
app/packages/Newtonsoft.Json.10.0.3/Newtonsoft.Json.10.0.3.nupkg
vendored
Normal file
BIN
app/packages/Newtonsoft.Json.10.0.3/Newtonsoft.Json.10.0.3.nupkg
vendored
Normal file
Binary file not shown.
BIN
app/packages/Newtonsoft.Json.10.0.3/lib/net20/Newtonsoft.Json.dll
vendored
Normal file
BIN
app/packages/Newtonsoft.Json.10.0.3/lib/net20/Newtonsoft.Json.dll
vendored
Normal file
Binary file not shown.
9815
app/packages/Newtonsoft.Json.10.0.3/lib/net20/Newtonsoft.Json.xml
vendored
Normal file
9815
app/packages/Newtonsoft.Json.10.0.3/lib/net20/Newtonsoft.Json.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
app/packages/Newtonsoft.Json.10.0.3/lib/net35/Newtonsoft.Json.dll
vendored
Normal file
BIN
app/packages/Newtonsoft.Json.10.0.3/lib/net35/Newtonsoft.Json.dll
vendored
Normal file
Binary file not shown.
8944
app/packages/Newtonsoft.Json.10.0.3/lib/net35/Newtonsoft.Json.xml
vendored
Normal file
8944
app/packages/Newtonsoft.Json.10.0.3/lib/net35/Newtonsoft.Json.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
app/packages/Newtonsoft.Json.10.0.3/lib/net40/Newtonsoft.Json.dll
vendored
Normal file
BIN
app/packages/Newtonsoft.Json.10.0.3/lib/net40/Newtonsoft.Json.dll
vendored
Normal file
Binary file not shown.
9144
app/packages/Newtonsoft.Json.10.0.3/lib/net40/Newtonsoft.Json.xml
vendored
Normal file
9144
app/packages/Newtonsoft.Json.10.0.3/lib/net40/Newtonsoft.Json.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
app/packages/Newtonsoft.Json.10.0.3/lib/net45/Newtonsoft.Json.dll
vendored
Normal file
BIN
app/packages/Newtonsoft.Json.10.0.3/lib/net45/Newtonsoft.Json.dll
vendored
Normal file
Binary file not shown.
10760
app/packages/Newtonsoft.Json.10.0.3/lib/net45/Newtonsoft.Json.xml
vendored
Normal file
10760
app/packages/Newtonsoft.Json.10.0.3/lib/net45/Newtonsoft.Json.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
app/packages/Newtonsoft.Json.10.0.3/lib/netstandard1.0/Newtonsoft.Json.dll
vendored
Normal file
BIN
app/packages/Newtonsoft.Json.10.0.3/lib/netstandard1.0/Newtonsoft.Json.dll
vendored
Normal file
Binary file not shown.
10467
app/packages/Newtonsoft.Json.10.0.3/lib/netstandard1.0/Newtonsoft.Json.xml
vendored
Normal file
10467
app/packages/Newtonsoft.Json.10.0.3/lib/netstandard1.0/Newtonsoft.Json.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
app/packages/Newtonsoft.Json.10.0.3/lib/netstandard1.3/Newtonsoft.Json.dll
vendored
Normal file
BIN
app/packages/Newtonsoft.Json.10.0.3/lib/netstandard1.3/Newtonsoft.Json.dll
vendored
Normal file
Binary file not shown.
10559
app/packages/Newtonsoft.Json.10.0.3/lib/netstandard1.3/Newtonsoft.Json.xml
vendored
Normal file
10559
app/packages/Newtonsoft.Json.10.0.3/lib/netstandard1.3/Newtonsoft.Json.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
app/packages/Newtonsoft.Json.10.0.3/lib/portable-net40+sl5+win8+wp8+wpa81/Newtonsoft.Json.dll
vendored
Normal file
BIN
app/packages/Newtonsoft.Json.10.0.3/lib/portable-net40+sl5+win8+wp8+wpa81/Newtonsoft.Json.dll
vendored
Normal file
Binary file not shown.
8555
app/packages/Newtonsoft.Json.10.0.3/lib/portable-net40+sl5+win8+wp8+wpa81/Newtonsoft.Json.xml
vendored
Normal file
8555
app/packages/Newtonsoft.Json.10.0.3/lib/portable-net40+sl5+win8+wp8+wpa81/Newtonsoft.Json.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
app/packages/Newtonsoft.Json.10.0.3/lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.dll
vendored
Normal file
BIN
app/packages/Newtonsoft.Json.10.0.3/lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.dll
vendored
Normal file
Binary file not shown.
10467
app/packages/Newtonsoft.Json.10.0.3/lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.xml
vendored
Normal file
10467
app/packages/Newtonsoft.Json.10.0.3/lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
116
app/packages/Newtonsoft.Json.10.0.3/tools/install.ps1
vendored
Normal file
116
app/packages/Newtonsoft.Json.10.0.3/tools/install.ps1
vendored
Normal file
@ -0,0 +1,116 @@
|
||||
param($installPath, $toolsPath, $package, $project)
|
||||
|
||||
# open json.net splash page on package install
|
||||
# don't open if json.net is installed as a dependency
|
||||
|
||||
try
|
||||
{
|
||||
$url = "http://www.newtonsoft.com/json/install?version=" + $package.Version
|
||||
$dte2 = Get-Interface $dte ([EnvDTE80.DTE2])
|
||||
|
||||
if ($dte2.ActiveWindow.Caption -eq "Package Manager Console")
|
||||
{
|
||||
# user is installing from VS NuGet console
|
||||
# get reference to the window, the console host and the input history
|
||||
# show webpage if "install-package newtonsoft.json" was last input
|
||||
|
||||
$consoleWindow = $(Get-VSComponentModel).GetService([NuGetConsole.IPowerConsoleWindow])
|
||||
|
||||
$props = $consoleWindow.GetType().GetProperties([System.Reflection.BindingFlags]::Instance -bor `
|
||||
[System.Reflection.BindingFlags]::NonPublic)
|
||||
|
||||
$prop = $props | ? { $_.Name -eq "ActiveHostInfo" } | select -first 1
|
||||
if ($prop -eq $null) { return }
|
||||
|
||||
$hostInfo = $prop.GetValue($consoleWindow)
|
||||
if ($hostInfo -eq $null) { return }
|
||||
|
||||
$history = $hostInfo.WpfConsole.InputHistory.History
|
||||
|
||||
$lastCommand = $history | select -last 1
|
||||
|
||||
if ($lastCommand)
|
||||
{
|
||||
$lastCommand = $lastCommand.Trim().ToLower()
|
||||
if ($lastCommand.StartsWith("install-package") -and $lastCommand.Contains("newtonsoft.json"))
|
||||
{
|
||||
$dte2.ItemOperations.Navigate($url) | Out-Null
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
# user is installing from VS NuGet dialog
|
||||
# get reference to the window, then smart output console provider
|
||||
# show webpage if messages in buffered console contains "installing...newtonsoft.json" in last operation
|
||||
|
||||
$instanceField = [NuGet.Dialog.PackageManagerWindow].GetField("CurrentInstance", [System.Reflection.BindingFlags]::Static -bor `
|
||||
[System.Reflection.BindingFlags]::NonPublic)
|
||||
|
||||
$consoleField = [NuGet.Dialog.PackageManagerWindow].GetField("_smartOutputConsoleProvider", [System.Reflection.BindingFlags]::Instance -bor `
|
||||
[System.Reflection.BindingFlags]::NonPublic)
|
||||
|
||||
if ($instanceField -eq $null -or $consoleField -eq $null) { return }
|
||||
|
||||
$instance = $instanceField.GetValue($null)
|
||||
|
||||
if ($instance -eq $null) { return }
|
||||
|
||||
$consoleProvider = $consoleField.GetValue($instance)
|
||||
if ($consoleProvider -eq $null) { return }
|
||||
|
||||
$console = $consoleProvider.CreateOutputConsole($false)
|
||||
|
||||
$messagesField = $console.GetType().GetField("_messages", [System.Reflection.BindingFlags]::Instance -bor `
|
||||
[System.Reflection.BindingFlags]::NonPublic)
|
||||
if ($messagesField -eq $null) { return }
|
||||
|
||||
$messages = $messagesField.GetValue($console)
|
||||
if ($messages -eq $null) { return }
|
||||
|
||||
$operations = $messages -split "=============================="
|
||||
|
||||
$lastOperation = $operations | select -last 1
|
||||
|
||||
if ($lastOperation)
|
||||
{
|
||||
$lastOperation = $lastOperation.ToLower()
|
||||
|
||||
$lines = $lastOperation -split "`r`n"
|
||||
|
||||
$installMatch = $lines | ? { $_.StartsWith("------- installing...newtonsoft.json ") } | select -first 1
|
||||
|
||||
if ($installMatch)
|
||||
{
|
||||
$dte2.ItemOperations.Navigate($url) | Out-Null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
try
|
||||
{
|
||||
$pmPane = $dte2.ToolWindows.OutputWindow.OutputWindowPanes.Item("Package Manager")
|
||||
|
||||
$selection = $pmPane.TextDocument.Selection
|
||||
$selection.StartOfDocument($false)
|
||||
$selection.EndOfDocument($true)
|
||||
|
||||
if ($selection.Text.StartsWith("Attempting to gather dependencies information for package 'Newtonsoft.Json." + $package.Version + "'"))
|
||||
{
|
||||
# don't show on upgrade
|
||||
if (!$selection.Text.Contains("Removed package"))
|
||||
{
|
||||
$dte2.ItemOperations.Navigate($url) | Out-Null
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
# stop potential errors from bubbling up
|
||||
# worst case the splash page won't open
|
||||
}
|
||||
}
|
||||
|
||||
# still yolo
|
||||
Loading…
x
Reference in New Issue
Block a user