diff --git a/.vs/CMS_CORE/v15/.suo b/.vs/CMS_CORE/v15/.suo
index 723629f..2ada28e 100644
Binary files a/.vs/CMS_CORE/v15/.suo and b/.vs/CMS_CORE/v15/.suo differ
diff --git a/CMS_CORE.sln b/CMS_CORE.sln
index 831b59b..f94c766 100644
--- a/CMS_CORE.sln
+++ b/CMS_CORE.sln
@@ -1,7 +1,13 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
+<<<<<<< .mine
+VisualStudioVersion = 15.0.27004.2006
+||||||| .r6
+VisualStudioVersion = 15.0.27004.2005
+=======
VisualStudioVersion = 15.0.26730.16
+>>>>>>> .r9
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CMS_CORE_Application", "CMS_CORE_Application\CMS_CORE_Application.csproj", "{EEB0C188-6EFA-4ABB-9E6F-4D423006428C}"
ProjectSection(ProjectDependencies) = postProject
diff --git a/CMS_CORE_Application/Form1.cs b/CMS_CORE_Application/Form1.cs
index 56049df..7cb9d5e 100644
--- a/CMS_CORE_Application/Form1.cs
+++ b/CMS_CORE_Application/Form1.cs
@@ -12,6 +12,7 @@ using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
+using System.IO;
namespace CMS_CORE_Application
{
@@ -67,6 +68,19 @@ namespace CMS_CORE_Application
byte byteValue = 0;
nc_Demo.MEM_RWByte(false, 1, Nc.MEMORY_Type.Null, 0, 0, ref byteValue);
MessageBox.Show("First byte: " + byteValue.ToString() + "\nDateTime: " + testDateTime.ToString());
+ FileStream a = new FileStream("./test.txt", FileMode.Create, FileAccess.ReadWrite);
+ nc_Demo.FILES_RProgramToFile("test.txt", a);
+ a.Close();
+ a = new FileStream("./test.txt", FileMode.Open, FileAccess.Read);
+
+ nc_Demo.FILES_WProgramFromFile("nuovissimo", a);
+
+ a.Close();
+
+ nc_Demo.FILES_CopyProgram("test.txt", "test.txt", true);
+
+ nc_Demo.FILES_DeleteProgram("", "test1.txt");
+
}
catch (Nc_Exception ex)
{
diff --git a/CMS_CORE_Application/bin/x86/Debug/CMS_CORE_Application.exe b/CMS_CORE_Application/bin/x86/Debug/CMS_CORE_Application.exe
index 423e623..1b6999a 100644
Binary files a/CMS_CORE_Application/bin/x86/Debug/CMS_CORE_Application.exe and b/CMS_CORE_Application/bin/x86/Debug/CMS_CORE_Application.exe differ
diff --git a/CMS_CORE_Application/obj/x86/Debug/CMS_CORE_Application.csproj.GenerateResource.Cache b/CMS_CORE_Application/obj/x86/Debug/CMS_CORE_Application.csproj.GenerateResource.Cache
index 8d5ecfc..0b346e0 100644
Binary files a/CMS_CORE_Application/obj/x86/Debug/CMS_CORE_Application.csproj.GenerateResource.Cache and b/CMS_CORE_Application/obj/x86/Debug/CMS_CORE_Application.csproj.GenerateResource.Cache differ
diff --git a/CMS_CORE_Application/obj/x86/Debug/CMS_CORE_Application.csprojResolveAssemblyReference.cache b/CMS_CORE_Application/obj/x86/Debug/CMS_CORE_Application.csprojResolveAssemblyReference.cache
index 5c45fbc..d576325 100644
Binary files a/CMS_CORE_Application/obj/x86/Debug/CMS_CORE_Application.csprojResolveAssemblyReference.cache and b/CMS_CORE_Application/obj/x86/Debug/CMS_CORE_Application.csprojResolveAssemblyReference.cache differ
diff --git a/CMS_CORE_Application/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache b/CMS_CORE_Application/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache
index bfe5141..3812446 100644
Binary files a/CMS_CORE_Application/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache and b/CMS_CORE_Application/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache differ
diff --git a/CMS_CORE_Application/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/CMS_CORE_Application/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index a099feb..6b4b730 100644
Binary files a/CMS_CORE_Application/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/CMS_CORE_Application/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/CMS_CORE_Library/CMS_CORE_Library.csproj b/CMS_CORE_Library/CMS_CORE_Library.csproj
index 63abbce..add13dc 100644
--- a/CMS_CORE_Library/CMS_CORE_Library.csproj
+++ b/CMS_CORE_Library/CMS_CORE_Library.csproj
@@ -67,6 +67,7 @@
+
diff --git a/CMS_CORE_Library/Demo/ILibraryService.cs b/CMS_CORE_Library/Demo/ILibraryService.cs
index 832840b..736c7b7 100644
--- a/CMS_CORE_Library/Demo/ILibraryService.cs
+++ b/CMS_CORE_Library/Demo/ILibraryService.cs
@@ -126,5 +126,21 @@ namespace Nc_Demo_Application.Server.Service
[WebInvoke(Method = "PUT", UriTemplate = "binary_memory/dword/{index}/list", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.WrappedRequest)]
void PutDWordList(string index, BinaryMemoryModel body);
#endregion
+
+ #region File Management
+
+ [WebGet(UriTemplate = "file/{fileName}", BodyStyle = WebMessageBodyStyle.Wrapped, ResponseFormat = WebMessageFormat.Json)]
+ void GetFile(string fileName, out string fileContent);
+
+ [WebInvoke(Method = "POST", UriTemplate = "file", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped)]
+ void PostFile(FileModel file);
+
+ [WebInvoke(Method = "PUT", UriTemplate = "file", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped)]
+ void CopyFile(FileModel file);
+
+ [WebInvoke(Method = "DELETE", UriTemplate = "file/{fileName}", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped)]
+ void DeleteFile(string fileName);
+
+ #endregion
}
}
diff --git a/CMS_CORE_Library/Demo/Models/FileModel.cs b/CMS_CORE_Library/Demo/Models/FileModel.cs
new file mode 100644
index 0000000..8c80a51
--- /dev/null
+++ b/CMS_CORE_Library/Demo/Models/FileModel.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.Serialization;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CMS_CORE.Demo.Models
+{
+ [DataContract]
+ class FileModel
+ {
+ [DataMember]
+ public string sourceFileName;
+ [DataMember]
+ public string destFileName;
+ [DataMember]
+ public string fileContent;
+ [DataMember]
+ public bool failIfExist;
+ }
+}
diff --git a/CMS_CORE_Library/Demo/Nc_Demo.cs b/CMS_CORE_Library/Demo/Nc_Demo.cs
index 7c358ba..ac3159c 100644
--- a/CMS_CORE_Library/Demo/Nc_Demo.cs
+++ b/CMS_CORE_Library/Demo/Nc_Demo.cs
@@ -4,15 +4,12 @@ using System.Globalization;
using System.IO;
using System.Linq;
using System.ServiceModel;
-using System.ServiceModel.Channels;
using System.ServiceModel.Description;
-using System.Text;
-using System.Threading.Tasks;
using CMS_CORE.Demo.Models;
using CMS_CORE.Exceptions;
using CMS_CORE_Library.Demo.Models;
using Nc_Demo_Application.Server.Service;
-using CMS_CORE_Library;
+using CMS_CORE.Utils;
namespace CMS_CORE.Demo
{
@@ -692,28 +689,79 @@ namespace CMS_CORE.Demo
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region File Management
- public override void FILES_RProgramToFile(string partProgramPath, string partProgramLocalName, ref FileStream localFile)
+ public override void FILES_RProgramToFile(string partProgramPath, FileStream localFile)
{
- throw new NotImplementedException();
+ // Check if the NC Demo is Connected
+ CheckConnection();
+
+ try
+ {
+ serverService.GetFile(partProgramPath, out string fileContent);
+ Nc_Utils.WriteLocalFile(fileContent, ref localFile);
+ }
+ catch(Exception ex)
+ {
+ ThrowNCException(ex);
+ }
}
public override void FILES_WProgramFromFile(string partProgramPath, FileStream localFile)
{
- throw new NotImplementedException();
+ // Check if the NC Demo is Connected
+ CheckConnection();
+
+ try
+ {
+ FileModel fileData = new FileModel
+ {
+ fileContent = Nc_Utils.ReadLocalFile(localFile),
+ destFileName = partProgramPath
+ };
+ serverService.PostFile(fileData);
+ }
+ catch (Exception ex)
+ {
+ ThrowNCException(ex);
+ }
}
public override void FILES_CopyProgram(string partProgramPath, string newPartProgramPath, bool failIfExist)
{
- throw new NotImplementedException();
+ // Check if the NC Demo is Connected
+ CheckConnection();
+
+ try
+ {
+ FileModel fileData = new FileModel
+ {
+ sourceFileName = partProgramPath,
+ destFileName = newPartProgramPath,
+ failIfExist = failIfExist
+ };
+ serverService.CopyFile(fileData);
+ }
+ catch (Exception ex)
+ {
+ ThrowNCException(ex);
+ }
}
public override void FILES_DeleteProgram(string partProgramPath, string partProgramName)
{
- throw new NotImplementedException();
+ // Check if the NC Demo is Connected
+ CheckConnection();
+
+ try
+ {
+ serverService.DeleteFile(partProgramName);
+ }
+ catch (Exception ex)
+ {
+ ThrowNCException(ex);
+ }
}
#endregion
-
-
+
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region Subordinate Private Functions
diff --git a/CMS_CORE_Library/Fanuc/Nc_Fanuc.cs b/CMS_CORE_Library/Fanuc/Nc_Fanuc.cs
index e2c29ac..5080313 100644
--- a/CMS_CORE_Library/Fanuc/Nc_Fanuc.cs
+++ b/CMS_CORE_Library/Fanuc/Nc_Fanuc.cs
@@ -1181,7 +1181,7 @@ namespace CMS_CORE.Fanuc
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region File Management
- public override void FILES_RProgramToFile(string partProgramPath, string partProgramLocalName, ref FileStream localFile)
+ public override void FILES_RProgramToFile(string partProgramPath, FileStream localFile)
{
string partProgramContent = "";
@@ -1190,7 +1190,7 @@ namespace CMS_CORE.Fanuc
try
{
// Write content into local file
- Nc_Utils.WriteLocalFile(partProgramLocalName, partProgramContent, ref localFile);
+ Nc_Utils.WriteLocalFile(partProgramContent, ref localFile);
}
catch (Exception ex)
{
diff --git a/CMS_CORE_Library/Nc.cs b/CMS_CORE_Library/Nc.cs
index 4d0648a..743e0de 100644
--- a/CMS_CORE_Library/Nc.cs
+++ b/CMS_CORE_Library/Nc.cs
@@ -678,7 +678,7 @@ namespace CMS_CORE
* Name of the Part Program and name of new local file
* Reference to the new local file where the NC Part Program data will be saved
* */
- public abstract void FILES_RProgramToFile(string partProgramPath, string partProgramLocalName, ref FileStream localFile);
+ public abstract void FILES_RProgramToFile(string partProgramPath, FileStream localFile);
/**
* Write/Overwrite a Part Program by path and name
diff --git a/CMS_CORE_Library/Osai/Nc_Osai.cs b/CMS_CORE_Library/Osai/Nc_Osai.cs
index 2fdc634..9c93698 100644
--- a/CMS_CORE_Library/Osai/Nc_Osai.cs
+++ b/CMS_CORE_Library/Osai/Nc_Osai.cs
@@ -1065,16 +1065,16 @@ namespace CMS_CORE.Osai
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region File Management
- public override void FILES_RProgramToFile(string partProgramPath, string partProgramLocalName, ref FileStream localFile)
+ public override void FILES_RProgramToFile(string partProgramPath, FileStream localFile)
{
string partProgramContent = "";
// Read NC part program content
- R_NCReadPartProgram(partProgramPath, ref partProgramContent); ;
+ FILES_RProgram(partProgramPath, ref partProgramContent); ;
try
{
// Write content into local file
- Nc_Utils.WriteLocalFile(partProgramLocalName, partProgramContent, ref localFile);
+ Nc_Utils.WriteLocalFile(partProgramContent, ref localFile);
}
catch (Exception ex)
{
@@ -1082,7 +1082,7 @@ namespace CMS_CORE.Osai
}
}
- private void R_NCReadPartProgram(string partProgramPath, ref string partProgramContent)
+ private void FILES_RProgram(string partProgramPath, ref string partProgramContent)
{
//Check if the NC is Connected
CheckConnection();
@@ -1122,10 +1122,10 @@ namespace CMS_CORE.Osai
ThrowNCException(ex);
}
// Write/Overwrite Nc file
- W_NCWritePartProgram(partProgramPath, partProgramContent);
+ FILES_WProgram(partProgramPath, partProgramContent);
}
- private void W_NCWritePartProgram(string partProgramPath, string partProgramContent)
+ private void FILES_WProgram(string partProgramPath, string partProgramContent)
{
//Check if the NC is Connected
CheckConnection();
diff --git a/CMS_CORE_Library/Utils/Nc_Utils.cs b/CMS_CORE_Library/Utils/Nc_Utils.cs
index f26977c..4b73321 100644
--- a/CMS_CORE_Library/Utils/Nc_Utils.cs
+++ b/CMS_CORE_Library/Utils/Nc_Utils.cs
@@ -146,14 +146,11 @@ namespace CMS_CORE.Utils
return Uint;
}
- public static void WriteLocalFile(string fileName, string fileContent, ref FileStream fileReference)
+ public static void WriteLocalFile(string fileContent, ref FileStream fileReference)
{
- // Create new local Part Program
- fileReference = new FileStream(partProgramFolder + fileName, FileMode.OpenOrCreate, FileAccess.Write);
-
// Write Part Program
StreamWriter writer = new StreamWriter(fileReference);
- writer.WriteLine(fileContent);
+ writer.Write(fileContent);
// Close file Writer
writer.Close();
}
diff --git a/CMS_CORE_Library/bin/Debug2/CMS_CORE_Library.dll b/CMS_CORE_Library/bin/Debug2/CMS_CORE_Library.dll
index 4e38ddb..7a54898 100644
Binary files a/CMS_CORE_Library/bin/Debug2/CMS_CORE_Library.dll and b/CMS_CORE_Library/bin/Debug2/CMS_CORE_Library.dll differ
diff --git a/CMS_CORE_Library/bin/Debug2/CMS_CORE_Library.pdb b/CMS_CORE_Library/bin/Debug2/CMS_CORE_Library.pdb
index 6cd47dc..3ea57ae 100644
Binary files a/CMS_CORE_Library/bin/Debug2/CMS_CORE_Library.pdb and b/CMS_CORE_Library/bin/Debug2/CMS_CORE_Library.pdb differ
diff --git a/CMS_CORE_Library/bin/Debug2/CMS_CORE_Library.xml b/CMS_CORE_Library/bin/Debug2/CMS_CORE_Library.xml
index 68c2be9..59c4a32 100644
--- a/CMS_CORE_Library/bin/Debug2/CMS_CORE_Library.xml
+++ b/CMS_CORE_Library/bin/Debug2/CMS_CORE_Library.xml
@@ -553,7 +553,7 @@
List of values to read/Write
-
+
Read a Part Program by path and name
Compatibility: Fanuc | Osai | Demo
diff --git a/CMS_CORE_Library/bin/Debug2/CndexLinkDotNet.dll b/CMS_CORE_Library/bin/Debug2/CndexLinkDotNet.dll
index 7b69fd3..14f023f 100644
Binary files a/CMS_CORE_Library/bin/Debug2/CndexLinkDotNet.dll and b/CMS_CORE_Library/bin/Debug2/CndexLinkDotNet.dll differ
diff --git a/CMS_CORE_Library/obj/Debug2/CMS_CORE_Library.csproj.CoreCompileInputs.cache b/CMS_CORE_Library/obj/Debug2/CMS_CORE_Library.csproj.CoreCompileInputs.cache
index c2374d1..ca4310f 100644
--- a/CMS_CORE_Library/obj/Debug2/CMS_CORE_Library.csproj.CoreCompileInputs.cache
+++ b/CMS_CORE_Library/obj/Debug2/CMS_CORE_Library.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-9a1c4b88cb1ae7a511e2e79c37db6884ee251c65
+7d878ebe32103cd5e6f43f15a703880188ed56f2
diff --git a/CMS_CORE_Library/obj/Debug2/CMS_CORE_Library.dll b/CMS_CORE_Library/obj/Debug2/CMS_CORE_Library.dll
index 4e38ddb..7a54898 100644
Binary files a/CMS_CORE_Library/obj/Debug2/CMS_CORE_Library.dll and b/CMS_CORE_Library/obj/Debug2/CMS_CORE_Library.dll differ
diff --git a/CMS_CORE_Library/obj/Debug2/CMS_CORE_Library.pdb b/CMS_CORE_Library/obj/Debug2/CMS_CORE_Library.pdb
index 6cd47dc..3ea57ae 100644
Binary files a/CMS_CORE_Library/obj/Debug2/CMS_CORE_Library.pdb and b/CMS_CORE_Library/obj/Debug2/CMS_CORE_Library.pdb differ
diff --git a/CMS_CORE_Library/obj/Debug2/DesignTimeResolveAssemblyReferencesInput.cache b/CMS_CORE_Library/obj/Debug2/DesignTimeResolveAssemblyReferencesInput.cache
index f86600b..c3f0398 100644
Binary files a/CMS_CORE_Library/obj/Debug2/DesignTimeResolveAssemblyReferencesInput.cache and b/CMS_CORE_Library/obj/Debug2/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/CMS_Core_Nc_Demo_Application.csproj b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/CMS_Core_Nc_Demo_Application.csproj
index 1533598..55aaf24 100644
--- a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/CMS_Core_Nc_Demo_Application.csproj
+++ b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/CMS_Core_Nc_Demo_Application.csproj
@@ -53,6 +53,7 @@
..\packages\System.Data.SQLite.Linq.1.0.105.2\lib\net451\System.Data.SQLite.Linq.dll
+
@@ -73,10 +74,11 @@
-
+
+
Form
diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Constants.cs b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Constants.cs
index 5d59e39..e232fe8 100644
--- a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Constants.cs
+++ b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Constants.cs
@@ -26,5 +26,8 @@ namespace Nc_Demo_Application
// CMS Process mode
public enum PROC_MODE : ushort { AUTO = 1, EDIT = 2, MDI = 3, REMOTE = 4, TEACH = 5, REF = 6, JOG = 7, JOGINC = 8, RETPROF = 9, HANDLE = 10, RESTART = 11, ERROR = 12 };
+
+ // File
+ public const string FILE_FOLDER = "./part_program/";
}
}
diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Database/Models/BinaryMemoryModel.cs b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Server/Models/BinaryMemoryModel.cs
similarity index 100%
rename from CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Database/Models/BinaryMemoryModel.cs
rename to CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Server/Models/BinaryMemoryModel.cs
diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Server/Models/FileModel.cs b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Server/Models/FileModel.cs
new file mode 100644
index 0000000..bfae0a1
--- /dev/null
+++ b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Server/Models/FileModel.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.Serialization;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Nc_Demo_Application.Server.Models
+{
+ [DataContract]
+ class FileModel
+ {
+ [DataMember]
+ public string sourceFileName;
+ [DataMember]
+ public string destFileName;
+ [DataMember]
+ public string fileContent;
+ [DataMember]
+ public bool failIfExist;
+ }
+}
diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Server/Service/ILibraryService.cs b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Server/Service/ILibraryService.cs
index 9503b5e..95c56de 100644
--- a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Server/Service/ILibraryService.cs
+++ b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Server/Service/ILibraryService.cs
@@ -4,6 +4,7 @@ using System.ServiceModel;
using System.ServiceModel.Web;
using static Nc_Demo_Application.Constants;
using System.Collections.Generic;
+using Nc_Demo_Application.Server.Models;
namespace Nc_Demo_Application.Server.Service
{
@@ -129,5 +130,21 @@ namespace Nc_Demo_Application.Server.Service
[WebInvoke(Method = "PUT", UriTemplate = "binary_memory/dword/{index}/list", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.WrappedRequest)]
void PutDWordList(string index, BinaryMemoryModel body);
#endregion
+
+ #region File Management
+
+ [WebGet(UriTemplate = "file/{fileName}", BodyStyle = WebMessageBodyStyle.Wrapped, ResponseFormat = WebMessageFormat.Json)]
+ void GetFile(string fileName, out string fileContent);
+
+ [WebInvoke(Method = "POST", UriTemplate = "file", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped)]
+ void PostFile(FileModel file);
+
+ [WebInvoke(Method = "PUT", UriTemplate = "file", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped)]
+ void CopyFile(FileModel file);
+
+ [WebInvoke(Method = "DELETE", UriTemplate = "file/{fileName}", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped)]
+ void DeleteFile(string fileName);
+
+ #endregion
}
}
diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Server/Service/LibraryService.cs b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Server/Service/LibraryService.cs
index 57484fb..1688d90 100644
--- a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Server/Service/LibraryService.cs
+++ b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Server/Service/LibraryService.cs
@@ -7,6 +7,8 @@ using static Nc_Demo_Application.Constants;
using System.Linq;
using System.ServiceModel.Web;
using System.Net;
+using System.IO;
+using Nc_Demo_Application.Server.Models;
namespace Nc_Demo_Application.Server.Service
{
@@ -308,6 +310,81 @@ namespace Nc_Demo_Application.Server.Service
}
#endregion
+ #region File Management
+
+ public void GetFile(string fileName, out string fileContent)
+ {
+ // If file not exist
+ if (!File.Exists(FILE_FOLDER + fileName))
+ throw new WebFaultException(HttpStatusCode.NotFound);
+ try
+ {
+ // Read file
+ fileContent = File.ReadAllText(FILE_FOLDER + fileName);
+ }
+ catch (Exception)
+ {
+ throw new WebFaultException(HttpStatusCode.InternalServerError);
+ }
+ }
+
+ public void PostFile(FileModel file)
+ {
+ try
+ {
+ // Write/Overwrite file
+ File.WriteAllText(FILE_FOLDER + file.destFileName, file.fileContent);
+ }
+ catch (Exception ex)
+ {
+ throw new WebFaultException(HttpStatusCode.InternalServerError);
+ }
+ }
+
+ public void CopyFile(FileModel file)
+ {
+ string sourcePath = FILE_FOLDER + file.sourceFileName;
+ string destPath = FILE_FOLDER + file.destFileName;
+
+ // Source file not exists
+ if (!File.Exists(sourcePath))
+ throw new WebFaultException(HttpStatusCode.NotFound);
+
+ // Source and destination file same name
+ if (file.sourceFileName == file.destFileName)
+ throw new WebFaultException(HttpStatusCode.BadRequest);
+
+ // if failIfExist == true check if dest file exist
+ if (file.failIfExist && File.Exists(destPath))
+ throw new WebFaultException(HttpStatusCode.Conflict);
+
+ try
+ {
+ // Copy file
+ File.Copy(FILE_FOLDER + file.sourceFileName, FILE_FOLDER + file.destFileName, true);
+ }
+ catch (Exception)
+ {
+ throw new WebFaultException(HttpStatusCode.InternalServerError);
+ }
+ }
+
+ public void DeleteFile(string fileName)
+ {
+ if (!File.Exists(FILE_FOLDER + fileName))
+ throw new WebFaultException(HttpStatusCode.NotFound);
+
+ try
+ {
+ File.Delete(FILE_FOLDER + fileName);
+ }
+ catch (Exception)
+ {
+ throw new WebFaultException(HttpStatusCode.InternalServerError);
+ }
+ }
+
+ #endregion
}
}
diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/DemoApplicationForm.Designer.cs b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/DemoApplicationForm.Designer.cs
index a353c8d..d643ecb 100644
--- a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/DemoApplicationForm.Designer.cs
+++ b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/DemoApplicationForm.Designer.cs
@@ -90,6 +90,14 @@
this.BinaryMemoryBinaryColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.BinaryMemoryWordColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.BinaryMemoryIntegerColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.partProgramPage = new System.Windows.Forms.TabPage();
+ this.fileContentTextBox = new System.Windows.Forms.TextBox();
+ this.toolStrip6 = new System.Windows.Forms.ToolStrip();
+ this.saveFileButton = new System.Windows.Forms.ToolStripButton();
+ this.deleteFileButton = new System.Windows.Forms.ToolStripButton();
+ this.addFileButton = new System.Windows.Forms.ToolStripButton();
+ this.newFileNameTextBox = new System.Windows.Forms.ToolStripTextBox();
+ this.fileTreeView = new System.Windows.Forms.TreeView();
this.serverStatusLabel = new System.Windows.Forms.Label();
this.ncAxesSaveButton.SuspendLayout();
this.ncDataPage.SuspendLayout();
@@ -106,6 +114,8 @@
this.byteMemoryPage.SuspendLayout();
this.toolStrip2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.binaryMemoryGridView)).BeginInit();
+ this.partProgramPage.SuspendLayout();
+ this.toolStrip6.SuspendLayout();
this.SuspendLayout();
//
// stopServer
@@ -125,6 +135,7 @@
this.ncAxesSaveButton.Controls.Add(this.alarms);
this.ncAxesSaveButton.Controls.Add(this.ncAxesPage);
this.ncAxesSaveButton.Controls.Add(this.byteMemoryPage);
+ this.ncAxesSaveButton.Controls.Add(this.partProgramPage);
this.ncAxesSaveButton.Location = new System.Drawing.Point(12, 12);
this.ncAxesSaveButton.Name = "ncAxesSaveButton";
this.ncAxesSaveButton.SelectedIndex = 0;
@@ -420,7 +431,7 @@
this.saveNcAlarmsButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.saveNcAlarmsButton.Name = "saveNcAlarmsButton";
this.saveNcAlarmsButton.Size = new System.Drawing.Size(23, 22);
- this.saveNcAlarmsButton.Text = "save";
+ this.saveNcAlarmsButton.Text = "Save";
this.saveNcAlarmsButton.Click += new System.EventHandler(this.SaveNcAlarmsButton_Click);
//
// ncAlarmsGridView
@@ -605,7 +616,7 @@
this.addRowsBinaryMemory.ImageTransparentColor = System.Drawing.Color.Magenta;
this.addRowsBinaryMemory.Name = "addRowsBinaryMemory";
this.addRowsBinaryMemory.Size = new System.Drawing.Size(23, 22);
- this.addRowsBinaryMemory.Text = "toolStripButton1";
+ this.addRowsBinaryMemory.Text = "Add 4 Rows";
this.addRowsBinaryMemory.Click += new System.EventHandler(this.addRowsBinaryMemory_Click);
//
// deleteRowsBinaryMemory
@@ -615,7 +626,7 @@
this.deleteRowsBinaryMemory.ImageTransparentColor = System.Drawing.Color.Magenta;
this.deleteRowsBinaryMemory.Name = "deleteRowsBinaryMemory";
this.deleteRowsBinaryMemory.Size = new System.Drawing.Size(23, 22);
- this.deleteRowsBinaryMemory.Text = "toolStripButton1";
+ this.deleteRowsBinaryMemory.Text = "Remove 4 rows";
this.deleteRowsBinaryMemory.Click += new System.EventHandler(this.deleteRowsBinaryMemory_Click);
//
// binaryMemoryGridView
@@ -669,6 +680,86 @@
this.BinaryMemoryIntegerColumn.HeaderText = "Integer";
this.BinaryMemoryIntegerColumn.Name = "BinaryMemoryIntegerColumn";
//
+ // partProgramPage
+ //
+ this.partProgramPage.Controls.Add(this.fileContentTextBox);
+ this.partProgramPage.Controls.Add(this.toolStrip6);
+ this.partProgramPage.Controls.Add(this.fileTreeView);
+ this.partProgramPage.Location = new System.Drawing.Point(4, 22);
+ this.partProgramPage.Name = "partProgramPage";
+ this.partProgramPage.Padding = new System.Windows.Forms.Padding(3);
+ this.partProgramPage.Size = new System.Drawing.Size(556, 410);
+ this.partProgramPage.TabIndex = 5;
+ this.partProgramPage.Text = "Part Program";
+ this.partProgramPage.UseVisualStyleBackColor = true;
+ //
+ // fileContentTextBox
+ //
+ this.fileContentTextBox.Enabled = false;
+ this.fileContentTextBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.fileContentTextBox.Location = new System.Drawing.Point(130, 31);
+ this.fileContentTextBox.Multiline = true;
+ this.fileContentTextBox.Name = "fileContentTextBox";
+ this.fileContentTextBox.Size = new System.Drawing.Size(423, 373);
+ this.fileContentTextBox.TabIndex = 2;
+ //
+ // toolStrip6
+ //
+ this.toolStrip6.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.saveFileButton,
+ this.deleteFileButton,
+ this.addFileButton,
+ this.newFileNameTextBox});
+ this.toolStrip6.Location = new System.Drawing.Point(3, 3);
+ this.toolStrip6.Name = "toolStrip6";
+ this.toolStrip6.Size = new System.Drawing.Size(550, 25);
+ this.toolStrip6.TabIndex = 1;
+ this.toolStrip6.Text = "toolStrip6";
+ //
+ // saveFileButton
+ //
+ this.saveFileButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+ this.saveFileButton.Enabled = false;
+ this.saveFileButton.Image = ((System.Drawing.Image)(resources.GetObject("saveFileButton.Image")));
+ this.saveFileButton.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.saveFileButton.Name = "saveFileButton";
+ this.saveFileButton.Size = new System.Drawing.Size(23, 22);
+ this.saveFileButton.Text = "Save file";
+ this.saveFileButton.Click += new System.EventHandler(this.SaveFileButton_Click);
+ //
+ // deleteFileButton
+ //
+ this.deleteFileButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+ this.deleteFileButton.Image = ((System.Drawing.Image)(resources.GetObject("deleteFileButton.Image")));
+ this.deleteFileButton.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.deleteFileButton.Name = "deleteFileButton";
+ this.deleteFileButton.Size = new System.Drawing.Size(23, 22);
+ this.deleteFileButton.Text = "Delete file";
+ this.deleteFileButton.Click += new System.EventHandler(this.DeleteFile_Click);
+ //
+ // addFileButton
+ //
+ this.addFileButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+ this.addFileButton.Image = ((System.Drawing.Image)(resources.GetObject("addFileButton.Image")));
+ this.addFileButton.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.addFileButton.Name = "addFileButton";
+ this.addFileButton.Size = new System.Drawing.Size(23, 22);
+ this.addFileButton.Text = "Add file";
+ this.addFileButton.Click += new System.EventHandler(this.AddFile_Click);
+ //
+ // newFileNameTextBox
+ //
+ this.newFileNameTextBox.Name = "newFileNameTextBox";
+ this.newFileNameTextBox.Size = new System.Drawing.Size(100, 25);
+ //
+ // fileTreeView
+ //
+ this.fileTreeView.Location = new System.Drawing.Point(3, 31);
+ this.fileTreeView.Name = "fileTreeView";
+ this.fileTreeView.Size = new System.Drawing.Size(121, 375);
+ this.fileTreeView.TabIndex = 0;
+ this.fileTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.FileTreeView_AfterSelect);
+ //
// serverStatusLabel
//
this.serverStatusLabel.AutoEllipsis = true;
@@ -689,6 +780,7 @@
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "DemoApplicationForm";
this.Text = "Nc Demo Application";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.DemoApplicationForm_FormClosing);
this.Load += new System.EventHandler(this.DemoApplicationForm_Load);
this.ncAxesSaveButton.ResumeLayout(false);
this.ncDataPage.ResumeLayout(false);
@@ -715,6 +807,10 @@
this.toolStrip2.ResumeLayout(false);
this.toolStrip2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.binaryMemoryGridView)).EndInit();
+ this.partProgramPage.ResumeLayout(false);
+ this.partProgramPage.PerformLayout();
+ this.toolStrip6.ResumeLayout(false);
+ this.toolStrip6.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@@ -783,6 +879,14 @@
private System.Windows.Forms.DataGridViewTextBoxColumn ncAlarmProcessIdColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn ncAlarmTextColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn ncAlarmIdColumn;
+ private System.Windows.Forms.TabPage partProgramPage;
+ private System.Windows.Forms.ToolStrip toolStrip6;
+ private System.Windows.Forms.ToolStripButton addFileButton;
+ private System.Windows.Forms.TreeView fileTreeView;
+ private System.Windows.Forms.ToolStripTextBox newFileNameTextBox;
+ private System.Windows.Forms.ToolStripButton deleteFileButton;
+ private System.Windows.Forms.TextBox fileContentTextBox;
+ private System.Windows.Forms.ToolStripButton saveFileButton;
}
}
diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/DemoApplicationForm.cs b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/DemoApplicationForm.cs
index 941bfb9..01ff004 100644
--- a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/DemoApplicationForm.cs
+++ b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/DemoApplicationForm.cs
@@ -7,6 +7,7 @@ using System.Windows.Forms;
using static Nc_Demo_Application.Constants;
using System.Data;
using System.Linq;
+using System.IO;
namespace Nc_Demo_Application
{
@@ -33,21 +34,27 @@ namespace Nc_Demo_Application
FillNcAlarmsInput();
FillNAxisInput();
FillBinaryMemoryInput();
+ ListDirectory("./part_program");
serverStatusLabel.Text = "Server running on: http://localhost:" + SERVER_PORT + API_URL;
}
private void StopServer_Click(object sender, EventArgs e)
+ {
+ Close();
+ }
+
+ private void DemoApplicationForm_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ CloseServer();
+ }
+
+ private void CloseServer()
{
// Stop Server
ServerController.getInstance().Stop();
// Reset button status
DatabaseController.getInstance().ResetDatabase();
-
- StartupForm startupForm = new StartupForm();
- // Close form
- Close();
- startupForm.Show();
}
private void FillNcDataInput()
@@ -280,5 +287,91 @@ namespace Nc_Demo_Application
}
}
+ private void ListDirectory(string path)
+ {
+ // Clear Tree view
+ fileTreeView.Nodes.Clear();
+
+ var stack = new Stack();
+ var rootDirectory = new DirectoryInfo(path);
+ // Push
+ var node = new TreeNode(rootDirectory.Name) { Tag = rootDirectory };
+ stack.Push(node);
+
+ while (stack.Count > 0)
+ {
+ // Get new node
+ var currentNode = stack.Pop();
+ // Add tag to new node
+ var directoryInfo = (DirectoryInfo)currentNode.Tag;
+ // Add node to Treeview
+ foreach (FileInfo file in directoryInfo.GetFiles())
+ currentNode.Nodes.Add(new TreeNode(file.Name));
+ }
+
+ fileTreeView.Nodes.Add(node);
+ }
+
+ private void AddFile_Click(object sender, EventArgs e)
+ {
+ if (!String.IsNullOrEmpty(newFileNameTextBox.Text))
+ {
+ File.Create(FILE_FOLDER + newFileNameTextBox.Text).Dispose();
+ fileTreeView.Nodes[0].Nodes.Add(new TreeNode(newFileNameTextBox.Text));
+ }
+ else
+ {
+ MessageBox.Show("Insert file name", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void DeleteFile_Click(object sender, EventArgs e)
+ {
+ string selectedFile = fileTreeView.SelectedNode.Text;
+
+ try
+ {
+ // If file exists
+ if (File.Exists(FILE_FOLDER + selectedFile))
+ {
+ // Delete file and update treeView
+ File.Delete(FILE_FOLDER + selectedFile);
+ fileTreeView.SelectedNode.Remove();
+ }
+ else
+ MessageBox.Show("Select a file");
+ }
+ catch(Exception ex)
+ {
+ Console.WriteLine("File exception: " + ex.Message);
+ }
+
+ }
+
+ private void FileTreeView_AfterSelect(object sender, TreeViewEventArgs e)
+ {
+ string selectedFile = fileTreeView.SelectedNode.Text;
+ // On treeview change, update textview if file exists
+ if (File.Exists(FILE_FOLDER + selectedFile))
+ {
+ fileContentTextBox.Text = File.ReadAllText(FILE_FOLDER + selectedFile);
+ fileContentTextBox.Enabled = true;
+ saveFileButton.Enabled = true;
+ }
+ else
+ {
+ fileContentTextBox.Text = "";
+ fileContentTextBox.Enabled = false;
+ saveFileButton.Enabled = false;
+ }
+ }
+
+ private void SaveFileButton_Click(object sender, EventArgs e)
+ {
+ string selectedFile = fileTreeView.SelectedNode.Text;
+
+ if (File.Exists(FILE_FOLDER + selectedFile))
+ File.WriteAllText(FILE_FOLDER + selectedFile, fileContentTextBox.Text);
+ }
}
}
\ No newline at end of file
diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/DemoApplicationForm.resx b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/DemoApplicationForm.resx
index 580d693..622ef84 100644
--- a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/DemoApplicationForm.resx
+++ b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/DemoApplicationForm.resx
@@ -120,6 +120,21 @@
437, 17
+
+ 122, 17
+
+
+ 227, 17
+
+
+ 332, 17
+
+
+ 17, 17
+
+
+ 542, 17
+
437, 17
@@ -135,9 +150,6 @@
122, 17
-
- 122, 17
-
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
@@ -173,9 +185,6 @@
227, 17
-
- 227, 17
-
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
@@ -211,9 +220,6 @@
332, 17
-
- 332, 17
-
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
@@ -273,9 +279,6 @@
17, 17
-
- 17, 17
-
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
@@ -316,6 +319,28 @@
True
+
+
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABRSURBVDhPY6AK+Pbt239S8NevX+dDtUIASJAheA4cf3j/
+ EY6RxUB0zIR9mIaQYgAIwwyBaifdABAm2gBkjKyGtgYQg0cNGJQGkIOh2ikBDAwAR/4LjdUkCHIAAAAA
+ SUVORK5CYII=
+
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAmSURBVDhPYxgFVADfvn37TwkGG+Dk5EQWHk4GUIKhcTEK
+ yAcMDABULP5BZjjimQAAAABJRU5ErkJggg==
+
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABISURBVDhPY8AGvn379h8bhkoTBiDFFl0mKHg4GwCSwIax
+ GYANY7WNWDycDMCGsSnGhqFxgQpAEtgMgEoTBsPEAGwYKo0EGBgAMACkrMWZPQwAAAAASUVORK5CYII=
+
+
AAABAAEAgIAAAAEAIAAoCAEAFgAAACgAAACAAAAAAAEAAAEAIAAAAAAAAAgBAAAAAAAAAAAAAAAAAAAA
diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/StartupForm.cs b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/StartupForm.cs
index ad01319..b2d06ff 100644
--- a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/StartupForm.cs
+++ b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/StartupForm.cs
@@ -24,8 +24,8 @@ namespace Nc_Demo_Application
SERVER_PORT = serverPort.Text;
Hide();
DemoApplicationForm serverForm = new DemoApplicationForm();
- serverForm.Show();
- serverForm.Focus();
+ serverForm.ShowDialog(this);
+ Show();
}
}
}
diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/bin/Debug/Nc_Demo_Application.exe b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/bin/Debug/Nc_Demo_Application.exe
index 4532b44..ea149df 100644
Binary files a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/bin/Debug/Nc_Demo_Application.exe and b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/bin/Debug/Nc_Demo_Application.exe differ
diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/bin/Debug/Nc_Demo_Application.pdb b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/bin/Debug/Nc_Demo_Application.pdb
index 28b008c..84b0b4b 100644
Binary files a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/bin/Debug/Nc_Demo_Application.pdb and b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/bin/Debug/Nc_Demo_Application.pdb differ
diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/CMS_Core_Nc_Demo_Application.csproj.CoreCompileInputs.cache b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/CMS_Core_Nc_Demo_Application.csproj.CoreCompileInputs.cache
index 23a4d4d..40b1843 100644
--- a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/CMS_Core_Nc_Demo_Application.csproj.CoreCompileInputs.cache
+++ b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/CMS_Core_Nc_Demo_Application.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-1c8a422d4d7efb455dfa5a9d1bb9c8f170cb2c87
+ad2ae4727336963bc917a71807a3007832481da7
diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/CMS_Core_Nc_Demo_Application.csproj.FileListAbsolute.txt b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/CMS_Core_Nc_Demo_Application.csproj.FileListAbsolute.txt
index 938e3b3..20d8e6c 100644
--- a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/CMS_Core_Nc_Demo_Application.csproj.FileListAbsolute.txt
+++ b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/CMS_Core_Nc_Demo_Application.csproj.FileListAbsolute.txt
@@ -18,27 +18,30 @@ C:\Workspace\Nc_Demo_Application\Nc_Demo_Application\obj\Debug\CMS_Core_Nc_Demo_
C:\Workspace\Nc_Demo_Application\Nc_Demo_Application\obj\Debug\CMS_Core_Nc_Demo_Application.csproj.CoreCompileInputs.cache
C:\Workspace\Nc_Demo_Application\Nc_Demo_Application\obj\Debug\Nc_Demo_Application.exe
C:\Workspace\Nc_Demo_Application\Nc_Demo_Application\obj\Debug\Nc_Demo_Application.pdb
-C:\Workspace\CMS_CORE_LIBRARY\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\bin\Debug\Nc_Demo_Application.exe.config
-C:\Workspace\CMS_CORE_LIBRARY\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\bin\Debug\Nc_Demo_Application.exe
-C:\Workspace\CMS_CORE_LIBRARY\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\bin\Debug\Nc_Demo_Application.pdb
-C:\Workspace\CMS_CORE_LIBRARY\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\bin\Debug\EntityFramework.dll
-C:\Workspace\CMS_CORE_LIBRARY\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\bin\Debug\EntityFramework.SqlServer.dll
-C:\Workspace\CMS_CORE_LIBRARY\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\bin\Debug\System.Data.SQLite.dll
-C:\Workspace\CMS_CORE_LIBRARY\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\bin\Debug\System.Data.SQLite.EF6.dll
-C:\Workspace\CMS_CORE_LIBRARY\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\bin\Debug\System.Data.SQLite.Linq.dll
-C:\Workspace\CMS_CORE_LIBRARY\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\bin\Debug\System.ServiceModel.Primitives.dll
-C:\Workspace\CMS_CORE_LIBRARY\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\bin\Debug\EntityFramework.xml
-C:\Workspace\CMS_CORE_LIBRARY\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\bin\Debug\EntityFramework.SqlServer.xml
-C:\Workspace\CMS_CORE_LIBRARY\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\bin\Debug\System.Data.SQLite.xml
-C:\Workspace\CMS_CORE_LIBRARY\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\bin\Debug\System.Data.SQLite.dll.config
+<<<<<<< .mine
+C:\Workspace\cms_core_library\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\bin\Debug\Nc_Demo_Application.exe.config
+C:\Workspace\cms_core_library\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\bin\Debug\Nc_Demo_Application.exe
+C:\Workspace\cms_core_library\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\bin\Debug\Nc_Demo_Application.pdb
+C:\Workspace\cms_core_library\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\bin\Debug\EntityFramework.dll
+C:\Workspace\cms_core_library\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\bin\Debug\EntityFramework.SqlServer.dll
+C:\Workspace\cms_core_library\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\bin\Debug\System.Data.SQLite.dll
+C:\Workspace\cms_core_library\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\bin\Debug\System.Data.SQLite.EF6.dll
+C:\Workspace\cms_core_library\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\bin\Debug\System.Data.SQLite.Linq.dll
+C:\Workspace\cms_core_library\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\bin\Debug\System.ServiceModel.Primitives.dll
+C:\Workspace\cms_core_library\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\bin\Debug\EntityFramework.xml
+C:\Workspace\cms_core_library\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\bin\Debug\EntityFramework.SqlServer.xml
+C:\Workspace\cms_core_library\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\bin\Debug\System.Data.SQLite.xml
+C:\Workspace\cms_core_library\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\bin\Debug\System.Data.SQLite.dll.config
+C:\Workspace\cms_core_library\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\obj\Debug\Nc_Demo_Application.DemoApplicationForm.resources
+C:\Workspace\cms_core_library\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\obj\Debug\Nc_Demo_Application.Properties.Resources.resources
+C:\Workspace\cms_core_library\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\obj\Debug\Nc_Demo_Application.StartupForm.resources
+C:\Workspace\cms_core_library\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\obj\Debug\CMS_Core_Nc_Demo_Application.csproj.GenerateResource.Cache
+C:\Workspace\cms_core_library\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\obj\Debug\CMS_Core_Nc_Demo_Application.csproj.CoreCompileInputs.cache
+C:\Workspace\cms_core_library\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\obj\Debug\Nc_Demo_Application.exe
+C:\Workspace\cms_core_library\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\obj\Debug\Nc_Demo_Application.pdb
+||||||| .r6
C:\Workspace\CMS_CORE_LIBRARY\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\obj\Debug\CMS_Core_Nc_Demo_Application.csprojResolveAssemblyReference.cache
-C:\Workspace\CMS_CORE_LIBRARY\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\obj\Debug\Nc_Demo_Application.Properties.Resources.resources
-C:\Workspace\CMS_CORE_LIBRARY\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\obj\Debug\CMS_Core_Nc_Demo_Application.csproj.GenerateResource.Cache
-C:\Workspace\CMS_CORE_LIBRARY\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\obj\Debug\CMS_Core_Nc_Demo_Application.csproj.CoreCompileInputs.cache
-C:\Workspace\CMS_CORE_LIBRARY\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\obj\Debug\Nc_Demo_Application.exe
-C:\Workspace\CMS_CORE_LIBRARY\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\obj\Debug\Nc_Demo_Application.pdb
-C:\Workspace\CMS_CORE_LIBRARY\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\obj\Debug\Nc_Demo_Application.DemoApplicationForm.resources
-C:\Workspace\CMS_CORE_LIBRARY\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\obj\Debug\Nc_Demo_Application.StartupForm.resources
+=======
C:\Users\carminatini\Documents\Visual Studio 2017\SVN Projects\CMS_CORE_Library\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\bin\Debug\Nc_Demo_Application.exe.config
C:\Users\carminatini\Documents\Visual Studio 2017\SVN Projects\CMS_CORE_Library\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\bin\Debug\Nc_Demo_Application.exe
C:\Users\carminatini\Documents\Visual Studio 2017\SVN Projects\CMS_CORE_Library\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\bin\Debug\Nc_Demo_Application.pdb
@@ -60,3 +63,4 @@ C:\Users\carminatini\Documents\Visual Studio 2017\SVN Projects\CMS_CORE_Library\
C:\Users\carminatini\Documents\Visual Studio 2017\SVN Projects\CMS_CORE_Library\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\obj\Debug\CMS_Core_Nc_Demo_Application.csproj.CoreCompileInputs.cache
C:\Users\carminatini\Documents\Visual Studio 2017\SVN Projects\CMS_CORE_Library\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\obj\Debug\Nc_Demo_Application.exe
C:\Users\carminatini\Documents\Visual Studio 2017\SVN Projects\CMS_CORE_Library\CMS_CORE_Nc_Demo_Application\Nc_Demo_Application\obj\Debug\Nc_Demo_Application.pdb
+>>>>>>> .r9
diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/CMS_Core_Nc_Demo_Application.csproj.GenerateResource.Cache b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/CMS_Core_Nc_Demo_Application.csproj.GenerateResource.Cache
index d97ee13..1f169c8 100644
Binary files a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/CMS_Core_Nc_Demo_Application.csproj.GenerateResource.Cache and b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/CMS_Core_Nc_Demo_Application.csproj.GenerateResource.Cache differ
diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/CMS_Core_Nc_Demo_Application.csprojResolveAssemblyReference.cache b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/CMS_Core_Nc_Demo_Application.csprojResolveAssemblyReference.cache
index c4dd9c3..82956b8 100644
Binary files a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/CMS_Core_Nc_Demo_Application.csprojResolveAssemblyReference.cache and b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/CMS_Core_Nc_Demo_Application.csprojResolveAssemblyReference.cache differ
diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/DesignTimeResolveAssemblyReferences.cache
index 7042321..4c6d1f1 100644
Binary files a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ
diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index 6a88c3c..63f0b32 100644
Binary files a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/Nc_Demo_Application.DemoApplicationForm.resources b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/Nc_Demo_Application.DemoApplicationForm.resources
index aad8c79..920a2ae 100644
Binary files a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/Nc_Demo_Application.DemoApplicationForm.resources and b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/Nc_Demo_Application.DemoApplicationForm.resources differ
diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/Nc_Demo_Application.exe b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/Nc_Demo_Application.exe
index 4532b44..ea149df 100644
Binary files a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/Nc_Demo_Application.exe and b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/Nc_Demo_Application.exe differ
diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/Nc_Demo_Application.pdb b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/Nc_Demo_Application.pdb
index 28b008c..84b0b4b 100644
Binary files a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/Nc_Demo_Application.pdb and b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/obj/Debug/Nc_Demo_Application.pdb differ