From 892d19a91ff14f564d39c76f158e904a2a50e342 Mon Sep 17 00:00:00 2001 From: DaddyPig <141154162+DaddyDaaPig@users.noreply.github.com> Date: Mon, 10 Jun 2024 15:57:04 +0200 Subject: [PATCH] bib-talk 23.05 v1 karlomalo --- bibtalk/.gitattributes | 63 ++++ bibtalk/.gitignore | 363 ++++++++++++++++++++++++ bibtalk/bib-talk.sln | 25 ++ bibtalk/bib-talk/App.xaml | 9 + bibtalk/bib-talk/App.xaml.cs | 17 ++ bibtalk/bib-talk/AssemblyInfo.cs | 10 + bibtalk/bib-talk/Icons/Settings.png | Bin 0 -> 9686 bytes bibtalk/bib-talk/Login.xaml | 130 +++++++++ bibtalk/bib-talk/Login.xaml.cs | 103 +++++++ bibtalk/bib-talk/MainWindow.xaml | 117 ++++++++ bibtalk/bib-talk/MainWindow.xaml.cs | 166 +++++++++++ bibtalk/bib-talk/RegisterWindow.xaml | 223 +++++++++++++++ bibtalk/bib-talk/RegisterWindow.xaml.cs | 94 ++++++ bibtalk/bib-talk/bib-talk.csproj | 19 ++ 14 files changed, 1339 insertions(+) create mode 100644 bibtalk/.gitattributes create mode 100644 bibtalk/.gitignore create mode 100644 bibtalk/bib-talk.sln create mode 100644 bibtalk/bib-talk/App.xaml create mode 100644 bibtalk/bib-talk/App.xaml.cs create mode 100644 bibtalk/bib-talk/AssemblyInfo.cs create mode 100644 bibtalk/bib-talk/Icons/Settings.png create mode 100644 bibtalk/bib-talk/Login.xaml create mode 100644 bibtalk/bib-talk/Login.xaml.cs create mode 100644 bibtalk/bib-talk/MainWindow.xaml create mode 100644 bibtalk/bib-talk/MainWindow.xaml.cs create mode 100644 bibtalk/bib-talk/RegisterWindow.xaml create mode 100644 bibtalk/bib-talk/RegisterWindow.xaml.cs create mode 100644 bibtalk/bib-talk/bib-talk.csproj diff --git a/bibtalk/.gitattributes b/bibtalk/.gitattributes new file mode 100644 index 0000000..1ff0c42 --- /dev/null +++ b/bibtalk/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/bibtalk/.gitignore b/bibtalk/.gitignore new file mode 100644 index 0000000..9491a2f --- /dev/null +++ b/bibtalk/.gitignore @@ -0,0 +1,363 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Oo]ut/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd \ No newline at end of file diff --git a/bibtalk/bib-talk.sln b/bibtalk/bib-talk.sln new file mode 100644 index 0000000..42d0166 --- /dev/null +++ b/bibtalk/bib-talk.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.4.33213.308 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "bib-talk", "bib-talk\bib-talk.csproj", "{92B3214E-6FB1-4D94-B93F-6F1A9D9F2224}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {92B3214E-6FB1-4D94-B93F-6F1A9D9F2224}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {92B3214E-6FB1-4D94-B93F-6F1A9D9F2224}.Debug|Any CPU.Build.0 = Debug|Any CPU + {92B3214E-6FB1-4D94-B93F-6F1A9D9F2224}.Release|Any CPU.ActiveCfg = Release|Any CPU + {92B3214E-6FB1-4D94-B93F-6F1A9D9F2224}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {B10C1A50-9612-42F2-9E3A-75F0E9739D01} + EndGlobalSection +EndGlobal diff --git a/bibtalk/bib-talk/App.xaml b/bibtalk/bib-talk/App.xaml new file mode 100644 index 0000000..0d752b2 --- /dev/null +++ b/bibtalk/bib-talk/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/bibtalk/bib-talk/App.xaml.cs b/bibtalk/bib-talk/App.xaml.cs new file mode 100644 index 0000000..21f3c61 --- /dev/null +++ b/bibtalk/bib-talk/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 bib_talk +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/bibtalk/bib-talk/AssemblyInfo.cs b/bibtalk/bib-talk/AssemblyInfo.cs new file mode 100644 index 0000000..8b5504e --- /dev/null +++ b/bibtalk/bib-talk/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Windows; + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/bibtalk/bib-talk/Icons/Settings.png b/bibtalk/bib-talk/Icons/Settings.png new file mode 100644 index 0000000000000000000000000000000000000000..9c8c1a7a257b2e885d37a4230dfb98c04ebae679 GIT binary patch literal 9686 zcmeHtRahH9vuJRaLMc)l3KWV5*W&J0C|cYlcqvw_K(Pi79!PKrZb1q~i&LOjad)@N zf9~sfI}c0QI?v3cyBt20g{hzW@L< zfR>t`{B!sJ%Kz=a|Jog><2jE808juR9SvQ;)1%wNJ( z8R_}(g#NxG0f$@wxxXjX<|`W7a|evf)5e$M)4p;p`{s1q@URI>D|CPGy4+VzxV8zzAChJ@tpnM9#+T^^z4^zpDC zJgM!u>6J#>&9iMOrd&Dsc~i;3L78yn8XxJ8X|<4sPYQ)UjSa%Wx1CJ}zgnplvAvUh z+bOj>@PXw`Q((vPIH%%!NxpJ13BoyUl5X~s3vtF3;y)w3mn}0C%xf`pdF0p|FZ$2)LP}}Wc&ljqJE`OhpDlbxR4q9Q5kNq8EuA zbT;Ae1D5sIJQMb&!=#^fS;bd`2eNGo>=aUVYsU(Rzb3f z92jG4hdVIr{(!KwJaV)~&mXfO*+~VAx{aSVI7!Tf`}_L0l-q&XShJNiVZjBlzFFAl zj^2RWRE|`KyGdO-sQ7Kq0QIvn)G$9X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(mP&SO?}-Yf&Pi?5*~hDc-Hr=*&(6zR>CQd#QzCY z@w5FnNV;v!4Dsj81M%v+hR0yRNZ7+C(!n~xS0srBg!SyZ*GRdbQqb4F5!Iqct~d07 zY#>adZG_h=eGR^CTjmSjHz+0NVFui#KNPGw$Ex@dxV|b6rb@_-gS^>f6)($`+CQ!J zdP6C<3mQn)H#}Mt1%u2Ke(CIFJiMRErj{L1`PeOrMf6#EkX)s0cuZLest=qjdGF~c zTC&(>EiK;Y7bDdkr5x6!lw1{Xnr?a1TXNW|-d7QV`?~e&LGVrp`h7iG+(q7C;84$BM1wh!jk@>leN)PI!d2ThuvxzF4 z`49T(%EO4YrVs+UP*Z5tYS*1Mbc{`HW<0<&Q))PDWW+3-?R~)tT&= zNxSM`SNF>OA$(fqI?>+H?qG+W<)J1=u>x&ruvdNxU7iZ3T;bNZI8xh`{xPrVLG-co z0%MIBl4i9})|js1L=4V$YdJHd)D(ymE;^2zmApYL2^^J}E#Qo|d}Eg%%TNZN^Arf& zr!U|s%!-|b?d?i8ZTpqpqltck)uI<9@2P@I^3Uu_KjUf-ct5-Bpu?g;*JzbWnne(+ z+#7O@EtH}l)mlm=^7v5Le#@l%mv$s)hFVGND_K1sv7H=gNjaMu5-^3d{auaIimGokvY)70`V7~1g;&7Rjh^W?<2$=iOV6C6zHo&{gVWBHbT+n zU)`WV@8^iN>0+}cTW0C+*ZKt!H#ig + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bibtalk/bib-talk/Login.xaml.cs b/bibtalk/bib-talk/Login.xaml.cs new file mode 100644 index 0000000..8f6feea --- /dev/null +++ b/bibtalk/bib-talk/Login.xaml.cs @@ -0,0 +1,103 @@ +using Newtonsoft.Json; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows; + +namespace bib_talk +{ + public partial class Login : Window + { + // Field to store logged in user + public static string loggedInUser; + + public Login() + { + InitializeComponent(); + } + + private void DraggableArea_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) + { + if (e.ButtonState == MouseButtonState.Pressed) + { + DragMove(); + } + } + + private void CloseButton_Click(object sender, RoutedEventArgs e) + { + this.Close(); + } + + private void Button_Click(object sender, RoutedEventArgs e) + { + RegisterWindow register = new RegisterWindow(); + register.Show(); + this.Close(); + } + + private void WeiterButton_Click(object sender, RoutedEventArgs e) + { + if (usernbox.Text != "" && passwordbox.Password != "") + { + LoginServer(); + + } + } + + private void passwordbox_PasswordChanged(object sender, RoutedEventArgs e) + { + if (usernbox.Text != "" && passwordbox.Password != "") + { + SolidColorBrush customBrush = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF6332A0")); + weiterbutton.Foreground = Brushes.White; + weiterbutton.Background = customBrush; + } + else + { + SolidColorBrush customBrush = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF323134")); + weiterbutton.Foreground = Brushes.Gray; + weiterbutton.Background = customBrush; + } + } + + private void Register_Click(object sender, RoutedEventArgs e) + { + RegisterWindow register = new RegisterWindow(); + register.Show(); + this.Close(); + } + + public async Task LoginServer() + { + string username = usernbox.Text; + string password = passwordbox.Password; + var loginData = new { Username = username, Password = password, Email = "", Birthday = "", IsOnline = ""}; + string json = JsonConvert.SerializeObject(loginData); + + using (var client = new HttpClient()) + { + var content = new StringContent(json, Encoding.UTF8, "application/json"); + var response = await client.PostAsync("http://daddypig.dns.navy:5114/api/users/login", content); + + if (response.IsSuccessStatusCode) + { + var responseContent = await response.Content.ReadAsStringAsync(); + var responseData = JsonConvert.DeserializeObject(responseContent); + string loggedInUsername = responseData.username; + MainWindow mainWindow = new MainWindow(loggedInUsername); + mainWindow.Show(); + this.Close(); + } + else + { + var responseContent = await response.Content.ReadAsStringAsync(); + MessageBox.Show($"Login failed: {responseContent}"); + } + } + } + + } +} diff --git a/bibtalk/bib-talk/MainWindow.xaml b/bibtalk/bib-talk/MainWindow.xaml new file mode 100644 index 0000000..b5f00b3 --- /dev/null +++ b/bibtalk/bib-talk/MainWindow.xaml @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bibtalk/bib-talk/RegisterWindow.xaml.cs b/bibtalk/bib-talk/RegisterWindow.xaml.cs new file mode 100644 index 0000000..1abebca --- /dev/null +++ b/bibtalk/bib-talk/RegisterWindow.xaml.cs @@ -0,0 +1,94 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Http; +using System.Text; +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; +using System.Net.Http; +using Newtonsoft.Json; + +namespace bib_talk +{ + public partial class RegisterWindow : Window + { + public RegisterWindow() + { + InitializeComponent(); + } + + private void CloseButton_Click(object sender, RoutedEventArgs e) + { + this.Close(); + } + + private void DraggableArea_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) + { + if (e.ButtonState == MouseButtonState.Pressed) + { + DragMove(); + } + } + private void Login_Click(object sender, RoutedEventArgs e) + { + Login login= new Login(); + login.Show(); + this.Close(); + } + + private void WeiterButton_Click(object sender, RoutedEventArgs e) + { + if (checkboxAGB.IsChecked == true) + { + RegisterServer(); + } + } + private void CheckBox_Checked(object sender, RoutedEventArgs e) + { + SolidColorBrush customBrush = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF6332A0")); + weiterbutton.Foreground = Brushes.White; + weiterbutton.Background = customBrush; + } + + private void CheckBox_Unchecked(object sender, RoutedEventArgs e) + { + SolidColorBrush customBrush = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF323134")); + weiterbutton.Foreground = Brushes.Gray; + weiterbutton.Background= customBrush; + } + + public async Task RegisterServer() + { + string username = usernbox.Text; + string password = passwordbox.Password; + string email = emailbox.Text; + string birthday = bday1.Text+"."+bday2.Text+"."+bday3.Text; + var newUser = new { Username = username, Password = password, Email = email, Birthday = birthday, IsOnline = ""}; + string json = JsonConvert.SerializeObject(newUser); + + using (var client = new HttpClient()) + { + var content = new StringContent(json, Encoding.UTF8, "application/json"); + var response = await client.PostAsync("http://daddypig.dns.navy:5114/api/users/register", content); + + if (response.IsSuccessStatusCode) + { + MessageBox.Show("Registration Succesful"); + } + else + { + MessageBox.Show("Registration failed."+ response); + } + } + } + } +} diff --git a/bibtalk/bib-talk/bib-talk.csproj b/bibtalk/bib-talk/bib-talk.csproj new file mode 100644 index 0000000..b24974b --- /dev/null +++ b/bibtalk/bib-talk/bib-talk.csproj @@ -0,0 +1,19 @@ + + + + WinExe + net6.0-windows + bib_talk + enable + true + + + + + + + + + + +