Merge pull request #9 from Crylia/feature/dashboard_mainwindow
Add remember me button and more
This commit is contained in:
Binary file not shown.
Binary file not shown.
34
Server Dashboard Socket/EchoServer.cs
Normal file
34
Server Dashboard Socket/EchoServer.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Server_Dashboard_Socket {
|
||||
public class EchoServer {
|
||||
public void Start(int port = 9565) {
|
||||
IPEndPoint endPoint = new IPEndPoint(IPAddress.Loopback, port);
|
||||
Socket socket = new Socket(endPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
|
||||
socket.Bind(endPoint);
|
||||
socket.Listen(128);
|
||||
_ = Task.Run(() => DoEcho(socket));
|
||||
}
|
||||
|
||||
private async Task DoEcho(Socket socket) {
|
||||
while (true) {
|
||||
Socket clientSocket = await Task.Factory.FromAsync(
|
||||
new Func<AsyncCallback, object, IAsyncResult>(socket.BeginAccept),
|
||||
new Func<IAsyncResult, Socket>(socket.EndAccept),
|
||||
null).ConfigureAwait(false);
|
||||
using(NetworkStream stream = new NetworkStream(clientSocket, true)) {
|
||||
byte[] buffer = new byte[1024];
|
||||
while (true) {
|
||||
int bytesRead = await stream.ReadAsync(buffer, 0, buffer.Length).ConfigureAwait(false);
|
||||
if (bytesRead == 0)
|
||||
break;
|
||||
await stream.WriteAsync(buffer, 0, bytesRead).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Server Dashboard Socket/Server Dashboard Socket.csproj
Normal file
8
Server Dashboard Socket/Server Dashboard Socket.csproj
Normal file
@@ -0,0 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<RootNamespace>Server_Dashboard_Socket</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"runtimeTarget": {
|
||||
"name": ".NETCoreApp,Version=v3.1",
|
||||
"signature": ""
|
||||
},
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETCoreApp,Version=v3.1": {
|
||||
"Server Dashboard Socket/1.0.0": {
|
||||
"runtime": {
|
||||
"Server Dashboard Socket.dll": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"Server Dashboard Socket/1.0.0": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v3.1", FrameworkDisplayName = "")]
|
||||
@@ -0,0 +1,23 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Server Dashboard Socket")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("Server Dashboard Socket")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("Server Dashboard Socket")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
// Von der MSBuild WriteCodeFragment-Klasse generiert.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
6e726691478e3d9c2ac99cb5832bdd0702cbb2d8
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
40cb88c995736b43b2440aaa34383fa2c95563ea
|
||||
@@ -0,0 +1,8 @@
|
||||
C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard Socket\bin\Debug\netcoreapp3.1\Server Dashboard Socket.deps.json
|
||||
C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard Socket\bin\Debug\netcoreapp3.1\Server Dashboard Socket.dll
|
||||
C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard Socket\bin\Debug\netcoreapp3.1\Server Dashboard Socket.pdb
|
||||
C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard Socket\obj\Debug\netcoreapp3.1\Server Dashboard Socket.AssemblyInfoInputs.cache
|
||||
C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard Socket\obj\Debug\netcoreapp3.1\Server Dashboard Socket.AssemblyInfo.cs
|
||||
C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard Socket\obj\Debug\netcoreapp3.1\Server Dashboard Socket.csproj.CoreCompileInputs.cache
|
||||
C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard Socket\obj\Debug\netcoreapp3.1\Server Dashboard Socket.dll
|
||||
C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard Socket\obj\Debug\netcoreapp3.1\Server Dashboard Socket.pdb
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,66 @@
|
||||
{
|
||||
"format": 1,
|
||||
"restore": {
|
||||
"C:\\Users\\Crylia\\Documents\\Git\\Server Dashboard\\Server Dashboard Socket\\Server Dashboard Socket.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"C:\\Users\\Crylia\\Documents\\Git\\Server Dashboard\\Server Dashboard Socket\\Server Dashboard Socket.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Users\\Crylia\\Documents\\Git\\Server Dashboard\\Server Dashboard Socket\\Server Dashboard Socket.csproj",
|
||||
"projectName": "Server Dashboard Socket",
|
||||
"projectPath": "C:\\Users\\Crylia\\Documents\\Git\\Server Dashboard\\Server Dashboard Socket\\Server Dashboard Socket.csproj",
|
||||
"packagesPath": "C:\\Users\\Crylia\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\Crylia\\Documents\\Git\\Server Dashboard\\Server Dashboard Socket\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"fallbackFolders": [
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
|
||||
],
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\Crylia\\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": [
|
||||
"netcoreapp3.1"
|
||||
],
|
||||
"sources": {
|
||||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp3.1": {
|
||||
"targetAlias": "netcoreapp3.1",
|
||||
"projectReferences": {}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp3.1": {
|
||||
"targetAlias": "netcoreapp3.1",
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"frameworkReferences": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.201\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?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\Crylia\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
|
||||
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.9.1</NuGetToolVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<SourceRoot Include="C:\Users\Crylia\.nuget\packages\" />
|
||||
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
72
Server Dashboard Socket/obj/project.assets.json
Normal file
72
Server Dashboard Socket/obj/project.assets.json
Normal file
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"version": 3,
|
||||
"targets": {
|
||||
".NETCoreApp,Version=v3.1": {}
|
||||
},
|
||||
"libraries": {},
|
||||
"projectFileDependencyGroups": {
|
||||
".NETCoreApp,Version=v3.1": []
|
||||
},
|
||||
"packageFolders": {
|
||||
"C:\\Users\\Crylia\\.nuget\\packages\\": {},
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {}
|
||||
},
|
||||
"project": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Users\\Crylia\\Documents\\Git\\Server Dashboard\\Server Dashboard Socket\\Server Dashboard Socket.csproj",
|
||||
"projectName": "Server Dashboard Socket",
|
||||
"projectPath": "C:\\Users\\Crylia\\Documents\\Git\\Server Dashboard\\Server Dashboard Socket\\Server Dashboard Socket.csproj",
|
||||
"packagesPath": "C:\\Users\\Crylia\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\Crylia\\Documents\\Git\\Server Dashboard\\Server Dashboard Socket\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"fallbackFolders": [
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
|
||||
],
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\Crylia\\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": [
|
||||
"netcoreapp3.1"
|
||||
],
|
||||
"sources": {
|
||||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp3.1": {
|
||||
"targetAlias": "netcoreapp3.1",
|
||||
"projectReferences": {}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp3.1": {
|
||||
"targetAlias": "netcoreapp3.1",
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"frameworkReferences": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.201\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Server Dashboard Socket/obj/project.nuget.cache
Normal file
8
Server Dashboard Socket/obj/project.nuget.cache
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "TThsag+xtSY7ctBsPwAhUX7uLjuhld1ipCW1nP987HRzxMfYvczqncYfdca/U4IfbiniWP3eJFeh7yA09+/gGA==",
|
||||
"success": true,
|
||||
"projectFilePath": "C:\\Users\\Crylia\\Documents\\Git\\Server Dashboard\\Server Dashboard Socket\\Server Dashboard Socket.csproj",
|
||||
"expectedPackageFiles": [],
|
||||
"logs": []
|
||||
}
|
||||
@@ -3,7 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.31129.286
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server Dashboard", "Server Dashboard\Server Dashboard.csproj", "{1183B3CA-7F78-4749-B571-0BCF52EA4FCD}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Server Dashboard", "Server Dashboard\Server Dashboard.csproj", "{1183B3CA-7F78-4749-B571-0BCF52EA4FCD}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server Dashboard Socket", "Server Dashboard Socket\Server Dashboard Socket.csproj", "{426A7389-BB4B-498B-B405-3ADCB0353A80}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@@ -15,6 +17,10 @@ Global
|
||||
{1183B3CA-7F78-4749-B571-0BCF52EA4FCD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1183B3CA-7F78-4749-B571-0BCF52EA4FCD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1183B3CA-7F78-4749-B571-0BCF52EA4FCD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{426A7389-BB4B-498B-B405-3ADCB0353A80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{426A7389-BB4B-498B-B405-3ADCB0353A80}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{426A7389-BB4B-498B-B405-3ADCB0353A80}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{426A7389-BB4B-498B-B405-3ADCB0353A80}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -1,9 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" >
|
||||
<section name="Server_Dashboard.Properties.Settings" type="System.Configuration.ClientSettingsSection, System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<connectionStrings>
|
||||
<add name="ServerDashboardDB" connectionString="Server=localhost;Database=ServerDashboardDB;User Id=SA;Password=Me262HG3;"/>
|
||||
</connectionStrings>
|
||||
<startup>
|
||||
<supportedRuntime version="v3.1.13" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
<userSettings>
|
||||
<Server_Dashboard.Properties.Settings>
|
||||
<setting name="Username" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
</Server_Dashboard.Properties.Settings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
@@ -7,12 +7,14 @@
|
||||
xmlns:root="clr-namespace:Server_Dashboard" xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
d:DataContext="{d:DesignInstance Type=root:DashboardModuleViewModel}"
|
||||
mc:Ignorable="d"
|
||||
WindowStyle="None"
|
||||
ResizeMode="NoResize"
|
||||
Height="700"
|
||||
Width="500"
|
||||
AllowsTransparency="True"
|
||||
d:WindowStyle="None"
|
||||
>
|
||||
<WindowChrome.WindowChrome>
|
||||
<WindowChrome CaptionHeight="0" ResizeBorderThickness="0"/>
|
||||
</WindowChrome.WindowChrome>
|
||||
<Border
|
||||
Width="500"
|
||||
Height="700"
|
||||
@@ -20,9 +22,6 @@
|
||||
<Border.Background>
|
||||
<SolidColorBrush Color="#2D2D2D" Opacity="1"/>
|
||||
</Border.Background>
|
||||
<Border.Effect>
|
||||
<DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0"/>
|
||||
</Border.Effect>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="30"/>
|
||||
@@ -32,6 +31,11 @@
|
||||
Background="{StaticResource BackgroundSurface_04dp}"
|
||||
Grid.Row="0"
|
||||
>
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="MouseDown">
|
||||
<i:CallMethodAction MethodName="DragMove" TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="40"/>
|
||||
@@ -70,6 +74,7 @@
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel VerticalAlignment="Center" Grid.Row="0" Margin="20 0 20 0">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
@@ -119,7 +124,7 @@
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Text="Password"
|
||||
FontSize="16"
|
||||
FontSize="24"
|
||||
Margin="0 0 0 5"
|
||||
>
|
||||
<TextBlock.Foreground>
|
||||
@@ -129,7 +134,7 @@
|
||||
<TextBlock
|
||||
Text="*"
|
||||
Foreground="{StaticResource ErrorRed}"
|
||||
FontSize="16"
|
||||
FontSize="20"
|
||||
/>
|
||||
</StackPanel>
|
||||
<Grid>
|
||||
@@ -137,14 +142,14 @@
|
||||
<DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0"/>
|
||||
</Grid.Effect>
|
||||
<PasswordBox
|
||||
Width="220"
|
||||
Width="420"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
root:MonitorPasswordProperty.Value="True"
|
||||
Grid.Column="1"
|
||||
FontSize="14"
|
||||
FontSize="20"
|
||||
x:Name="Password"
|
||||
Height="30"
|
||||
Height="40"
|
||||
>
|
||||
</PasswordBox>
|
||||
<TextBlock
|
||||
@@ -155,7 +160,7 @@
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="5 0 0 0"
|
||||
FontSize="14"
|
||||
FontSize="20"
|
||||
>
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.12"/>
|
||||
@@ -167,7 +172,7 @@
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Text="Username"
|
||||
FontSize="16"
|
||||
FontSize="24"
|
||||
Margin="0 0 0 5"
|
||||
>
|
||||
<TextBlock.Foreground>
|
||||
@@ -187,15 +192,15 @@
|
||||
<TextBox
|
||||
Text="{Binding Username}"
|
||||
Grid.Column="1"
|
||||
Height="30"
|
||||
FontSize="14"
|
||||
Height="40"
|
||||
FontSize="20"
|
||||
x:Name="UserName"
|
||||
/>
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
Text="Name"
|
||||
FontSize="14"
|
||||
FontSize="20"
|
||||
Visibility="{Binding ElementName=UserName, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}"
|
||||
Grid.Column="1"
|
||||
IsHitTestVisible="False"
|
||||
@@ -211,7 +216,7 @@
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Text="IP Adress"
|
||||
FontSize="16"
|
||||
FontSize="24"
|
||||
Margin="0 0 0 5"
|
||||
>
|
||||
<TextBlock.Foreground>
|
||||
@@ -231,15 +236,15 @@
|
||||
<TextBox
|
||||
Text="{Binding IPAdress}"
|
||||
Grid.Column="1"
|
||||
Height="30"
|
||||
FontSize="14"
|
||||
Height="40"
|
||||
FontSize="20"
|
||||
x:Name="IPAdress"
|
||||
/>
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
Text="sample.ssh.com"
|
||||
FontSize="14"
|
||||
FontSize="20"
|
||||
Visibility="{Binding ElementName=IPAdress, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}"
|
||||
Grid.Column="1"
|
||||
IsHitTestVisible="False"
|
||||
@@ -254,7 +259,7 @@
|
||||
<StackPanel VerticalAlignment="Center" Grid.Row="4" Margin="20 0 20 0">
|
||||
<TextBlock
|
||||
Text="Port"
|
||||
FontSize="16"
|
||||
FontSize="24"
|
||||
Margin="0 0 0 5"
|
||||
>
|
||||
<TextBlock.Foreground>
|
||||
@@ -268,15 +273,15 @@
|
||||
<TextBox
|
||||
Text="{Binding Port}"
|
||||
Grid.Column="1"
|
||||
Height="30"
|
||||
FontSize="14"
|
||||
Height="40"
|
||||
FontSize="20"
|
||||
x:Name="Port"
|
||||
/>
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
Text="22"
|
||||
FontSize="14"
|
||||
FontSize="20"
|
||||
Visibility="{Binding ElementName=Port, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}"
|
||||
Grid.Column="1"
|
||||
IsHitTestVisible="False"
|
||||
@@ -288,6 +293,15 @@
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
<Button
|
||||
Height="60"
|
||||
Width="350"
|
||||
Command="{Binding CreateModuleCommand}"
|
||||
CommandParameter="{Binding ElementName=CREATE_MODULE}"
|
||||
Grid.Row="5"
|
||||
Content="CREATE MODULE"
|
||||
Grid.ColumnSpan="2"
|
||||
/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<Grid>
|
||||
<Ellipse
|
||||
x:Name="Background"
|
||||
|
||||
Fill="{Binding
|
||||
ElementName=_this,
|
||||
Path=BackgroundBrush
|
||||
|
||||
@@ -13,9 +13,6 @@ using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Server_Dashboard.Controls.DoubleRoundProgressBar {
|
||||
/// <summary>
|
||||
/// Interaktionslogik für HalfRoundProgressBar.xaml
|
||||
/// </summary>
|
||||
public partial class DoubleRoundProgressBar : UserControl {
|
||||
|
||||
public static DependencyProperty ReadIndicatorBrushProperty = DependencyProperty.Register("ReadIndicatorBrush", typeof(Brush), typeof(DoubleRoundProgressBar));
|
||||
|
||||
@@ -13,9 +13,6 @@ using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Server_Dashboard.Controls.HalfRoundProgressBar {
|
||||
/// <summary>
|
||||
/// Interaktionslogik für HalfRoundProgressBar.xaml
|
||||
/// </summary>
|
||||
public partial class HalfRoundProgressBar : UserControl {
|
||||
|
||||
public static DependencyProperty IndicatorBrushProperty = DependencyProperty.Register("IndicatorBrush", typeof(Brush), typeof(HalfRoundProgressBar));
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
xmlns:halfroundprogressbar="clr-namespace:Server_Dashboard.Controls.HalfRoundProgressBar"
|
||||
xmlns:doubleroundprogressbar="clr-namespace:Server_Dashboard.Controls.DoubleRoundProgressBar"
|
||||
mc:Ignorable="d">
|
||||
<Border Background="{StaticResource BackgroundSurface_02dp}" MinHeight="100" MinWidth="300" Width="Auto" Height="Auto" Margin="10">
|
||||
<Border Background="{StaticResource BackgroundSurface_02dp}" MinHeight="100" MinWidth="300" Width="Auto" Height="Auto" Margin="10" CornerRadius="5">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect BlurRadius="5" ShadowDepth="0"/>
|
||||
</Border.Effect>
|
||||
@@ -17,6 +17,7 @@
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border
|
||||
CornerRadius="5 5 0 0"
|
||||
Grid.Row="0"
|
||||
Background="{StaticResource BackgroundSurface_08dp}"
|
||||
>
|
||||
@@ -29,7 +30,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Grid.Column="0" Margin="7.5 0 7.5 0" Height="25" Width="25" Source="{Binding ModuleIcon}"/>
|
||||
<TextBlock Foreground="{StaticResource DeepPurple_A100}" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Left" Text="{Binding ModulName}"/>
|
||||
<Border Background="{Binding StatusIndicator}" Grid.Column="3">
|
||||
<Border CornerRadius="0 5 0 0" Background="{Binding StatusIndicator}" Grid.Column="3">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
@@ -40,7 +41,7 @@
|
||||
<SolidColorBrush Color="White" Opacity="0.87"/>
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
<Border Grid.Column="1" HorizontalAlignment="Right" Background="{Binding StatusIndicatorBG}" Padding="6">
|
||||
<Border CornerRadius="0 5 0 0" Grid.Column="1" HorizontalAlignment="Right" Background="{Binding StatusIndicatorBG}" Padding="6">
|
||||
<Ellipse Fill="{Binding StatusIndicator}" StrokeThickness="0" Width="25" Height="25"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
@@ -149,7 +150,7 @@
|
||||
BackgroundBrush="{StaticResource BackgroundSurface_08dp}"
|
||||
Height="100"
|
||||
Width="100"
|
||||
Value="60"
|
||||
Value="{Binding ServerInfo.CpuUsage}"
|
||||
IndicatorBrush="{StaticResource Teal_A100}"
|
||||
/>
|
||||
<TextBlock
|
||||
@@ -167,7 +168,7 @@
|
||||
BackgroundBrush="{StaticResource BackgroundSurface_08dp}"
|
||||
Height="100"
|
||||
Width="100"
|
||||
Value="60"
|
||||
Value="{Binding ServerInfo.GpuUsage}"
|
||||
IndicatorBrush="{StaticResource Teal_A100}"
|
||||
/>
|
||||
<TextBlock
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Text;
|
||||
|
||||
namespace Server_Dashboard {
|
||||
class DashboardModule {
|
||||
public string ModulName { get; set; }
|
||||
public string ModuleName { get; set; }
|
||||
public string Creator { get; set; }
|
||||
public ServerInformation ServerInfo { get; set; }
|
||||
public string StatusIndicator { get; set; }
|
||||
|
||||
12
Server Dashboard/DashboardModules/NewModuleInformation.cs
Normal file
12
Server Dashboard/DashboardModules/NewModuleInformation.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Server_Dashboard.DashboardModules {
|
||||
class NewModuleInformation {
|
||||
public string ServerName { get; set; }
|
||||
public string Username { get; set; }
|
||||
public string IPAdress { get; set; }
|
||||
public int Port { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -13,5 +13,7 @@ namespace Server_Dashboard {
|
||||
public string DeployDate { get; set; }
|
||||
public string PublicIpAdress { get; set; }
|
||||
public string PrivateIpAdress { get; set; }
|
||||
public string GpuUsage { get; set; }
|
||||
public string CpuUsage { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,53 @@ namespace Server_Dashboard {
|
||||
return Convert.ToBoolean(valid);
|
||||
}
|
||||
|
||||
public static bool CheckCookie(string cookie, string username) {
|
||||
string valid = "False";
|
||||
ConnectToDatabase(con => {
|
||||
string query = "EXEC CheckUserCookie @Cookie = @cookie, @UserName = @username, @Valid = @valid OUTPUT";
|
||||
using (SqlCommand com = new SqlCommand(query, con)) {
|
||||
com.Parameters.AddWithValue("@cookie", cookie);
|
||||
com.Parameters.AddWithValue("@username", username);
|
||||
com.Parameters.Add("@valid", SqlDbType.NVarChar, 250);
|
||||
com.Parameters["@valid"].Direction = ParameterDirection.Output;
|
||||
com.ExecuteNonQuery();
|
||||
valid = Convert.ToString(com.Parameters["@Valid"].Value);
|
||||
}
|
||||
});
|
||||
return Convert.ToBoolean(valid);
|
||||
}
|
||||
|
||||
public static bool DeleteCookie(string username) {
|
||||
string valid = "False";
|
||||
ConnectToDatabase(con => {
|
||||
string query = "EXEC DeleteUserCookie @Username = @username, @ResponseMessage = @response OUTPUT";
|
||||
using (SqlCommand com = new SqlCommand(query, con)) {
|
||||
com.Parameters.AddWithValue("@username", username);
|
||||
com.Parameters.Add("@response", SqlDbType.NVarChar, 250);
|
||||
com.Parameters["@response"].Direction = ParameterDirection.Output;
|
||||
com.ExecuteNonQuery();
|
||||
valid = Convert.ToString(com.Parameters["@ResponseMessage"].Value);
|
||||
}
|
||||
});
|
||||
return Convert.ToBoolean(valid);
|
||||
}
|
||||
|
||||
public static bool AddCookie(string cookie, string username) {
|
||||
string valid = "False";
|
||||
ConnectToDatabase(con => {
|
||||
string query = "EXEC AddCookieToUser @Cookie = @cookie, @UserName = @username, @ResponseMessage = @response OUTPUT";
|
||||
using (SqlCommand com = new SqlCommand(query, con)) {
|
||||
com.Parameters.AddWithValue("@cookie", cookie);
|
||||
com.Parameters.AddWithValue("@username", username);
|
||||
com.Parameters.Add("@response", SqlDbType.NVarChar, 250);
|
||||
com.Parameters["@response"].Direction = ParameterDirection.Output;
|
||||
com.ExecuteNonQuery();
|
||||
valid = Convert.ToString(com.Parameters["@ResponseMessage"].Value);
|
||||
}
|
||||
});
|
||||
return Convert.ToBoolean(valid);
|
||||
}
|
||||
|
||||
#region Private methods
|
||||
/// <summary>
|
||||
/// Opens a database connection
|
||||
|
||||
62
Server Dashboard/Properties/Settings.Designer.cs
generated
Normal file
62
Server Dashboard/Properties/Settings.Designer.cs
generated
Normal file
@@ -0,0 +1,62 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Server_Dashboard.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string Cookies {
|
||||
get {
|
||||
return ((string)(this["Cookies"]));
|
||||
}
|
||||
set {
|
||||
this["Cookies"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string Username {
|
||||
get {
|
||||
return ((string)(this["Username"]));
|
||||
}
|
||||
set {
|
||||
this["Username"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool RememberMe {
|
||||
get {
|
||||
return ((bool)(this["RememberMe"]));
|
||||
}
|
||||
set {
|
||||
this["RememberMe"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
15
Server Dashboard/Properties/Settings.settings
Normal file
15
Server Dashboard/Properties/Settings.settings
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="Server_Dashboard.Properties" GeneratedClassName="Settings">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="Cookies" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="Username" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="RememberMe" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@@ -44,6 +44,10 @@
|
||||
<PackageReference Include="System.Data.SqlClient" Version="4.8.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Server Dashboard Socket\Server Dashboard Socket.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.Expression.Drawing">
|
||||
<HintPath>..\..\..\..\..\..\Program Files (x86)\Microsoft SDKs\Expression\Blend\.NETFramework\v4.0\Libraries\Microsoft.Expression.Drawing.dll</HintPath>
|
||||
@@ -78,6 +82,18 @@
|
||||
<Compile Update="Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Properties\Settings.Designer.cs">
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -6,20 +6,33 @@ using System.Text;
|
||||
namespace Server_Dashboard {
|
||||
class DashboardModuleViewModel : BaseViewModel {
|
||||
public ObservableCollection<DashboardModule> Modules { get; set; }
|
||||
private int gpuUsage;
|
||||
|
||||
public int GPUUsage {
|
||||
get { return gpuUsage; }
|
||||
set {
|
||||
if(value != gpuUsage)
|
||||
gpuUsage = value;
|
||||
OnPropertyChanged(nameof(gpuUsage));
|
||||
}
|
||||
}
|
||||
|
||||
public DashboardModuleViewModel() {
|
||||
Modules = new ObservableCollection<DashboardModule>();
|
||||
for (int i = 0; i < 10; i++) {
|
||||
Modules.Add(new DashboardModule(true) {
|
||||
ModulName = "TestModule",
|
||||
ModuleName = "TestModule",
|
||||
Creator = "Username",
|
||||
ModuleIcon = "../../Assets/Images/PlaceHolderModuleLight.png",
|
||||
CreationDate = DateTime.Now.ToString(),
|
||||
ServerInfo = new ServerInformation() {
|
||||
GpuUsage = "20",
|
||||
CpuUsage = "20",
|
||||
CpuTemp = "88.88",
|
||||
DeployDate = DateTime.Now.ToString(),
|
||||
GpuTemp = "69.69",
|
||||
ServerName = "Ubuntu",
|
||||
OSUserName = "crylia",
|
||||
OSUserName = "crylia " + i,
|
||||
PrivateIpAdress = "192.168.1.1",
|
||||
PublicIpAdress = "85.69.102.58",
|
||||
Uptime = DateTime.Now.ToString()
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections.ObjectModel;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using Server_Dashboard_Socket;
|
||||
|
||||
namespace Server_Dashboard {
|
||||
class DashboardViewModel : BaseViewModel {
|
||||
@@ -30,26 +31,30 @@ namespace Server_Dashboard {
|
||||
}
|
||||
|
||||
public DashboardViewModel() {
|
||||
EchoServer echoServer = new EchoServer();
|
||||
echoServer.Start();
|
||||
OpenLinkCommand = new RelayCommand(OpenLink);
|
||||
CreateNewModuleCommand = new RelayCommand(CreateNewModule);
|
||||
OpenNewModuleWindowCommand = new RelayCommand(OpenNewModuleWindow);
|
||||
CreateModuleCommand = new RelayCommand(CreateModule);
|
||||
Modules = dmvm.Modules;
|
||||
|
||||
}
|
||||
|
||||
public ICommand OpenLinkCommand { get; set; }
|
||||
public ICommand CreateNewModuleCommand { get; set; }
|
||||
|
||||
public ICommand OpenNewModuleWindowCommand { get; set; }
|
||||
public ICommand CreateModuleCommand { get; set; }
|
||||
private void OpenLink(object param) {
|
||||
Process.Start(new ProcessStartInfo((string)param) { UseShellExecute = true });
|
||||
}
|
||||
|
||||
private void CreateNewModule(object param) {
|
||||
private void OpenNewModuleWindow(object param) {
|
||||
CreateModulePopup cmp = new CreateModulePopup {
|
||||
DataContext = this
|
||||
};
|
||||
cmp.Owner = Application.Current.MainWindow;
|
||||
cmp.WindowStartupLocation = WindowStartupLocation.CenterOwner;
|
||||
cmp.WindowStartupLocation = WindowStartupLocation.CenterScreen;
|
||||
cmp.ShowDialog();
|
||||
}
|
||||
private void CreateModule(object param) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using Server_Dashboard.Views;
|
||||
using Server_Dashboard.Properties;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Security;
|
||||
using System.Text;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace Server_Dashboard {
|
||||
@@ -29,10 +27,26 @@ namespace Server_Dashboard {
|
||||
OnPropertyChanged(nameof(errorText));
|
||||
}
|
||||
}
|
||||
|
||||
private bool rememberUser;
|
||||
|
||||
public bool RememberUser {
|
||||
get { return rememberUser; }
|
||||
set {
|
||||
if(value != rememberUser)
|
||||
rememberUser = value;
|
||||
OnPropertyChanged(nameof(rememberUser));
|
||||
}
|
||||
}
|
||||
|
||||
public Action Close { get ; set; }
|
||||
|
||||
public LoginViewModel() {
|
||||
LoginCommand = new RelayCommand(Login);
|
||||
if (!String.IsNullOrEmpty(Settings.Default.Username)) {
|
||||
Username = Settings.Default.Username;
|
||||
RememberUser = Settings.Default.RememberMe;
|
||||
}
|
||||
}
|
||||
|
||||
public ICommand LoginCommand { get; set; }
|
||||
@@ -40,6 +54,24 @@ namespace Server_Dashboard {
|
||||
private void Login(object parameter) {
|
||||
if (!String.IsNullOrWhiteSpace(Username) && !String.IsNullOrWhiteSpace((parameter as IHavePassword).SecurePassword.Unsecure())) {
|
||||
if (DatabaseHandler.CheckLogin(Username, (parameter as IHavePassword).SecurePassword.Unsecure())) {
|
||||
if (RememberUser && !String.IsNullOrEmpty(Settings.Default.Cookies)) {
|
||||
DatabaseHandler.CheckCookie(Settings.Default.Cookies, Username);
|
||||
}
|
||||
if (!RememberUser && !String.IsNullOrEmpty(Settings.Default.Cookies)) {
|
||||
Settings.Default.Cookies = null;
|
||||
Settings.Default.Username = "";
|
||||
Settings.Default.RememberMe = false;
|
||||
Settings.Default.Save();
|
||||
DatabaseHandler.DeleteCookie(Username);
|
||||
}
|
||||
if (RememberUser && String.IsNullOrEmpty(Settings.Default.Cookies)) {
|
||||
var guid = new Guid().ToString() + Username;
|
||||
Settings.Default.Cookies = guid;
|
||||
Settings.Default.Username = Username;
|
||||
Settings.Default.RememberMe = true;
|
||||
Settings.Default.Save();
|
||||
DatabaseHandler.AddCookie(Username, guid);
|
||||
}
|
||||
DashboardWindow window = new DashboardWindow();
|
||||
window.Show();
|
||||
Close?.Invoke();
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</Grid.RowDefinitions>
|
||||
<Button
|
||||
Grid.Row="0"
|
||||
Command="{Binding CreateNewModuleCommand}"
|
||||
Command="{Binding OpenNewModuleWindowCommand}"
|
||||
Content="New Module"
|
||||
Height="50"
|
||||
Margin="5 10 5 0" Cursor="Hand"
|
||||
@@ -41,14 +41,14 @@
|
||||
/>
|
||||
<Button
|
||||
Grid.Row="1"
|
||||
Command="{Binding DeleteModuleCommand}"
|
||||
Command="{Binding OpenDeleteModuleWindowCommand}"
|
||||
Content="Remove Module"
|
||||
Height="50"
|
||||
Margin="5 10 5 0"
|
||||
/>
|
||||
<Button
|
||||
Grid.Row="2"
|
||||
Command="{Binding UpdateModuleCommand}"
|
||||
Command="{Binding OpenUpdateModuleWindowCommand}"
|
||||
Content="Change Module"
|
||||
Height="50"
|
||||
Margin="5 10 5 0" Cursor="Hand"
|
||||
|
||||
@@ -18,7 +18,6 @@ namespace Server_Dashboard.Views.DashboardPages {
|
||||
public partial class MainDashboardPage : UserControl {
|
||||
public MainDashboardPage() {
|
||||
InitializeComponent();
|
||||
DataContext = new DashboardViewModel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -156,6 +156,11 @@
|
||||
}
|
||||
},
|
||||
"System.Security.Principal.Windows/4.7.0": {},
|
||||
"Server Dashboard Socket/1.0.0": {
|
||||
"runtime": {
|
||||
"Server Dashboard Socket.dll": {}
|
||||
}
|
||||
},
|
||||
"Microsoft.Expression.Drawing/4.0.0.0": {
|
||||
"runtime": {
|
||||
"Microsoft.Expression.Drawing.dll": {
|
||||
@@ -263,6 +268,11 @@
|
||||
"path": "system.security.principal.windows/4.7.0",
|
||||
"hashPath": "system.security.principal.windows.4.7.0.nupkg.sha512"
|
||||
},
|
||||
"Server Dashboard Socket/1.0.0": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"Microsoft.Expression.Drawing/4.0.0.0": {
|
||||
"type": "reference",
|
||||
"serviceable": false,
|
||||
|
||||
Binary file not shown.
@@ -1,9 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" >
|
||||
<section name="Server_Dashboard.Properties.Settings" type="System.Configuration.ClientSettingsSection, System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<connectionStrings>
|
||||
<add name="ServerDashboardDB" connectionString="Server=localhost;Database=ServerDashboardDB;User Id=SA;Password=Me262HG3;"/>
|
||||
</connectionStrings>
|
||||
<startup>
|
||||
<supportedRuntime version="v3.1.13" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
<userSettings>
|
||||
<Server_Dashboard.Properties.Settings>
|
||||
<setting name="Username" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
</Server_Dashboard.Properties.Settings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
Binary file not shown.
@@ -1,11 +1,11 @@
|
||||
#pragma checksum "..\..\..\App.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "8B13C63F73D8B03B1CC973E996B230B95776E3E8"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#pragma checksum "..\..\..\App.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "8B13C63F73D8B03B1CC973E996B230B95776E3E8"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
Binary file not shown.
@@ -1,11 +1,11 @@
|
||||
#pragma checksum "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "32E40DCB8D29DC9D6CAF64DBB32922B5F29B846C"
|
||||
#pragma checksum "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "0EFE1CD6D3BEC2F7CABDA72A79271A24F45A2CA8"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
public partial class CreateModulePopup : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 100 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
#line 105 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox ServerName;
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 146 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
#line 151 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.PasswordBox Password;
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 151 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
#line 156 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock PasswordHint;
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 192 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
#line 197 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox UserName;
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 236 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
#line 241 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox IPAdress;
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 273 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
#line 278 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox Port;
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#pragma checksum "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "32E40DCB8D29DC9D6CAF64DBB32922B5F29B846C"
|
||||
#pragma checksum "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "0EFE1CD6D3BEC2F7CABDA72A79271A24F45A2CA8"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
public partial class CreateModulePopup : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 100 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
#line 105 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox ServerName;
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 146 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
#line 151 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.PasswordBox Password;
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 151 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
#line 156 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock PasswordHint;
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 192 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
#line 197 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox UserName;
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 236 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
#line 241 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox IPAdress;
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 273 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
#line 278 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox Port;
|
||||
|
||||
|
||||
Binary file not shown.
@@ -1,11 +1,11 @@
|
||||
#pragma checksum "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "17E1D8A225A205E6419F31597D149EB5F8DCE3B4"
|
||||
#pragma checksum "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "E96EB8CBB00924E817B4F6983981D68244368A22"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace Server_Dashboard.Controls.DoubleRoundProgressBar {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 44 "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml"
|
||||
#line 45 "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Shapes.Ellipse Seperator;
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace Server_Dashboard.Controls.DoubleRoundProgressBar {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 54 "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml"
|
||||
#line 55 "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Shapes.Ellipse Seperator2;
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace Server_Dashboard.Controls.DoubleRoundProgressBar {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 80 "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml"
|
||||
#line 81 "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Shapes.Ellipse Border;
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#pragma checksum "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "17E1D8A225A205E6419F31597D149EB5F8DCE3B4"
|
||||
#pragma checksum "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "E96EB8CBB00924E817B4F6983981D68244368A22"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace Server_Dashboard.Controls.DoubleRoundProgressBar {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 44 "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml"
|
||||
#line 45 "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Shapes.Ellipse Seperator;
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace Server_Dashboard.Controls.DoubleRoundProgressBar {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 54 "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml"
|
||||
#line 55 "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Shapes.Ellipse Seperator2;
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace Server_Dashboard.Controls.DoubleRoundProgressBar {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 80 "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml"
|
||||
#line 81 "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Shapes.Ellipse Border;
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#pragma checksum "..\..\..\..\..\Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "088662625301BAB0ABA31EF9E2688BA689BC4C48"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#pragma checksum "..\..\..\..\..\Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "088662625301BAB0ABA31EF9E2688BA689BC4C48"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
Binary file not shown.
@@ -1,11 +1,11 @@
|
||||
#pragma checksum "..\..\..\..\..\Controls\ServerModules\ServerModule.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "633A641D03E1AF034F36D2AA572BA272CB58A758"
|
||||
#pragma checksum "..\..\..\..\..\Controls\ServerModules\ServerModule.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "12FD63773F2E25B061A0E9C5E434CAC0A984B464"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#pragma checksum "..\..\..\..\..\Controls\ServerModules\ServerModule.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "633A641D03E1AF034F36D2AA572BA272CB58A758"
|
||||
#pragma checksum "..\..\..\..\..\Controls\ServerModules\ServerModule.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "12FD63773F2E25B061A0E9C5E434CAC0A984B464"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#pragma checksum "..\..\..\LoginWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "DC5E405274889CDB3CDAE3C78BC0E5CCC83DDAB2"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#pragma checksum "..\..\..\LoginWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "DC5E405274889CDB3CDAE3C78BC0E5CCC83DDAB2"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
Binary file not shown.
@@ -1 +1 @@
|
||||
bfa9f92dc8e415b87a2c5cdc24b3325d2555a4a3
|
||||
b852d494999982b43c2f775a16d53a25a0a321b6
|
||||
|
||||
@@ -52,3 +52,5 @@ C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\obj\Debug\netcor
|
||||
C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\obj\Debug\netcoreapp3.1\Controls\HalfRoundProgressBar\HalfRoundProgressBar.baml
|
||||
C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\obj\Debug\netcoreapp3.1\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.g.cs
|
||||
C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\obj\Debug\netcoreapp3.1\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.baml
|
||||
C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\bin\Debug\netcoreapp3.1\Server Dashboard Socket.dll
|
||||
C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\bin\Debug\netcoreapp3.1\Server Dashboard Socket.pdb
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -12,8 +12,8 @@ TRACE;DEBUG;NETCOREAPP;NETCOREAPP3_1;
|
||||
C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\App.xaml
|
||||
7-211744036
|
||||
|
||||
25689428640
|
||||
205685840547
|
||||
27-1860005045
|
||||
2061472260849
|
||||
Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml;Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml;Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml;Controls\ServerModules\ServerModule.xaml;LoginWindow.xaml;Views\DashboardPages\MainDashboardPage.xaml;Views\DashboardWindow.xaml;
|
||||
|
||||
False
|
||||
|
||||
@@ -12,9 +12,9 @@ TRACE;DEBUG;NETCOREAPP;NETCOREAPP3_1;
|
||||
C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\App.xaml
|
||||
7-211744036
|
||||
|
||||
27-909898630
|
||||
205685840547
|
||||
29835634981
|
||||
2061472260849
|
||||
Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml;Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml;Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml;Controls\ServerModules\ServerModule.xaml;LoginWindow.xaml;Views\DashboardPages\MainDashboardPage.xaml;Views\DashboardWindow.xaml;
|
||||
|
||||
True
|
||||
False
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\obj\Debug\netcoreapp3.1\GeneratedInternalTypeHelper.g.i.cs
|
||||
FC:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\App.xaml;;
|
||||
FC:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml;;
|
||||
FC:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml;;
|
||||
FC:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml;;
|
||||
FC:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\Controls\ServerModules\ServerModule.xaml;;
|
||||
FC:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\LoginWindow.xaml;;
|
||||
FC:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\Views\DashboardPages\MainDashboardPage.xaml;;
|
||||
FC:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\Views\DashboardWindow.xaml;;
|
||||
|
||||
Binary file not shown.
@@ -1,11 +1,11 @@
|
||||
#pragma checksum "..\..\..\..\..\Views\DashboardPages\MainDashboardPage.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "12AD3CC2ED4678AD83292A0BDCB8AC15BCB96FEB"
|
||||
#pragma checksum "..\..\..\..\..\Views\DashboardPages\MainDashboardPage.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "7F9B87538E0489397D1B928CEE51EE7AE4712B3B"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#pragma checksum "..\..\..\..\..\Views\DashboardPages\MainDashboardPage.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "12AD3CC2ED4678AD83292A0BDCB8AC15BCB96FEB"
|
||||
#pragma checksum "..\..\..\..\..\Views\DashboardPages\MainDashboardPage.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "7F9B87538E0489397D1B928CEE51EE7AE4712B3B"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#pragma checksum "..\..\..\..\Views\DashboardWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "E2931D9FE448B25CA4843C7DB4CD838F94FDDCEB"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#pragma checksum "..\..\..\..\Views\DashboardWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "E2931D9FE448B25CA4843C7DB4CD838F94FDDCEB"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -4,6 +4,64 @@
|
||||
"C:\\Users\\Crylia\\Documents\\Git\\Server Dashboard\\Server Dashboard\\Server Dashboard.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"C:\\Users\\Crylia\\Documents\\Git\\Server Dashboard\\Server Dashboard Socket\\Server Dashboard Socket.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Users\\Crylia\\Documents\\Git\\Server Dashboard\\Server Dashboard Socket\\Server Dashboard Socket.csproj",
|
||||
"projectName": "Server Dashboard Socket",
|
||||
"projectPath": "C:\\Users\\Crylia\\Documents\\Git\\Server Dashboard\\Server Dashboard Socket\\Server Dashboard Socket.csproj",
|
||||
"packagesPath": "C:\\Users\\Crylia\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\Crylia\\Documents\\Git\\Server Dashboard\\Server Dashboard Socket\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"fallbackFolders": [
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
|
||||
],
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\Crylia\\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": [
|
||||
"netcoreapp3.1"
|
||||
],
|
||||
"sources": {
|
||||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp3.1": {
|
||||
"targetAlias": "netcoreapp3.1",
|
||||
"projectReferences": {}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp3.1": {
|
||||
"targetAlias": "netcoreapp3.1",
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"frameworkReferences": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.201\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"C:\\Users\\Crylia\\Documents\\Git\\Server Dashboard\\Server Dashboard\\Server Dashboard.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
@@ -31,7 +89,11 @@
|
||||
"frameworks": {
|
||||
"netcoreapp3.1": {
|
||||
"targetAlias": "netcoreapp3.1",
|
||||
"projectReferences": {}
|
||||
"projectReferences": {
|
||||
"C:\\Users\\Crylia\\Documents\\Git\\Server Dashboard\\Server Dashboard Socket\\Server Dashboard Socket.csproj": {
|
||||
"projectPath": "C:\\Users\\Crylia\\Documents\\Git\\Server Dashboard\\Server Dashboard Socket\\Server Dashboard Socket.csproj"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
|
||||
@@ -186,6 +186,16 @@
|
||||
"rid": "win"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Server Dashboard Socket/1.0.0": {
|
||||
"type": "project",
|
||||
"framework": ".NETCoreApp,Version=v3.1",
|
||||
"compile": {
|
||||
"bin/placeholder/Server Dashboard Socket.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"bin/placeholder/Server Dashboard Socket.dll": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -715,12 +725,18 @@
|
||||
"useSharedDesignerContext.txt",
|
||||
"version.txt"
|
||||
]
|
||||
},
|
||||
"Server Dashboard Socket/1.0.0": {
|
||||
"type": "project",
|
||||
"path": "../Server Dashboard Socket/Server Dashboard Socket.csproj",
|
||||
"msbuildProject": "../Server Dashboard Socket/Server Dashboard Socket.csproj"
|
||||
}
|
||||
},
|
||||
"projectFileDependencyGroups": {
|
||||
".NETCoreApp,Version=v3.1": [
|
||||
"Microsoft.Xaml.Behaviors.Wpf >= 1.1.31",
|
||||
"SSH.NET >= 2020.0.1",
|
||||
"Server Dashboard Socket >= 1.0.0",
|
||||
"SharpVectors >= 1.7.1",
|
||||
"System.Data.SqlClient >= 4.8.2"
|
||||
]
|
||||
@@ -756,7 +772,11 @@
|
||||
"frameworks": {
|
||||
"netcoreapp3.1": {
|
||||
"targetAlias": "netcoreapp3.1",
|
||||
"projectReferences": {}
|
||||
"projectReferences": {
|
||||
"C:\\Users\\Crylia\\Documents\\Git\\Server Dashboard\\Server Dashboard Socket\\Server Dashboard Socket.csproj": {
|
||||
"projectPath": "C:\\Users\\Crylia\\Documents\\Git\\Server Dashboard\\Server Dashboard Socket\\Server Dashboard Socket.csproj"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "1rW9kwGYrr8Er0KtlcGVGLHnp29SqldnKenIO5rFzWQX4CBpQnZU6bweIEFosX/O3wuDcG5e4WCUibETBvXenw==",
|
||||
"dgSpecHash": "HXRDkeOq6+C/ByDU4F1SMIP1JghG7OjBlyJpDMYJu2MsBWBCCGqu1D1TkY9/AYS2Wb1ebiR2JrXDxpATbPuPhQ==",
|
||||
"success": true,
|
||||
"projectFilePath": "C:\\Users\\Crylia\\Documents\\Git\\Server Dashboard\\Server Dashboard\\Server Dashboard.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
3
Socket/App.config
Normal file
3
Socket/App.config
Normal file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
</configuration>
|
||||
33
Socket/EchoServer.cs
Normal file
33
Socket/EchoServer.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SocketServer {
|
||||
public class EchoServer {
|
||||
public void Start(int port = 9656) {
|
||||
IPEndPoint endPoint = new IPEndPoint(IPAddress.Loopback, port);
|
||||
Socket socket = new Socket(endPoint.AddressFamily, SocketType.Stream, SecurityProtocolType.Tcp);
|
||||
socket.Bind(endPoint);
|
||||
socket.Listen(128);
|
||||
_ = Task.Run(() => DoEcho(socket));
|
||||
}
|
||||
private async Task DoEcho(Socket socket) {
|
||||
while (true) {
|
||||
Socket clientSocket = await Task.Factory.FromAsync(
|
||||
new Func<AsyncCallback, object, IAsyncResult>(socket.BeginAccept),
|
||||
new Func<IAsyncResult, Socket>(socket.EndAccept),
|
||||
null).ConfigureAwait(false);
|
||||
using (NetworkStream nStream = new NetworkStream(clientSocket, true)) {
|
||||
byte[] buffer = new byte[1024];
|
||||
while (true) {
|
||||
int bytesRead = await nStream.ReadAsync(buffer, 0, buffer.Length).ConfigureAwait(false);
|
||||
if (bytesRead == 0)
|
||||
break;
|
||||
await nStream.WriteAsync(buffer, 0, bytesRead).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
10
Socket/Server.cs
Normal file
10
Socket/Server.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SocketServer {
|
||||
class Server {
|
||||
}
|
||||
}
|
||||
46
Socket/SocketServer.csproj
Normal file
46
Socket/SocketServer.csproj
Normal file
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{31861EFE-4D24-489C-9615-A3B22FCB7041}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>Socket</RootNamespace>
|
||||
<AssemblyName>Socket</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="EchoServer.cs" />
|
||||
<Compile Include="Server.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
|
||||
BIN
Socket/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
Normal file
BIN
Socket/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
Normal file
Binary file not shown.
1
Socket/obj/Debug/Socket.csproj.CoreCompileInputs.cache
Normal file
1
Socket/obj/Debug/Socket.csproj.CoreCompileInputs.cache
Normal file
@@ -0,0 +1 @@
|
||||
07442253ff0d2d71b56b29a5132f6fc63b7b6ee7
|
||||
2
Socket/obj/Debug/Socket.csproj.FileListAbsolute.txt
Normal file
2
Socket/obj/Debug/Socket.csproj.FileListAbsolute.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
C:\Users\Crylia\Documents\Git\Server Dashboard\Socket\obj\Debug\Socket.csprojAssemblyReference.cache
|
||||
C:\Users\Crylia\Documents\Git\Server Dashboard\Socket\obj\Debug\Socket.csproj.CoreCompileInputs.cache
|
||||
@@ -0,0 +1 @@
|
||||
07442253ff0d2d71b56b29a5132f6fc63b7b6ee7
|
||||
@@ -0,0 +1,2 @@
|
||||
C:\Users\Crylia\Documents\Git\Server Dashboard\Socket\obj\Debug\SocketServer.csproj.CoreCompileInputs.cache
|
||||
C:\Users\Crylia\Documents\Git\Server Dashboard\Socket\obj\Debug\SocketServer.csprojAssemblyReference.cache
|
||||
BIN
Socket/obj/Debug/SocketServer.csprojAssemblyReference.cache
Normal file
BIN
Socket/obj/Debug/SocketServer.csprojAssemblyReference.cache
Normal file
Binary file not shown.
Reference in New Issue
Block a user