Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
SendDicomFiles
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alan Farhadi
SendDicomFiles
Commits
afd464c0
Commit
afd464c0
authored
May 10, 2020
by
alan.f
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add-nlog
parent
0d9a6b04
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
56 additions
and
2 deletions
+56
-2
C-UI.csproj
C-UI/C-UI.csproj
+14
-0
NLog.config
C-UI/NLog.config
+33
-0
NLog.xsd
C-UI/NLog.xsd
+0
-0
SCU_Store.cs
C-UI/SCU_Store.cs
+6
-2
packages.config
C-UI/packages.config
+3
-0
No files found.
C-UI/C-UI.csproj
View file @
afd464c0
...
...
@@ -38,17 +38,25 @@
<Reference
Include=
"Dicom.Core, Version=4.0.4.0, Culture=neutral, PublicKeyToken=3a13f649e28eb09a, processorArchitecture=MSIL"
>
<HintPath>
..\packages\fo-dicom.Desktop.4.0.4\lib\net45\Dicom.Core.dll
</HintPath>
</Reference>
<Reference
Include=
"NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"
>
<HintPath>
..\packages\NLog.4.7.0\lib\net45\NLog.dll
</HintPath>
</Reference>
<Reference
Include=
"System"
/>
<Reference
Include=
"System.Configuration"
/>
<Reference
Include=
"System.Core"
/>
<Reference
Include=
"System.IO.Compression"
/>
<Reference
Include=
"System.Reactive, Version=4.4.0.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL"
>
<HintPath>
..\packages\System.Reactive.4.4.1\lib\net46\System.Reactive.dll
</HintPath>
</Reference>
<Reference
Include=
"System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
>
<HintPath>
..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll
</HintPath>
</Reference>
<Reference
Include=
"System.Runtime.Serialization"
/>
<Reference
Include=
"System.ServiceModel"
/>
<Reference
Include=
"System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"
>
<HintPath>
..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll
</HintPath>
</Reference>
<Reference
Include=
"System.Transactions"
/>
<Reference
Include=
"System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"
>
<HintPath>
..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll
</HintPath>
</Reference>
...
...
@@ -86,6 +94,12 @@
<AutoGen>
True
</AutoGen>
<DependentUpon>
Resources.resx
</DependentUpon>
</Compile>
<Content
Include=
"NLog.config"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</Content>
<None
Include=
"NLog.xsd"
>
<SubType>
Designer
</SubType>
</None>
<None
Include=
"packages.config"
/>
<None
Include=
"Properties\Settings.settings"
>
<Generator>
SettingsSingleFileGenerator
</Generator>
...
...
C-UI/NLog.config
0 → 100644
View file @
afd464c0
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
nlog
xmlns
=
"http://www.nlog-project.org/schemas/NLog.xsd"
xmlns
:
xsi
=
"http://www.w3.org/2001/XMLSchema-instance"
xsi
:
schemaLocation
=
"http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
autoReload
=
"true"
throwExceptions
=
"false"
internalLogLevel
=
"Off"
internalLogFile
=
"c:\temp\nlog-internal.log"
>
<!--
optional
,
add
some
variables
https
://
github
.
com
/
nlog
/
NLog
/
wiki
/
Configuration
-
file
#variables
-->
<
variable
name
=
"myvar"
value
=
"myvalue"
/>
<!--
See
https
://
github
.
com
/
nlog
/
nlog
/
wiki
/
Configuration
-
file
for
information
on
customizing
logging
rules
and
outputs
.
-->
<
targets
>
<
target
name
=
"f1"
xsi
:
type
=
"File"
fileName
=
"d:\Logs\NlogTestServiceLog.txt"
/>
</
targets
>
<
rules
>
<
logger
name
=
"*"
minlevel
=
"Debug"
writeTo
=
"f1"
/>
<!--
add
your
logging
rules
here
-->
<!--
Write
all
events
with
minimal
level
of
Debug
(
So
Debug
,
Info
,
Warn
,
Error
and
Fatal
,
but
not
Trace
)
to
"f"
<
logger
name
=
"*"
minlevel
=
"Debug"
writeTo
=
"f"
/>
-->
</
rules
>
</
nlog
>
C-UI/NLog.xsd
0 → 100644
View file @
afd464c0
This source diff could not be displayed because it is too large. You can
view the blob
instead.
C-UI/SCU_Store.cs
View file @
afd464c0
using
Dicom.Network
;
using
NLog
;
using
System
;
using
System.Collections.Generic
;
using
System.IO
;
...
...
@@ -12,8 +13,11 @@ using DicomClient = Dicom.Network.Client.DicomClient;
namespace
C_UI
{
public
static
class
SCU_Store
{
static
Logger
logger
=
LogManager
.
GetCurrentClassLogger
();
public
static
async
Task
StoreFile
(
string
_storeServerHost
,
int
_storeServerPort
,
string
[]
dicomFiles
,
string
_aet
,
string
_storeServerAET
)
{
var
client
=
new
DicomClient
(
_storeServerHost
,
_storeServerPort
,
false
,
_storeServerAET
,
_aet
);
...
...
@@ -24,14 +28,14 @@ namespace C_UI
try
{
var
request
=
new
DicomCStoreRequest
(
currentFile
.
ToString
());
request
.
OnResponseReceived
+=
(
req
,
response
)
=>
Console
.
WriteLine
(
"C-Store Response Received, Status: "
+
response
.
Status
);
request
.
OnResponseReceived
+=
(
req
,
response
)
=>
logger
.
Info
(
response
.
Status
);
await
client
.
AddRequestAsync
(
request
);
await
client
.
SendAsync
();
}
catch
(
Exception
exception
)
{
MessageBox
.
Show
(
exception
.
Message
);
logger
.
Error
(
exception
.
Message
);
}
});
...
...
C-UI/packages.config
View file @
afd464c0
...
...
@@ -2,6 +2,9 @@
<
packages
>
<
package
id
=
"fo-dicom"
version
=
"4.0.4"
targetFramework
=
"net472"
/>
<
package
id
=
"fo-dicom.Desktop"
version
=
"4.0.4"
targetFramework
=
"net472"
/>
<
package
id
=
"NLog"
version
=
"4.7.0"
targetFramework
=
"net472"
/>
<
package
id
=
"NLog.Config"
version
=
"4.7.0"
targetFramework
=
"net472"
/>
<
package
id
=
"NLog.Schema"
version
=
"4.7.0"
targetFramework
=
"net472"
/>
<
package
id
=
"System.Reactive"
version
=
"4.4.1"
targetFramework
=
"net472"
/>
<
package
id
=
"System.Runtime.CompilerServices.Unsafe"
version
=
"4.5.3"
targetFramework
=
"net472"
/>
<
package
id
=
"System.Threading.Tasks.Extensions"
version
=
"4.5.4"
targetFramework
=
"net472"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment