Compare commits
1 Commits
develop
...
feature/tr
| Author | SHA1 | Date | |
|---|---|---|---|
| 01098484d9 |
67
bsmd.hisnord/Importer.cs
Normal file
67
bsmd.hisnord/Importer.cs
Normal file
@ -0,0 +1,67 @@
|
||||
// Copyright (c) 2014-present schick Informatik
|
||||
// Resembles "Importer.java" from ported transmitter code
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using log4net;
|
||||
|
||||
namespace bsmd.hisnord
|
||||
{
|
||||
public class Importer
|
||||
{
|
||||
private string[] curFiles = null;
|
||||
private readonly ILog _log = LogManager.GetLogger(typeof(Importer));
|
||||
|
||||
#region public methods
|
||||
|
||||
public void Execute()
|
||||
{
|
||||
_log.Info("starting transmitter");
|
||||
|
||||
try
|
||||
{
|
||||
this.curFiles = TransmitterUtils.readFiles(Properties.Settings.Default.IMPDIR);
|
||||
this.SendFiles();
|
||||
this.GetAnswers();
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
_log.ErrorFormat("transmitter failure: {0}", ex.ToString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region private methods
|
||||
|
||||
private void GetAnswers()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
private void SendFiles()
|
||||
{
|
||||
foreach(string file in curFiles)
|
||||
{
|
||||
if(File.Exists(file)) // this is probably nonsense
|
||||
{
|
||||
new Thread(() => SendFile(file)) { IsBackground = true }.Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SendFile(string file)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
146
bsmd.hisnord/Properties/Settings.Designer.cs
generated
146
bsmd.hisnord/Properties/Settings.Designer.cs
generated
@ -12,7 +12,7 @@ namespace bsmd.hisnord.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
|
||||
public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
@ -118,5 +118,149 @@ namespace bsmd.hisnord.Properties {
|
||||
this["TransmitterRoot"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string SERVER {
|
||||
get {
|
||||
return ((string)(this["SERVER"]));
|
||||
}
|
||||
set {
|
||||
this["SERVER"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("5555")]
|
||||
public uint PORT {
|
||||
get {
|
||||
return ((uint)(this["PORT"]));
|
||||
}
|
||||
set {
|
||||
this["PORT"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("500")]
|
||||
public uint PACKETSIZE {
|
||||
get {
|
||||
return ((uint)(this["PACKETSIZE"]));
|
||||
}
|
||||
set {
|
||||
this["PACKETSIZE"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string KEYSTORE {
|
||||
get {
|
||||
return ((string)(this["KEYSTORE"]));
|
||||
}
|
||||
set {
|
||||
this["KEYSTORE"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string STOREPASS {
|
||||
get {
|
||||
return ((string)(this["STOREPASS"]));
|
||||
}
|
||||
set {
|
||||
this["STOREPASS"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string CERTPASS {
|
||||
get {
|
||||
return ((string)(this["CERTPASS"]));
|
||||
}
|
||||
set {
|
||||
this["CERTPASS"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string IMPDIR {
|
||||
get {
|
||||
return ((string)(this["IMPDIR"]));
|
||||
}
|
||||
set {
|
||||
this["IMPDIR"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string EXDIR {
|
||||
get {
|
||||
return ((string)(this["EXDIR"]));
|
||||
}
|
||||
set {
|
||||
this["EXDIR"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string CORDIR {
|
||||
get {
|
||||
return ((string)(this["CORDIR"]));
|
||||
}
|
||||
set {
|
||||
this["CORDIR"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string VERSION {
|
||||
get {
|
||||
return ((string)(this["VERSION"]));
|
||||
}
|
||||
set {
|
||||
this["VERSION"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string XMLRESULTDIR {
|
||||
get {
|
||||
return ((string)(this["XMLRESULTDIR"]));
|
||||
}
|
||||
set {
|
||||
this["XMLRESULTDIR"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("10")]
|
||||
public uint INTERVAL {
|
||||
get {
|
||||
return ((uint)(this["INTERVAL"]));
|
||||
}
|
||||
set {
|
||||
this["INTERVAL"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -26,5 +26,41 @@
|
||||
<Setting Name="TransmitterRoot" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">E:\svnlager\BSMD\nsw\HIS-NORD\</Value>
|
||||
</Setting>
|
||||
<Setting Name="SERVER" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="PORT" Type="System.UInt32" Scope="User">
|
||||
<Value Profile="(Default)">5555</Value>
|
||||
</Setting>
|
||||
<Setting Name="PACKETSIZE" Type="System.UInt32" Scope="User">
|
||||
<Value Profile="(Default)">500</Value>
|
||||
</Setting>
|
||||
<Setting Name="KEYSTORE" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="STOREPASS" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="CERTPASS" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="IMPDIR" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="EXDIR" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="CORDIR" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="VERSION" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="XMLRESULTDIR" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="INTERVAL" Type="System.UInt32" Scope="User">
|
||||
<Value Profile="(Default)">10</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
32
bsmd.hisnord/TransmitterUtils.cs
Normal file
32
bsmd.hisnord/TransmitterUtils.cs
Normal file
@ -0,0 +1,32 @@
|
||||
// Copyright (c) 2014-present schick Informatik
|
||||
// This file is one of the direct ports of the "Transmitter Tool" files, namely the "TransferLib.java"
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace bsmd.hisnord
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public sealed class TransmitterUtils
|
||||
{
|
||||
public static string[] readFiles(string directoryPath)
|
||||
{
|
||||
if((directoryPath != null) && Directory.Exists(directoryPath))
|
||||
{
|
||||
return Directory.GetFiles(directoryPath, "*.xml");
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -31,6 +31,42 @@
|
||||
<setting name="TransmitterRoot" serializeAs="String">
|
||||
<value>E:\svnlager\BSMD\nsw\HIS-NORD\</value>
|
||||
</setting>
|
||||
<setting name="SERVER" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="PORT" serializeAs="String">
|
||||
<value>5555</value>
|
||||
</setting>
|
||||
<setting name="PACKETSIZE" serializeAs="String">
|
||||
<value>500</value>
|
||||
</setting>
|
||||
<setting name="KEYSTORE" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="STOREPASS" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="CERTPASS" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="IMPDIR" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="EXDIR" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="CORDIR" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="VERSION" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="XMLRESULTDIR" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="INTERVAL" serializeAs="String">
|
||||
<value>10</value>
|
||||
</setting>
|
||||
</bsmd.hisnord.Properties.Settings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
@ -61,6 +61,7 @@
|
||||
<Link>Properties\AssemblyProjectKeyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="his-nord.cs" />
|
||||
<Compile Include="Importer.cs" />
|
||||
<Compile Include="NSWResponse.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
@ -72,6 +73,7 @@
|
||||
<Compile Include="Response.cs" />
|
||||
<Compile Include="TransitId.cs" />
|
||||
<Compile Include="transmitter.cs" />
|
||||
<Compile Include="TransmitterUtils.cs" />
|
||||
<Compile Include="VisitId.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@ -85,6 +87,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="bsmd.hisnord.licenseheader" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>PublicSettingsSingleFileGenerator</Generator>
|
||||
|
||||
11
bsmd.hisnord/bsmd.hisnord.licenseheader
Normal file
11
bsmd.hisnord/bsmd.hisnord.licenseheader
Normal file
@ -0,0 +1,11 @@
|
||||
extensions: designer.cs generated.cs
|
||||
extensions: .cs .cpp .h
|
||||
// Copyright (c) 2014-present schick Informatik
|
||||
extensions: .aspx .ascx
|
||||
<%--
|
||||
Copyright (c) 2014-present schick Informatik
|
||||
--%>
|
||||
extensions: .xml .config .xsd
|
||||
<!--
|
||||
Sample license text.
|
||||
-->
|
||||
Loading…
Reference in New Issue
Block a user