Browse Source

initial commit

Ray-works 1 year ago
commit
761d471a8c

BIN
.vs/ChatClient/v16/.suo


+ 25 - 0
ChatClient.sln

@@ -0,0 +1,25 @@
1
+
2
+Microsoft Visual Studio Solution File, Format Version 12.00
3
+# Visual Studio Version 16
4
+VisualStudioVersion = 16.0.30104.148
5
+MinimumVisualStudioVersion = 10.0.40219.1
6
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChatClient", "ChatClient\ChatClient.csproj", "{F0C804A4-E883-456E-BF46-1A96569B9D6A}"
7
+EndProject
8
+Global
9
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
10
+		Debug|Any CPU = Debug|Any CPU
11
+		Release|Any CPU = Release|Any CPU
12
+	EndGlobalSection
13
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
14
+		{F0C804A4-E883-456E-BF46-1A96569B9D6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15
+		{F0C804A4-E883-456E-BF46-1A96569B9D6A}.Debug|Any CPU.Build.0 = Debug|Any CPU
16
+		{F0C804A4-E883-456E-BF46-1A96569B9D6A}.Release|Any CPU.ActiveCfg = Release|Any CPU
17
+		{F0C804A4-E883-456E-BF46-1A96569B9D6A}.Release|Any CPU.Build.0 = Release|Any CPU
18
+	EndGlobalSection
19
+	GlobalSection(SolutionProperties) = preSolution
20
+		HideSolutionNode = FALSE
21
+	EndGlobalSection
22
+	GlobalSection(ExtensibilityGlobals) = postSolution
23
+		SolutionGuid = {C0E69E91-4A27-45C9-AA2A-A5F20B31C911}
24
+	EndGlobalSection
25
+EndGlobal

+ 6 - 0
ChatClient/App.config

@@ -0,0 +1,6 @@
1
+<?xml version="1.0" encoding="utf-8" ?>
2
+<configuration>
3
+    <startup> 
4
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
5
+    </startup>
6
+</configuration>

+ 9 - 0
ChatClient/App.xaml

@@ -0,0 +1,9 @@
1
+<Application x:Class="ChatClient.App"
2
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4
+             xmlns:local="clr-namespace:ChatClient"
5
+             StartupUri="MainWindow.xaml">
6
+    <Application.Resources>
7
+         
8
+    </Application.Resources>
9
+</Application>

+ 17 - 0
ChatClient/App.xaml.cs

@@ -0,0 +1,17 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Configuration;
4
+using System.Data;
5
+using System.Linq;
6
+using System.Threading.Tasks;
7
+using System.Windows;
8
+
9
+namespace ChatClient
10
+{
11
+    /// <summary>
12
+    /// Interaktionslogik für "App.xaml"
13
+    /// </summary>
14
+    public partial class App : Application
15
+    {
16
+    }
17
+}

+ 98 - 0
ChatClient/ChatClient.csproj

@@ -0,0 +1,98 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4
+  <PropertyGroup>
5
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7
+    <ProjectGuid>{F0C804A4-E883-456E-BF46-1A96569B9D6A}</ProjectGuid>
8
+    <OutputType>WinExe</OutputType>
9
+    <RootNamespace>ChatClient</RootNamespace>
10
+    <AssemblyName>ChatClient</AssemblyName>
11
+    <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
12
+    <FileAlignment>512</FileAlignment>
13
+    <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
14
+    <WarningLevel>4</WarningLevel>
15
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
16
+    <Deterministic>true</Deterministic>
17
+  </PropertyGroup>
18
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
19
+    <PlatformTarget>AnyCPU</PlatformTarget>
20
+    <DebugSymbols>true</DebugSymbols>
21
+    <DebugType>full</DebugType>
22
+    <Optimize>false</Optimize>
23
+    <OutputPath>bin\Debug\</OutputPath>
24
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
25
+    <ErrorReport>prompt</ErrorReport>
26
+    <WarningLevel>4</WarningLevel>
27
+  </PropertyGroup>
28
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
29
+    <PlatformTarget>AnyCPU</PlatformTarget>
30
+    <DebugType>pdbonly</DebugType>
31
+    <Optimize>true</Optimize>
32
+    <OutputPath>bin\Release\</OutputPath>
33
+    <DefineConstants>TRACE</DefineConstants>
34
+    <ErrorReport>prompt</ErrorReport>
35
+    <WarningLevel>4</WarningLevel>
36
+  </PropertyGroup>
37
+  <ItemGroup>
38
+    <Reference Include="System" />
39
+    <Reference Include="System.Data" />
40
+    <Reference Include="System.Xml" />
41
+    <Reference Include="Microsoft.CSharp" />
42
+    <Reference Include="System.Core" />
43
+    <Reference Include="System.Xml.Linq" />
44
+    <Reference Include="System.Data.DataSetExtensions" />
45
+    <Reference Include="System.Net.Http" />
46
+    <Reference Include="System.Xaml">
47
+      <RequiredTargetFramework>4.0</RequiredTargetFramework>
48
+    </Reference>
49
+    <Reference Include="WindowsBase" />
50
+    <Reference Include="PresentationCore" />
51
+    <Reference Include="PresentationFramework" />
52
+  </ItemGroup>
53
+  <ItemGroup>
54
+    <ApplicationDefinition Include="App.xaml">
55
+      <Generator>MSBuild:Compile</Generator>
56
+      <SubType>Designer</SubType>
57
+    </ApplicationDefinition>
58
+    <Page Include="MainWindow.xaml">
59
+      <Generator>MSBuild:Compile</Generator>
60
+      <SubType>Designer</SubType>
61
+    </Page>
62
+    <Compile Include="App.xaml.cs">
63
+      <DependentUpon>App.xaml</DependentUpon>
64
+      <SubType>Code</SubType>
65
+    </Compile>
66
+    <Compile Include="MainWindow.xaml.cs">
67
+      <DependentUpon>MainWindow.xaml</DependentUpon>
68
+      <SubType>Code</SubType>
69
+    </Compile>
70
+  </ItemGroup>
71
+  <ItemGroup>
72
+    <Compile Include="Properties\AssemblyInfo.cs">
73
+      <SubType>Code</SubType>
74
+    </Compile>
75
+    <Compile Include="Properties\Resources.Designer.cs">
76
+      <AutoGen>True</AutoGen>
77
+      <DesignTime>True</DesignTime>
78
+      <DependentUpon>Resources.resx</DependentUpon>
79
+    </Compile>
80
+    <Compile Include="Properties\Settings.Designer.cs">
81
+      <AutoGen>True</AutoGen>
82
+      <DependentUpon>Settings.settings</DependentUpon>
83
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
84
+    </Compile>
85
+    <EmbeddedResource Include="Properties\Resources.resx">
86
+      <Generator>ResXFileCodeGenerator</Generator>
87
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
88
+    </EmbeddedResource>
89
+    <None Include="Properties\Settings.settings">
90
+      <Generator>SettingsSingleFileGenerator</Generator>
91
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
92
+    </None>
93
+  </ItemGroup>
94
+  <ItemGroup>
95
+    <None Include="App.config" />
96
+  </ItemGroup>
97
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
98
+</Project>

+ 17 - 0
ChatClient/MainWindow.xaml

@@ -0,0 +1,17 @@
1
+<Window x:Class="ChatClient.MainWindow"
2
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4
+        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5
+        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6
+        xmlns:local="clr-namespace:ChatClient"
7
+        mc:Ignorable="d"
8
+        Title="MainWindow" Height="450" Width="800" WindowStartupLocation="CenterScreen" MinHeight="450" MinWidth="800">
9
+    <Grid Margin="0,0,2,0">
10
+        <TextBox x:Name="tb_message" Margin="10,0,121,11" TextWrapping="Wrap" KeyUp="tb_message_KeyUp" Height="23" VerticalAlignment="Bottom"/>
11
+        <Button x:Name="btn_send" Content="Send" Margin="0,0,10,10" Click="btn_send_Click" Height="24" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="106"/>
12
+        <TextBox x:Name="tb_nickname" HorizontalAlignment="Left" Margin="10,13,0,0" TextWrapping="Wrap" Width="156" KeyDown="tb_nickname_KeyDown" Height="23" VerticalAlignment="Top"/>
13
+        <Button x:Name="btn_set_nickname" Content="Set Nickname" Margin="171,13,0,0" VerticalAlignment="Top" Height="24" Click="btn_set_nickname_Click" HorizontalAlignment="Left" Width="108"/>
14
+        <TextBox x:Name="tb_chatframe" Margin="10,41,10,39" TextWrapping="Wrap" ScrollViewer.CanContentScroll="True" IsReadOnly="True" IsUndoEnabled="False" VerticalScrollBarVisibility="Auto" ClipToBounds="True" IsTabStop="False" Focusable="False"/>
15
+
16
+    </Grid>
17
+</Window>

+ 125 - 0
ChatClient/MainWindow.xaml.cs

@@ -0,0 +1,125 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Net.Sockets;
5
+using System.Text;
6
+using System.Threading;
7
+using System.Threading.Tasks;
8
+using System.Windows;
9
+using System.Windows.Controls;
10
+using System.Windows.Data;
11
+using System.Windows.Documents;
12
+using System.Windows.Input;
13
+using System.Windows.Media;
14
+using System.Windows.Media.Imaging;
15
+using System.Windows.Navigation;
16
+using System.Windows.Shapes;
17
+
18
+namespace ChatClient
19
+{
20
+    /// <summary>
21
+    /// Interaktionslogik für MainWindow.xaml
22
+    /// </summary>
23
+    public partial class MainWindow : Window
24
+    {
25
+        Socket s;
26
+        Thread receiverThread;
27
+        String nickname;
28
+
29
+        public MainWindow()
30
+        {
31
+            InitializeComponent();
32
+
33
+            tb_chatframe.Text = "";
34
+            tb_message.Clear();
35
+
36
+            s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
37
+            connectToServer();
38
+            receiverThread = new Thread(receiveMessage);
39
+            receiverThread.Start();
40
+        }
41
+
42
+        ~MainWindow()
43
+        {
44
+            if(receiverThread != null && receiverThread.IsAlive)
45
+                receiverThread.Interrupt();
46
+        }
47
+
48
+        private byte[] StringToByteArray(string str)
49
+        {
50
+            ASCIIEncoding enc = new ASCIIEncoding();
51
+            return enc.GetBytes(str);
52
+        }
53
+
54
+        private string ByteArrayToString(byte[] arr)
55
+        {
56
+            ASCIIEncoding enc = new ASCIIEncoding();
57
+            return enc.GetString(arr);
58
+        }
59
+
60
+        public void connectToServer()
61
+        {
62
+            String ip = "127.0.0.1";
63
+            int port = 7070;
64
+            s.Connect(ip, port);
65
+        }
66
+
67
+        public void receiveMessage()
68
+        {
69
+            for (;;)
70
+            {
71
+                byte[] msgBuffer = new byte[1024];
72
+                s.Receive(msgBuffer);
73
+                if (msgBuffer.Length > 0)
74
+                {
75
+                    String msg = ByteArrayToString(msgBuffer);
76
+                    tb_chatframe.Dispatcher.Invoke(new Action(() => { 
77
+                        tb_chatframe.Text += msg + Environment.NewLine; 
78
+                        tb_chatframe.ScrollToEnd();
79
+                    }));
80
+                    
81
+                }
82
+            }
83
+        }
84
+
85
+        public void sendMessage(String msg)
86
+        {
87
+            s.Send(StringToByteArray("msg\x01"+msg));
88
+        }
89
+
90
+        public void setNickname(String nickname)
91
+        {
92
+            s.Send(StringToByteArray("su\x01" + nickname));
93
+        }
94
+
95
+        private void btn_send_Click(object sender, RoutedEventArgs e)
96
+        {
97
+            sendMessage(tb_message.Text);
98
+            tb_chatframe.Text += nickname + ": " + tb_message.Text + Environment.NewLine;
99
+            tb_chatframe.ScrollToEnd();
100
+            tb_message.Clear();
101
+        }
102
+
103
+        private void btn_set_nickname_Click(object sender, RoutedEventArgs e)
104
+        {
105
+            setNickname(tb_nickname.Text);
106
+            nickname = tb_nickname.Text;
107
+        }
108
+
109
+        private void tb_message_KeyUp(object sender, KeyEventArgs e)
110
+        {
111
+            if(e.Key == Key.Enter)
112
+            {
113
+                btn_send_Click(sender, null);
114
+            }
115
+        }
116
+
117
+        private void tb_nickname_KeyDown(object sender, KeyEventArgs e)
118
+        {
119
+            if (e.Key == Key.Enter)
120
+            {
121
+                btn_set_nickname_Click(sender, null);
122
+            }
123
+        }
124
+    }
125
+}

+ 55 - 0
ChatClient/Properties/AssemblyInfo.cs

@@ -0,0 +1,55 @@
1
+using System.Reflection;
2
+using System.Resources;
3
+using System.Runtime.CompilerServices;
4
+using System.Runtime.InteropServices;
5
+using System.Windows;
6
+
7
+// Allgemeine Informationen über eine Assembly werden über die folgenden
8
+// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
9
+// die einer Assembly zugeordnet sind.
10
+[assembly: AssemblyTitle("ChatClient")]
11
+[assembly: AssemblyDescription("")]
12
+[assembly: AssemblyConfiguration("")]
13
+[assembly: AssemblyCompany("")]
14
+[assembly: AssemblyProduct("ChatClient")]
15
+[assembly: AssemblyCopyright("Copyright ©  2020")]
16
+[assembly: AssemblyTrademark("")]
17
+[assembly: AssemblyCulture("")]
18
+
19
+// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
20
+// für COM-Komponenten unsichtbar.  Wenn Sie auf einen Typ in dieser Assembly von
21
+// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
22
+[assembly: ComVisible(false)]
23
+
24
+//Um mit dem Erstellen lokalisierbarer Anwendungen zu beginnen, legen Sie
25
+//<UICulture>ImCodeVerwendeteKultur</UICulture> in der .csproj-Datei
26
+//in einer <PropertyGroup> fest.  Wenn Sie in den Quelldateien beispielsweise Deutsch
27
+//(Deutschland) verwenden, legen Sie <UICulture> auf \"de-DE\" fest.  Heben Sie dann die Auskommentierung
28
+//des nachstehenden NeutralResourceLanguage-Attributs auf.  Aktualisieren Sie "en-US" in der nachstehenden Zeile,
29
+//sodass es mit der UICulture-Einstellung in der Projektdatei übereinstimmt.
30
+
31
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32
+
33
+
34
+[assembly: ThemeInfo(
35
+    ResourceDictionaryLocation.None, //Speicherort der designspezifischen Ressourcenwörterbücher
36
+                                     //(wird verwendet, wenn eine Ressource auf der Seite nicht gefunden wird,
37
+                                     // oder in den Anwendungsressourcen-Wörterbüchern nicht gefunden werden kann.)
38
+    ResourceDictionaryLocation.SourceAssembly //Speicherort des generischen Ressourcenwörterbuchs
39
+                                              //(wird verwendet, wenn eine Ressource auf der Seite nicht gefunden wird,
40
+                                              // designspezifischen Ressourcenwörterbuch nicht gefunden werden kann.)
41
+)]
42
+
43
+
44
+// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
45
+//
46
+//      Hauptversion
47
+//      Nebenversion
48
+//      Buildnummer
49
+//      Revision
50
+//
51
+// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
52
+// indem Sie "*" wie unten gezeigt eingeben:
53
+// [assembly: AssemblyVersion("1.0.*")]
54
+[assembly: AssemblyVersion("1.0.0.0")]
55
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 71 - 0
ChatClient/Properties/Resources.Designer.cs

@@ -0,0 +1,71 @@
1
+//------------------------------------------------------------------------------
2
+// <auto-generated>
3
+//     Dieser Code wurde von einem Tool generiert.
4
+//     Laufzeitversion: 4.0.30319.42000
5
+//
6
+//     Änderungen an dieser Datei können fehlerhaftes Verhalten verursachen und gehen verloren, wenn
7
+//     der Code erneut generiert wird.
8
+// </auto-generated>
9
+//------------------------------------------------------------------------------
10
+
11
+namespace ChatClient.Properties
12
+{
13
+
14
+
15
+    /// <summary>
16
+    ///   Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
17
+    /// </summary>
18
+    // Diese Klasse wurde von der StronglyTypedResourceBuilder-Klasse
19
+    // über ein Tool wie ResGen oder Visual Studio automatisch generiert.
20
+    // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
21
+    // mit der Option /str erneut aus, oder erstellen Sie Ihr VS-Projekt neu.
22
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25
+    internal class Resources
26
+    {
27
+
28
+        private static global::System.Resources.ResourceManager resourceMan;
29
+
30
+        private static global::System.Globalization.CultureInfo resourceCulture;
31
+
32
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33
+        internal Resources()
34
+        {
35
+        }
36
+
37
+        /// <summary>
38
+        ///   Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
39
+        /// </summary>
40
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41
+        internal static global::System.Resources.ResourceManager ResourceManager
42
+        {
43
+            get
44
+            {
45
+                if ((resourceMan == null))
46
+                {
47
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ChatClient.Properties.Resources", typeof(Resources).Assembly);
48
+                    resourceMan = temp;
49
+                }
50
+                return resourceMan;
51
+            }
52
+        }
53
+
54
+        /// <summary>
55
+        ///   Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
56
+        ///   Ressourcenlookups, die diese stark typisierte Ressourcenklasse verwenden.
57
+        /// </summary>
58
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59
+        internal static global::System.Globalization.CultureInfo Culture
60
+        {
61
+            get
62
+            {
63
+                return resourceCulture;
64
+            }
65
+            set
66
+            {
67
+                resourceCulture = value;
68
+            }
69
+        }
70
+    }
71
+}

+ 117 - 0
ChatClient/Properties/Resources.resx

@@ -0,0 +1,117 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<root>
3
+  <!-- 
4
+    Microsoft ResX Schema 
5
+    
6
+    Version 2.0
7
+    
8
+    The primary goals of this format is to allow a simple XML format 
9
+    that is mostly human readable. The generation and parsing of the 
10
+    various data types are done through the TypeConverter classes 
11
+    associated with the data types.
12
+    
13
+    Example:
14
+    
15
+    ... ado.net/XML headers & schema ...
16
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
+    <resheader name="version">2.0</resheader>
18
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
+    </data>
25
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
+        <comment>This is a comment</comment>
28
+    </data>
29
+                
30
+    There are any number of "resheader" rows that contain simple 
31
+    name/value pairs.
32
+    
33
+    Each data row contains a name, and value. The row also contains a 
34
+    type or mimetype. Type corresponds to a .NET class that support 
35
+    text/value conversion through the TypeConverter architecture. 
36
+    Classes that don't support this are serialized and stored with the 
37
+    mimetype set.
38
+    
39
+    The mimetype is used for serialized objects, and tells the 
40
+    ResXResourceReader how to depersist the object. This is currently not 
41
+    extensible. For a given mimetype the value must be set accordingly:
42
+    
43
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
+    that the ResXResourceWriter will generate, however the reader can 
45
+    read any of the formats listed below.
46
+    
47
+    mimetype: application/x-microsoft.net.object.binary.base64
48
+    value   : The object must be serialized with 
49
+            : System.Serialization.Formatters.Binary.BinaryFormatter
50
+            : and then encoded with base64 encoding.
51
+    
52
+    mimetype: application/x-microsoft.net.object.soap.base64
53
+    value   : The object must be serialized with 
54
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
+            : and then encoded with base64 encoding.
56
+
57
+    mimetype: application/x-microsoft.net.object.bytearray.base64
58
+    value   : The object must be serialized into a byte array 
59
+            : using a System.ComponentModel.TypeConverter
60
+            : and then encoded with base64 encoding.
61
+    -->
62
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
+    <xsd:element name="root" msdata:IsDataSet="true">
64
+      <xsd:complexType>
65
+        <xsd:choice maxOccurs="unbounded">
66
+          <xsd:element name="metadata">
67
+            <xsd:complexType>
68
+              <xsd:sequence>
69
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
70
+              </xsd:sequence>
71
+              <xsd:attribute name="name" type="xsd:string" />
72
+              <xsd:attribute name="type" type="xsd:string" />
73
+              <xsd:attribute name="mimetype" type="xsd:string" />
74
+            </xsd:complexType>
75
+          </xsd:element>
76
+          <xsd:element name="assembly">
77
+            <xsd:complexType>
78
+              <xsd:attribute name="alias" type="xsd:string" />
79
+              <xsd:attribute name="name" type="xsd:string" />
80
+            </xsd:complexType>
81
+          </xsd:element>
82
+          <xsd:element name="data">
83
+            <xsd:complexType>
84
+              <xsd:sequence>
85
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
86
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
87
+              </xsd:sequence>
88
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
89
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
90
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
91
+            </xsd:complexType>
92
+          </xsd:element>
93
+          <xsd:element name="resheader">
94
+            <xsd:complexType>
95
+              <xsd:sequence>
96
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
97
+              </xsd:sequence>
98
+              <xsd:attribute name="name" type="xsd:string" use="required" />
99
+            </xsd:complexType>
100
+          </xsd:element>
101
+        </xsd:choice>
102
+      </xsd:complexType>
103
+    </xsd:element>
104
+  </xsd:schema>
105
+  <resheader name="resmimetype">
106
+    <value>text/microsoft-resx</value>
107
+  </resheader>
108
+  <resheader name="version">
109
+    <value>2.0</value>
110
+  </resheader>
111
+  <resheader name="reader">
112
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
113
+  </resheader>
114
+  <resheader name="writer">
115
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
+  </resheader>
117
+</root>

+ 30 - 0
ChatClient/Properties/Settings.Designer.cs

@@ -0,0 +1,30 @@
1
+//------------------------------------------------------------------------------
2
+// <auto-generated>
3
+//     This code was generated by a tool.
4
+//     Runtime Version:4.0.30319.42000
5
+//
6
+//     Changes to this file may cause incorrect behavior and will be lost if
7
+//     the code is regenerated.
8
+// </auto-generated>
9
+//------------------------------------------------------------------------------
10
+
11
+namespace ChatClient.Properties
12
+{
13
+
14
+
15
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18
+    {
19
+
20
+        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21
+
22
+        public static Settings Default
23
+        {
24
+            get
25
+            {
26
+                return defaultInstance;
27
+            }
28
+        }
29
+    }
30
+}

+ 7 - 0
ChatClient/Properties/Settings.settings

@@ -0,0 +1,7 @@
1
+<?xml version='1.0' encoding='utf-8'?>
2
+<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
3
+  <Profiles>
4
+    <Profile Name="(Default)" />
5
+  </Profiles>
6
+  <Settings />
7
+</SettingsFile>

+ 70 - 0
ChatClient/obj/Debug/App.g.i.cs

@@ -0,0 +1,70 @@
1
+#pragma checksum "..\..\App.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "DC9D4D1836076D552AD787B1520542D9F4CE430561ADA0B6CB2A353FFD31CC1F"
2
+//------------------------------------------------------------------------------
3
+// <auto-generated>
4
+//     Dieser Code wurde von einem Tool generiert.
5
+//     Laufzeitversion:4.0.30319.42000
6
+//
7
+//     Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
8
+//     der Code erneut generiert wird.
9
+// </auto-generated>
10
+//------------------------------------------------------------------------------
11
+
12
+using ChatClient;
13
+using System;
14
+using System.Diagnostics;
15
+using System.Windows;
16
+using System.Windows.Automation;
17
+using System.Windows.Controls;
18
+using System.Windows.Controls.Primitives;
19
+using System.Windows.Data;
20
+using System.Windows.Documents;
21
+using System.Windows.Ink;
22
+using System.Windows.Input;
23
+using System.Windows.Markup;
24
+using System.Windows.Media;
25
+using System.Windows.Media.Animation;
26
+using System.Windows.Media.Effects;
27
+using System.Windows.Media.Imaging;
28
+using System.Windows.Media.Media3D;
29
+using System.Windows.Media.TextFormatting;
30
+using System.Windows.Navigation;
31
+using System.Windows.Shapes;
32
+using System.Windows.Shell;
33
+
34
+
35
+namespace ChatClient {
36
+    
37
+    
38
+    /// <summary>
39
+    /// App
40
+    /// </summary>
41
+    public partial class App : System.Windows.Application {
42
+        
43
+        /// <summary>
44
+        /// InitializeComponent
45
+        /// </summary>
46
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
47
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
48
+        public void InitializeComponent() {
49
+            
50
+            #line 5 "..\..\App.xaml"
51
+            this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative);
52
+            
53
+            #line default
54
+            #line hidden
55
+        }
56
+        
57
+        /// <summary>
58
+        /// Application Entry Point.
59
+        /// </summary>
60
+        [System.STAThreadAttribute()]
61
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
62
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
63
+        public static void Main() {
64
+            ChatClient.App app = new ChatClient.App();
65
+            app.InitializeComponent();
66
+            app.Run();
67
+        }
68
+    }
69
+}
70
+

