From e9334d20e8a875f55202b542365a3e13af17d02b Mon Sep 17 00:00:00 2001
From: Luca Pulga <68555926+LucaPulga@users.noreply.github.com>
Date: Mon, 17 May 2021 15:14:10 +0200
Subject: [PATCH] Aggiungere i file di progetto.
---
App.config | 6 +
App.xaml | 18 ++
App.xaml.cs | 17 ++
MainWindow.xaml | 27 ++
MainWindow.xaml.cs | 238 ++++++++++++++++++
Properties/AssemblyInfo.cs | 55 ++++
Properties/Resources.Designer.cs | 70 ++++++
Properties/Resources.resx | 117 +++++++++
Properties/Settings.Designer.cs | 29 +++
Properties/Settings.settings | 7 +
TcpGameClient.csproj | 123 +++++++++
TcpGameClient.sln | 25 ++
TcpGameServer/App.config | 6 +
TcpGameServer/App.xaml | 18 ++
TcpGameServer/App.xaml.cs | 17 ++
TcpGameServer/MainWindow.xaml | 30 +++
TcpGameServer/MainWindow.xaml.cs | 237 +++++++++++++++++
TcpGameServer/Properties/AssemblyInfo.cs | 55 ++++
.../Properties/Resources.Designer.cs | 70 ++++++
TcpGameServer/Properties/Resources.resx | 117 +++++++++
TcpGameServer/Properties/Settings.Designer.cs | 29 +++
TcpGameServer/Properties/Settings.settings | 7 +
TcpGameServer/TcpGameServer.csproj | 123 +++++++++
TcpGameServer/TcpGameServer.sln | 25 ++
TcpGameServer/icons8_the_flash_sign.ico | Bin 0 -> 5430 bytes
TcpGameServer/packages.config | 5 +
TcpGameServer/speed.jpg | Bin 0 -> 12690 bytes
icons8_the_flash_sign.ico | Bin 0 -> 5430 bytes
packages.config | 5 +
speed.jpg | Bin 0 -> 12690 bytes
30 files changed, 1476 insertions(+)
create mode 100644 App.config
create mode 100644 App.xaml
create mode 100644 App.xaml.cs
create mode 100644 MainWindow.xaml
create mode 100644 MainWindow.xaml.cs
create mode 100644 Properties/AssemblyInfo.cs
create mode 100644 Properties/Resources.Designer.cs
create mode 100644 Properties/Resources.resx
create mode 100644 Properties/Settings.Designer.cs
create mode 100644 Properties/Settings.settings
create mode 100644 TcpGameClient.csproj
create mode 100644 TcpGameClient.sln
create mode 100644 TcpGameServer/App.config
create mode 100644 TcpGameServer/App.xaml
create mode 100644 TcpGameServer/App.xaml.cs
create mode 100644 TcpGameServer/MainWindow.xaml
create mode 100644 TcpGameServer/MainWindow.xaml.cs
create mode 100644 TcpGameServer/Properties/AssemblyInfo.cs
create mode 100644 TcpGameServer/Properties/Resources.Designer.cs
create mode 100644 TcpGameServer/Properties/Resources.resx
create mode 100644 TcpGameServer/Properties/Settings.Designer.cs
create mode 100644 TcpGameServer/Properties/Settings.settings
create mode 100644 TcpGameServer/TcpGameServer.csproj
create mode 100644 TcpGameServer/TcpGameServer.sln
create mode 100644 TcpGameServer/icons8_the_flash_sign.ico
create mode 100644 TcpGameServer/packages.config
create mode 100644 TcpGameServer/speed.jpg
create mode 100644 icons8_the_flash_sign.ico
create mode 100644 packages.config
create mode 100644 speed.jpg
diff --git a/App.config b/App.config
new file mode 100644
index 0000000..56efbc7
--- /dev/null
+++ b/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/App.xaml b/App.xaml
new file mode 100644
index 0000000..d8319ba
--- /dev/null
+++ b/App.xaml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/App.xaml.cs b/App.xaml.cs
new file mode 100644
index 0000000..a066e8f
--- /dev/null
+++ b/App.xaml.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace TcpGameClient
+{
+ ///
+ /// Logica di interazione per App.xaml
+ ///
+ public partial class App : Application
+ {
+ }
+}
diff --git a/MainWindow.xaml b/MainWindow.xaml
new file mode 100644
index 0000000..c1414e9
--- /dev/null
+++ b/MainWindow.xaml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs
new file mode 100644
index 0000000..ac0a82b
--- /dev/null
+++ b/MainWindow.xaml.cs
@@ -0,0 +1,238 @@
+/*
+ * Sviluppatore: Pulga Luca;
+ * Classe: 4^L
+ * Data di consegna: 2021/05/17
+ * Scopo: Utilizzando le classi TCPClient e TCPListener realizzare un semplice gioco
+ * (carte, dadi o altro) utilizzando il protocollo TCP (che a differenza dell'UDP
+ * visto oggi richiede la creazione di una connessione).
+ * APP: SPEED CLICKER with TCP protocol
+ */
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Net;
+using System.Net.Sockets;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace TcpGameClient
+{
+ ///
+ /// Logica di interazione per MainWindow.xaml
+ ///
+ public partial class MainWindow : Window
+ {
+ TcpClient client;
+ Socket socket;
+ bool sessionToken;
+ int time = 10000;
+ float cps;
+ int clicks;
+
+ public MainWindow()
+ {
+ InitializeComponent();
+
+ txtDestPort.Text = "55000";
+ txtIpAdd.Text = GetLocalIPAddress();
+ txtTime.Text = "0";
+ }
+
+ private void btnConnect_Click(object sender, RoutedEventArgs e)
+ {
+ ClientSide(); // Ricezione.
+ }
+
+ private async void ClientSide()
+ {
+ try
+ {
+ await Task.Run(() =>
+ {
+ client = new TcpClient("127.0.0.1", 55000);
+ //client.Connect("127.0.0.1", 55000);
+ this.Dispatcher.BeginInvoke(new Action(() =>
+ {
+ if (client.Connected) // Controllo se i 2 host sono connessi.
+ {
+ lblConnection.Content = "CONNECTED";
+ btnConnect.IsEnabled = false;
+ }
+ }));
+
+ while (true)
+ {
+ string textToTransmit = "";
+ this.Dispatcher.BeginInvoke(new Action(() =>
+ {
+ textToTransmit = lblMine.Content.ToString();
+ }));
+ socket = client.Client; // Parte client.
+
+ byte[] ba = Encoding.ASCII.GetBytes(textToTransmit); // string to byte to send.
+
+
+ byte[] bb = new byte[100];
+ int j = socket.Receive(bb, bb.Length, 0); // Ricezione dati.
+
+ if(j > 0)
+ this.Dispatcher.BeginInvoke(new Action(() =>
+ {
+ lblAvversario.Content = "Opponent: " + Encoding.ASCII.GetString(bb);
+ }));
+ }
+ });
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("Errore:\n" + ex.Message, "Client", MessageBoxButton.OK, MessageBoxImage.Error);
+ return;
+ }
+ finally
+ {
+ if (client != null)
+ client.Close();
+ }
+ }
+
+ private void Session()
+ {
+ while (true)
+ {
+ if (sessionToken == true)
+ {
+ Thread.Sleep(time);
+ sessionToken = false;
+ cps = time / 1000;
+ cps = clicks / cps;
+
+ string n = "";
+
+ this.Dispatcher.BeginInvoke(new Action(() =>
+ {
+ lblMine.Content = "Click: " + clicks.ToString() + ", clicks per second: " + cps.ToString();
+ }));
+
+ this.Dispatcher.BeginInvoke(new Action(() =>
+ {
+ n = lblMine.Content.ToString();
+ }));
+
+ Thread.Sleep(100);
+ SendData(n);
+
+ Thread.Sleep(2000);
+ this.Dispatcher.BeginInvoke(new Action(() =>
+ {
+ btnStart.Visibility = Visibility.Visible;
+ }));
+ }
+ }
+ }
+
+ ///
+ /// Invio dei dati.
+ ///
+ ///
+ private void SendData(string n)
+ {
+ socket.Send(Encoding.ASCII.GetBytes(n));
+ }
+
+ ///
+ /// Creazione window e avvio thread per gestione click
+ ///
+ ///
+ ///
+ private void Window_Loaded(object sender, RoutedEventArgs e)
+ {
+ Thread sn = new Thread(Session) { IsBackground = true }; // Se rilascia il button, incremento numero di click.
+ sn.Start();
+ }
+
+ ///
+ /// elease del click del mouse per incremento numero click.
+ ///
+ ///
+ ///
+ private void Window_MouseUp(object sender, MouseButtonEventArgs e)
+ {
+ if (e.LeftButton == MouseButtonState.Released)
+ {
+ clicks++;
+ lblClicks.Content = "Click: " + clicks.ToString();
+ }
+ }
+
+ private void btnStart_Click(object sender, RoutedEventArgs e)
+ {
+ try
+ {
+ if (!int.TryParse(txtTime.Text, out int t))
+ throw new Exception("Inserire un tempo valido.");
+ time = t * 1000;
+ if (sessionToken == false)
+ {
+ clicks = 0;
+ sessionToken = true;
+ this.Dispatcher.BeginInvoke(new Action(() =>
+ {
+ btnStart.Visibility = Visibility.Hidden;
+ }));
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("Errore :\n" + ex.Message, "Client", MessageBoxButton.OK, MessageBoxImage.Error);
+ return;
+ }
+
+ }
+
+ ///
+ /// get automated local ip.
+ ///
+ ///
+ public static string GetLocalIPAddress()
+ {
+ try
+ {
+ string hostName = Dns.GetHostName(); // Retrive the Name of HOST
+ // Get the IP
+ string myIP = Dns.GetHostByName(hostName).AddressList[0].ToString(); // Get local ip address
+
+ Uri uri = new Uri("http://" + myIP);
+
+ return uri.Host.ToString(); // return dell'ip dell'host.
+ }
+ catch (Exception ex)
+ {
+ throw new Exception("No network adapters with an IPv4 address in the system!");
+ }
+ }
+
+ ///
+ /// control ipv4 address.
+ ///
+ ///
+ ///
+ public static bool IsIPv4(string ipAddress)
+ {
+ return Regex.IsMatch(ipAddress, @"^\d{1,3}(\.\d{1,3}){3}$") && ipAddress.Split('.').SingleOrDefault(s => int.Parse(s) > 255) == null; // Regex per controllare ip.
+ }
+
+ }
+}
diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..b07d5c6
--- /dev/null
+++ b/Properties/AssemblyInfo.cs
@@ -0,0 +1,55 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// Le informazioni generali relative a un assembly sono controllate dal seguente
+// set di attributi. Modificare i valori di questi attributi per modificare le informazioni
+// associate a un assembly.
+[assembly: AssemblyTitle("TcpGameClient")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("TcpGameClient")]
+[assembly: AssemblyCopyright("Copyright © 2021")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Se si imposta ComVisible su false, i tipi in questo assembly non saranno visibili
+// ai componenti COM. Se è necessario accedere a un tipo in questo assembly da
+// COM, impostare su true l'attributo ComVisible per tale tipo.
+[assembly: ComVisible(false)]
+
+//Per iniziare a creare applicazioni localizzabili, impostare
+//CultureYouAreCodingWith nel file .csproj
+//all'interno di un . Ad esempio, se si utilizza l'inglese (Stati Uniti)
+//nei file di origine, impostare su en-US. Rimuovere quindi il commento dall'attributo
+//NeutralResourceLanguage riportato di seguito. Aggiornare "en-US" nella
+//riga sottostante in modo che corrisponda all'impostazione UICulture nel file di progetto.
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //dove si trovano i dizionari delle risorse specifiche del tema
+ //(da usare se nella pagina non viene trovata una risorsa,
+ // oppure nei dizionari delle risorse dell'applicazione)
+ ResourceDictionaryLocation.SourceAssembly //dove si trova il dizionario delle risorse generiche
+ //(da usare se nella pagina non viene trovata una risorsa,
+ // nell'applicazione o nei dizionari delle risorse specifiche del tema)
+)]
+
+
+// Le informazioni sulla versione di un assembly sono costituite dai seguenti quattro valori:
+//
+// Versione principale
+// Versione secondaria
+// Numero di build
+// Revisione
+//
+// È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build
+// usando l'asterisco '*' come illustrato di seguito:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..50ebfb3
--- /dev/null
+++ b/Properties/Resources.Designer.cs
@@ -0,0 +1,70 @@
+//------------------------------------------------------------------------------
+//
+// Codice generato da uno strumento.
+// Versione runtime:4.0.30319.42000
+//
+// Le modifiche apportate a questo file possono causare un comportamento non corretto e andranno perse se
+// il codice viene rigenerato.
+//
+//------------------------------------------------------------------------------
+
+
+namespace TcpGameClient.Properties
+{
+ ///
+ /// Classe di risorse fortemente tipizzata per la ricerca di stringhe localizzate e così via.
+ ///
+ // Questa classe è stata generata automaticamente dalla classe StronglyTypedResourceBuilder
+ // tramite uno strumento quale ResGen o Visual Studio.
+ // Per aggiungere o rimuovere un membro, modificare il file .ResX, quindi eseguire di nuovo ResGen
+ // con l'opzione /str oppure ricompilare il progetto VS.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources
+ {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources()
+ {
+ }
+
+ ///
+ /// Restituisce l'istanza di ResourceManager memorizzata nella cache e usata da questa classe.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager
+ {
+ get
+ {
+ if ((resourceMan == null))
+ {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TcpGameClient.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Esegue l'override della proprietà CurrentUICulture del thread corrente per tutte
+ /// le ricerche di risorse che utilizzano questa classe di risorse fortemente tipizzata.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return resourceCulture;
+ }
+ set
+ {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/Properties/Resources.resx b/Properties/Resources.resx
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ b/Properties/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/Properties/Settings.Designer.cs b/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..7fb1b88
--- /dev/null
+++ b/Properties/Settings.Designer.cs
@@ -0,0 +1,29 @@
+//------------------------------------------------------------------------------
+//
+// 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.
+//
+//------------------------------------------------------------------------------
+
+
+namespace TcpGameClient.Properties
+{
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.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;
+ }
+ }
+ }
+}
diff --git a/Properties/Settings.settings b/Properties/Settings.settings
new file mode 100644
index 0000000..033d7a5
--- /dev/null
+++ b/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/TcpGameClient.csproj b/TcpGameClient.csproj
new file mode 100644
index 0000000..4d7a4e0
--- /dev/null
+++ b/TcpGameClient.csproj
@@ -0,0 +1,123 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {04BE0711-E387-4CF4-ADBC-22818E793A44}
+ WinExe
+ TcpGameClient
+ TcpGameClient
+ v4.7.2
+ 512
+ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ 4
+ true
+ true
+
+
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+ icons8_the_flash_sign.ico
+
+
+
+ packages\MaterialDesignColors.2.0.0\lib\net452\MaterialDesignColors.dll
+
+
+ packages\MaterialDesignThemes.4.0.0\lib\net452\MaterialDesignThemes.Wpf.dll
+
+
+
+
+
+
+
+
+
+
+ 4.0
+
+
+
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ App.xaml
+ Code
+
+
+ MainWindow.xaml
+ Code
+
+
+
+
+ Code
+
+
+ True
+ True
+ Resources.resx
+
+
+ True
+ Settings.settings
+ True
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Questo progetto fa riferimento a uno o più pacchetti NuGet che non sono presenti in questo computer. Usare lo strumento di ripristino dei pacchetti NuGet per scaricarli. Per altre informazioni, vedere http://go.microsoft.com/fwlink/?LinkID=322105. Il file mancante è {0}.
+
+
+
+
\ No newline at end of file
diff --git a/TcpGameClient.sln b/TcpGameClient.sln
new file mode 100644
index 0000000..cf95303
--- /dev/null
+++ b/TcpGameClient.sln
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.31205.134
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TcpGameClient", "TcpGameClient.csproj", "{04BE0711-E387-4CF4-ADBC-22818E793A44}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {04BE0711-E387-4CF4-ADBC-22818E793A44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {04BE0711-E387-4CF4-ADBC-22818E793A44}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {04BE0711-E387-4CF4-ADBC-22818E793A44}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {04BE0711-E387-4CF4-ADBC-22818E793A44}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {F7FDAFCA-A56A-41B8-97A5-E85DBD2035F6}
+ EndGlobalSection
+EndGlobal
diff --git a/TcpGameServer/App.config b/TcpGameServer/App.config
new file mode 100644
index 0000000..56efbc7
--- /dev/null
+++ b/TcpGameServer/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/TcpGameServer/App.xaml b/TcpGameServer/App.xaml
new file mode 100644
index 0000000..bebefd5
--- /dev/null
+++ b/TcpGameServer/App.xaml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/TcpGameServer/App.xaml.cs b/TcpGameServer/App.xaml.cs
new file mode 100644
index 0000000..089368c
--- /dev/null
+++ b/TcpGameServer/App.xaml.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace TcpGameServer
+{
+ ///
+ /// Logica di interazione per App.xaml
+ ///
+ public partial class App : Application
+ {
+ }
+}
diff --git a/TcpGameServer/MainWindow.xaml b/TcpGameServer/MainWindow.xaml
new file mode 100644
index 0000000..06caa33
--- /dev/null
+++ b/TcpGameServer/MainWindow.xaml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/TcpGameServer/MainWindow.xaml.cs b/TcpGameServer/MainWindow.xaml.cs
new file mode 100644
index 0000000..8b5f970
--- /dev/null
+++ b/TcpGameServer/MainWindow.xaml.cs
@@ -0,0 +1,237 @@
+/*
+ * Sviluppatore: Pulga Luca;
+ * Classe: 4^L
+ * Data di consegna: 2021/05/17
+ * Scopo: Utilizzando le classi TCPClient e TCPListener realizzare un semplice gioco
+ * (carte, dadi o altro) utilizzando il protocollo TCP (che a differenza dell'UDP
+ * visto oggi richiede la creazione di una connessione).
+ * APP: SPEED CLICKER with TCP protocol
+ */
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Net;
+using System.Net.Sockets;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace TcpGameServer
+{
+ ///
+ /// Logica di interazione per MainWindow.xaml
+ ///
+ public partial class MainWindow : Window
+ {
+ bool sessionToken;
+ int time = 10000;
+ float cps;
+ int clicks;
+ IPAddress ipAd;
+ TcpListener myList;
+ Socket s;
+
+ public MainWindow()
+ {
+ InitializeComponent();
+
+ ipAd = IPAddress.Parse("127.0.0.1");
+ myList = new TcpListener(ipAd, 55000);
+
+ txtDestPort.Text = "55000";
+ txtIpAdd.Text = GetLocalIPAddress();
+ }
+
+ private async void ServerSide()
+ {
+ try
+ {
+ await Task.Run(() =>
+ {
+ myList.Start();
+ s = myList.AcceptSocket();
+
+ this.Dispatcher.BeginInvoke(new Action(() =>
+ {
+ if (s.Connected) // Controllo se i 2 host sono connessi.
+ {
+ lblConnection.Content = "CONNECTED";
+ btnConnect.IsEnabled = false;
+ }
+ }));
+
+
+ while (true)
+ {
+ byte[] b = new byte[100];
+ string n = "";
+ int k = 0;
+ if (s.Available > 0) // se ci sono byte disponibili, li legge.
+ {
+ k = s.Receive(b); // Ricezione info.
+ this.Dispatcher.BeginInvoke(new Action(() =>
+ {
+ lblAvversario.Content = "Opponent: " + Encoding.ASCII.GetString(b);
+ n = lblMine.Content.ToString();
+ }));
+ }
+ }
+
+ });
+
+ myList.Stop();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("Errore:\n" + ex.Message, "Server", MessageBoxButton.OK, MessageBoxImage.Error);
+ return;
+ }
+ }
+
+ private void btnConnect_Click(object sender, RoutedEventArgs e)
+ {
+ ServerSide(); // Ricezione.
+ }
+
+ private void btnStart_Click(object sender, RoutedEventArgs e)
+ {
+ try
+ {
+ if (!int.TryParse(txtTime.Text, out int t)) // validazione tempo.
+ throw new Exception("Inserire un tempo valido.");
+ time = t * 1000; // tempo in secondi.
+ if (sessionToken == false)
+ {
+ clicks = 0;
+ sessionToken = true;
+ this.Dispatcher.BeginInvoke(new Action(() =>
+ {
+ btnStart.Visibility = Visibility.Hidden;
+ }));
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("Errore:\n" + ex.Message, "Server", MessageBoxButton.OK, MessageBoxImage.Error);
+ return;
+ }
+ }
+
+ private void Session()
+ {
+ while (true)
+ {
+ if (sessionToken == true)
+ {
+ Thread.Sleep(time);
+ sessionToken = false;
+ // Calcolo click.
+ cps = time / 1000;
+ cps = clicks / cps;
+
+ this.Dispatcher.BeginInvoke(new Action(() =>
+ {
+ lblMine.Content = "Click: " + clicks.ToString() + ", clicks per second: " + cps.ToString(); // Info sessione clicker.
+ }));
+
+ string n = "";
+ this.Dispatcher.BeginInvoke(new Action(() =>
+ {
+ n = lblMine.Content.ToString();
+ }));
+ Thread.Sleep(100);
+
+ // Se la stringa da inviare non è vuota, allora invio i dati.
+ if(n != "")
+ SendData(n);
+
+ Thread.Sleep(3000);
+ this.Dispatcher.BeginInvoke(new Action(() =>
+ {
+ btnStart.Visibility = Visibility.Visible;
+ }));
+
+ }
+ }
+ }
+
+ ///
+ /// Invio dei dati.
+ ///
+ ///
+ private void SendData(string n)
+ {
+ s.Send(Encoding.ASCII.GetBytes(n));
+ }
+
+ ///
+ /// Creazione window e avvio thread per gestione click.
+ ///
+ ///
+ ///
+ private void Window_Loaded(object sender, RoutedEventArgs e)
+ {
+ Thread sn = new Thread(Session) { IsBackground = true }; // Thread per la gestione dei click e il send della info.
+ sn.Start();
+ }
+
+ ///
+ /// Release del click del mouse per incremento numero click.
+ ///
+ ///
+ ///
+ private void Window_MouseUp(object sender, MouseButtonEventArgs e)
+ {
+ if (e.LeftButton == MouseButtonState.Released) // Se rilascia il button, incremento numero di click.
+ {
+ clicks++;
+ lblClicks.Content = "Click: " + clicks.ToString();
+ }
+ }
+
+ ///
+ /// get automated local ip.
+ ///
+ ///
+ public static string GetLocalIPAddress()
+ {
+ try
+ {
+ string hostName = Dns.GetHostName(); // Retrive the Name of HOST
+ // Get the IP
+ string myIP = Dns.GetHostByName(hostName).AddressList[0].ToString(); // Get local ip address
+
+ Uri uri = new Uri("http://" + myIP);
+
+ return uri.Host.ToString(); // return dell'ip dell'host.
+ }
+ catch (Exception ex)
+ {
+ throw new Exception("No network adapters with an IPv4 address in the system!");
+ }
+ }
+
+ ///
+ /// control ipv4 address.
+ ///
+ ///
+ ///
+ public static bool IsIPv4(string ipAddress)
+ {
+ return Regex.IsMatch(ipAddress, @"^\d{1,3}(\.\d{1,3}){3}$") && ipAddress.Split('.').SingleOrDefault(s => int.Parse(s) > 255) == null; // Regex per controllare ip.
+ }
+
+ }
+}
diff --git a/TcpGameServer/Properties/AssemblyInfo.cs b/TcpGameServer/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..cb1b855
--- /dev/null
+++ b/TcpGameServer/Properties/AssemblyInfo.cs
@@ -0,0 +1,55 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// Le informazioni generali relative a un assembly sono controllate dal seguente
+// set di attributi. Modificare i valori di questi attributi per modificare le informazioni
+// associate a un assembly.
+[assembly: AssemblyTitle("TcpGameServer")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("TcpGameServer")]
+[assembly: AssemblyCopyright("Copyright © 2021")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Se si imposta ComVisible su false, i tipi in questo assembly non saranno visibili
+// ai componenti COM. Se è necessario accedere a un tipo in questo assembly da
+// COM, impostare su true l'attributo ComVisible per tale tipo.
+[assembly: ComVisible(false)]
+
+//Per iniziare a creare applicazioni localizzabili, impostare
+//CultureYouAreCodingWith nel file .csproj
+//all'interno di un . Ad esempio, se si utilizza l'inglese (Stati Uniti)
+//nei file di origine, impostare su en-US. Rimuovere quindi il commento dall'attributo
+//NeutralResourceLanguage riportato di seguito. Aggiornare "en-US" nella
+//riga sottostante in modo che corrisponda all'impostazione UICulture nel file di progetto.
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //dove si trovano i dizionari delle risorse specifiche del tema
+ //(da usare se nella pagina non viene trovata una risorsa,
+ // oppure nei dizionari delle risorse dell'applicazione)
+ ResourceDictionaryLocation.SourceAssembly //dove si trova il dizionario delle risorse generiche
+ //(da usare se nella pagina non viene trovata una risorsa,
+ // nell'applicazione o nei dizionari delle risorse specifiche del tema)
+)]
+
+
+// Le informazioni sulla versione di un assembly sono costituite dai seguenti quattro valori:
+//
+// Versione principale
+// Versione secondaria
+// Numero di build
+// Revisione
+//
+// È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build
+// usando l'asterisco '*' come illustrato di seguito:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/TcpGameServer/Properties/Resources.Designer.cs b/TcpGameServer/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..158dd7f
--- /dev/null
+++ b/TcpGameServer/Properties/Resources.Designer.cs
@@ -0,0 +1,70 @@
+//------------------------------------------------------------------------------
+//
+// Codice generato da uno strumento.
+// Versione runtime:4.0.30319.42000
+//
+// Le modifiche apportate a questo file possono causare un comportamento non corretto e andranno perse se
+// il codice viene rigenerato.
+//
+//------------------------------------------------------------------------------
+
+
+namespace TcpGameServer.Properties
+{
+ ///
+ /// Classe di risorse fortemente tipizzata per la ricerca di stringhe localizzate e così via.
+ ///
+ // Questa classe è stata generata automaticamente dalla classe StronglyTypedResourceBuilder
+ // tramite uno strumento quale ResGen o Visual Studio.
+ // Per aggiungere o rimuovere un membro, modificare il file .ResX, quindi eseguire di nuovo ResGen
+ // con l'opzione /str oppure ricompilare il progetto VS.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources
+ {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources()
+ {
+ }
+
+ ///
+ /// Restituisce l'istanza di ResourceManager memorizzata nella cache e usata da questa classe.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager
+ {
+ get
+ {
+ if ((resourceMan == null))
+ {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TcpGameServer.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Esegue l'override della proprietà CurrentUICulture del thread corrente per tutte
+ /// le ricerche di risorse che utilizzano questa classe di risorse fortemente tipizzata.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return resourceCulture;
+ }
+ set
+ {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/TcpGameServer/Properties/Resources.resx b/TcpGameServer/Properties/Resources.resx
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ b/TcpGameServer/Properties/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/TcpGameServer/Properties/Settings.Designer.cs b/TcpGameServer/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..96b7af8
--- /dev/null
+++ b/TcpGameServer/Properties/Settings.Designer.cs
@@ -0,0 +1,29 @@
+//------------------------------------------------------------------------------
+//
+// 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.
+//
+//------------------------------------------------------------------------------
+
+
+namespace TcpGameServer.Properties
+{
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.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;
+ }
+ }
+ }
+}
diff --git a/TcpGameServer/Properties/Settings.settings b/TcpGameServer/Properties/Settings.settings
new file mode 100644
index 0000000..033d7a5
--- /dev/null
+++ b/TcpGameServer/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/TcpGameServer/TcpGameServer.csproj b/TcpGameServer/TcpGameServer.csproj
new file mode 100644
index 0000000..029f708
--- /dev/null
+++ b/TcpGameServer/TcpGameServer.csproj
@@ -0,0 +1,123 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {6B53B53B-2A67-4BBB-B3F2-41B64FEAA0BC}
+ WinExe
+ TcpGameServer
+ TcpGameServer
+ v4.7.2
+ 512
+ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ 4
+ true
+ true
+
+
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+ icons8_the_flash_sign.ico
+
+
+
+ packages\MaterialDesignColors.2.0.0\lib\net452\MaterialDesignColors.dll
+
+
+ packages\MaterialDesignThemes.4.0.0\lib\net452\MaterialDesignThemes.Wpf.dll
+
+
+
+
+
+
+
+
+
+
+ 4.0
+
+
+
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ App.xaml
+ Code
+
+
+ MainWindow.xaml
+ Code
+
+
+
+
+ Code
+
+
+ True
+ True
+ Resources.resx
+
+
+ True
+ Settings.settings
+ True
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Questo progetto fa riferimento a uno o più pacchetti NuGet che non sono presenti in questo computer. Usare lo strumento di ripristino dei pacchetti NuGet per scaricarli. Per altre informazioni, vedere http://go.microsoft.com/fwlink/?LinkID=322105. Il file mancante è {0}.
+
+
+
+
\ No newline at end of file
diff --git a/TcpGameServer/TcpGameServer.sln b/TcpGameServer/TcpGameServer.sln
new file mode 100644
index 0000000..ed43908
--- /dev/null
+++ b/TcpGameServer/TcpGameServer.sln
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.31205.134
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TcpGameServer", "TcpGameServer.csproj", "{6B53B53B-2A67-4BBB-B3F2-41B64FEAA0BC}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {6B53B53B-2A67-4BBB-B3F2-41B64FEAA0BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6B53B53B-2A67-4BBB-B3F2-41B64FEAA0BC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6B53B53B-2A67-4BBB-B3F2-41B64FEAA0BC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6B53B53B-2A67-4BBB-B3F2-41B64FEAA0BC}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {972E4229-DFD3-49B4-B8D9-BC078ABDA236}
+ EndGlobalSection
+EndGlobal
diff --git a/TcpGameServer/icons8_the_flash_sign.ico b/TcpGameServer/icons8_the_flash_sign.ico
new file mode 100644
index 0000000000000000000000000000000000000000..0be14494c15b06563c75d8f895e23989b4470aed
GIT binary patch
literal 5430
zcmc(je`r=!7{||?xvbUHv@)%C)vT4-4~YY!Ye`6;>OCK@|Fr
zgwl^eD5exzWGSVtBDET>NQW#+dy4wEi~swb%-=(FKvV)0kVa5A>9jl;l-cS6?*{
z=3Kstii%3d0pIu~OO{-4u9%=-F>ri{+>4w>JmlBP%F36^%gZMQvEe@cdC1pbi-GU@shpA_Zbe=4D)?ho%_%2DC`u^g34c}Ia
zdx!onh-z0Ims(^N`Yw&7FVdKXhK4cN|AJ$V?6#H;8~;7{O*J(&=gS9XKK2uIv!v_6
zKNVY&TF0d=e*H^re6x#{kNAnQW4qj8$#;c~&$gHtxDsrKg@u2M!)iWcD=RCzEMUvV
z_9r~I$!5p%mT&>7lMk+i*xKm!)^F{vlJiaV^@u}x!KP>z<6BAYN$9(f^=VY!Upt0B
z@YOo2#!cKF;+tfn{|x<;$W(_3w#3dw#Icp}#lcUkt*zDEe2FYVnz7#*j0yMI8`HqO
zfw=YSCf`HI&bqp~+%P_qUQ|>x7LMtRD_?V=@xie;6MisujhnrAVG!$i#z_8+8FRYD
zm{xYy!BximJlB|`s}WlD4`FM+!yx)Ep
zLimWG?5kYnM(_RqRs(CT^X{b)4`u`e%)usVcries^J+TlbB*@3_GG{}>Rp|ajH9y~*m=tr?{MDEvnFe3kte*yh7mjAJ+
z@ex-@-t88nI(7_oe~@b&abH-DBz%v$T=bu`_7rXJneP0y&7#(4@e89G&iXEd@cmTq
zt8JV|zM7zud&_xne{20cw48d;54Z-$L;t~ORDUb;H<_5fZQN#gnU8Gh*n{l|@)7cx
z^=oXZA>%yY6JF!^aWLxucD3+GJ2AcYD)d?C3G0(TDBbuT=s%LQ#y-6PY`5@WDxxq!
z8@Lu>nXi6#Az`pTC0~@NHewbAxm+Lo4jZ$>*`iv$=@)_X_Y7Qjg)w@Uuzw!P{}cKP
z$Oe4dkb-a=wuf!Z8J%BYztb7R9ERbQjG8CyKYW|z
zA3#<(KG%X>Wbr*w<8nB);Pwj37}o~vu1}3Rn|E8js5-ic?f33DPTH>=Po@^kGRxgY
zu1Qfiy+dF=wm8+G^QVfuI&XC+|DA8A|9h3aUx@C%(_mIc@da(#L*P#!;?4NouxoX|
z;)MOc@!*>R&rNo{KDC&(bIrYr2k+)U>rn0N;g+%K+pqJ-UkAoFKZrqh-%9zH1$_hc
zZQbu#-Y(jV-#Bu_@E^C>AM|~MTi;);g+K4KyTmzA&altUZ?omqZ@rDWYld;swZ`~Q
zTI?!nnnAzY>dolA-?6CpOg7a3@B5ZVbNCPXHuy@(ITM+zHPAf`+id)&kPg{s*CD&%
z$jih(7(4OVA7bgokrwfp69h@d*1cOywvPOee&s4Jef$v6HWE8u4D1WQysB&
zogH~Cor(IE&SV^kwfH)=Q;D2)UCC=36RB7%>BZv7`d8wqSaZFX^PA^2&Gx*GX(Z@D
H`kwy)%vj>g
literal 0
HcmV?d00001
diff --git a/TcpGameServer/packages.config b/TcpGameServer/packages.config
new file mode 100644
index 0000000..283c7d0
--- /dev/null
+++ b/TcpGameServer/packages.config
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/TcpGameServer/speed.jpg b/TcpGameServer/speed.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..09fe365098273fb2655b7f5e7986b5e6a1d34a80
GIT binary patch
literal 12690
zcmbulby!qi+cvxhkdhDy0SToULb_op^?skfdP~*L6HXO4(Tq5
zq3fOBeSgpWeDC|$^S$3b<~sJ;v)0}-=drH6)_Gmmc{g>p2s}_xP*wmyAQ14c<8BFf
z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