Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

Commit

Permalink
Update DTO
Browse files Browse the repository at this point in the history
  • Loading branch information
Johnnymc2001 committed Jan 30, 2022
1 parent 71b482f commit 13dfa45
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 17 deletions.
13 changes: 13 additions & 0 deletions MainProgram/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<add key="Ingame_State" value="[𝗧 {TScore}] &lt;&lt;{Round}&gt;&gt; [{CTScore} 𝗖𝗧]" />
<add key="Ingame_LargeText" value="{Map}" />
<add key="Ingame_SmallText" value="{Name} [{Kill}/{Death}/{Assist} ({Score}) [{MVP}⭐]" />
<add key="ClientSettingsProvider.ServiceUri" value="" />
</appSettings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
Expand All @@ -21,4 +22,16 @@
</dependentAssembly>
</assemblyBinding>
</runtime>
<system.web>
<membership defaultProvider="ClientAuthenticationMembershipProvider">
<providers>
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
</providers>
</membership>
<roleManager defaultProvider="ClientRoleProvider" enabled="true">
<providers>
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
</providers>
</roleManager>
</system.web>
</configuration>
4 changes: 2 additions & 2 deletions MainProgram/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ private async void generateFriendCode(string id)
btnRefreshFriendCode.Enabled = false;
string url = $"{apiEndpoint}/csgo/id-to-friendcode/{id}";
userId = id;
FriendCode fc = await url.GetJsonAsync<FriendCode>();
friendCode = fc.code;
UserInfoDTO fc = await url.GetJsonAsync<UserInfoDTO>();
friendCode = fc.friendcode;
txtFriendCode.Text = friendCode;
}
catch
Expand Down
13 changes: 0 additions & 13 deletions MainProgram/FriendCode.cs

This file was deleted.

9 changes: 7 additions & 2 deletions MainProgram/MainProgram.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<WarningLevel>1</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="CSGSI, Version=1.3.1.0, Culture=neutral, processorArchitecture=MSIL">
Expand All @@ -55,6 +55,7 @@
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.DirectoryServices" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
Expand All @@ -72,7 +73,7 @@
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="FriendCode.cs" />
<Compile Include="UserInfoDTO.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
Expand Down Expand Up @@ -108,4 +109,8 @@
<None Include="Resources\csgo-icon-42849.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
</Project>
15 changes: 15 additions & 0 deletions MainProgram/UserInfoDTO.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MainProgram
{
public class UserInfoDTO
{
public string steamId { get; set; }
public string friendcode { get; set; }
public string name { get; set; }
}
}

0 comments on commit 13dfa45

Please sign in to comment.