+ 0 - 0
ChatClient/obj/Debug/ChatClient.csproj.FileListAbsolute.txt


+ 20 - 0
ChatClient/obj/Debug/ChatClient_MarkupCompile.i.cache

@@ -0,0 +1,20 @@
1
+ChatClient
2
+
3
+
4
+winexe
5
+C#
6
+.cs
7
+D:\Workspaces\CSharp\ChatClient\ChatClient\obj\Debug\
8
+ChatClient
9
+none
10
+false
11
+DEBUG;TRACE
12
+D:\Workspaces\CSharp\ChatClient\ChatClient\App.xaml
13
+11151548125
14
+
15
+683447110
16
+13-1505183044
17
+MainWindow.xaml;
18
+
19
+True
20
+

+ 4 - 0
ChatClient/obj/Debug/ChatClient_MarkupCompile.i.lref

@@ -0,0 +1,4 @@
1
+
2
+
3
+FD:\Workspaces\CSharp\ChatClient\ChatClient\MainWindow.xaml;;
4
+

BIN
ChatClient/obj/Debug/DesignTimeResolveAssemblyReferences.cache


BIN
ChatClient/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache


+ 157 - 0
ChatClient/obj/Debug/MainWindow.g.i.cs

@@ -0,0 +1,157 @@
1
+#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "A823953C37DADFF25691158F73ABDD3D9C97A08EF048936C6C59E8014B05E462"
2
+//------------------------------------------------------------------------------
3
+// <auto-generated>
4
+//     Dieser Code wurde von einem Tool generiert.
5
+//     Laufzeitversion:4.0.30319.42000
6
+//
7
+//     Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
8
+//     der Code erneut generiert wird.
9
+// </auto-generated>
10
+//------------------------------------------------------------------------------
11
+
12
+using ChatClient;
13
+using System;
14
+using System.Diagnostics;
15
+using System.Windows;
16
+using System.Windows.Automation;
17
+using System.Windows.Controls;
18
+using System.Windows.Controls.Primitives;
19
+using System.Windows.Data;
20
+using System.Windows.Documents;
21
+using System.Windows.Ink;
22
+using System.Windows.Input;
23
+using System.Windows.Markup;
24
+using System.Windows.Media;
25
+using System.Windows.Media.Animation;
26
+using System.Windows.Media.Effects;
27
+using System.Windows.Media.Imaging;
28
+using System.Windows.Media.Media3D;
29
+using System.Windows.Media.TextFormatting;
30
+using System.Windows.Navigation;
31
+using System.Windows.Shapes;
32
+using System.Windows.Shell;
33
+
34
+
35
+namespace ChatClient {
36
+    
37
+    
38
+    /// <summary>
39
+    /// MainWindow
40
+    /// </summary>
41
+    public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
42
+        
43
+        
44
+        #line 10 "..\..\MainWindow.xaml"
45
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
46
+        internal System.Windows.Controls.TextBox tb_message;
47
+        
48
+        #line default
49
+        #line hidden
50
+        
51
+        
52
+        #line 11 "..\..\MainWindow.xaml"
53
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
54
+        internal System.Windows.Controls.Button btn_send;
55
+        
56
+        #line default
57
+        #line hidden
58
+        
59
+        
60
+        #line 12 "..\..\MainWindow.xaml"
61
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
62
+        internal System.Windows.Controls.TextBox tb_nickname;
63
+        
64
+        #line default
65
+        #line hidden
66
+        
67
+        
68
+        #line 13 "..\..\MainWindow.xaml"
69
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
70
+        internal System.Windows.Controls.Button btn_set_nickname;
71
+        
72
+        #line default
73
+        #line hidden
74
+        
75
+        
76
+        #line 14 "..\..\MainWindow.xaml"
77
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
78
+        internal System.Windows.Controls.TextBox tb_chatframe;
79
+        
80
+        #line default
81
+        #line hidden
82
+        
83
+        private bool _contentLoaded;
84
+        
85
+        /// <summary>
86
+        /// InitializeComponent
87
+        /// </summary>
88
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
89
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
90
+        public void InitializeComponent() {
91
+            if (_contentLoaded) {
92
+                return;
93
+            }
94
+            _contentLoaded = true;
95
+            System.Uri resourceLocater = new System.Uri("/ChatClient;component/mainwindow.xaml", System.UriKind.Relative);
96
+            
97
+            #line 1 "..\..\MainWindow.xaml"
98
+            System.Windows.Application.LoadComponent(this, resourceLocater);
99
+            
100
+            #line default
101
+            #line hidden
102
+        }
103
+        
104
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
105
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
106
+        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
107
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
108
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
109
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
110
+        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
111
+            switch (connectionId)
112
+            {
113
+            case 1:
114
+            this.tb_message = ((System.Windows.Controls.TextBox)(target));
115
+            
116
+            #line 10 "..\..\MainWindow.xaml"
117
+            this.tb_message.KeyUp += new System.Windows.Input.KeyEventHandler(this.tb_message_KeyUp);
118
+            
119
+            #line default
120
+            #line hidden
121
+            return;
122
+            case 2:
123
+            this.btn_send = ((System.Windows.Controls.Button)(target));
124
+            
125
+            #line 11 "..\..\MainWindow.xaml"
126
+            this.btn_send.Click += new System.Windows.RoutedEventHandler(this.btn_send_Click);
127
+            
128
+            #line default
129
+            #line hidden
130
+            return;
131
+            case 3:
132
+            this.tb_nickname = ((System.Windows.Controls.TextBox)(target));
133
+            
134
+            #line 12 "..\..\MainWindow.xaml"
135
+            this.tb_nickname.KeyDown += new System.Windows.Input.KeyEventHandler(this.tb_nickname_KeyDown);
136
+            
137
+            #line default
138
+            #line hidden
139
+            return;
140
+            case 4:
141
+            this.btn_set_nickname = ((System.Windows.Controls.Button)(target));
142
+            
143
+            #line 13 "..\..\MainWindow.xaml"
144
+            this.btn_set_nickname.Click += new System.Windows.RoutedEventHandler(this.btn_set_nickname_Click);
145
+            
146
+            #line default
147
+            #line hidden
148
+            return;
149
+            case 5:
150
+            this.tb_chatframe = ((System.Windows.Controls.TextBox)(target));
151
+            return;
152
+            }
153
+            this._contentLoaded = true;
154
+        }
155
+    }
156
+}
157
+