From a7b4fc7be6dac8c4ff9ae7924eb499d7e2ac1453 Mon Sep 17 00:00:00 2001 From: marcinzelent Date: Tue, 10 Oct 2017 11:21:01 +0200 Subject: Removed packages, added Client project properly. --- Client/Client.csproj | 61 +++++++ Client/MainWindow.cs | 35 ++++ Client/Program.cs | 16 ++ Client/Properties/AssemblyInfo.cs | 26 +++ Client/TcpChatClient.cs | 69 +++++++ Client/gtk-gui/MainWindow.cs | 179 ++++++++++++++++++ Client/gtk-gui/generated.cs | 30 +++ Client/gtk-gui/gui.stetic | 187 +++++++++++++++++++ TcpChatX.sln | 2 +- TcpChatX.userprefs | 1 - packages/Xwt.0.2.40/LICENSE.txt | 21 --- packages/Xwt.0.2.40/README.markdown | 221 ----------------------- packages/Xwt.0.2.40/Xwt.0.2.40.nupkg | Bin 177505 -> 0 bytes packages/Xwt.0.2.40/lib/net40/Xwt.dll | Bin 414720 -> 0 bytes packages/Xwt.Gtk.0.2.40/LICENSE.txt | 21 --- packages/Xwt.Gtk.0.2.40/README.markdown | 221 ----------------------- packages/Xwt.Gtk.0.2.40/Xwt.Gtk.0.2.40.nupkg | Bin 138439 -> 0 bytes packages/Xwt.Gtk.0.2.40/build/Xwt.Gtk.dll.config | 22 --- packages/Xwt.Gtk.0.2.40/build/Xwt.Gtk.props | 10 - packages/Xwt.Gtk.0.2.40/lib/net40/Xwt.Gtk.dll | Bin 286720 -> 0 bytes 20 files changed, 604 insertions(+), 518 deletions(-) create mode 100644 Client/Client.csproj create mode 100644 Client/MainWindow.cs create mode 100644 Client/Program.cs create mode 100644 Client/Properties/AssemblyInfo.cs create mode 100644 Client/TcpChatClient.cs create mode 100644 Client/gtk-gui/MainWindow.cs create mode 100644 Client/gtk-gui/generated.cs create mode 100644 Client/gtk-gui/gui.stetic delete mode 100644 packages/Xwt.0.2.40/LICENSE.txt delete mode 100644 packages/Xwt.0.2.40/README.markdown delete mode 100644 packages/Xwt.0.2.40/Xwt.0.2.40.nupkg delete mode 100644 packages/Xwt.0.2.40/lib/net40/Xwt.dll delete mode 100644 packages/Xwt.Gtk.0.2.40/LICENSE.txt delete mode 100644 packages/Xwt.Gtk.0.2.40/README.markdown delete mode 100644 packages/Xwt.Gtk.0.2.40/Xwt.Gtk.0.2.40.nupkg delete mode 100644 packages/Xwt.Gtk.0.2.40/build/Xwt.Gtk.dll.config delete mode 100644 packages/Xwt.Gtk.0.2.40/build/Xwt.Gtk.props delete mode 100644 packages/Xwt.Gtk.0.2.40/lib/net40/Xwt.Gtk.dll diff --git a/Client/Client.csproj b/Client/Client.csproj new file mode 100644 index 0000000..f0d2993 --- /dev/null +++ b/Client/Client.csproj @@ -0,0 +1,61 @@ + + + + {73154F68-BBEB-48FC-86C4-BB4909C1C7B4} + WinExe + v4.5 + Client + Client + + + true + full + false + bin\Debug + DEBUG; + 4 + x86 + + + true + bin\Release + 4 + x86 + + + + + False + + + False + + + False + + + False + + + False + + + False + + + + + + gui.stetic + + + + + + + + + + + + \ No newline at end of file diff --git a/Client/MainWindow.cs b/Client/MainWindow.cs new file mode 100644 index 0000000..22564ac --- /dev/null +++ b/Client/MainWindow.cs @@ -0,0 +1,35 @@ +using System; +using Gtk; +using Client; + +public partial class MainWindow : Gtk.Window +{ + TcpChatClient tcpChat; + + public MainWindow() : base(Gtk.WindowType.Toplevel) + { + Build(); + tcpChat = new TcpChatClient(); + tcpChat.PropertyChanged += (sender, args) => + outputTv.Buffer.Text = tcpChat.Log; + } + + protected void OnDeleteEvent(object sender, DeleteEventArgs a) + { + Application.Quit(); + a.RetVal = true; + } + + protected async void Connect(object sender, EventArgs e) + { + await tcpChat.Connect(ipEntry.Text, Int32.Parse(portEntry.Text)); + tcpChat.SendMessage($"{usernameEntry.Text} connected."); + } + + protected void SendMessage(object sender, EventArgs e) + { + string message = $"{usernameEntry.Text}: {messageEntry.Text}"; + tcpChat.SendMessage(message); + messageEntry.Text = ""; + } +} diff --git a/Client/Program.cs b/Client/Program.cs new file mode 100644 index 0000000..22bf2bb --- /dev/null +++ b/Client/Program.cs @@ -0,0 +1,16 @@ +using System; +using Gtk; + +namespace Client +{ + class MainClass + { + public static void Main(string[] args) + { + Application.Init(); + MainWindow win = new MainWindow(); + win.Show(); + Application.Run(); + } + } +} diff --git a/Client/Properties/AssemblyInfo.cs b/Client/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..7614f1a --- /dev/null +++ b/Client/Properties/AssemblyInfo.cs @@ -0,0 +1,26 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// Information about this assembly is defined by the following attributes. +// Change them to the values specific to your project. + +[assembly: AssemblyTitle("Client")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("${AuthorCopyright}")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". +// The form "{Major}.{Minor}.*" will automatically update the build and revision, +// and "{Major}.{Minor}.{Build}.*" will update just the revision. + +[assembly: As