Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified CNAApp/.vs/CNAApp/DesignTimeBuild/.dtbcache.v2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified CNAApp/.vs/CNAApp/v17/.futdcache.v1
Binary file not shown.
Binary file added CNAApp/.vs/CNAApp/v17/.futdcache.v2
Binary file not shown.
Binary file modified CNAApp/.vs/CNAApp/v17/.suo
Binary file not shown.
Binary file modified CNAApp/.vs/ProjectEvaluation/cnaapp.metadata.v2
Binary file not shown.
Binary file not shown.
Binary file modified CNAApp/.vs/ProjectEvaluation/cnaapp.projects.v2
Binary file not shown.
Binary file not shown.
8 changes: 7 additions & 1 deletion CNAApp/CNAApp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.2.32516.85
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CNAApp", "CNAApp\CNAApp.csproj", "{ACC9215E-AEDD-4D65-9E05-D5762B04DD67}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CNAApp", "CNAApp\CNAApp.csproj", "{ACC9215E-AEDD-4D65-9E05-D5762B04DD67}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServerProj", "ServerProj\ServerProj.csproj", "{30B31CC4-B3BB-493E-8060-6203D9E3622B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -15,6 +17,10 @@ Global
{ACC9215E-AEDD-4D65-9E05-D5762B04DD67}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ACC9215E-AEDD-4D65-9E05-D5762B04DD67}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ACC9215E-AEDD-4D65-9E05-D5762B04DD67}.Release|Any CPU.Build.0 = Release|Any CPU
{30B31CC4-B3BB-493E-8060-6203D9E3622B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{30B31CC4-B3BB-493E-8060-6203D9E3622B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{30B31CC4-B3BB-493E-8060-6203D9E3622B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{30B31CC4-B3BB-493E-8060-6203D9E3622B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
3 changes: 2 additions & 1 deletion CNAApp/CNAApp/CNAApp.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<StartupObject>CNAApp.Program</StartupObject>
</PropertyGroup>

</Project>
81 changes: 81 additions & 0 deletions CNAApp/CNAApp/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net.Sockets;
using System.Net;
using System.IO;

namespace CNAApp
{
internal class Program
{
static void Main()
{
Console.WriteLine("Hello World");

Client client = new Client();
if (client.Connect("127.0.0.1", 4444))
{
client.Run();
}
else
{
Console.WriteLine("failed to connect to the server");
}
}
}

public class Client
{
private TcpClient tcpClient;
NetworkStream m_stream;
StreamWriter m_writer;
StreamReader m_reader;

public Client()
{
tcpClient = new TcpClient();
}

public bool Connect(string ipAddress, int port)
{
try
{
tcpClient.Connect(ipAddress, port);
m_stream = tcpClient.GetStream();
m_reader = new StreamReader(m_stream, Encoding.UTF8);
m_writer = new StreamWriter(m_stream, Encoding.UTF8);
return true;
}
catch (Exception e)
{
Console.WriteLine("Exception: " + e.Message);
return false;
}
}

public void Run()
{
string userInput;
ProcessServerResponse();

while ((userInput = Console.ReadLine()) != null)
{
m_writer.WriteLine(userInput);
m_writer.Flush();

ProcessServerResponse();
if (userInput == "Close") { break; }
}
tcpClient.Close();
}

private void ProcessServerResponse()
{
Console.WriteLine("Server says: " + m_reader.ReadLine());
Console.WriteLine();
}
}
}
Binary file added CNAApp/CNAApp/bin/Debug/CNAApp.1.0.0.nupkg
Binary file not shown.
25 changes: 11 additions & 14 deletions CNAApp/CNAApp/obj/CNAApp.csproj.nuget.dgspec.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
{
"format": 1,
"restore": {
"C:\\Users\\b019105l\\Documents\\GitHub\\CNA-application\\CNAApp\\CNAApp\\CNAApp.csproj": {}
"C:\\Users\\Robyn\\Documents\\GitHub\\CNA-repo\\CNAApp\\CNAApp\\CNAApp.csproj": {}
},
"projects": {
"C:\\Users\\b019105l\\Documents\\GitHub\\CNA-application\\CNAApp\\CNAApp\\CNAApp.csproj": {
"C:\\Users\\Robyn\\Documents\\GitHub\\CNA-repo\\CNAApp\\CNAApp\\CNAApp.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "C:\\Users\\b019105l\\Documents\\GitHub\\CNA-application\\CNAApp\\CNAApp\\CNAApp.csproj",
"projectUniqueName": "C:\\Users\\Robyn\\Documents\\GitHub\\CNA-repo\\CNAApp\\CNAApp\\CNAApp.csproj",
"projectName": "CNAApp",
"projectPath": "C:\\Users\\b019105l\\Documents\\GitHub\\CNA-application\\CNAApp\\CNAApp\\CNAApp.csproj",
"packagesPath": "C:\\Users\\b019105l\\.nuget\\packages\\",
"outputPath": "C:\\Users\\b019105l\\Documents\\GitHub\\CNA-application\\CNAApp\\CNAApp\\obj\\",
"projectPath": "C:\\Users\\Robyn\\Documents\\GitHub\\CNA-repo\\CNAApp\\CNAApp\\CNAApp.csproj",
"packagesPath": "C:\\Users\\Robyn\\.nuget\\packages\\",
"outputPath": "C:\\Users\\Robyn\\Documents\\GitHub\\CNA-repo\\CNAApp\\CNAApp\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
],
"configFilePaths": [
"C:\\Users\\b019105l\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Users\\Robyn\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"net6.0-windows7.0"
"net6.0-windows"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
Expand All @@ -49,7 +45,8 @@
"net47",
"net471",
"net472",
"net48"
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
Expand All @@ -61,7 +58,7 @@
"privateAssets": "none"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.305\\RuntimeIdentifierGraph.json"
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.401\\RuntimeIdentifierGraph.json"
}
}
}
Expand Down
7 changes: 3 additions & 4 deletions CNAApp/CNAApp/obj/CNAApp.csproj.nuget.g.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\b019105l\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\Robyn\.nuget\packages\</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.2.0</NuGetToolVersion>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.3.0</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\b019105l\.nuget\packages\" />
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
<SourceRoot Include="C:\Users\Robyn\.nuget\packages\" />
</ItemGroup>
</Project>
69 changes: 69 additions & 0 deletions CNAApp/CNAApp/obj/CNAApp_d2jyjfve_wpftmp.csproj.nuget.dgspec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"format": 1,
"restore": {
"C:\\Users\\b019105l\\Documents\\GitHub\\CNA-repo\\CNAApp\\CNAApp\\CNAApp.csproj": {}
},
"projects": {
"C:\\Users\\b019105l\\Documents\\GitHub\\CNA-repo\\CNAApp\\CNAApp\\CNAApp.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "C:\\Users\\b019105l\\Documents\\GitHub\\CNA-repo\\CNAApp\\CNAApp\\CNAApp.csproj",
"projectName": "CNAApp",
"projectPath": "C:\\Users\\b019105l\\Documents\\GitHub\\CNA-repo\\CNAApp\\CNAApp\\CNAApp.csproj",
"packagesPath": "C:\\Users\\b019105l\\.nuget\\packages\\",
"outputPath": "C:\\Users\\b019105l\\Documents\\GitHub\\CNA-repo\\CNAApp\\CNAApp\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
],
"configFilePaths": [
"C:\\Users\\b019105l\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"net6.0-windows7.0"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net6.0-windows7.0": {
"targetAlias": "net6.0-windows",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"net6.0-windows7.0": {
"targetAlias": "net6.0-windows",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
},
"Microsoft.WindowsDesktop.App.WPF": {
"privateAssets": "none"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.305\\RuntimeIdentifierGraph.json"
}
}
}
}
}
16 changes: 16 additions & 0 deletions CNAApp/CNAApp/obj/CNAApp_d2jyjfve_wpftmp.csproj.nuget.g.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\b019105l\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.2.0</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\b019105l\.nuget\packages\" />
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
69 changes: 69 additions & 0 deletions CNAApp/CNAApp/obj/CNAApp_f1c5ghnk_wpftmp.csproj.nuget.dgspec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"format": 1,
"restore": {
"C:\\Users\\b019105l\\Documents\\GitHub\\CNA-repo\\CNAApp\\CNAApp\\CNAApp.csproj": {}
},
"projects": {
"C:\\Users\\b019105l\\Documents\\GitHub\\CNA-repo\\CNAApp\\CNAApp\\CNAApp.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "C:\\Users\\b019105l\\Documents\\GitHub\\CNA-repo\\CNAApp\\CNAApp\\CNAApp.csproj",
"projectName": "CNAApp",
"projectPath": "C:\\Users\\b019105l\\Documents\\GitHub\\CNA-repo\\CNAApp\\CNAApp\\CNAApp.csproj",
"packagesPath": "C:\\Users\\b019105l\\.nuget\\packages\\",
"outputPath": "C:\\Users\\b019105l\\Documents\\GitHub\\CNA-repo\\CNAApp\\CNAApp\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
],
"configFilePaths": [
"C:\\Users\\b019105l\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"net6.0-windows7.0"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net6.0-windows7.0": {
"targetAlias": "net6.0-windows",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"net6.0-windows7.0": {
"targetAlias": "net6.0-windows",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
},
"Microsoft.WindowsDesktop.App.WPF": {
"privateAssets": "none"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.305\\RuntimeIdentifierGraph.json"
}
}
}
}
}
16 changes: 16 additions & 0 deletions CNAApp/CNAApp/obj/CNAApp_f1c5ghnk_wpftmp.csproj.nuget.g.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\b019105l\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.2.0</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\b019105l\.nuget\packages\" />
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
Loading