Compare commits

...

62 Commits
5.0 ... master

Author SHA1 Message Date
852ec739cb Implement New Room Entry Control
Version Bump
2025-11-21 16:17:48 -08:00
98f62e976c Rework Contacts Tab Style
Fixed Messages Getting Cutoff Slightly At The End
Version Bump
2025-11-18 22:06:28 -08:00
bfcc445c63 Version Bump 2025-11-18 16:13:55 -08:00
987fae22f0 Implement New Message Control In DM's 2025-11-18 16:13:00 -08:00
95daf24473 Version Bump 2025-11-17 16:55:27 -08:00
256e10a7ba Fix Index Out Of Range Exception In AddMessage (im stupid im dumb im stupid im du-) 2025-11-17 16:55:11 -08:00
5016e63a38 Rework Chat Room Form (again)
Version Bump
2025-11-17 16:40:15 -08:00
0d71fe5983 Version Bump 2025-11-15 12:33:13 -08:00
55323321d0 Merge pull request 'Rework Lobby And Use ListViews For Messages' (#6) from lobby-rework into master
Reviewed-on: Moonbase/qtc-net-client#6
2025-11-15 12:30:43 -08:00
ca895d1b97 ChatRoom Form Now Joins Room Instead Of Main Form
Chat Message List Design Changes
2025-11-15 12:29:32 -08:00
89d3c60bde Rework Lobby
Use ListViews For Messages
2025-11-14 18:37:43 -08:00
391b182f4c Remove Explicit Transparency On Profile Images
Fix Store Tab Being Multi Selectable
2025-11-14 17:09:16 -08:00
f1648a12c2 Sign Out Should Delete Stored Credential 2025-11-12 13:58:30 -08:00
4361a69506 Version Bump 2025-11-12 13:44:49 -08:00
b358bb54d0 Implement Better Image Creating
Change Remember Me Checkbox Text To 30 Days
Bug Fixes (i can't remember what i was doing here)
2025-11-12 13:44:22 -08:00
a95d012d69 Update Packages That Could Be Updated
Rework Missed Refresh Token Code
Minor Version Bump
2025-09-21 14:16:41 -07:00
d1d3af2ec9 Rework Refresh Token Storage Solution To Use Windows Credentials API
Minor Version Bump
2025-09-21 13:49:11 -07:00
4e61a1d7b9 Version Bump 2025-08-03 15:00:37 -07:00
446745d4df Implement CreateProfileImage To Combine Precense Icon, Profile Image, and Cosmetic To Make Final Profile Image 2025-08-03 15:00:09 -07:00
00df7505a7 Move Cosmetic Download To Main Form Thread 2025-08-03 14:27:00 -07:00
b17d391406 Minor Version Bump 2025-07-31 15:21:50 -07:00
2092d2c6d3 Keep Default KA Values 2025-07-31 15:05:03 -07:00
fd743dcb42 Do Not Set Server Timeout (it was the default value anyways) 2025-07-31 15:00:37 -07:00
9214460927 Server Timeout = 30s
Keep-Alive Interval  = 1m
2025-07-31 14:59:13 -07:00
1b30636937 Configure TimeSpans For ServerTimeout And KeepAliveInterval 2025-07-31 10:18:57 -07:00
72d9b99c4c Refresh Session Everytime Gateway Connection Is Used To Prevent The Server From Aborting Requests 2025-07-31 10:06:12 -07:00
c7137e4c7e Version Bump 2025-07-27 13:56:55 -07:00
4ee524778d Merge pull request 'Email Features' (#5) from email-features into master
Reviewed-on: Moonbase/qtc-net-client#5
2025-07-27 13:55:57 -07:00
cfcc5ad4c1 Message Box On Register To Inform User Of Email Verification 2025-07-27 13:54:17 -07:00
b81b059177 Initial Implementation Of Email Features 2025-07-27 13:51:44 -07:00
5d553cdf58 Change Default Pfp 2025-07-19 13:54:14 -07:00
8cb59e1b21 Work Around Weird Offline Behaviour 2025-07-19 13:31:54 -07:00
6acb72975e Optimizations To Main Form 2025-07-17 15:33:17 -07:00
098a59f555 Avoid Updating Store Items ListView If Count Is Still Equal (No New Items)
Fix Stock Market Game UI Positioning
2025-07-17 15:27:16 -07:00
e6c842cb19 Remove Uneeded Log Entry 2025-07-17 15:20:53 -07:00
758a5a96dc Add Additional Logging/Diagnostics For Weird Status Behaviours 2025-07-17 14:36:56 -07:00
6bf77aa12e Add enableDebugLogs Config Property 2025-07-15 14:15:31 -07:00
f98e5a490c Implement Extra Logging To Diagnose Status Issues
Better Connection Error Handling
2025-07-15 14:04:46 -07:00
75b61c0a8c Move LoggingService to API library
Add Additional Logging For SignalR
2025-07-14 19:07:54 -07:00
0432fec3cd Finish Initial Implementation Of Admin Menus
Implement Logout Event
Fix Own Direct Messages Not New Lining The Chat
Version Bump
2025-07-13 17:27:16 -07:00
de2a81d485 Initial WIP Implementation Of Admin Menus 2025-07-12 14:23:15 -07:00
fca34d5479 Version Bump 2025-07-12 11:14:40 -07:00
932ee5fe62 Implement OnCurrentUserUpdate Event 2025-07-12 11:14:22 -07:00
34f478213e Version Bump 2025-07-11 12:29:06 -07:00
ffa44ff036 More Profile Image Sizing Fixes 2025-07-11 12:28:22 -07:00
217e3f301a Fix Some Profile Images Not Showing As A Square 2025-07-11 12:15:53 -07:00
28358f44f8 Version Bump 2025-07-11 11:07:10 -07:00
eb9fd6c8cf Fix Order Of Operations In StoreItemDisplay 2025-07-11 11:03:21 -07:00
a325a622a5 Check If User Already Owns The Item Requested 2025-07-11 11:02:10 -07:00
0c76a206f7 Refresh Currency Counter When Buying From Store 2025-07-11 10:58:28 -07:00
502dda6436 Profile Editing - Reworked Cosmetic Selection 2025-07-11 10:43:40 -07:00
868f6fa067 Positioning And Size Fixes 2025-07-11 10:18:37 -07:00
003d01fe4e Implement Store Frontend
Implement Profile Cosmetics
2025-07-10 17:18:54 -07:00
0d93557959 Implement Store API Functions
Fix CurrentUser Not Being Up To Date When Updating User API Side
2025-07-10 10:34:09 -07:00
9fecd1fb74 Version Bump (i keep forgetting) 2025-07-07 12:57:15 -07:00
074b68c698 Implement Donation Button 2025-07-07 12:50:17 -07:00
922528c61c Fix Auto-Updater Not Working If .bak File Exists 2025-07-06 15:36:15 -07:00
846a477587 Add Event For When A Guest User Joins 2025-07-06 10:38:22 -07:00
ad5345512a Rework Contacts List Refreshing 2025-07-06 10:22:29 -07:00
37a7807008 Prepare For Release 5.1 2025-07-05 13:51:27 -07:00
53fab11f88 Rework Client Config To Use Single URL 2025-07-05 13:49:19 -07:00
042671da91 Implement Tic-Tac-Toe Game
Fix Currency Counter Sometimes Adding Decimals
2025-07-05 13:40:16 -07:00
76 changed files with 5457 additions and 1178 deletions

View File

@ -11,5 +11,6 @@
public DateTime CreatedAt { get; set; } = new DateTime(); public DateTime CreatedAt { get; set; } = new DateTime();
public int Status { get; set; } = 0; public int Status { get; set; } = 0;
public int CurrencyAmount { get; set; } = 0; public int CurrencyAmount { get; set; } = 0;
public int ProfileCosmeticId { get; set; } = 0;
} }
} }

View File

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace QtCNETAPI.Dtos.User
{
public class UserPasswordResetDto
{
public string Token { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
}
}

View File

@ -6,5 +6,6 @@
public string Username { get; set; } = string.Empty; public string Username { get; set; } = string.Empty;
public string Bio { get; set; } = string.Empty; public string Bio { get; set; } = string.Empty;
public DateTime DateOfBirth { get; set; } = new DateTime(); public DateTime DateOfBirth { get; set; } = new DateTime();
public int ProfileCosmeticId { get; set; } = 0;
} }
} }

View File

@ -0,0 +1,13 @@
namespace QtCNETAPI.Enums
{
public enum GameStatus
{
WaitingForPlayer,
SelectingSymbol,
Ongoing,
P1Win,
P2Win,
NoWin,
PlayerDisconnected
}
}

View File

@ -0,0 +1,8 @@
namespace QtCNETAPI.Enums
{
public enum StoreItemType
{
ProfileCosmetic = 1,
ClientCosmetic = 2
}
}

View File

@ -0,0 +1,9 @@
namespace QtCNETAPI.Enums
{
public enum TicTacToeSymbol
{
X,
O,
Blank
}
}

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace QtCNETAPI.Events
{
public class GuestUserJoinEventArgs : EventArgs
{
public required string Username { get; set; }
}
}

View File

@ -0,0 +1,14 @@
using System.ComponentModel.DataAnnotations;
namespace QtCNETAPI.Models
{
public class OwnedStoreItem
{
[Key]
public int Id { get; set; }
public string UserId { get; set; } = string.Empty;
public int StoreItemId { get; set; }
public virtual User? User { get; }
}
}

View File

@ -6,5 +6,6 @@
public string Name { get; set; } = string.Empty; public string Name { get; set; } = string.Empty;
public string CreatorId { get; set; } = string.Empty; public string CreatorId { get; set; } = string.Empty;
public DateTime CreatedAt { get; set; } = new DateTime(); public DateTime CreatedAt { get; set; } = new DateTime();
public int UserCount { get; set; } = 0;
} }
} }

View File

@ -9,15 +9,19 @@
public string Role { get; set; } = string.Empty; public string Role { get; set; } = string.Empty;
public string PasswordHash { get; set; } = string.Empty; public string PasswordHash { get; set; } = string.Empty;
public string Email { get; set; } = string.Empty; public string Email { get; set; } = string.Empty;
public bool IsEmailVerified { get; set; } = false;
public DateTime DateOfBirth { get; set; } public DateTime DateOfBirth { get; set; }
public DateTime CreatedAt { get; set; } public DateTime CreatedAt { get; set; }
public int Status { get; set; } = 0; public int Status { get; set; } = 0;
public int CurrencyAmount { get; set; } = 0; public int CurrencyAmount { get; set; } = 0;
public int StockAmount { get; set; } = 0; public int StockAmount { get; set; } = 0;
public DateTime LastCurrencySpin { get; set; } public DateTime LastCurrencySpin { get; set; }
public int ActiveProfileCosmetic { get; set; } = 0;
public string CurrentRoomId { get; set; } = string.Empty;
public virtual IEnumerable<RefreshToken>? RefreshTokens { get; } public virtual IEnumerable<RefreshToken>? RefreshTokens { get; }
public virtual IEnumerable<Contact>? ContactsMade { get; } public virtual IEnumerable<Contact>? ContactsMade { get; }
public virtual IEnumerable<Contact>? ContactsList { get; } public virtual IEnumerable<Contact>? ContactsList { get; }
public virtual IEnumerable<OwnedStoreItem>? OwnedStoreItems { get; }
} }
} }

View File

@ -7,10 +7,11 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Meziantou.Framework.Win32.CredentialManager" Version="1.7.6" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.16" /> <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.16" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="9.0.5" /> <PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="9.0.9" />
<PackageReference Include="RestSharp" Version="112.1.0" /> <PackageReference Include="RestSharp" Version="112.1.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.10.0" /> <PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.14.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -0,0 +1,16 @@
using QtCNETAPI.Enums;
using QtCNETAPI.Models;
namespace QtCNETAPI.Schema
{
public class GameRoom
{
public string Id { get; set; } = string.Empty;
public GameStatus Status { get; set; }
public TicTacToeBoard Board { get; set; } = new();
public User? Player1 { get; set; }
public TicTacToeSymbol P1Symbol { get; set; } = TicTacToeSymbol.Blank;
public User? Player2 { get; set; }
public TicTacToeSymbol P2Symbol { get; set; } = TicTacToeSymbol.Blank;
}
}

View File

@ -0,0 +1,23 @@
using QtCNETAPI.Enums;
using System.Text.Json.Serialization;
namespace QtCNETAPI.Schema
{
public class StoreItem
{
[JsonPropertyName("Id")]
public int Id { get; set; }
[JsonPropertyName("Type")]
public StoreItemType Type { get; set; }
[JsonPropertyName("Price")]
public int Price { get; set; }
[JsonPropertyName("Name")]
public string Name { get; set; } = string.Empty;
[JsonPropertyName("Description")]
public string Description { get; set; } = string.Empty;
[JsonPropertyName("AssetUrl")]
public string AssetUrl { get; set; } = string.Empty;
[JsonPropertyName("ThumbnailUrl")]
public string ThumbnailUrl { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,17 @@
using QtCNETAPI.Enums;
namespace QtCNETAPI.Schema
{
public class TicTacToeBoard
{
public TicTacToeSymbol Square1 { get; set; } = TicTacToeSymbol.Blank;
public TicTacToeSymbol Square2 { get; set; } = TicTacToeSymbol.Blank;
public TicTacToeSymbol Square3 { get; set; } = TicTacToeSymbol.Blank;
public TicTacToeSymbol Square4 { get; set; } = TicTacToeSymbol.Blank;
public TicTacToeSymbol Square5 { get; set; } = TicTacToeSymbol.Blank;
public TicTacToeSymbol Square6 { get; set; } = TicTacToeSymbol.Blank;
public TicTacToeSymbol Square7 { get; set; } = TicTacToeSymbol.Blank;
public TicTacToeSymbol Square8 { get; set; } = TicTacToeSymbol.Blank;
public TicTacToeSymbol Square9 { get; set; } = TicTacToeSymbol.Blank;
}
}

View File

@ -0,0 +1,10 @@
using QtCNETAPI.Models;
namespace QtCNETAPI.Schema
{
public class TicTacToeMove
{
public User User { get; set; } = new();
public int Point { get; set; }
}
}

View File

@ -2,9 +2,9 @@
using QtCNETAPI.Dtos.User; using QtCNETAPI.Dtos.User;
using QtCNETAPI.Enums; using QtCNETAPI.Enums;
using QtCNETAPI.Models; using QtCNETAPI.Models;
using QtCNETAPI.Schema;
using RestSharp; using RestSharp;
using System.IdentityModel.Tokens.Jwt; using System.IdentityModel.Tokens.Jwt;
using System.Resources;
using System.Text.Json; using System.Text.Json;
namespace QtCNETAPI.Services.ApiService namespace QtCNETAPI.Services.ApiService
@ -13,10 +13,15 @@ namespace QtCNETAPI.Services.ApiService
{ {
private User? user; private User? user;
private RestClient _client; private RestClient _client;
private LoggingService _loggingService;
private CredentialService _credService = new();
internal string? sessionToken; internal string? sessionToken;
internal string apiUri; internal string apiUri;
public event EventHandler? OnCurrentUserUpdate;
public string? SessionToken public string? SessionToken
{ {
get { return sessionToken; } get { return sessionToken; }
@ -28,9 +33,10 @@ namespace QtCNETAPI.Services.ApiService
get { return user; } get { return user; }
} }
public ApiService(string apiUrl) public ApiService(string apiUrl, LoggingService loggingService)
{ {
apiUri = apiUrl; apiUri = apiUrl;
_loggingService = loggingService;
_client = new RestClient(apiUri); _client = new RestClient(apiUri);
} }
@ -151,10 +157,9 @@ namespace QtCNETAPI.Services.ApiService
serviceResponse.Success = true; serviceResponse.Success = true;
serviceResponse.Data = response.Data; serviceResponse.Data = response.Data;
// update currentuser model // anything that changes the user should tell the api service to set it again
CurrentUser!.Username = response.Data!.Username; await SetCurrentUser();
CurrentUser.Bio = response.Data.Bio; OnCurrentUserUpdate?.Invoke(this, EventArgs.Empty);
CurrentUser.DateOfBirth = response.Data.DateOfBirth;
} else } else
{ {
serviceResponse.Success = false; serviceResponse.Success = false;
@ -180,6 +185,10 @@ namespace QtCNETAPI.Services.ApiService
{ {
serviceResponse.Success = true; serviceResponse.Success = true;
serviceResponse.Data = response.Data; serviceResponse.Data = response.Data;
// anything that changes the user should tell the api service to set it again
await SetCurrentUser();
OnCurrentUserUpdate?.Invoke(this, EventArgs.Empty);
} }
else else
{ {
@ -228,9 +237,9 @@ namespace QtCNETAPI.Services.ApiService
} }
} }
public async Task<ServiceResponse<User>> LoginAsync(UserLoginDto userLoginDto) public async Task<ServiceResponse<string>> LoginAsync(UserLoginDto userLoginDto)
{ {
var serviceResponse = new ServiceResponse<User>(); var serviceResponse = new ServiceResponse<string>();
try try
{ {
@ -250,13 +259,11 @@ namespace QtCNETAPI.Services.ApiService
{ {
SessionToken = response.Data!; SessionToken = response.Data!;
await File.WriteAllTextAsync("./session.token", response.Message);
var user = await SetCurrentUser(); var user = await SetCurrentUser();
serviceResponse.Success = true; serviceResponse.Success = true;
if (response.Message != null) serviceResponse.Message = response.Message; if (response.Message != null) serviceResponse.Message = response.Message;
serviceResponse.Data = user; serviceResponse.Data = response.Message;
} }
else else
{ {
@ -273,16 +280,85 @@ namespace QtCNETAPI.Services.ApiService
return serviceResponse; return serviceResponse;
} }
private async Task<User> SetCurrentUser() public async Task<ServiceResponse<bool>> ResendVerificationEmail(string email)
{
var serviceResponse = new ServiceResponse<bool>();
var restRequest = new RestRequest($"auth/resend-verification-email")
.AddQueryParameter("email", email);
var response = await _client.PostAsync<ServiceResponse<bool>>(restRequest);
if (response != null)
{
serviceResponse.Success = true;
serviceResponse.Data = response.Data;
}
else
{
serviceResponse.Success = false;
serviceResponse.Message = "API never responded.";
}
return serviceResponse;
}
public async Task<ServiceResponse<bool>> SendPasswordResetEmail(string email)
{
var serviceResponse = new ServiceResponse<bool>();
var restRequest = new RestRequest($"auth/request-password-reset")
.AddQueryParameter("email", email);
var response = await _client.PostAsync<ServiceResponse<bool>>(restRequest);
if (response != null)
{
serviceResponse.Success = true;
serviceResponse.Data = response.Data;
}
else
{
serviceResponse.Success = false;
serviceResponse.Message = "API never responded.";
}
return serviceResponse;
}
public async Task<ServiceResponse<bool>> ResetPassword(UserPasswordResetDto request)
{
var serviceResponse = new ServiceResponse<bool>();
var restRequest = new RestRequest($"auth/reset-password")
.AddJsonBody(request);
var response = await _client.PostAsync<ServiceResponse<bool>>(restRequest);
if (response != null)
{
serviceResponse.Success = true;
serviceResponse.Data = response.Data;
}
else
{
serviceResponse.Success = false;
serviceResponse.Message = "API never responded.";
}
return serviceResponse;
}
public async Task<User> SetCurrentUser()
{ {
var userRequest = new RestRequest("users/user-authorized") var userRequest = new RestRequest("users/user-authorized")
.AddHeader("Authorization", $"Bearer {SessionToken}"); .AddHeader("Authorization", $"Bearer {SessionToken}");
var userResponse = await _client.GetAsync<ServiceResponse<User>>(userRequest); var userResponse = await _client.GetAsync<ServiceResponse<User>>(userRequest);
if (userResponse != null || userResponse!.Data != null) if (userResponse != null && userResponse.Success && userResponse.Data != null)
{ {
user = userResponse.Data; user = userResponse.Data;
return userResponse.Data!;
_loggingService.LogString($"Current User's Status Is {userResponse.Data.Status}");
return userResponse.Data;
} else } else
{ {
throw new NullReferenceException("Current User could not be set."); throw new NullReferenceException("Current User could not be set.");
@ -337,21 +413,23 @@ namespace QtCNETAPI.Services.ApiService
public async Task<ServiceResponse<string>> RefreshSessionIfInvalid() public async Task<ServiceResponse<string>> RefreshSessionIfInvalid()
{ {
var tokenHandler = new JwtSecurityTokenHandler(); var tokenHandler = new JwtSecurityTokenHandler();
var refToken = await File.ReadAllTextAsync("./session.token"); var refToken = _credService.GetAccessToken(); // fuck CA1416, if this is being ran on linux it should just crash (theoretically)
if (refToken == null)
{
// treat as session expired
return new ServiceResponse<string> { Success = false, Message = "Refresh Token Not Found. Session Expired." };
}
JwtSecurityToken token = tokenHandler.ReadJwtToken(SessionToken); JwtSecurityToken token = tokenHandler.ReadJwtToken(SessionToken);
if(DateTime.Compare(DateTime.UtcNow, token.ValidTo) > 0) if(DateTime.Compare(DateTime.UtcNow, token.ValidTo) > 0)
{ {
if (!File.Exists("./session.token")) { return new ServiceResponse<string> { Success = false, Message = "Session File Not Found. Session Expired." }; }
var result = await RefreshLogin(refToken); var result = await RefreshLogin(refToken);
if (result == null || result.Success == false) if (result == null || result.Success == false)
{ {
File.Delete("./session.token"); return new ServiceResponse<string> { Success = false, Message = "Session Expired." }; // logging in again should overwrite old token
return new ServiceResponse<string> { Success = false, Message = "Session Expired." };
} else return new ServiceResponse<string> { Success = true, Data = refToken }; } else return new ServiceResponse<string> { Success = true, Data = refToken };
} else return new ServiceResponse<string> { Success = true, Data = refToken }; } else return new ServiceResponse<string> { Success = true, Data = refToken };
} }
@ -590,6 +668,10 @@ namespace QtCNETAPI.Services.ApiService
{ {
serviceResponse.Success = true; serviceResponse.Success = true;
serviceResponse.Data = response.Data; serviceResponse.Data = response.Data;
// anything that changes the user should tell the api service to set it again
await SetCurrentUser();
OnCurrentUserUpdate?.Invoke(this, EventArgs.Empty);
} }
return serviceResponse; return serviceResponse;
@ -637,6 +719,10 @@ namespace QtCNETAPI.Services.ApiService
{ {
serviceResponse.Success = true; serviceResponse.Success = true;
serviceResponse.Data = response.Data; serviceResponse.Data = response.Data;
// anything that changes the user should tell the api service to set it again
await SetCurrentUser();
OnCurrentUserUpdate?.Invoke(this, EventArgs.Empty);
} }
return serviceResponse; return serviceResponse;
@ -661,6 +747,10 @@ namespace QtCNETAPI.Services.ApiService
{ {
serviceResponse.Success = true; serviceResponse.Success = true;
serviceResponse.Data = response.Data; serviceResponse.Data = response.Data;
// anything that changes the user should tell the api service to set it again
await SetCurrentUser();
OnCurrentUserUpdate?.Invoke(this, EventArgs.Empty);
} }
return serviceResponse; return serviceResponse;
@ -713,5 +803,151 @@ namespace QtCNETAPI.Services.ApiService
return serviceResponse; return serviceResponse;
} }
public async Task<ServiceResponse<List<StoreItem>>> GetStoreItems()
{
await RefreshSessionIfInvalid();
var serviceResponse = new ServiceResponse<List<StoreItem>>();
if (SessionToken == null) throw new NullReferenceException("Function Was Called Before A Session Was Made.");
var restRequest = new RestRequest("store/all-items")
.AddHeader("Authorization", $"Bearer {SessionToken}");
var response = await _client.GetAsync<ServiceResponse<List<StoreItem>>>(restRequest);
if (response == null) { serviceResponse.Success = false; serviceResponse.Message = "API did not respond."; return serviceResponse; }
if (response.Success)
{
serviceResponse.Success = true;
serviceResponse.Data = response.Data;
}
return serviceResponse;
}
public async Task<ServiceResponse<StoreItem>> GetStoreItem(int id)
{
await RefreshSessionIfInvalid();
var serviceResponse = new ServiceResponse<StoreItem>();
if (SessionToken == null) throw new NullReferenceException("Function Was Called Before A Session Was Made.");
var restRequest = new RestRequest("store/item")
.AddHeader("Authorization", $"Bearer {SessionToken}")
.AddQueryParameter("id", id);
var response = await _client.GetAsync<ServiceResponse<StoreItem>>(restRequest);
if (response == null) { serviceResponse.Success = false; serviceResponse.Message = "API did not respond."; return serviceResponse; }
if (response.Success)
{
serviceResponse.Success = true;
serviceResponse.Data = response.Data;
}
return serviceResponse;
}
public async Task<ServiceResponse<bool>> BuyStoreItem(int id)
{
await RefreshSessionIfInvalid();
var serviceResponse = new ServiceResponse<bool>();
if (SessionToken == null) throw new NullReferenceException("Function Was Called Before A Session Was Made.");
var restRequest = new RestRequest("store/buy-item")
.AddHeader("Authorization", $"Bearer {SessionToken}")
.AddQueryParameter("id", id);
var response = await _client.PostAsync<ServiceResponse<bool>>(restRequest);
if (response == null) { serviceResponse.Success = false; serviceResponse.Message = "API did not respond."; return serviceResponse; }
if (response.Success)
{
serviceResponse.Success = true;
serviceResponse.Data = response.Data;
// anything that changes the user should tell the api service to set it again
await SetCurrentUser();
OnCurrentUserUpdate?.Invoke(this, EventArgs.Empty);
}
return serviceResponse;
}
public async Task<ServiceResponse<List<OwnedStoreItem>>> GetOwnedStoreItems()
{
await RefreshSessionIfInvalid();
var serviceResponse = new ServiceResponse<List<OwnedStoreItem>>();
if (SessionToken == null) throw new NullReferenceException("Function Was Called Before A Session Was Made.");
var restRequest = new RestRequest("store/bought-items")
.AddHeader("Authorization", $"Bearer {SessionToken}");
var response = await _client.GetAsync<ServiceResponse<List<OwnedStoreItem>>>(restRequest);
if (response == null) { serviceResponse.Success = false; serviceResponse.Message = "API did not respond."; return serviceResponse; }
if (response.Success)
{
serviceResponse.Success = true;
serviceResponse.Data = response.Data;
}
return serviceResponse;
}
public async Task<ServiceResponse<OwnedStoreItem>> GetOwnedStoreItem(int id)
{
await RefreshSessionIfInvalid();
var serviceResponse = new ServiceResponse<OwnedStoreItem>();
if (SessionToken == null) throw new NullReferenceException("Function Was Called Before A Session Was Made.");
var restRequest = new RestRequest("store/bought-item")
.AddHeader("Authorization", $"Bearer {SessionToken}")
.AddQueryParameter("id", id);
var response = await _client.GetAsync<ServiceResponse<OwnedStoreItem>>(restRequest);
if (response == null) { serviceResponse.Success = false; serviceResponse.Message = "API did not respond."; return serviceResponse; }
if (response.Success)
{
serviceResponse.Success = true;
serviceResponse.Data = response.Data;
}
return serviceResponse;
}
public async Task<ServiceResponse<User>> DeleteUserById(string id)
{
await RefreshSessionIfInvalid();
var serviceResponse = new ServiceResponse<User>();
if (SessionToken == null) throw new NullReferenceException("Function Was Called Before A Session Was Made.");
var restRequest = new RestRequest("users/delete-user")
.AddHeader("Authorization", $"Bearer {SessionToken}")
.AddQueryParameter("id", id);
var response = await _client.DeleteAsync<ServiceResponse<User>>(restRequest);
if (response == null) { serviceResponse.Success = false; serviceResponse.Message = "API did not respond."; return serviceResponse; }
if (response.Success)
{
serviceResponse.Success = true;
serviceResponse.Data = response.Data;
}
return serviceResponse;
}
} }
} }

View File

@ -8,6 +8,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using QtCNETAPI.Enums; using QtCNETAPI.Enums;
using QtCNETAPI.Schema;
namespace QtCNETAPI.Services.ApiService namespace QtCNETAPI.Services.ApiService
{ {
@ -16,12 +17,19 @@ namespace QtCNETAPI.Services.ApiService
public string? SessionToken { get; set; } public string? SessionToken { get; set; }
public User CurrentUser { get; } public User CurrentUser { get; }
public event EventHandler? OnCurrentUserUpdate;
public Task<ServiceResponse<string>> PingServerAsync(); public Task<ServiceResponse<string>> PingServerAsync();
public Task<ServiceResponse<List<UserInformationDto>>> GetOnlineUsersAsync(); public Task<ServiceResponse<List<UserInformationDto>>> GetOnlineUsersAsync();
public Task<ServiceResponse<List<UserInformationDto>>> GetAllUsersAsync(); public Task<ServiceResponse<List<UserInformationDto>>> GetAllUsersAsync();
public Task<ServiceResponse<User>> LoginAsync(UserLoginDto userLoginDto); public Task<ServiceResponse<User>> DeleteUserById(string id);
public Task<ServiceResponse<string>> LoginAsync(UserLoginDto userLoginDto);
public Task<ServiceResponse<bool>> ResendVerificationEmail(string email);
public Task<ServiceResponse<bool>> SendPasswordResetEmail(string email);
public Task<ServiceResponse<bool>> ResetPassword(UserPasswordResetDto request);
public Task<ServiceResponse<User>> RefreshLogin(string refreshToken); public Task<ServiceResponse<User>> RefreshLogin(string refreshToken);
public Task<ServiceResponse<string>> RefreshSessionIfInvalid(); public Task<ServiceResponse<string>> RefreshSessionIfInvalid();
public Task<User> SetCurrentUser();
public Task<ServiceResponse<User>> RegisterAsync(UserDto userDto); public Task<ServiceResponse<User>> RegisterAsync(UserDto userDto);
public Task<ServiceResponse<UserInformationDto>> GetUserInformationAsync(string id); public Task<ServiceResponse<UserInformationDto>> GetUserInformationAsync(string id);
public Task<ServiceResponse<UserInformationDto>> UpdateUserInformationAsync(UserUpdateInformationDto request); public Task<ServiceResponse<UserInformationDto>> UpdateUserInformationAsync(UserUpdateInformationDto request);
@ -40,5 +48,10 @@ namespace QtCNETAPI.Services.ApiService
public Task<ServiceResponse<UserStockActionResultDto>> SellStock(int amount); public Task<ServiceResponse<UserStockActionResultDto>> SellStock(int amount);
public Task<ServiceResponse<int>> GetRandomNumber(); public Task<ServiceResponse<int>> GetRandomNumber();
public Task<ServiceResponse<NumberGuessResult>> GuessRandomNumber(int original, int guess); public Task<ServiceResponse<NumberGuessResult>> GuessRandomNumber(int original, int guess);
public Task<ServiceResponse<List<StoreItem>>> GetStoreItems();
public Task<ServiceResponse<StoreItem>> GetStoreItem(int id);
public Task<ServiceResponse<bool>> BuyStoreItem(int id);
public Task<ServiceResponse<List<OwnedStoreItem>>> GetOwnedStoreItems();
public Task<ServiceResponse<OwnedStoreItem>> GetOwnedStoreItem(int id);
} }
} }

View File

@ -0,0 +1,42 @@
using Meziantou.Framework.Win32;
namespace QtCNETAPI.Services
{
public class CredentialService()
{
/*
* NOTE *
This does not work on other platforms such as Linux or macOS.
I will probably recode the legacy way of doing this for those other platforms.
*/
public void SaveAccessToken(string username, string accessToken)
{
string applicationName = "QtC.NET";
if (System.Diagnostics.Debugger.IsAttached) applicationName = "QtC.NET.Development";
CredentialManager.WriteCredential(applicationName, username, accessToken, $"Access Token For User {username} On QtC.NET", CredentialPersistence.LocalMachine);
}
public void DeleteAccessToken()
{
string applicationName = "QtC.NET";
if (System.Diagnostics.Debugger.IsAttached) applicationName = "QtC.NET.Development";
CredentialManager.DeleteCredential(applicationName);
}
public string? GetAccessToken()
{
string applicationName = "QtC.NET";
if (System.Diagnostics.Debugger.IsAttached) applicationName = "QtC.NET.Development";
var credential = CredentialManager.ReadCredential(applicationName);
if (credential == null) return null;
return credential.Password;
}
}
}

View File

@ -1,4 +1,5 @@
using Microsoft.AspNetCore.SignalR.Client; using Microsoft.AspNetCore.SignalR.Client;
using Microsoft.Extensions.Logging;
using QtCNETAPI.Dtos.User; using QtCNETAPI.Dtos.User;
using QtCNETAPI.Events; using QtCNETAPI.Events;
using QtCNETAPI.Models; using QtCNETAPI.Models;
@ -6,47 +7,54 @@ using QtCNETAPI.Services.ApiService;
namespace QtCNETAPI.Services.GatewayService namespace QtCNETAPI.Services.GatewayService
{ {
public class GatewayService : IGatewayService, IAsyncDisposable public class GatewayService(string GWUrl, IApiService apiService, LoggingService loggingService) : IGatewayService, IAsyncDisposable
{ {
internal string gwBaseUri = "127.0.0.1"; internal string gwBaseUri = GWUrl;
public Room? CurrentRoom { get; private set; } public Room? CurrentRoom { get; private set; }
public bool InLobby { get; private set; }
public HubConnection? HubConnection { get; private set; } public HubConnection? HubConnection { get; private set; }
public event EventHandler OnRoomMessageReceived; public event EventHandler? OnRoomMessageReceived;
public event EventHandler OnRoomUserListReceived; public event EventHandler? OnRoomUserListReceived;
public event EventHandler OnRefreshUserListsReceived; public event EventHandler? OnGuestUserJoin;
public event EventHandler OnRefreshRoomListReceived; public event EventHandler? OnRefreshUserListsReceived;
public event EventHandler OnRefreshContactsListReceived; public event EventHandler? OnRefreshRoomListReceived;
public event EventHandler OnClientFunctionReceived; public event EventHandler? OnRoomDeleted;
public event EventHandler OnDirectMessageReceived; public event EventHandler? OnRefreshContactsListReceived;
public event EventHandler OnServerConfigReceived; public event EventHandler? OnClientFunctionReceived;
public event EventHandler OnServerDisconnect; public event EventHandler? OnDirectMessageReceived;
public event EventHandler OnServerReconnecting; public event EventHandler? OnServerConfigReceived;
public event EventHandler OnServerReconnected; public event EventHandler? OnServerDisconnect;
public event EventHandler? OnServerReconnecting;
public event EventHandler? OnServerReconnected;
public event EventHandler? OnUserForceLogout;
private IApiService _apiService; private IApiService _apiService = apiService;
private LoggingService _loggingService = loggingService;
public GatewayService(string GWUrl, IApiService apiService)
{
gwBaseUri = GWUrl;
_apiService = apiService;
}
public async Task StartAsync() public async Task StartAsync()
{ {
// just to be safe (it doesn't load the server since it shouldn't request a new one unless its actually expired)
await _apiService.RefreshSessionIfInvalid();
// build connection // build connection
var gwConBuilder = new HubConnectionBuilder() var gwConBuilder = new HubConnectionBuilder()
.WithAutomaticReconnect() .WithAutomaticReconnect()
.ConfigureLogging((builder) =>
{
builder.AddProvider(new LoggingServiceProvider(_loggingService));
if (System.Diagnostics.Debugger.IsAttached) builder.SetMinimumLevel(LogLevel.Debug);
else builder.SetMinimumLevel(LogLevel.Error);
})
.WithUrl(gwBaseUri, options => .WithUrl(gwBaseUri, options =>
{ {
options.AccessTokenProvider = () => Task.FromResult(_apiService.SessionToken); options.AccessTokenProvider = async () =>
}); {
// this should hopefully refresh the session every time the gateway connection is used to prevent connection aborts
await _apiService.RefreshSessionIfInvalid();
return _apiService.SessionToken;
};
})
.WithStatefulReconnect();
HubConnection = gwConBuilder.Build(); HubConnection = gwConBuilder.Build();
// register events // register events
@ -58,14 +66,28 @@ namespace QtCNETAPI.Services.GatewayService
HubConnection.On("RefreshContactsList", () => OnRefreshContactsListReceived?.Invoke(this, EventArgs.Empty)); HubConnection.On("RefreshContactsList", () => OnRefreshContactsListReceived?.Invoke(this, EventArgs.Empty));
HubConnection.On<ServerConfig>("ReceiveServerConfig", (serverConfig) => OnServerConfigReceived?.Invoke(this, new ServerConfigEventArgs { ServerConfig = serverConfig })); HubConnection.On<ServerConfig>("ReceiveServerConfig", (serverConfig) => OnServerConfigReceived?.Invoke(this, new ServerConfigEventArgs { ServerConfig = serverConfig }));
HubConnection.On<List<User>>("RoomUserList", (userList) => OnRoomUserListReceived?.Invoke(this, new RoomListEventArgs { UserList = userList })); HubConnection.On<List<User>>("RoomUserList", (userList) => OnRoomUserListReceived?.Invoke(this, new RoomListEventArgs { UserList = userList }));
HubConnection.On<string>("GuestJoin", (username) => OnGuestUserJoin?.Invoke(this, new GuestUserJoinEventArgs { Username = username }));
HubConnection.On("RoomDeleted", () => OnRoomDeleted?.Invoke(this, EventArgs.Empty));
HubConnection.On("ForceSignOut", () => OnUserForceLogout?.Invoke(this, EventArgs.Empty));
HubConnection.Closed += HubConnection_Closed; HubConnection.Closed += HubConnection_Closed;
HubConnection.Reconnecting += HubConnection_Reconnecting; HubConnection.Reconnecting += HubConnection_Reconnecting;
HubConnection.Reconnected += HubConnection_Reconnected; HubConnection.Reconnected += HubConnection_Reconnected;
// start connection // start connection
try
{
await HubConnection.StartAsync(); await HubConnection.StartAsync();
} }
catch (HttpRequestException ex)
{
_loggingService.LogString($"Unable To Connect To SignalR.\n{ex.Message}\n{ex.StackTrace}");
return;
}
// ensure current user is up to date (particularly status)
await _apiService.SetCurrentUser();
}
public async Task StopAsync() public async Task StopAsync()
{ {
@ -97,71 +119,35 @@ namespace QtCNETAPI.Services.GatewayService
} }
} }
public async Task JoinLobbyAsync() public async Task JoinRoomAsync(Room? room = null)
{ {
await _apiService.RefreshSessionIfInvalid();
if (HubConnection == null || HubConnection.State != HubConnectionState.Connected) throw new InvalidOperationException("Function was called before connection was made."); if (HubConnection == null || HubConnection.State != HubConnectionState.Connected) throw new InvalidOperationException("Function was called before connection was made.");
await HubConnection.SendAsync("JoinLobby", _apiService.CurrentUser); // assume user is trying to join lobby if room is null (does not have db entry)
InLobby = true; room ??= new Room
CurrentRoom = null;
}
public async Task JoinRoomAsync(Room room)
{ {
await _apiService.RefreshSessionIfInvalid(); Id = "LOBBY",
Name = "Lobby"
if (HubConnection == null || HubConnection.State != HubConnectionState.Connected) throw new InvalidOperationException("Function was called before connection was made."); };
if (InLobby == true)
{
await HubConnection.SendAsync("LeaveLobby", _apiService.CurrentUser);
InLobby = false;
}
else if (CurrentRoom != null)
{
await HubConnection.SendAsync("LeaveRoom", _apiService.CurrentUser, CurrentRoom);
}
if (CurrentRoom != null) await HubConnection.SendAsync("LeaveRoom", _apiService.CurrentUser, CurrentRoom);
await HubConnection.SendAsync("JoinRoom", _apiService.CurrentUser, room); await HubConnection.SendAsync("JoinRoom", _apiService.CurrentUser, room);
CurrentRoom = room; CurrentRoom = room;
} }
public async Task LeaveRoomAsync() public async Task LeaveRoomAsync()
{ {
await _apiService.RefreshSessionIfInvalid();
if (HubConnection == null || HubConnection.State != HubConnectionState.Connected) throw new InvalidOperationException("Function was called before connection was made."); if (HubConnection == null || HubConnection.State != HubConnectionState.Connected) throw new InvalidOperationException("Function was called before connection was made.");
if (InLobby) if (CurrentRoom != null) await HubConnection.SendAsync("LeaveRoom", _apiService.CurrentUser, CurrentRoom);
{
await HubConnection.SendAsync("LeaveLobby", _apiService.CurrentUser);
InLobby = false;
}
else
{
await HubConnection.SendAsync("LeaveRoom", _apiService.CurrentUser, CurrentRoom);
CurrentRoom = null; CurrentRoom = null;
} }
}
public async Task RefreshContactsForUser(UserInformationDto user)
{
await _apiService.RefreshSessionIfInvalid();
if (HubConnection == null || HubConnection.State != HubConnectionState.Connected) throw new InvalidOperationException("Function was called before connection was made.");
await HubConnection.SendAsync("RefreshContactsListOnUser", user, _apiService.CurrentUser);
}
public async Task PostMessageAsync(Message message) public async Task PostMessageAsync(Message message)
{ {
await _apiService.RefreshSessionIfInvalid();
if (HubConnection == null || HubConnection.State != HubConnectionState.Connected) throw new InvalidOperationException("Function was called before connection was made."); if (HubConnection == null || HubConnection.State != HubConnectionState.Connected) throw new InvalidOperationException("Function was called before connection was made.");
await HubConnection.SendAsync("SendMessage", _apiService.CurrentUser, message, InLobby, CurrentRoom); await HubConnection.SendAsync("SendMessage", _apiService.CurrentUser, message, CurrentRoom);
} }
public async Task SendDirectMessageAsync(UserInformationDto user, Message message) public async Task SendDirectMessageAsync(UserInformationDto user, Message message)
@ -175,11 +161,12 @@ namespace QtCNETAPI.Services.GatewayService
public async Task UpdateStatus(int status) public async Task UpdateStatus(int status)
{ {
await _apiService.RefreshSessionIfInvalid();
if (HubConnection == null || HubConnection.State != HubConnectionState.Connected) throw new InvalidOperationException("Function was called before connection was made."); if (HubConnection == null || HubConnection.State != HubConnectionState.Connected) throw new InvalidOperationException("Function was called before connection was made.");
await HubConnection.SendAsync("UpdateStatus", _apiService.CurrentUser, status); await HubConnection.SendAsync("UpdateStatus", _apiService.CurrentUser, status);
// anything that changes the user should tell the api service to set it again
await _apiService.SetCurrentUser();
} }

View File

@ -18,10 +18,7 @@ namespace QtCNETAPI.Services.GatewayService
/// The Current Room The Current User Is In /// The Current Room The Current User Is In
/// </summary> /// </summary>
public Room? CurrentRoom { get; } public Room? CurrentRoom { get; }
/// <summary>
/// Is The User Currently In The Lobby?
/// </summary>
public bool InLobby { get; }
/// <summary> /// <summary>
/// The Current Connection To The Gateway /// The Current Connection To The Gateway
/// </summary> /// </summary>
@ -47,20 +44,13 @@ namespace QtCNETAPI.Services.GatewayService
/// <returns></returns> /// <returns></returns>
public Task DisposeAsync(); public Task DisposeAsync();
/// <summary>
/// Joins The Lobby Of The Server
/// </summary>
/// <returns></returns>
/// <exception cref="InvalidOperationException">Thrown if the function is called before the connection is established.</exception>
public Task JoinLobbyAsync();
/// <summary> /// <summary>
/// Joins The Current User To A Room On The Server /// Joins The Current User To A Room On The Server
/// </summary> /// </summary>
/// <param name="room">Room To Join</param> /// <param name="room">Room To Join</param>
/// <returns></returns> /// <returns></returns>
/// <exception cref="InvalidOperationException">Thrown if the function is called before the connection is established.</exception> /// <exception cref="InvalidOperationException">Thrown if the function is called before the connection is established.</exception>
public Task JoinRoomAsync(Room room); public Task JoinRoomAsync(Room? room = null);
/// <summary> /// <summary>
/// Leaves The Current Room The Current User Is In /// Leaves The Current Room The Current User Is In
@ -85,14 +75,6 @@ namespace QtCNETAPI.Services.GatewayService
/// <returns></returns> /// <returns></returns>
public Task SendDirectMessageAsync(UserInformationDto user, Message message); public Task SendDirectMessageAsync(UserInformationDto user, Message message);
/// <summary>
/// Refreshes Contacts List For A Specified User
/// </summary>
/// <param name="user">The User You Wish To Refresh</param>
/// <param name="currentUser">Yourself</param>
/// <returns></returns>
public Task RefreshContactsForUser(UserInformationDto user);
/// <summary> /// <summary>
/// Updates The Status For The Current User /// Updates The Status For The Current User
/// </summary> /// </summary>
@ -112,6 +94,16 @@ namespace QtCNETAPI.Services.GatewayService
/// </summary> /// </summary>
public event EventHandler OnRoomUserListReceived; public event EventHandler OnRoomUserListReceived;
/// <summary>
/// Fires When The Room The User Is In Gets Deleted By An Admin
/// </summary>
public event EventHandler OnRoomDeleted;
/// <summary>
/// Fires When A Guest User Joins Your Room
/// </summary>
public event EventHandler OnGuestUserJoin;
/// <summary> /// <summary>
/// When A Client Function/Event Is Received, This Event Fires /// When A Client Function/Event Is Received, This Event Fires
/// </summary> /// </summary>
@ -156,5 +148,10 @@ namespace QtCNETAPI.Services.GatewayService
/// When the Connection Reconnects, This Event Fires /// When the Connection Reconnects, This Event Fires
/// </summary> /// </summary>
public event EventHandler OnServerReconnected; public event EventHandler OnServerReconnected;
/// <summary>
/// Fires When The Current User Is Signed Out By The Server
/// </summary>
public event EventHandler OnUserForceLogout;
} }
} }

View File

@ -0,0 +1,93 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
using System.Text.Json;
using Microsoft.Extensions.Logging;
using Microsoft.IdentityModel.Abstractions;
namespace QtCNETAPI.Services
{
public class LoggingService : IDisposable, ILogger
{
private DateTime LogDate { get; set; }
private string LogFilePath { get; set; }
private StreamWriter LogFile { get; set; }
public LoggingService()
{
LogDate = DateTime.Now;
LogFilePath = $"./Logs/QtCClientLog_{LogDate:ddMMyyy-hhmm}.log";
// create log file
if (!Directory.Exists("./Logs")) Directory.CreateDirectory("./Logs");
LogFile = new StreamWriter(File.Create(LogFilePath));
Debug.WriteLine($"Log File Created At {LogFilePath}");
}
public void LogString(string message)
{
try
{
Debug.WriteLine($"({DateTime.Now.ToLocalTime():hh:mm}) {message}");
LogFile.WriteLine($"({DateTime.Now.ToLocalTime():hh:mm}) {message}");
} catch (ObjectDisposedException)
{
}
}
public void LogModel<T>(T model)
{
try
{
// serialize the model as json
string modelSerialized = JsonSerializer.Serialize(model, options: new JsonSerializerOptions { WriteIndented = true });
// log it
Debug.WriteLine($"({DateTime.Now.ToLocalTime():hh:mm}) {modelSerialized}");
LogFile.WriteLine($"({DateTime.Now.ToLocalTime():hh:mm}) {modelSerialized}");
} catch (ObjectDisposedException)
{
}
}
public void Dispose()
{
LogFile.WriteLine("--- END OF LOG ---");
LogFile.Close();
LogFile.Dispose();
}
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
{
try
{
// format message
string message = $"({DateTime.Now.ToLocalTime():hh:mm}) [{logLevel}] {formatter(state, exception)}";
// log it
Debug.WriteLine(message);
LogFile.WriteLine(message);
} catch (ObjectDisposedException)
{
}
}
public bool IsEnabled(LogLevel logLevel) => true;
public IDisposable? BeginScope<TState>(TState state) where TState : notnull => default!;
}
public class LoggingServiceProvider(LoggingService? loggingService = null) : ILoggerProvider
{
public ILogger CreateLogger(string categoryName)
{
if (loggingService != null) return loggingService;
else return new LoggingService();
}
public void Dispose() { }
}
}

View File

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace qtc_net_client_2.ClientModel
{
public class ComboBoxItem
{
public string? Name { get; set; }
public object? Value { get; set; }
public override string ToString()
{
return Name ?? string.Empty;
}
}
}

View File

@ -15,12 +15,12 @@ namespace qtc_net_client_2.ClientModel
[JsonPropertyName("minimizeToTray")] [JsonPropertyName("minimizeToTray")]
[JsonRequired] [JsonRequired]
public bool MinimizeToTray { get; set; } = true; public bool MinimizeToTray { get; set; } = true;
[JsonPropertyName("enableDebugLogs")]
[JsonRequired]
public bool EnableDebugLogs { get; set; } = false;
[JsonPropertyName("apiEndpoint")] [JsonPropertyName("serverUrl")]
[JsonRequired] [JsonRequired]
public string ApiEndpoint { get; set; } = "https://qtc.alanmoon.net/api"; public string ServerUrl { get; set; } = "https://qtc.alanmoon.net";
[JsonPropertyName("gatewayEndpoint")]
[JsonRequired]
public string GatewayEndpoint { get; set; } = "https://qtc.alanmoon.net/chat";
} }
} }

View File

@ -0,0 +1,148 @@
using qtc_net_client_2.Properties;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace qtc_net_client_2.Controls
{
public class ChatMessageControl : Control
{
public Image? Avatar { get; set; }
public string Username = "Username";
public string Message = "Message";
private Font usernameFont = new("Segoe UI", 9, FontStyle.Bold);
private Font messageFont = new("Segoe UI", 9, FontStyle.Regular);
private Font messageFontBold = new("Segoe UI", 10, FontStyle.Bold);
public ChatMessageControl()
{
DoubleBuffered = true;
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
int avatarSize = 32;
int padding = 6;
// first, draw the avatar
Rectangle pfpRect = new(padding, padding, avatarSize, avatarSize);
e.Graphics.DrawImage(Avatar ?? Resources.DefaultPfp, pfpRect);
// then draw the username
int textLeft = padding * 2 + avatarSize;
int textWidth = Width - textLeft - padding;
Rectangle usernameRect = new(textLeft, padding, textWidth, 20);
e.Graphics.DrawString(Username, usernameFont, Brushes.Black, usernameRect);
// finally draw the message
int messageTop = usernameRect.Bottom + 2;
Rectangle messageRect = new(textLeft, messageTop, textWidth, Height - messageTop - padding);
StringFormat fmt = new()
{
Trimming = StringTrimming.Word,
FormatFlags = 0,
Alignment = StringAlignment.Near
};
if (Username.Contains("Server"))
{
e.Graphics.DrawString(Message, messageFontBold, Brushes.Black, messageRect, fmt);
return;
}
e.Graphics.DrawString(Message, messageFont, Brushes.Black, messageRect, fmt);
}
protected override void OnResize(EventArgs e)
{
base.OnResize(e);
Height = CalculateHeight(Width);
}
public int CalculateHeight(int width)
{
int padding = 6;
int avatarSize = 32;
int textLeft = padding * 2 + avatarSize;
int textWidth = width - textLeft - padding;
using (Graphics g = CreateGraphics())
{
SizeF usernameSize = g.MeasureString(Username, usernameFont, textWidth);
SizeF messageSize = g.MeasureString(Message, messageFont, textWidth);
int totalHeight = padding + (int)usernameSize.Height + 2 + (int)messageSize.Height + padding + 5;
return Math.Max(totalHeight, avatarSize + 2 * padding);
}
}
}
public class ChatMessageControlMinimal : Control
{
public string Username = "Username";
public string Message = "Message";
private Font usernameFont = new("Segoe UI", 9, FontStyle.Bold);
private Font messageFont = new("Segoe UI", 9, FontStyle.Regular);
public ChatMessageControlMinimal()
{
DoubleBuffered = true;
MinimumSize = new Size(150, 20);
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
int padding = 6;
// first draw the username
int textWidth = Width - padding * 2;
Rectangle usernameRect = new(padding, padding, textWidth, 20);
e.Graphics.DrawString(Username, usernameFont, Brushes.Black, usernameRect);
// finally draw the message
int messageTop = usernameRect.Bottom + 2;
Rectangle messageRect = new(padding, messageTop, textWidth, Height - messageTop - padding);
StringFormat fmt = new()
{
Trimming = StringTrimming.Word,
FormatFlags = 0,
Alignment = StringAlignment.Near
};
e.Graphics.DrawString(Message, messageFont, Brushes.Black, messageRect, fmt);
}
protected override void OnResize(EventArgs e)
{
base.OnResize(e);
Height = CalculateHeight(Width);
}
public int CalculateHeight(int width)
{
int padding = 6;
int textWidth = width - padding * 2;
using (Graphics g = CreateGraphics())
{
SizeF usernameSize = g.MeasureString(Username, usernameFont, textWidth);
SizeF messageSize = g.MeasureString(Message, messageFont, textWidth);
int totalHeight = padding + (int)usernameSize.Height + 2 + (int)messageSize.Height + padding + 5;
return totalHeight;
}
}
}
}

View File

@ -0,0 +1,92 @@
using Accessibility;
using Microsoft.AspNetCore.Mvc.TagHelpers;
using qtc_net_client_2.Properties;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace qtc_net_client_2.Controls
{
public class ContactEntryControl : Control
{
public Image? Avatar { get; set; }
public string Username = "Username";
public Color StatusColor = Color.Gray;
private Font? usernameFont;
public event EventHandler? ContactDoubleClicked;
private bool IsHoveredOn;
public ContactEntryControl()
{
// reduce flicker
SetStyle(ControlStyles.AllPaintingInWmPaint |
ControlStyles.ResizeRedraw |
ControlStyles.UserPaint |
ControlStyles.OptimizedDoubleBuffer, true);
Height = 36;
}
protected override void OnPaintBackground(PaintEventArgs pevent) { } // prevent this
protected override void OnPaint(PaintEventArgs e)
{
e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
Rectangle rect = ClientRectangle;
using var brush = new LinearGradientBrush(rect, StatusColor, BackColor, LinearGradientMode.Horizontal);
Color usernameForeColor = Color.Black;
if(IsHoveredOn)
{
usernameForeColor = Color.White;
usernameFont = new Font("Segoe UI", 9, FontStyle.Bold | FontStyle.Underline);
}
else
{
usernameFont = new Font("Segoe UI", 9, FontStyle.Bold);
}
e.Graphics.FillRectangle(brush, rect);
int margin = 6;
int imgSize = 32;
Rectangle avatarRect = new(margin, (Height - imgSize) / 2, imgSize, imgSize);
e.Graphics.DrawImage(Avatar ?? Resources.DefaultPfp, avatarRect);
int textLeft = avatarRect.Right + margin;
Rectangle rectText = new(textLeft, 0, Width - textLeft - 8, Height - 16);
TextRenderer.DrawText(e.Graphics, Username, usernameFont, rectText, usernameForeColor, TextFormatFlags.Left | TextFormatFlags.VerticalCenter);
}
protected override void OnMouseDoubleClick(MouseEventArgs e)
{
base.OnMouseDoubleClick(e);
ContactDoubleClicked?.Invoke(this, EventArgs.Empty);
}
protected override void OnMouseHover(EventArgs e)
{
base.OnMouseHover(e);
IsHoveredOn = true;
Invalidate();
}
protected override void OnMouseLeave(EventArgs e)
{
base.OnMouseLeave(e);
IsHoveredOn = false;
Invalidate();
}
}
}

View File

@ -0,0 +1,95 @@
using qtc_net_client_2.Properties;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel;
namespace qtc_net_client_2.Controls
{
public class RoomEntryControl : Control
{
public Image Image = Resources.RoomsChatIcon;
public string RoomName = "Room";
public bool HideUserCount = false;
public int RoomUserCount = 0;
private Font? nameFont;
private Color nameColor;
private Font userCountFont = new("Segoe UI", 9, FontStyle.Bold);
private Color userCountColor = Color.Gray;
private bool IsHoveredOn = false;
public event EventHandler? OnRoomDoubleClicked;
public RoomEntryControl()
{
// reduce flicker
SetStyle(ControlStyles.AllPaintingInWmPaint |
ControlStyles.ResizeRedraw |
ControlStyles.UserPaint |
ControlStyles.OptimizedDoubleBuffer, true);
Height = 36;
}
protected override void OnPaint(PaintEventArgs e)
{
if(IsHoveredOn)
{
nameFont = new("Segoe UI", 9, FontStyle.Bold | FontStyle.Underline);
nameColor = Color.LightGray;
} else
{
nameFont = new("Segoe UI", 9, FontStyle.Bold);
nameColor = Color.Black;
}
int margin = 6;
int imageSize = 32;
Rectangle imageRect = new(margin, (Height - imageSize) / 2, imageSize, imageSize);
e.Graphics.DrawImage(Image, imageRect);
int nameLeft = imageRect.Right + margin;
Rectangle nameRect = new(nameLeft, 6, Width - nameLeft - 8, Height - 16);
TextRenderer.DrawText(e.Graphics, RoomName, nameFont, nameRect, nameColor, TextFormatFlags.Left | TextFormatFlags.VerticalCenter);
string userCountText = RoomUserCount.ToString();
Size countSize = TextRenderer.MeasureText(e.Graphics, userCountText, userCountFont);
if(!HideUserCount)
{
int rightPad = 8;
int countX = Width - countSize.Width - rightPad;
int countY = (Height - countSize.Height) / 2;
Point userCountPoint = new(countX, countY);
TextRenderer.DrawText(e.Graphics, userCountText, userCountFont, userCountPoint, userCountColor, TextFormatFlags.Left);
}
}
protected override void OnMouseDoubleClick(MouseEventArgs e)
{
base.OnMouseDoubleClick(e);
OnRoomDoubleClicked?.Invoke(this, EventArgs.Empty);
}
protected override void OnMouseHover(EventArgs e)
{
base.OnMouseHover(e);
IsHoveredOn = true;
Invalidate();
}
protected override void OnMouseLeave(EventArgs e)
{
base.OnMouseLeave(e);
IsHoveredOn = false;
Invalidate();
}
}
}

View File

@ -32,17 +32,18 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ChatRoom)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ChatRoom));
rtxtChatbox = new RichTextBox(); rtxtChatbox = new RichTextBox();
btnSend = new Button(); btnSend = new Button();
rtxtChat = new RichTextBox();
lblRoomName = new Label(); lblRoomName = new Label();
lvUserList = new ListView();
ilStatusIcons = new ImageList(components); ilStatusIcons = new ImageList(components);
ilProfileImages = new ImageList(components);
lvUserList = new ListView();
fpnlMessages = new FlowLayoutPanel();
SuspendLayout(); SuspendLayout();
// //
// rtxtChatbox // rtxtChatbox
// //
rtxtChatbox.Location = new Point(12, 268); rtxtChatbox.Location = new Point(12, 322);
rtxtChatbox.Name = "rtxtChatbox"; rtxtChatbox.Name = "rtxtChatbox";
rtxtChatbox.Size = new Size(512, 54); rtxtChatbox.Size = new Size(589, 54);
rtxtChatbox.TabIndex = 1; rtxtChatbox.TabIndex = 1;
rtxtChatbox.Text = ""; rtxtChatbox.Text = "";
rtxtChatbox.KeyDown += rtxtChatbox_KeyDown; rtxtChatbox.KeyDown += rtxtChatbox_KeyDown;
@ -52,24 +53,13 @@
btnSend.FlatAppearance.BorderSize = 0; btnSend.FlatAppearance.BorderSize = 0;
btnSend.FlatStyle = FlatStyle.Flat; btnSend.FlatStyle = FlatStyle.Flat;
btnSend.Image = Properties.Resources.SendIcon; btnSend.Image = Properties.Resources.SendIcon;
btnSend.Location = new Point(530, 268); btnSend.Location = new Point(607, 322);
btnSend.Name = "btnSend"; btnSend.Name = "btnSend";
btnSend.Size = new Size(75, 54); btnSend.Size = new Size(75, 54);
btnSend.TabIndex = 2; btnSend.TabIndex = 2;
btnSend.UseVisualStyleBackColor = true; btnSend.UseVisualStyleBackColor = true;
btnSend.Click += btnSend_Click; btnSend.Click += btnSend_Click;
// //
// rtxtChat
//
rtxtChat.Font = new Font("Segoe UI", 10F);
rtxtChat.HideSelection = false;
rtxtChat.Location = new Point(142, 43);
rtxtChat.Name = "rtxtChat";
rtxtChat.ReadOnly = true;
rtxtChat.Size = new Size(463, 219);
rtxtChat.TabIndex = 3;
rtxtChat.Text = "";
//
// lblRoomName // lblRoomName
// //
lblRoomName.AutoSize = true; lblRoomName.AutoSize = true;
@ -82,19 +72,6 @@
lblRoomName.TabIndex = 8; lblRoomName.TabIndex = 8;
lblRoomName.Text = "Room"; lblRoomName.Text = "Room";
// //
// lvUserList
//
lvUserList.Alignment = ListViewAlignment.Left;
lvUserList.Location = new Point(12, 43);
lvUserList.MultiSelect = false;
lvUserList.Name = "lvUserList";
lvUserList.Size = new Size(124, 219);
lvUserList.SmallImageList = ilStatusIcons;
lvUserList.TabIndex = 9;
lvUserList.UseCompatibleStateImageBehavior = false;
lvUserList.View = View.SmallIcon;
lvUserList.DoubleClick += lvUserList_DoubleClick;
//
// ilStatusIcons // ilStatusIcons
// //
ilStatusIcons.ColorDepth = ColorDepth.Depth32Bit; ilStatusIcons.ColorDepth = ColorDepth.Depth32Bit;
@ -105,17 +82,50 @@
ilStatusIcons.Images.SetKeyName(2, "Away"); ilStatusIcons.Images.SetKeyName(2, "Away");
ilStatusIcons.Images.SetKeyName(3, "DND"); ilStatusIcons.Images.SetKeyName(3, "DND");
// //
// ilProfileImages
//
ilProfileImages.ColorDepth = ColorDepth.Depth32Bit;
ilProfileImages.ImageStream = (ImageListStreamer)resources.GetObject("ilProfileImages.ImageStream");
ilProfileImages.TransparentColor = Color.Transparent;
ilProfileImages.Images.SetKeyName(0, "DefaultPFP");
//
// lvUserList
//
lvUserList.Alignment = ListViewAlignment.Left;
lvUserList.Location = new Point(12, 43);
lvUserList.MultiSelect = false;
lvUserList.Name = "lvUserList";
lvUserList.Size = new Size(124, 273);
lvUserList.SmallImageList = ilStatusIcons;
lvUserList.TabIndex = 9;
lvUserList.UseCompatibleStateImageBehavior = false;
lvUserList.View = View.SmallIcon;
lvUserList.DoubleClick += lvUserList_DoubleClick;
//
// fpnlMessages
//
fpnlMessages.AutoScroll = true;
fpnlMessages.BackColor = Color.White;
fpnlMessages.BorderStyle = BorderStyle.Fixed3D;
fpnlMessages.FlowDirection = FlowDirection.TopDown;
fpnlMessages.Location = new Point(142, 43);
fpnlMessages.Name = "fpnlMessages";
fpnlMessages.Size = new Size(540, 273);
fpnlMessages.TabIndex = 10;
fpnlMessages.WrapContents = false;
//
// ChatRoom // ChatRoom
// //
AutoScaleDimensions = new SizeF(7F, 15F); AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
BackColor = Color.DodgerBlue; BackColor = Color.DodgerBlue;
ClientSize = new Size(617, 334); ClientSize = new Size(694, 388);
Controls.Add(fpnlMessages);
Controls.Add(lvUserList); Controls.Add(lvUserList);
Controls.Add(lblRoomName); Controls.Add(lblRoomName);
Controls.Add(rtxtChat);
Controls.Add(btnSend); Controls.Add(btnSend);
Controls.Add(rtxtChatbox); Controls.Add(rtxtChatbox);
DoubleBuffered = true;
FormBorderStyle = FormBorderStyle.FixedSingle; FormBorderStyle = FormBorderStyle.FixedSingle;
Icon = (Icon)resources.GetObject("$this.Icon"); Icon = (Icon)resources.GetObject("$this.Icon");
MaximizeBox = false; MaximizeBox = false;
@ -131,9 +141,10 @@
#endregion #endregion
private RichTextBox rtxtChatbox; private RichTextBox rtxtChatbox;
private Button btnSend; private Button btnSend;
private RichTextBox rtxtChat;
private Label lblRoomName; private Label lblRoomName;
private ListView lvUserList;
private ImageList ilStatusIcons; private ImageList ilStatusIcons;
private ImageList ilProfileImages;
private ListView lvUserList;
private FlowLayoutPanel fpnlMessages;
} }
} }

View File

@ -1,47 +1,63 @@
using qtc_net_client_2.Services; using qtc_net_client_2.ClientModel;
using qtc_net_client_2.Controls;
using qtc_net_client_2.Services;
using QtCNETAPI.Dtos.User;
using QtCNETAPI.Events; using QtCNETAPI.Events;
using QtCNETAPI.Models; using QtCNETAPI.Models;
using QtCNETAPI.Services.ApiService; using QtCNETAPI.Services.ApiService;
using QtCNETAPI.Services.GatewayService; using QtCNETAPI.Services.GatewayService;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms;
namespace qtc_net_client_2.Forms namespace qtc_net_client_2.Forms
{ {
public partial class ChatRoom : Form public partial class ChatRoom : Form
{ {
IGatewayService _gatewayService; private readonly IGatewayService _gatewayService;
IApiService _apiService; private readonly IApiService _apiService;
AudioService AudioService = new(); private readonly AudioService AudioService = new();
private List<User> UserList = new(); private readonly List<User> RoomUserList = new();
public ChatRoom(IGatewayService gatewayService, IApiService apiService) private Room? Room;
public ChatRoom(IGatewayService gatewayService, IApiService apiService, Room? room = null)
{ {
_gatewayService = gatewayService; _gatewayService = gatewayService;
_apiService = apiService; _apiService = apiService;
InitializeComponent(); Room = room;
}
private void frmChat_Load(object sender, EventArgs e)
{
// subscribe to server message event // subscribe to server message event
_gatewayService.OnRoomMessageReceived += _gatewayService_OnServerMessageReceived; _gatewayService.OnRoomMessageReceived += _gatewayService_OnServerMessageReceived;
_gatewayService.OnRoomUserListReceived += _gatewayService_OnRoomUserListReceived; _gatewayService.OnRoomUserListReceived += _gatewayService_OnRoomUserListReceived;
_gatewayService.OnRoomDeleted += _gatewayService_OnRoomDeleted;
_gatewayService.OnGuestUserJoin += _gatewayService_OnGuestUserJoin;
if (_gatewayService.CurrentRoom != null) { Text = $"QtC.NET Client - Chat Room - {_gatewayService.CurrentRoom.Name}"; lblRoomName.Text = _gatewayService.CurrentRoom.Name; } InitializeComponent();
else if (_gatewayService.InLobby) { Text = $"QtC.NET Client - Chat Room - Lobby"; lblRoomName.Text = "Lobby"; } }
lvUserList.Clear(); private async void frmChat_Load(object sender, EventArgs e)
{
if (Room == null)
{
// join lobby
await _gatewayService.JoinRoomAsync();
Room = new Room
{
Id = "LOBBY",
Name = "Lobby"
};
}
else
{
// join selected room
await _gatewayService.JoinRoomAsync(Room);
}
// always add current user to list i guess // init ui
lvUserList.Items.Add(_apiService.CurrentUser.Username, _apiService.CurrentUser.Status);
Text = $"QtC.NET Client - Chat Room - {Room.Name}";
lblRoomName.Text = Room.Name;
RoomUserList.Clear();
lvUserList.Items.Clear();
} }
private async void frmChat_FormClosing(object sender, FormClosingEventArgs e) private async void frmChat_FormClosing(object sender, FormClosingEventArgs e)
@ -50,7 +66,7 @@ namespace qtc_net_client_2.Forms
_gatewayService.OnRoomMessageReceived -= _gatewayService_OnServerMessageReceived; _gatewayService.OnRoomMessageReceived -= _gatewayService_OnServerMessageReceived;
_gatewayService.OnRoomUserListReceived -= _gatewayService_OnRoomUserListReceived; _gatewayService.OnRoomUserListReceived -= _gatewayService_OnRoomUserListReceived;
if (_gatewayService.CurrentRoom != null || _gatewayService.InLobby) if (_gatewayService.CurrentRoom != null)
{ {
// leave any room user is in // leave any room user is in
await _gatewayService.LeaveRoomAsync(); await _gatewayService.LeaveRoomAsync();
@ -66,7 +82,7 @@ namespace qtc_net_client_2.Forms
// send it and clear text box // send it and clear text box
await _gatewayService.PostMessageAsync(message); await _gatewayService.PostMessageAsync(message);
rtxtChatbox.Clear(); rtxtChatbox.Text = string.Empty;
AudioService.PlaySoundEffect("sndSendClick"); AudioService.PlaySoundEffect("sndSendClick");
} }
} }
@ -94,8 +110,10 @@ namespace qtc_net_client_2.Forms
{ {
// get user info and open profile dialog // get user info and open profile dialog
var user = mainForm.UserDirectory.FirstOrDefault(e => e.Username == selectedUser); var user = mainForm.UserDirectory.FirstOrDefault(e => e.Username == selectedUser);
var res = await _apiService.GetUserInformationAsync(user!.Id); if (user != null)
var pfpRes = await _apiService.GetUserProfilePic(user!.Id); {
var res = await _apiService.GetUserInformationAsync(user.Id);
var pfpRes = await _apiService.GetUserProfilePic(user.Id);
if (res.Data != null && res.Success) if (res.Data != null && res.Success)
{ {
@ -106,12 +124,14 @@ namespace qtc_net_client_2.Forms
} }
} }
} }
}
private void _gatewayService_OnServerMessageReceived(object? sender, EventArgs e) private async void _gatewayService_OnServerMessageReceived(object? sender, EventArgs e)
{ {
var msgEventArgs = (ServerMessageEventArgs)e; var msgEventArgs = (ServerMessageEventArgs)e;
var user = RoomUserList.FirstOrDefault(e => e.Username == msgEventArgs.Message.Split(':')[0]);
AddMessage(msgEventArgs.Message); AddMessage(msgEventArgs.Message, user?.Id);
if (!msgEventArgs.Message.Contains(_apiService.CurrentUser.Username)) AudioService.PlaySoundEffect("sndMessage"); if (!msgEventArgs.Message.Contains(_apiService.CurrentUser.Username)) AudioService.PlaySoundEffect("sndMessage");
} }
@ -119,20 +139,77 @@ namespace qtc_net_client_2.Forms
{ {
var args = (RoomListEventArgs)e; var args = (RoomListEventArgs)e;
if (!IsHandleCreated) return; if (IsHandleCreated && !IsDisposed)
{
lvUserList.BeginInvoke(lvUserList.Clear); Invoke(async delegate ()
{
RoomUserList.Clear();
lvUserList.Items.Clear();
foreach (var user in args.UserList) foreach (var user in args.UserList)
{ {
lvUserList.BeginInvoke(delegate () { lvUserList.Items.Add(user.Username, user.Status); }); lvUserList.Items.Add(user.Username, user.Status);
RoomUserList.Add(user);
// TODO - probably do this only when a message is received (requires response model change)
var pfpRes = await _apiService.GetUserProfilePic(user.Id);
if (pfpRes != null && pfpRes.Success && pfpRes.Data != null)
{
using var ms = new MemoryStream(pfpRes.Data);
using var bmp = new Bitmap(ms);
ilProfileImages.Images.Add(user.Id, bmp);
}
}
});
}
}
private void _gatewayService_OnGuestUserJoin(object? sender, EventArgs e)
{
var args = (GuestUserJoinEventArgs)e;
AddMessage($"Server: Guest User {args.Username} Has Joined {_gatewayService.CurrentRoom?.Name}");
}
private void _gatewayService_OnRoomDeleted(object? sender, EventArgs e)
{
if (IsHandleCreated && !IsDisposed)
{
Invoke(delegate ()
{
AddMessage($"Server: This Room Was Deleted By An Admin.");
lvUserList.Items.Clear();
RoomUserList.Clear();
lvUserList.Enabled = false;
rtxtChatbox.Enabled = false;
btnSend.Enabled = false;
});
} }
} }
private void AddMessage(string message)
private void AddMessage(string message, string? userId = null)
{ {
if (InvokeRequired) if (IsHandleCreated && !IsDisposed)
Invoke(delegate { rtxtChat.AppendText(message + Environment.NewLine); }); {
else rtxtChat.AppendText(message + Environment.NewLine); Invoke((Delegate)delegate ()
{
var ctrl = new ChatMessageControl()
{
Username = message.Split(':')[0],
Message = message.Split(':')[1].Trim(),
Width = fpnlMessages.ClientSize.Width - SystemInformation.VerticalScrollBarWidth
};
if(ilProfileImages.Images.ContainsKey(userId))
ctrl.Avatar = ilProfileImages.Images[userId];
else ctrl.Avatar = null;
ctrl.Height = ctrl.CalculateHeight(ctrl.Width);
fpnlMessages.Controls.Add(ctrl);
fpnlMessages.VerticalScroll.Value = fpnlMessages.VerticalScroll.Maximum;
fpnlMessages.PerformLayout();
});
}
} }
} }
} }

View File

@ -124,93 +124,218 @@
<value> <value>
AAEAAAD/////AQAAAAAAAAAMAgAAAEZTeXN0ZW0uV2luZG93cy5Gb3Jtcywg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2YB5QJ+AbQB/AJtAZ4B+wNlAeIDUwGnAzMBUQMGAQcMAAFCAU0BPgcAAT4DAAEoAwAB AQGAAQEBgAEBAYABAQHAAQMBwAEDAcABAwHAAQMB4AEHAeABBwHgAQcB4AEHCw==
QAMAASADAAEBAQABAQYAAQEWAAP/gQAB4AEHAeABBwHgAQcB4AEHAcABAwHAAQMBwAEDAcABAwGAAQEB </value>
gAEBAYABAQGAAQFQAAGAAQEBgAEBAYABAQGAAQEBwAEDAcABAwHAAQMBwAEDAeABBwHgAQcB4AEHAeAB </data>
Bws= <metadata name="ilProfileImages.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>132, 12</value>
</metadata>
<data name="ilProfileImages.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAEZTeXN0ZW0uV2luZG93cy5Gb3JtcywgQ3VsdHVyZT1uZXV0cmFs
LCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BQEAAAAmU3lzdGVtLldpbmRvd3MuRm9ybXMu
SW1hZ2VMaXN0U3RyZWFtZXIBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAlhsAAAJNU0Z0AUkBTAMBAQAB
QAEBAUABAQEgAQABIAEABP8BIQEACP8BQgFNATYHAAE2AwABKAMAAYADAAEgAwABAQEAASAGAAFAEgAC
RwFGAYACRwFGAYACRwFGAYABRwJGAYABRwJGAYACRwFGAYACRwFGAYABRwJGAYABRwJGAYABRwJGAYAD
RgGAAkcBRgGAAkcBRgGAAkcBRgGAAkcBRgGAAkcBRgGAAkcBRgGAAkcBRgGAAkcBRgGAAkcBRgGAAkcB
RgGAAkcBRgGAA0YBgAFHAkYBgAFHAkYBgAFHAkYBgAFHAkYBgAFHAkYBgAJHAUYBgAJHAUYBgAJHAUYB
gAMqAUD/AIEAAf8BRwEBAv8BRwEBAv8BRwEBAv8B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Av8BRwEBAv8BRwEBAv8BRwEBAf8CRwFGAYD/AIEAAf8BRwEBAv8B
RwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8B
RwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8B
RwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAf8C
RwFGAYD/AIEAAf8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8B
RwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8B
RwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8B
RwEBAv8BRwEBAv8BRwEBAf8CRwFGAYD/AIEAAf8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8B
RwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8B
RwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8B
RwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAv8BRwEBAf8CRwFGAYD/AIEAAUIBTQE+BwABPgMAASgD
AAGAAwABIAMAAQEBAAEBBgABAhYAA///AP8AAwAL
</value> </value>
</data> </data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

View File

@ -31,18 +31,17 @@
lblHead = new Label(); lblHead = new Label();
btnReconnect = new Button(); btnReconnect = new Button();
btnQuit = new Button(); btnQuit = new Button();
lblReason = new Label();
SuspendLayout(); SuspendLayout();
// //
// lblHead // lblHead
// //
lblHead.AutoSize = true;
lblHead.Font = new Font("Segoe UI", 11F, FontStyle.Bold); lblHead.Font = new Font("Segoe UI", 11F, FontStyle.Bold);
lblHead.Location = new Point(12, 9); lblHead.Location = new Point(12, 9);
lblHead.Name = "lblHead"; lblHead.Name = "lblHead";
lblHead.Size = new Size(444, 20); lblHead.Size = new Size(444, 20);
lblHead.TabIndex = 0; lblHead.TabIndex = 0;
lblHead.Text = "Your Connection To The QtC.NET Server Was Lost. What Now?"; lblHead.Text = "Your Connection To The QtC.NET Server Was Lost. What Now?";
lblHead.TextAlign = ContentAlignment.MiddleCenter;
// //
// btnReconnect // btnReconnect
// //
@ -66,23 +65,12 @@
btnQuit.UseVisualStyleBackColor = true; btnQuit.UseVisualStyleBackColor = true;
btnQuit.Click += btnQuit_Click; btnQuit.Click += btnQuit_Click;
// //
// lblReason // ConnectionClosed
//
lblReason.AutoSize = true;
lblReason.Font = new Font("Segoe UI", 5F, FontStyle.Bold);
lblReason.Location = new Point(88, 40);
lblReason.Name = "lblReason";
lblReason.Size = new Size(72, 10);
lblReason.TabIndex = 3;
lblReason.Text = "Reason: ${REASON}";
//
// frmConnectionClosed
// //
AutoScaleDimensions = new SizeF(7F, 15F); AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
BackColor = Color.DodgerBlue; BackColor = Color.DodgerBlue;
ClientSize = new Size(463, 65); ClientSize = new Size(463, 65);
Controls.Add(lblReason);
Controls.Add(btnQuit); Controls.Add(btnQuit);
Controls.Add(btnReconnect); Controls.Add(btnReconnect);
Controls.Add(lblHead); Controls.Add(lblHead);
@ -92,12 +80,10 @@
Margin = new Padding(4, 3, 4, 3); Margin = new Padding(4, 3, 4, 3);
MaximizeBox = false; MaximizeBox = false;
MinimizeBox = false; MinimizeBox = false;
Name = "frmConnectionClosed"; Name = "ConnectionClosed";
StartPosition = FormStartPosition.CenterScreen; StartPosition = FormStartPosition.CenterScreen;
Text = "QtC.NET Client - Connection Lost"; Text = "QtC.NET Client - Connection Lost";
Load += frmConnectionClosed_Load;
ResumeLayout(false); ResumeLayout(false);
PerformLayout();
} }
#endregion #endregion
@ -105,6 +91,5 @@
private Label lblHead; private Label lblHead;
private Button btnReconnect; private Button btnReconnect;
private Button btnQuit; private Button btnQuit;
private Label lblReason;
} }
} }

View File

@ -12,19 +12,12 @@ namespace qtc_net_client_2.Forms
{ {
public partial class ConnectionClosed : Form public partial class ConnectionClosed : Form
{ {
public string? Reason { get; set; } = string.Empty; public Label StatusLabel { get { return lblHead; } }
public ConnectionClosed(string? reason = "") public ConnectionClosed()
{ {
Reason = reason;
InitializeComponent(); InitializeComponent();
} }
private void frmConnectionClosed_Load(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(Reason)) lblReason.Visible = false;
else lblReason.Text = $"Reason: {Reason}";
}
private void btnReconnect_Click(object sender, EventArgs e) private void btnReconnect_Click(object sender, EventArgs e)
{ {
DialogResult = DialogResult.OK; DialogResult = DialogResult.OK;

View File

@ -29,23 +29,14 @@
private void InitializeComponent() private void InitializeComponent()
{ {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DirectMessage)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DirectMessage));
rtxtChat = new RichTextBox();
btnSend = new Button(); btnSend = new Button();
rtxtChatbox = new RichTextBox(); rtxtChatbox = new RichTextBox();
lblUsername = new Label(); lblUsername = new Label();
pbPfp = new PictureBox();
fpnlMessages = new FlowLayoutPanel();
((System.ComponentModel.ISupportInitialize)pbPfp).BeginInit();
SuspendLayout(); SuspendLayout();
// //
// rtxtChat
//
rtxtChat.HideSelection = false;
rtxtChat.Location = new Point(12, 48);
rtxtChat.Margin = new Padding(4, 3, 4, 3);
rtxtChat.Name = "rtxtChat";
rtxtChat.ReadOnly = true;
rtxtChat.Size = new Size(593, 325);
rtxtChat.TabIndex = 6;
rtxtChat.Text = "";
//
// btnSend // btnSend
// //
btnSend.FlatAppearance.BorderSize = 0; btnSend.FlatAppearance.BorderSize = 0;
@ -74,21 +65,44 @@
// //
lblUsername.AutoSize = true; lblUsername.AutoSize = true;
lblUsername.Font = new Font("Segoe UI", 25F, FontStyle.Bold | FontStyle.Italic); lblUsername.Font = new Font("Segoe UI", 25F, FontStyle.Bold | FontStyle.Italic);
lblUsername.Location = new Point(6, 0); lblUsername.Location = new Point(52, 0);
lblUsername.Margin = new Padding(4, 0, 4, 0); lblUsername.Margin = new Padding(4, 0, 4, 0);
lblUsername.Name = "lblUsername"; lblUsername.Name = "lblUsername";
lblUsername.Size = new Size(181, 46); lblUsername.Size = new Size(181, 46);
lblUsername.TabIndex = 7; lblUsername.TabIndex = 7;
lblUsername.Text = "Username"; lblUsername.Text = "Username";
// //
// pbPfp
//
pbPfp.Image = Properties.Resources.DefaultPfp;
pbPfp.Location = new Point(14, 6);
pbPfp.Name = "pbPfp";
pbPfp.Size = new Size(40, 37);
pbPfp.SizeMode = PictureBoxSizeMode.StretchImage;
pbPfp.TabIndex = 9;
pbPfp.TabStop = false;
//
// fpnlMessages
//
fpnlMessages.AutoScroll = true;
fpnlMessages.BackColor = Color.White;
fpnlMessages.BorderStyle = BorderStyle.Fixed3D;
fpnlMessages.FlowDirection = FlowDirection.TopDown;
fpnlMessages.Location = new Point(14, 49);
fpnlMessages.Name = "fpnlMessages";
fpnlMessages.Size = new Size(591, 324);
fpnlMessages.TabIndex = 11;
fpnlMessages.WrapContents = false;
//
// DirectMessage // DirectMessage
// //
AutoScaleDimensions = new SizeF(7F, 15F); AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
BackColor = Color.DodgerBlue; BackColor = Color.DodgerBlue;
ClientSize = new Size(618, 443); ClientSize = new Size(618, 443);
Controls.Add(fpnlMessages);
Controls.Add(pbPfp);
Controls.Add(lblUsername); Controls.Add(lblUsername);
Controls.Add(rtxtChat);
Controls.Add(btnSend); Controls.Add(btnSend);
Controls.Add(rtxtChatbox); Controls.Add(rtxtChatbox);
Font = new Font("Segoe UI", 9F); Font = new Font("Segoe UI", 9F);
@ -101,15 +115,16 @@
StartPosition = FormStartPosition.CenterScreen; StartPosition = FormStartPosition.CenterScreen;
Text = "QtC.NET Client - Direct Message With ${USER}"; Text = "QtC.NET Client - Direct Message With ${USER}";
Load += frmDirectMessage_Load; Load += frmDirectMessage_Load;
((System.ComponentModel.ISupportInitialize)pbPfp).EndInit();
ResumeLayout(false); ResumeLayout(false);
PerformLayout(); PerformLayout();
} }
#endregion #endregion
private RichTextBox rtxtChat;
private Button btnSend; private Button btnSend;
private RichTextBox rtxtChatbox; private RichTextBox rtxtChatbox;
private Label lblUsername; private Label lblUsername;
private PictureBox pbPfp;
private FlowLayoutPanel fpnlMessages;
} }
} }

View File

@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.ModelBinding;
using qtc_net_client_2.Controls;
using qtc_net_client_2.Services; using qtc_net_client_2.Services;
using QtCNETAPI.Dtos.User; using QtCNETAPI.Dtos.User;
using QtCNETAPI.Events; using QtCNETAPI.Events;
@ -36,15 +37,23 @@ namespace qtc_net_client_2.Forms
InitializeComponent(); InitializeComponent();
} }
private void frmDirectMessage_Load(object sender, EventArgs e) private async void frmDirectMessage_Load(object sender, EventArgs e)
{ {
lblUsername.Text = User.Username; lblUsername.Text = User.Username;
Text = $"QtC.NET Client - Direct Message With {User.Username}"; Text = $"QtC.NET Client - Direct Message With {User.Username}";
Messages.CollectionChanged += Messages_CollectionChanged; Messages.CollectionChanged += Messages_CollectionChanged;
var pfpRes = await _apiService.GetUserProfilePic(User.Id);
if(pfpRes != null && pfpRes.Success && pfpRes.Data != null)
{
using var ms = new MemoryStream(pfpRes.Data);
using var img = Image.FromStream(ms);
pbPfp.Image = new Bitmap(img);
}
if (InitMessage != null) if (InitMessage != null)
{ {
Messages.Add($"[{User.Username}] {InitMessage.Content}\n"); Messages.Add($"{User.Username}: {InitMessage.Content}");
AudioService.PlaySoundEffect("sndDirectMsg"); AudioService.PlaySoundEffect("sndDirectMsg");
} }
} }
@ -58,7 +67,7 @@ namespace qtc_net_client_2.Forms
if (!string.IsNullOrEmpty(rtxtChatbox.Text)) if (!string.IsNullOrEmpty(rtxtChatbox.Text))
{ {
await _gatewayService.SendDirectMessageAsync(User, new QtCNETAPI.Models.Message { Content = rtxtChatbox.Text, AuthorId = _apiService.CurrentUser.Id }); await _gatewayService.SendDirectMessageAsync(User, new QtCNETAPI.Models.Message { Content = rtxtChatbox.Text, AuthorId = _apiService.CurrentUser.Id });
Messages.Add($"[{_apiService.CurrentUser.Username}] {rtxtChatbox.Text}"); Messages.Add($"{_apiService.CurrentUser.Username}: {rtxtChatbox.Text}");
rtxtChatbox.Clear(); rtxtChatbox.Clear();
AudioService.PlaySoundEffect("sndSendClick"); AudioService.PlaySoundEffect("sndSendClick");
} }
@ -69,7 +78,7 @@ namespace qtc_net_client_2.Forms
if (!string.IsNullOrEmpty(rtxtChatbox.Text)) if (!string.IsNullOrEmpty(rtxtChatbox.Text))
{ {
await _gatewayService.SendDirectMessageAsync(User, new QtCNETAPI.Models.Message { Content = rtxtChatbox.Text, AuthorId = _apiService.CurrentUser.Id }); await _gatewayService.SendDirectMessageAsync(User, new QtCNETAPI.Models.Message { Content = rtxtChatbox.Text, AuthorId = _apiService.CurrentUser.Id });
Messages.Add($"[{_apiService.CurrentUser.Username}] {rtxtChatbox.Text}"); Messages.Add($"{_apiService.CurrentUser.Username}: {rtxtChatbox.Text}");
rtxtChatbox.Clear(); rtxtChatbox.Clear();
AudioService.PlaySoundEffect("sndSendClick"); AudioService.PlaySoundEffect("sndSendClick");
} }
@ -92,14 +101,36 @@ namespace qtc_net_client_2.Forms
Invoke(delegate () Invoke(delegate ()
{ {
var msg = e.NewItems.Cast<string>().FirstOrDefault(); var msg = e.NewItems.Cast<string>().FirstOrDefault();
rtxtChat.AppendText(msg);
var ctrl = new ChatMessageControlMinimal()
{
Username = msg!.Split(':')[0],
Message = msg!.Split(":")[1].Trim(),
};
ctrl.Height = ctrl.CalculateHeight(ctrl.Width);
fpnlMessages.Controls.Add(ctrl);
fpnlMessages.VerticalScroll.Value = fpnlMessages.VerticalScroll.Maximum;
fpnlMessages.PerformLayout();
if (!msg!.Contains(_apiService.CurrentUser.Username)) AudioService.PlaySoundEffect("sndMessage"); if (!msg!.Contains(_apiService.CurrentUser.Username)) AudioService.PlaySoundEffect("sndMessage");
}); });
} }
else else
{ {
var msg = e.NewItems.Cast<string>().FirstOrDefault(); var msg = e.NewItems.Cast<string>().FirstOrDefault();
rtxtChat.AppendText(msg);
var ctrl = new ChatMessageControlMinimal()
{
Username = msg!.Split(':')[0],
Message = msg!.Split(":")[1].Trim(),
};
ctrl.Height = ctrl.CalculateHeight(ctrl.Width);
fpnlMessages.Controls.Add(ctrl);
fpnlMessages.VerticalScroll.Value = fpnlMessages.VerticalScroll.Maximum;
fpnlMessages.PerformLayout();
if (!msg!.Contains(_apiService.CurrentUser.Username)) AudioService.PlaySoundEffect("sndMessage"); if (!msg!.Contains(_apiService.CurrentUser.Username)) AudioService.PlaySoundEffect("sndMessage");
} }
} }

View File

@ -0,0 +1,112 @@
namespace qtc_net_client_2.Forms
{
partial class DonationWindow
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DonationWindow));
lblHi = new Label();
lblInfo = new Label();
pbKofi = new PictureBox();
pbCobaltPuter = new PictureBox();
((System.ComponentModel.ISupportInitialize)pbKofi).BeginInit();
((System.ComponentModel.ISupportInitialize)pbCobaltPuter).BeginInit();
SuspendLayout();
//
// lblHi
//
lblHi.AutoSize = true;
lblHi.Font = new Font("Segoe UI", 30F, FontStyle.Bold | FontStyle.Italic);
lblHi.Location = new Point(231, 7);
lblHi.Name = "lblHi";
lblHi.Size = new Size(81, 54);
lblHi.TabIndex = 0;
lblHi.Text = "Hi!";
//
// lblInfo
//
lblInfo.Font = new Font("Segoe UI", 7F, FontStyle.Bold);
lblInfo.Location = new Point(12, 51);
lblInfo.Name = "lblInfo";
lblInfo.Size = new Size(290, 177);
lblInfo.TabIndex = 1;
lblInfo.Text = resources.GetString("lblInfo.Text");
lblInfo.TextAlign = ContentAlignment.MiddleLeft;
//
// pbKofi
//
pbKofi.Cursor = Cursors.Hand;
pbKofi.Image = Properties.Resources.support_me_on_kofi_badge_blue;
pbKofi.Location = new Point(89, 239);
pbKofi.Name = "pbKofi";
pbKofi.Size = new Size(149, 78);
pbKofi.SizeMode = PictureBoxSizeMode.Zoom;
pbKofi.TabIndex = 2;
pbKofi.TabStop = false;
pbKofi.Click += pbKofi_Click;
//
// pbCobaltPuter
//
pbCobaltPuter.Image = Properties.Resources.cobalt_sittingatputer;
pbCobaltPuter.Location = new Point(316, 29);
pbCobaltPuter.Name = "pbCobaltPuter";
pbCobaltPuter.Size = new Size(339, 270);
pbCobaltPuter.SizeMode = PictureBoxSizeMode.Zoom;
pbCobaltPuter.TabIndex = 3;
pbCobaltPuter.TabStop = false;
//
// DonationWindow
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
BackColor = Color.DodgerBlue;
ClientSize = new Size(667, 328);
Controls.Add(pbCobaltPuter);
Controls.Add(pbKofi);
Controls.Add(lblInfo);
Controls.Add(lblHi);
ForeColor = Color.White;
FormBorderStyle = FormBorderStyle.FixedDialog;
MaximizeBox = false;
MinimizeBox = false;
Name = "DonationWindow";
StartPosition = FormStartPosition.CenterScreen;
Text = "QtC.NET Client - Donate!";
((System.ComponentModel.ISupportInitialize)pbKofi).EndInit();
((System.ComponentModel.ISupportInitialize)pbCobaltPuter).EndInit();
ResumeLayout(false);
PerformLayout();
}
#endregion
private Label lblHi;
private Label lblInfo;
private PictureBox pbKofi;
private PictureBox pbCobaltPuter;
}
}

View File

@ -0,0 +1,51 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace qtc_net_client_2.Forms
{
public partial class DonationWindow : Form
{
public DonationWindow()
{
InitializeComponent();
}
private void pbKofi_Click(object sender, EventArgs e)
{
var url = "https://ko-fi.com/moonbase__";
try
{
Process.Start(url);
} catch
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
url = url.Replace("&", "^&");
Process.Start(new ProcessStartInfo("cmd", $"/c start {url}") { CreateNoWindow = true });
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
Process.Start("xdg-open", url);
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
Process.Start("open", url);
}
else
{
throw;
}
}
}
}
}

View File

@ -0,0 +1,136 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="lblInfo.Text" xml:space="preserve">
<value>I'm Moonbase, Thanks For Using QtC.NET!
If you wish, you can send a few bucks to my KoFi
linked below. It will help imensely in improving the
performance of the platform by upgrading the VPS
this is currently being hosted on.
This project is and always will be mostly just a passion
project, similar to the likes of SillyPost. The protocol
has existed for a bit now, however
this is the most I've worked
on it.
Thanks again for your interest!</value>
</data>
</root>

View File

@ -32,11 +32,13 @@
pbLoginBanner = new PictureBox(); pbLoginBanner = new PictureBox();
tbEmail = new TextBox(); tbEmail = new TextBox();
lblEmail = new Label(); lblEmail = new Label();
label1 = new Label(); lblPassword = new Label();
tbPassword = new TextBox(); tbPassword = new TextBox();
btnLogin = new Button(); btnLogin = new Button();
llblRegister = new LinkLabel(); llblRegister = new LinkLabel();
cbRememberMe = new CheckBox(); cbRememberMe = new CheckBox();
llblResendEmail = new LinkLabel();
llblForgotPasswor = new LinkLabel();
((System.ComponentModel.ISupportInitialize)pbLoginBanner).BeginInit(); ((System.ComponentModel.ISupportInitialize)pbLoginBanner).BeginInit();
SuspendLayout(); SuspendLayout();
// //
@ -68,16 +70,16 @@
lblEmail.TabIndex = 2; lblEmail.TabIndex = 2;
lblEmail.Text = "Email"; lblEmail.Text = "Email";
// //
// label1 // lblPassword
// //
label1.AutoSize = true; lblPassword.AutoSize = true;
label1.Font = new Font("Segoe UI Light", 9F); lblPassword.Font = new Font("Segoe UI Light", 9F);
label1.ForeColor = SystemColors.ControlLight; lblPassword.ForeColor = SystemColors.ControlLight;
label1.Location = new Point(11, 138); lblPassword.Location = new Point(11, 138);
label1.Name = "label1"; lblPassword.Name = "lblPassword";
label1.Size = new Size(55, 15); lblPassword.Size = new Size(55, 15);
label1.TabIndex = 4; lblPassword.TabIndex = 4;
label1.Text = "Password"; lblPassword.Text = "Password";
// //
// tbPassword // tbPassword
// //
@ -117,21 +119,49 @@
cbRememberMe.ForeColor = SystemColors.ControlLight; cbRememberMe.ForeColor = SystemColors.ControlLight;
cbRememberMe.Location = new Point(198, 168); cbRememberMe.Location = new Point(198, 168);
cbRememberMe.Name = "cbRememberMe"; cbRememberMe.Name = "cbRememberMe";
cbRememberMe.Size = new Size(157, 19); cbRememberMe.Size = new Size(163, 19);
cbRememberMe.TabIndex = 7; cbRememberMe.TabIndex = 7;
cbRememberMe.Text = "Remember Me For 7 Days"; cbRememberMe.Text = "Remember Me For 30 Days";
cbRememberMe.UseVisualStyleBackColor = true; cbRememberMe.UseVisualStyleBackColor = true;
// //
// frmLogin // llblResendEmail
//
llblResendEmail.AutoSize = true;
llblResendEmail.Font = new Font("Segoe UI Light", 9F);
llblResendEmail.LinkColor = SystemColors.ControlLight;
llblResendEmail.Location = new Point(369, 164);
llblResendEmail.Name = "llblResendEmail";
llblResendEmail.Size = new Size(129, 15);
llblResendEmail.TabIndex = 8;
llblResendEmail.TabStop = true;
llblResendEmail.Text = "Resend Verification Email";
llblResendEmail.LinkClicked += llblResendEmail_LinkClicked;
//
// llblForgotPasswor
//
llblForgotPasswor.AutoSize = true;
llblForgotPasswor.Font = new Font("Segoe UI Light", 9F);
llblForgotPasswor.LinkColor = SystemColors.ControlLight;
llblForgotPasswor.Location = new Point(401, 181);
llblForgotPasswor.Name = "llblForgotPasswor";
llblForgotPasswor.Size = new Size(98, 15);
llblForgotPasswor.TabIndex = 9;
llblForgotPasswor.TabStop = true;
llblForgotPasswor.Text = "Forgot Password?";
llblForgotPasswor.LinkClicked += llblForgotPasswor_LinkClicked;
//
// Login
// //
AutoScaleDimensions = new SizeF(7F, 15F); AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
BackColor = Color.DodgerBlue; BackColor = Color.DodgerBlue;
ClientSize = new Size(515, 203); ClientSize = new Size(515, 203);
Controls.Add(llblForgotPasswor);
Controls.Add(llblResendEmail);
Controls.Add(cbRememberMe); Controls.Add(cbRememberMe);
Controls.Add(llblRegister); Controls.Add(llblRegister);
Controls.Add(btnLogin); Controls.Add(btnLogin);
Controls.Add(label1); Controls.Add(lblPassword);
Controls.Add(tbPassword); Controls.Add(tbPassword);
Controls.Add(lblEmail); Controls.Add(lblEmail);
Controls.Add(tbEmail); Controls.Add(tbEmail);
@ -139,7 +169,7 @@
FormBorderStyle = FormBorderStyle.FixedDialog; FormBorderStyle = FormBorderStyle.FixedDialog;
Icon = (Icon)resources.GetObject("$this.Icon"); Icon = (Icon)resources.GetObject("$this.Icon");
MaximizeBox = false; MaximizeBox = false;
Name = "frmLogin"; Name = "Login";
StartPosition = FormStartPosition.CenterParent; StartPosition = FormStartPosition.CenterParent;
Text = "QtC.NET Client - Login"; Text = "QtC.NET Client - Login";
Load += frmLogin_Load; Load += frmLogin_Load;
@ -153,10 +183,12 @@
private PictureBox pbLoginBanner; private PictureBox pbLoginBanner;
private TextBox tbEmail; private TextBox tbEmail;
private Label lblEmail; private Label lblEmail;
private Label label1; private Label lblPassword;
private TextBox tbPassword; private TextBox tbPassword;
private Button btnLogin; private Button btnLogin;
private LinkLabel llblRegister; private LinkLabel llblRegister;
private CheckBox cbRememberMe; private CheckBox cbRememberMe;
private LinkLabel llblResendEmail;
private LinkLabel llblForgotPasswor;
} }
} }

View File

@ -1,4 +1,5 @@
using QtCNETAPI.Services.ApiService; using QtCNETAPI.Services.ApiService;
using QtCNETAPI.Services;
using QtCNETAPI.Dtos.User; using QtCNETAPI.Dtos.User;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
@ -9,12 +10,14 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using qtc_net_client_2.Services;
namespace qtc_net_client_2.Forms namespace qtc_net_client_2.Forms
{ {
public partial class Login : Form public partial class Login : Form
{ {
private IApiService _apiService; private IApiService _apiService;
private CredentialService _credService = new();
public Login(IApiService apiService) public Login(IApiService apiService)
{ {
_apiService = apiService; _apiService = apiService;
@ -24,14 +27,14 @@ namespace qtc_net_client_2.Forms
private async void frmLogin_Load(object sender, EventArgs e) private async void frmLogin_Load(object sender, EventArgs e)
{ {
if (File.Exists("./session.token")) string? accessToken = _credService.GetAccessToken();
if (accessToken != null)
{ {
ToggleControls(false, false); ToggleControls(false, false);
// try logging in with the token in the file // try logging in with the token in cred storage
string token = File.ReadAllText("./session.token"); var result = await _apiService.RefreshLogin(accessToken);
var result = await _apiService.RefreshLogin(token);
if (result.Success) if (result.Success)
{ {
DialogResult = DialogResult.OK; DialogResult = DialogResult.OK;
@ -55,8 +58,9 @@ namespace qtc_net_client_2.Forms
RememberMe = cbRememberMe.Checked RememberMe = cbRememberMe.Checked
}); });
if (result.Success) if (result.Success && result.Data != null)
{ {
_credService.SaveAccessToken(_apiService.CurrentUser.Username, result.Data);
DialogResult = DialogResult.OK; DialogResult = DialogResult.OK;
Close(); Close();
} }
@ -68,6 +72,24 @@ namespace qtc_net_client_2.Forms
} }
} }
private void llblRegister_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
Register frmRegister = new Register(_apiService);
frmRegister.ShowDialog();
}
private void llblResendEmail_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
ResendVerificationEmail resendVerificationEmail = new ResendVerificationEmail(_apiService);
resendVerificationEmail.ShowDialog();
}
private void llblForgotPasswor_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
ResetPassword resetPassword = new ResetPassword(_apiService);
resetPassword.ShowDialog();
}
private void ToggleControls(bool enable, bool clearText) private void ToggleControls(bool enable, bool clearText)
{ {
tbEmail.Enabled = enable; tbEmail.Enabled = enable;
@ -81,11 +103,5 @@ namespace qtc_net_client_2.Forms
tbPassword.Text = string.Empty; tbPassword.Text = string.Empty;
} }
} }
private void llblRegister_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
Register frmRegister = new Register(_apiService);
frmRegister.ShowDialog();
}
} }
} }

View File

@ -30,24 +30,27 @@
{ {
components = new System.ComponentModel.Container(); components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Main)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Main));
ListViewItem listViewItem1 = new ListViewItem("Stock Market", 0); ListViewItem listViewItem4 = new ListViewItem("Stock Market", 0);
ListViewItem listViewItem2 = new ListViewItem("Guess The Number", 1); ListViewItem listViewItem5 = new ListViewItem("Guess The Number", 1);
ListViewItem listViewItem6 = new ListViewItem("Tic-Tac-Toe (Multiplayer)", "Tic-tac-toe.png");
tbcMain = new TabControl(); tbcMain = new TabControl();
tbpContacts = new TabPage(); tbpContacts = new TabPage();
lvContacts = new ListView(); flpContacts = new FlowLayoutPanel();
ctxmRefresh = new ContextMenuStrip(components); ctxmRefresh = new ContextMenuStrip(components);
refreshToolStripMenuItem = new ToolStripMenuItem(); refreshToolStripMenuItem = new ToolStripMenuItem();
ilProfilePics = new ImageList(components);
tbpRooms = new TabPage(); tbpRooms = new TabPage();
btnAddRoom = new Button(); flpRooms = new FlowLayoutPanel();
lbRooms = new ListBox();
tbpUsers = new TabPage(); tbpUsers = new TabPage();
lvUserDirectory = new ListView(); lvUserDirectory = new ListView();
ilStatusIcons = new ImageList(components); ilStatusIcons = new ImageList(components);
tbpGames = new TabPage(); tbpGames = new TabPage();
lvGames = new ListView(); lvGames = new ListView();
ilGames = new ImageList(components); ilGames = new ImageList(components);
tbpStore = new TabPage();
lvStoreItems = new ListView();
ilStoreThumbnails = new ImageList(components);
ilTabIcons = new ImageList(components); ilTabIcons = new ImageList(components);
ilProfilePics = new ImageList(components);
ctxmChangeStatus = new ContextMenuStrip(components); ctxmChangeStatus = new ContextMenuStrip(components);
onlineToolStripMenuItem = new ToolStripMenuItem(); onlineToolStripMenuItem = new ToolStripMenuItem();
awayToolStripMenuItem = new ToolStripMenuItem(); awayToolStripMenuItem = new ToolStripMenuItem();
@ -65,17 +68,34 @@
llblSignIn = new LinkLabel(); llblSignIn = new LinkLabel();
lblWelcome = new Label(); lblWelcome = new Label();
pbUserPfp = new PictureBox(); pbUserPfp = new PictureBox();
pbDonate = new PictureBox();
ctxmAdminUserList = new ContextMenuStrip(components);
refreshToolStripMenuItem1 = new ToolStripMenuItem();
toolStripSeparator1 = new ToolStripSeparator();
copyUserIDToClipboardToolStripMenuItem = new ToolStripMenuItem();
deleteUserToolStripMenuItem = new ToolStripMenuItem();
adminDirectMessageToolStripMenuItem = new ToolStripMenuItem();
ctxmAdminRoomList = new ContextMenuStrip(components);
toolStripMenuItem1 = new ToolStripMenuItem();
toolStripSeparator2 = new ToolStripSeparator();
addRoomToolStripMenuItem = new ToolStripMenuItem();
deleteRoomToolStripMenuItem = new ToolStripMenuItem();
lblConnectionLost = new Label();
tbcMain.SuspendLayout(); tbcMain.SuspendLayout();
tbpContacts.SuspendLayout(); tbpContacts.SuspendLayout();
ctxmRefresh.SuspendLayout(); ctxmRefresh.SuspendLayout();
tbpRooms.SuspendLayout(); tbpRooms.SuspendLayout();
tbpUsers.SuspendLayout(); tbpUsers.SuspendLayout();
tbpGames.SuspendLayout(); tbpGames.SuspendLayout();
tbpStore.SuspendLayout();
ctxmChangeStatus.SuspendLayout(); ctxmChangeStatus.SuspendLayout();
pCurrencyArea.SuspendLayout(); pCurrencyArea.SuspendLayout();
((System.ComponentModel.ISupportInitialize)pbCurrencyIcon).BeginInit(); ((System.ComponentModel.ISupportInitialize)pbCurrencyIcon).BeginInit();
pCurrentUser.SuspendLayout(); pCurrentUser.SuspendLayout();
((System.ComponentModel.ISupportInitialize)pbUserPfp).BeginInit(); ((System.ComponentModel.ISupportInitialize)pbUserPfp).BeginInit();
((System.ComponentModel.ISupportInitialize)pbDonate).BeginInit();
ctxmAdminUserList.SuspendLayout();
ctxmAdminRoomList.SuspendLayout();
SuspendLayout(); SuspendLayout();
// //
// tbcMain // tbcMain
@ -85,41 +105,41 @@
tbcMain.Controls.Add(tbpRooms); tbcMain.Controls.Add(tbpRooms);
tbcMain.Controls.Add(tbpUsers); tbcMain.Controls.Add(tbpUsers);
tbcMain.Controls.Add(tbpGames); tbcMain.Controls.Add(tbpGames);
tbcMain.Controls.Add(tbpStore);
tbcMain.Enabled = false; tbcMain.Enabled = false;
tbcMain.ImageList = ilTabIcons; tbcMain.ImageList = ilTabIcons;
tbcMain.Location = new Point(12, 66); tbcMain.Location = new Point(12, 83);
tbcMain.Name = "tbcMain"; tbcMain.Name = "tbcMain";
tbcMain.SelectedIndex = 0; tbcMain.SelectedIndex = 0;
tbcMain.Size = new Size(305, 535); tbcMain.Size = new Size(352, 499);
tbcMain.TabIndex = 0; tbcMain.TabIndex = 0;
tbcMain.SelectedIndexChanged += tbcMain_SelectedIndexChanged;
// //
// tbpContacts // tbpContacts
// //
tbpContacts.Controls.Add(lvContacts); tbpContacts.Controls.Add(flpContacts);
tbpContacts.ImageKey = "ContactsIcon.png"; tbpContacts.ImageKey = "ContactsIcon.png";
tbpContacts.Location = new Point(4, 24); tbpContacts.Location = new Point(4, 24);
tbpContacts.Name = "tbpContacts"; tbpContacts.Name = "tbpContacts";
tbpContacts.Padding = new Padding(3); tbpContacts.Padding = new Padding(3);
tbpContacts.Size = new Size(297, 507); tbpContacts.Size = new Size(344, 471);
tbpContacts.TabIndex = 0; tbpContacts.TabIndex = 0;
tbpContacts.Text = "Contacts"; tbpContacts.Text = "Contacts";
tbpContacts.UseVisualStyleBackColor = true; tbpContacts.UseVisualStyleBackColor = true;
// //
// lvContacts // flpContacts
// //
lvContacts.Alignment = ListViewAlignment.Left; flpContacts.AutoScroll = true;
lvContacts.Anchor = AnchorStyles.Left | AnchorStyles.Right; flpContacts.BackColor = Color.White;
lvContacts.ContextMenuStrip = ctxmRefresh; flpContacts.BorderStyle = BorderStyle.Fixed3D;
lvContacts.LargeImageList = ilProfilePics; flpContacts.ContextMenuStrip = ctxmRefresh;
lvContacts.Location = new Point(0, 0); flpContacts.Dock = DockStyle.Fill;
lvContacts.MultiSelect = false; flpContacts.FlowDirection = FlowDirection.TopDown;
lvContacts.Name = "lvContacts"; flpContacts.Location = new Point(3, 3);
lvContacts.Size = new Size(297, 514); flpContacts.Name = "flpContacts";
lvContacts.SmallImageList = ilProfilePics; flpContacts.Size = new Size(338, 465);
lvContacts.TabIndex = 1; flpContacts.TabIndex = 0;
lvContacts.UseCompatibleStateImageBehavior = false; flpContacts.WrapContents = false;
lvContacts.View = View.SmallIcon;
lvContacts.DoubleClick += lvContacts_DoubleClick;
// //
// ctxmRefresh // ctxmRefresh
// //
@ -134,48 +154,31 @@
refreshToolStripMenuItem.Text = "Refresh"; refreshToolStripMenuItem.Text = "Refresh";
refreshToolStripMenuItem.Click += refreshToolStripMenuItem_Click; refreshToolStripMenuItem.Click += refreshToolStripMenuItem_Click;
// //
// ilProfilePics
//
ilProfilePics.ColorDepth = ColorDepth.Depth32Bit;
ilProfilePics.ImageStream = (ImageListStreamer)resources.GetObject("ilProfilePics.ImageStream");
ilProfilePics.TransparentColor = Color.Transparent;
ilProfilePics.Images.SetKeyName(0, "DEFAULT");
//
// tbpRooms // tbpRooms
// //
tbpRooms.Controls.Add(btnAddRoom); tbpRooms.Controls.Add(flpRooms);
tbpRooms.Controls.Add(lbRooms);
tbpRooms.ImageKey = "RoomsChatIcon.png"; tbpRooms.ImageKey = "RoomsChatIcon.png";
tbpRooms.Location = new Point(4, 24); tbpRooms.Location = new Point(4, 24);
tbpRooms.Name = "tbpRooms"; tbpRooms.Name = "tbpRooms";
tbpRooms.Padding = new Padding(3); tbpRooms.Padding = new Padding(3);
tbpRooms.Size = new Size(297, 507); tbpRooms.Size = new Size(344, 471);
tbpRooms.TabIndex = 1; tbpRooms.TabIndex = 1;
tbpRooms.Text = "Rooms"; tbpRooms.Text = "Rooms";
tbpRooms.UseVisualStyleBackColor = true; tbpRooms.UseVisualStyleBackColor = true;
// //
// btnAddRoom // flpRooms
// //
btnAddRoom.FlatAppearance.BorderSize = 0; flpRooms.AutoScroll = true;
btnAddRoom.FlatStyle = FlatStyle.Flat; flpRooms.BackColor = Color.White;
btnAddRoom.Location = new Point(342, 485); flpRooms.BorderStyle = BorderStyle.Fixed3D;
btnAddRoom.Name = "btnAddRoom"; flpRooms.ContextMenuStrip = ctxmRefresh;
btnAddRoom.Size = new Size(20, 22); flpRooms.Dock = DockStyle.Fill;
btnAddRoom.TabIndex = 7; flpRooms.FlowDirection = FlowDirection.TopDown;
btnAddRoom.UseVisualStyleBackColor = true; flpRooms.Location = new Point(3, 3);
btnAddRoom.Click += btnAddRoom_Click; flpRooms.Name = "flpRooms";
// flpRooms.Size = new Size(338, 465);
// lbRooms flpRooms.TabIndex = 1;
// flpRooms.WrapContents = false;
lbRooms.Anchor = AnchorStyles.Left | AnchorStyles.Right;
lbRooms.ContextMenuStrip = ctxmRefresh;
lbRooms.FormattingEnabled = true;
lbRooms.ItemHeight = 15;
lbRooms.Location = new Point(0, 0);
lbRooms.Name = "lbRooms";
lbRooms.Size = new Size(297, 514);
lbRooms.TabIndex = 0;
lbRooms.DoubleClick += lbRooms_DoubleClick;
// //
// tbpUsers // tbpUsers
// //
@ -183,7 +186,7 @@
tbpUsers.ImageIndex = 1; tbpUsers.ImageIndex = 1;
tbpUsers.Location = new Point(4, 24); tbpUsers.Location = new Point(4, 24);
tbpUsers.Name = "tbpUsers"; tbpUsers.Name = "tbpUsers";
tbpUsers.Size = new Size(297, 507); tbpUsers.Size = new Size(344, 471);
tbpUsers.TabIndex = 3; tbpUsers.TabIndex = 3;
tbpUsers.Text = "Users"; tbpUsers.Text = "Users";
tbpUsers.UseVisualStyleBackColor = true; tbpUsers.UseVisualStyleBackColor = true;
@ -191,12 +194,13 @@
// lvUserDirectory // lvUserDirectory
// //
lvUserDirectory.Alignment = ListViewAlignment.Left; lvUserDirectory.Alignment = ListViewAlignment.Left;
lvUserDirectory.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
lvUserDirectory.ContextMenuStrip = ctxmRefresh; lvUserDirectory.ContextMenuStrip = ctxmRefresh;
lvUserDirectory.Location = new Point(0, 0); lvUserDirectory.Location = new Point(0, 0);
lvUserDirectory.MultiSelect = false; lvUserDirectory.MultiSelect = false;
lvUserDirectory.Name = "lvUserDirectory"; lvUserDirectory.Name = "lvUserDirectory";
lvUserDirectory.RightToLeft = RightToLeft.Yes; lvUserDirectory.RightToLeft = RightToLeft.Yes;
lvUserDirectory.Size = new Size(297, 514); lvUserDirectory.Size = new Size(344, 484);
lvUserDirectory.SmallImageList = ilStatusIcons; lvUserDirectory.SmallImageList = ilStatusIcons;
lvUserDirectory.TabIndex = 0; lvUserDirectory.TabIndex = 0;
lvUserDirectory.UseCompatibleStateImageBehavior = false; lvUserDirectory.UseCompatibleStateImageBehavior = false;
@ -219,22 +223,23 @@
tbpGames.ImageIndex = 3; tbpGames.ImageIndex = 3;
tbpGames.Location = new Point(4, 24); tbpGames.Location = new Point(4, 24);
tbpGames.Name = "tbpGames"; tbpGames.Name = "tbpGames";
tbpGames.Size = new Size(297, 507); tbpGames.Size = new Size(344, 471);
tbpGames.TabIndex = 4; tbpGames.TabIndex = 4;
tbpGames.Text = "Games"; tbpGames.Text = "Games";
tbpGames.UseVisualStyleBackColor = true; tbpGames.UseVisualStyleBackColor = true;
// //
// lvGames // lvGames
// //
lvGames.Anchor = AnchorStyles.Left | AnchorStyles.Right; lvGames.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
listViewItem1.Tag = "StockMarketGame"; listViewItem4.Tag = "StockMarketGame";
listViewItem2.Tag = "GuessTheNumberGame"; listViewItem5.Tag = "GuessTheNumberGame";
lvGames.Items.AddRange(new ListViewItem[] { listViewItem1, listViewItem2 }); listViewItem6.Tag = "TicTacToeGame";
lvGames.Items.AddRange(new ListViewItem[] { listViewItem4, listViewItem5, listViewItem6 });
lvGames.LargeImageList = ilGames; lvGames.LargeImageList = ilGames;
lvGames.Location = new Point(0, 0); lvGames.Location = new Point(0, 0);
lvGames.MultiSelect = false; lvGames.MultiSelect = false;
lvGames.Name = "lvGames"; lvGames.Name = "lvGames";
lvGames.Size = new Size(297, 514); lvGames.Size = new Size(344, 484);
lvGames.SmallImageList = ilGames; lvGames.SmallImageList = ilGames;
lvGames.TabIndex = 2; lvGames.TabIndex = 2;
lvGames.UseCompatibleStateImageBehavior = false; lvGames.UseCompatibleStateImageBehavior = false;
@ -247,6 +252,37 @@
ilGames.TransparentColor = Color.Transparent; ilGames.TransparentColor = Color.Transparent;
ilGames.Images.SetKeyName(0, "dollar-money.gif"); ilGames.Images.SetKeyName(0, "dollar-money.gif");
ilGames.Images.SetKeyName(1, "NumberGuessGameIcon.png"); ilGames.Images.SetKeyName(1, "NumberGuessGameIcon.png");
ilGames.Images.SetKeyName(2, "Tic-tac-toe.png");
//
// tbpStore
//
tbpStore.Controls.Add(lvStoreItems);
tbpStore.ImageIndex = 3;
tbpStore.Location = new Point(4, 24);
tbpStore.Name = "tbpStore";
tbpStore.Padding = new Padding(3);
tbpStore.Size = new Size(344, 471);
tbpStore.TabIndex = 5;
tbpStore.Text = "Store";
tbpStore.UseVisualStyleBackColor = true;
//
// lvStoreItems
//
lvStoreItems.LargeImageList = ilStoreThumbnails;
lvStoreItems.Location = new Point(0, 0);
lvStoreItems.MultiSelect = false;
lvStoreItems.Name = "lvStoreItems";
lvStoreItems.Size = new Size(344, 484);
lvStoreItems.SmallImageList = ilStoreThumbnails;
lvStoreItems.TabIndex = 0;
lvStoreItems.UseCompatibleStateImageBehavior = false;
lvStoreItems.DoubleClick += lvStoreItems_DoubleClick;
//
// ilStoreThumbnails
//
ilStoreThumbnails.ColorDepth = ColorDepth.Depth32Bit;
ilStoreThumbnails.ImageSize = new Size(64, 64);
ilStoreThumbnails.TransparentColor = Color.Transparent;
// //
// ilTabIcons // ilTabIcons
// //
@ -258,6 +294,13 @@
ilTabIcons.Images.SetKeyName(2, "RoomsChatIcon.png"); ilTabIcons.Images.SetKeyName(2, "RoomsChatIcon.png");
ilTabIcons.Images.SetKeyName(3, "CurrencyIcon.png"); ilTabIcons.Images.SetKeyName(3, "CurrencyIcon.png");
// //
// ilProfilePics
//
ilProfilePics.ColorDepth = ColorDepth.Depth32Bit;
ilProfilePics.ImageStream = (ImageListStreamer)resources.GetObject("ilProfilePics.ImageStream");
ilProfilePics.TransparentColor = Color.Transparent;
ilProfilePics.Images.SetKeyName(0, "DEFAULT");
//
// ctxmChangeStatus // ctxmChangeStatus
// //
ctxmChangeStatus.Items.AddRange(new ToolStripItem[] { onlineToolStripMenuItem, awayToolStripMenuItem, doNotDisturbToolStripMenuItem, invisibleToolStripMenuItem }); ctxmChangeStatus.Items.AddRange(new ToolStripItem[] { onlineToolStripMenuItem, awayToolStripMenuItem, doNotDisturbToolStripMenuItem, invisibleToolStripMenuItem });
@ -295,10 +338,10 @@
// //
// lblRequestNotif // lblRequestNotif
// //
lblRequestNotif.Anchor = AnchorStyles.Top | AnchorStyles.Right; lblRequestNotif.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
lblRequestNotif.AutoSize = true; lblRequestNotif.AutoSize = true;
lblRequestNotif.Font = new Font("Segoe UI", 6F, FontStyle.Bold); lblRequestNotif.Font = new Font("Segoe UI", 6F, FontStyle.Bold);
lblRequestNotif.Location = new Point(215, 53); lblRequestNotif.Location = new Point(12, 67);
lblRequestNotif.Name = "lblRequestNotif"; lblRequestNotif.Name = "lblRequestNotif";
lblRequestNotif.Size = new Size(109, 11); lblRequestNotif.Size = new Size(109, 11);
lblRequestNotif.TabIndex = 6; lblRequestNotif.TabIndex = 6;
@ -331,7 +374,7 @@
pCurrencyArea.Controls.Add(llblClaimSpin); pCurrencyArea.Controls.Add(llblClaimSpin);
pCurrencyArea.Controls.Add(pbCurrencyIcon); pCurrencyArea.Controls.Add(pbCurrencyIcon);
pCurrencyArea.Controls.Add(lblCurrencyAmount); pCurrencyArea.Controls.Add(lblCurrencyAmount);
pCurrencyArea.Location = new Point(223, 5); pCurrencyArea.Location = new Point(270, 5);
pCurrencyArea.Name = "pCurrencyArea"; pCurrencyArea.Name = "pCurrencyArea";
pCurrencyArea.Size = new Size(95, 46); pCurrencyArea.Size = new Size(95, 46);
pCurrencyArea.TabIndex = 12; pCurrencyArea.TabIndex = 12;
@ -427,7 +470,6 @@
// //
// pbUserPfp // pbUserPfp
// //
pbUserPfp.BorderStyle = BorderStyle.FixedSingle;
pbUserPfp.ContextMenuStrip = ctxmChangeStatus; pbUserPfp.ContextMenuStrip = ctxmChangeStatus;
pbUserPfp.Cursor = Cursors.Hand; pbUserPfp.Cursor = Cursors.Hand;
pbUserPfp.Image = Properties.Resources.DefaultPfp; pbUserPfp.Image = Properties.Resources.DefaultPfp;
@ -439,16 +481,114 @@
pbUserPfp.TabStop = false; pbUserPfp.TabStop = false;
pbUserPfp.Click += pbUserPfp_Click; pbUserPfp.Click += pbUserPfp_Click;
// //
// pbDonate
//
pbDonate.Anchor = AnchorStyles.Top | AnchorStyles.Right;
pbDonate.Cursor = Cursors.Hand;
pbDonate.Image = Properties.Resources.donatebtn;
pbDonate.Location = new Point(288, 56);
pbDonate.Name = "pbDonate";
pbDonate.Size = new Size(77, 22);
pbDonate.SizeMode = PictureBoxSizeMode.Zoom;
pbDonate.TabIndex = 14;
pbDonate.TabStop = false;
pbDonate.Click += pbDonate_Click;
//
// ctxmAdminUserList
//
ctxmAdminUserList.Items.AddRange(new ToolStripItem[] { refreshToolStripMenuItem1, toolStripSeparator1, copyUserIDToClipboardToolStripMenuItem, deleteUserToolStripMenuItem, adminDirectMessageToolStripMenuItem });
ctxmAdminUserList.Name = "contextMenuStrip1";
ctxmAdminUserList.Size = new Size(214, 98);
ctxmAdminUserList.Opening += ctxmAdminUserList_Opening;
//
// refreshToolStripMenuItem1
//
refreshToolStripMenuItem1.Name = "refreshToolStripMenuItem1";
refreshToolStripMenuItem1.Size = new Size(213, 22);
refreshToolStripMenuItem1.Text = "Refresh";
refreshToolStripMenuItem1.Click += refreshToolStripMenuItem_Click;
//
// toolStripSeparator1
//
toolStripSeparator1.Name = "toolStripSeparator1";
toolStripSeparator1.Size = new Size(210, 6);
//
// copyUserIDToClipboardToolStripMenuItem
//
copyUserIDToClipboardToolStripMenuItem.Name = "copyUserIDToClipboardToolStripMenuItem";
copyUserIDToClipboardToolStripMenuItem.Size = new Size(213, 22);
copyUserIDToClipboardToolStripMenuItem.Text = "Copy User ID To Clipboard";
copyUserIDToClipboardToolStripMenuItem.Click += copyUserIDToClipboardToolStripMenuItem_Click;
//
// deleteUserToolStripMenuItem
//
deleteUserToolStripMenuItem.Name = "deleteUserToolStripMenuItem";
deleteUserToolStripMenuItem.Size = new Size(213, 22);
deleteUserToolStripMenuItem.Text = "Delete User";
deleteUserToolStripMenuItem.Click += deleteUserToolStripMenuItem_Click;
//
// adminDirectMessageToolStripMenuItem
//
adminDirectMessageToolStripMenuItem.Name = "adminDirectMessageToolStripMenuItem";
adminDirectMessageToolStripMenuItem.Size = new Size(213, 22);
adminDirectMessageToolStripMenuItem.Text = "Admin Direct Message";
adminDirectMessageToolStripMenuItem.Click += adminDirectMessageToolStripMenuItem_Click;
//
// ctxmAdminRoomList
//
ctxmAdminRoomList.Items.AddRange(new ToolStripItem[] { toolStripMenuItem1, toolStripSeparator2, addRoomToolStripMenuItem, deleteRoomToolStripMenuItem });
ctxmAdminRoomList.Name = "contextMenuStrip1";
ctxmAdminRoomList.Size = new Size(143, 76);
//
// toolStripMenuItem1
//
toolStripMenuItem1.Name = "toolStripMenuItem1";
toolStripMenuItem1.Size = new Size(142, 22);
toolStripMenuItem1.Text = "Refresh";
toolStripMenuItem1.Click += refreshToolStripMenuItem_Click;
//
// toolStripSeparator2
//
toolStripSeparator2.Name = "toolStripSeparator2";
toolStripSeparator2.Size = new Size(139, 6);
//
// addRoomToolStripMenuItem
//
addRoomToolStripMenuItem.Name = "addRoomToolStripMenuItem";
addRoomToolStripMenuItem.Size = new Size(142, 22);
addRoomToolStripMenuItem.Text = "Add Room";
addRoomToolStripMenuItem.Click += addRoomToolStripMenuItem_Click;
//
// deleteRoomToolStripMenuItem
//
deleteRoomToolStripMenuItem.Name = "deleteRoomToolStripMenuItem";
deleteRoomToolStripMenuItem.Size = new Size(142, 22);
deleteRoomToolStripMenuItem.Text = "Delete Room";
//
// lblConnectionLost
//
lblConnectionLost.AutoSize = true;
lblConnectionLost.Font = new Font("Segoe UI", 6F, FontStyle.Bold);
lblConnectionLost.ForeColor = Color.Red;
lblConnectionLost.Location = new Point(12, 67);
lblConnectionLost.Name = "lblConnectionLost";
lblConnectionLost.Size = new Size(175, 11);
lblConnectionLost.TabIndex = 15;
lblConnectionLost.Text = "Server Connection Lost. Trying To Reconnect...";
lblConnectionLost.Visible = false;
//
// Main // Main
// //
AutoScaleDimensions = new SizeF(7F, 15F); AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
BackColor = Color.DodgerBlue; BackColor = Color.DodgerBlue;
ClientSize = new Size(329, 613); ClientSize = new Size(376, 594);
Controls.Add(pbDonate);
Controls.Add(pCurrentUser); Controls.Add(pCurrentUser);
Controls.Add(pCurrencyArea); Controls.Add(pCurrencyArea);
Controls.Add(lblRequestNotif); Controls.Add(lblRequestNotif);
Controls.Add(tbcMain); Controls.Add(tbcMain);
Controls.Add(lblConnectionLost);
FormBorderStyle = FormBorderStyle.FixedDialog; FormBorderStyle = FormBorderStyle.FixedDialog;
Icon = (Icon)resources.GetObject("$this.Icon"); Icon = (Icon)resources.GetObject("$this.Icon");
MaximizeBox = false; MaximizeBox = false;
@ -464,6 +604,7 @@
tbpRooms.ResumeLayout(false); tbpRooms.ResumeLayout(false);
tbpUsers.ResumeLayout(false); tbpUsers.ResumeLayout(false);
tbpGames.ResumeLayout(false); tbpGames.ResumeLayout(false);
tbpStore.ResumeLayout(false);
ctxmChangeStatus.ResumeLayout(false); ctxmChangeStatus.ResumeLayout(false);
pCurrencyArea.ResumeLayout(false); pCurrencyArea.ResumeLayout(false);
pCurrencyArea.PerformLayout(); pCurrencyArea.PerformLayout();
@ -471,6 +612,9 @@
pCurrentUser.ResumeLayout(false); pCurrentUser.ResumeLayout(false);
pCurrentUser.PerformLayout(); pCurrentUser.PerformLayout();
((System.ComponentModel.ISupportInitialize)pbUserPfp).EndInit(); ((System.ComponentModel.ISupportInitialize)pbUserPfp).EndInit();
((System.ComponentModel.ISupportInitialize)pbDonate).EndInit();
ctxmAdminUserList.ResumeLayout(false);
ctxmAdminRoomList.ResumeLayout(false);
ResumeLayout(false); ResumeLayout(false);
PerformLayout(); PerformLayout();
} }
@ -480,9 +624,7 @@
private TabControl tbcMain; private TabControl tbcMain;
private TabPage tbpContacts; private TabPage tbpContacts;
private TabPage tbpRooms; private TabPage tbpRooms;
private ListBox lbRooms;
private Label lblRequestNotif; private Label lblRequestNotif;
private ListView lvContacts;
private System.Windows.Forms.ImageList ilProfilePics; private System.Windows.Forms.ImageList ilProfilePics;
private NotifyIcon niMain; private NotifyIcon niMain;
private ImageList ilTabIcons; private ImageList ilTabIcons;
@ -491,7 +633,6 @@
private ToolStripMenuItem awayToolStripMenuItem; private ToolStripMenuItem awayToolStripMenuItem;
private ToolStripMenuItem doNotDisturbToolStripMenuItem; private ToolStripMenuItem doNotDisturbToolStripMenuItem;
private ToolStripMenuItem invisibleToolStripMenuItem; private ToolStripMenuItem invisibleToolStripMenuItem;
private Button btnAddRoom;
private LinkLabel llblClaimSpin; private LinkLabel llblClaimSpin;
private Panel pCurrencyArea; private Panel pCurrencyArea;
private Panel pCurrentUser; private Panel pCurrentUser;
@ -509,6 +650,24 @@
private ToolStripMenuItem refreshToolStripMenuItem; private ToolStripMenuItem refreshToolStripMenuItem;
private ImageList ilStatusIcons; private ImageList ilStatusIcons;
private TabPage tbpUsers; private TabPage tbpUsers;
private PictureBox pbDonate;
private TabPage tbpStore;
private ListView lvStoreItems;
private ImageList ilStoreThumbnails;
private ContextMenuStrip ctxmAdminUserList;
private ToolStripMenuItem refreshToolStripMenuItem1;
private ToolStripSeparator toolStripSeparator1;
private ToolStripMenuItem copyUserIDToClipboardToolStripMenuItem;
private ToolStripMenuItem deleteUserToolStripMenuItem;
private ToolStripMenuItem adminDirectMessageToolStripMenuItem;
private ContextMenuStrip ctxmAdminRoomList;
private ToolStripMenuItem toolStripMenuItem1;
private ToolStripSeparator toolStripSeparator2;
private ToolStripMenuItem addRoomToolStripMenuItem;
private ToolStripMenuItem deleteRoomToolStripMenuItem;
private Label lblConnectionLost;
private FlowLayoutPanel flpContacts;
private ListView lvUserDirectory; private ListView lvUserDirectory;
private FlowLayoutPanel flpRooms;
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -120,6 +120,362 @@
<metadata name="ctxmRefresh.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="ctxmRefresh.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>356, 21</value> <value>356, 21</value>
</metadata> </metadata>
<metadata name="ilTabIcons.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>20, 44</value>
</metadata>
<data name="ilTabIcons.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAEZTeXN0ZW0uV2luZG93cy5Gb3JtcywgQ3VsdHVyZT1uZXV0cmFs
LCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BQEAAAAmU3lzdGVtLldpbmRvd3MuRm9ybXMu
SW1hZ2VMaXN0U3RyZWFtZXIBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAshIAAAJNU0Z0AUkBTAIBAQQB
AAGoAQMBqAEDARABAAEQAQAE/wEhAQAI/wFCAU0BNgcAATYDAAEoAwABQAMAASADAAEBAQABIAYAASD/
AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/ACIAA2cB7wJnAVkB7wFnAV0BWQHvAWcBWwFZAe8B
ZwFbAVkB7wFnAlkB7wFnAWQBWQHvA2cB7wNnAe8DZwHvA2cB7wNnAe8DZwHvA2cB7wNnAe8DZwHvAwcB
CQMqAT8DRQF8A1kBuwNjAd8DaAH0A4AB/gOBAf8DgQH/A4EB/wOAAf4DaAH0A2MB3wNaAboDRAF6AycB
OjgAAzMBUQNuAfUIAAM3AVoDWAG4A2MB3wJjAV0B3wFiAl0B3wNdAd8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
/wGTATMB/wJuAWgB9QNdAcUDNgFZBP8B9AHNAWwB/wH0AcsBZgH/AfQBywFlAf8B9AHLAWUB/wHxAcEB
SQH/AfkB4wGsAf8DiQH/A4kB/wOJAf8DiQH/A4kB/wOJAf8DiQH/A4kB/wOaAf8DBgEIAzEBTANQAZsD
ZQHsA30B+gOBAf8DgQH/A4EB/wOBAf8DgQH/A4EB/wOBAf8DfQH6A2oB7QNQAZsDLwFJCAADIgExA18B
yQJ9AWcB+gHzAcoBZQH/AfkB4QGmAf8B+wHtAcwB/wH7AewByAH/AfgB3QGbAf8DgAH+AmUBXgHiAz0B
aAQBDAADQgFyA2MB1QNqAfkB/wHJAZkC/wG8AX8C/wGuAWYC/wGkAVMC/wGfAUoC/wGfAUsC/wGjAVEC
/wGnAVgB/wN8AfgDXQHHAzsBYgQAQP8IAAMFAQYDEgEXAzoBYANRAZ8DXwHTA2cB7wNjAfYDYgHuA14B
0gNRAZ4DOQFfAxEBFgMFAQYUAAMPARMDRwGCA2QB2wJ+AW8B/ANnAeoDVAGoAygBOxwAAzwBZQNeAdIB
/wHvAeAC/wHcAbwC/wHNAZ8C/wHBAYoC/wG7AX8C/wG/AYYC/wHNAaEC/wHpAdYB/wNcAcQDNQFVCAAB
QgFNAT4HAAE+AwABKAMAAUADAAEgAwABAQEAAQEGAAEBFgAD/4UAAf8B/AHAAQMEAAH/AfwBgAEBBAAB
/wH5BgAB/wH5BgAB8AETBgABwAEDBAAC/wGAAQEEAAHAAQEBgAEBBAABgAIAAQEHAAEBBwABAQcAAQEH
AAEBBgABgAEBBgABwAEDAYABAQIAAcABAQHwAR8BwAEDCw==
</value>
</data>
<metadata name="ilStatusIcons.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>13, 101</value>
</metadata>
<data name="ilStatusIcons.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAE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gHuA30B
+gGuAb4BrgH9AZ8B/wGfAf8BjAH/AYwB/wFAAb4BQAH9AWgBagFoAfkBYQFsAWEB6wNVAawDHwEsEAAD
IQEwA1kBtgNiAe4DfQH6Aa4CvgH9AZ8D/wGMA/8BQAK+Af0BaAJqAfkBYQJsAesDVQGsAx8BLBAAAyEB
MANZAbYDYgHuA30B+gKuAb4B/QKfAv8CjAL/AkABvgH9AmgBagH5AmEBbAHrA1UBrAMfASwUAAMGAQcD
NgFYA1UBrANmAeUDfgH8A18B+wNlAeIDUwGnAzMBUQMGAQcYAAMGAQcDNgFYA1UBrANmAeUDfgH8AV8B
cwFfAfsDZQHiA1MBpwMzAVEDBgEHGAADBgEHAzYBWANVAawDZgHlA34B/AFfAnMB+wNlAeIDUwGnAzMB
UQMGAQcYAAMGAQcDNgFYA1UBrANmAeUDfgH8Al8BcwH7A2UB4gNTAacDMwFRAwYBBwwAAUIBTQE+BwAB
PgMAASgDAAFAAwABIAMAAQEBAAEBBgABARYAA/+BAAHgAQcB4AEHAeABBwHgAQcBwAEDAcABAwHAAQMB
wAEDAYABAQGAAQEBgAEBAYABAVAAAYABAQGAAQEBgAEBAYABAQHAAQMBwAEDAcABAwHAAQMB4AEHAeAB
BwHgAQcB4AEHCw==
</value>
</data>
<metadata name="ilGames.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>24, 73</value>
</metadata>
<data name="ilGames.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAEZTeXN0ZW0uV2luZG93cy5Gb3JtcywgQ3VsdHVyZT1uZXV0cmFs
LCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BQEAAAAmU3lzdGVtLldpbmRvd3MuRm9ybXMu
SW1hZ2VMaXN0U3RyZWFtZXIBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAJCUAAAJNU0Z0AUk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/wIAAf8B/AEDAYABAAH/Ac8B8wH/BAAB/wGAAQEB/wH+AQMBgAEAAf8BzwHzAf8EAAH/AQAB
AwP/AYABAAH/Ac8B8wH/BAAB/wEMAQ8D/wHAAQAB/wHPAfMB/wQAAf8B3wT/AcABAAH/Ac8B8wH/BAAG
/wHwAQEB/wHPAfMB/wQACw==
</value>
</data>
<metadata name="ilStoreThumbnails.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>12, 128</value>
</metadata>
<metadata name="ilProfilePics.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="ilProfilePics.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
@ -128,7 +484,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAEZTeXN0ZW0uV2luZG93cy5Gb3JtcywgQ3VsdHVyZT1uZXV0cmFs AAEAAAD/////AQAAAAAAAAAMAgAAAEZTeXN0ZW0uV2luZG93cy5Gb3JtcywgQ3VsdHVyZT1uZXV0cmFs
LCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BQEAAAAmU3lzdGVtLldpbmRvd3MuRm9ybXMu LCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BQEAAAAmU3lzdGVtLldpbmRvd3MuRm9ybXMu
SW1hZ2VMaXN0U3RyZWFtZXIBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAA0A0AAAJNU0Z0AUkBTAMBAQAB SW1hZ2VMaXN0U3RyZWFtZXIBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAA0A0AAAJNU0Z0AUkBTAMBAQAB
2AEAAdgBAAEgAQABIAEABP8BIQEACP8BQgFNATYHAAE2AwABKAMA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type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>13, 101</value>
</metadata>
<data name="ilStatusIcons.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAEZTeXN0ZW0uV2luZG93cy5Gb3JtcywgQ3VsdHVyZT1uZXV0cmFs
LCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BQEAAAAmU3lzdGVtLldpbmRvd3MuRm9ybXMu
SW1hZ2VMaXN0U3RyZWFtZXIBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAKhQAAAJNU0Z0AUkBTAIBAQQB
AAGQAQABkAEAARABAAEQAQAE/wEhAQAI/wFCAU0BNgcAATYDAAEoAwABQAMAASADAAEBAQABIAYAASD/
AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AC4AAwYBBwM0AVQDUQGiA14B0gNaAekDYAHoA10B
0QNQAZ8DMQFNAwUBBhgAAwYBBwM0AVQDUQGiA14B0gNaAekDYAHoA10B0QNQAZ8DMQFNAwUBBhgAAwYB
BwM0AVQDUQGiA14B0gNaAekDYAHoA10B0QNQAZ8DMQFNAwUBBhgAAwYBBwM0AVQDUQGiA14B0gNaAekD
YAHoA10B0QNQAZ8DMQFNAwUBBhQAAyABLQNUAasDWwHkA0sB9QMkAfsDNgH+AzYB/gMkAfsDUwH0A2IB
4QNRAaEDHgEqEAADIAEtA1QBqwNbAeQBRQFXAUUB9QEhAVIBIQH7ARIBUgESAf4BEgFSARIB/gEhAVIB
IQH7AU0BUwFNAfQDYgHhA1EBoQMeASoQAAMgAS0DVAGrA1sB5AFFAlcB9QEhAlIB+wESAlIB/gESAlIB
/gEhAlIB+wFNAlMB9ANiAeEDUQGhAx4BKhAAAyABLQNUAasDWwHkAkUBVwH1AiEBUgH7AhIBUgH+AhIB
UgH+AiEBUgH7Ak0BUwH0A2IB4QNRAaEDHgEq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="ilGames.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>24, 73</value>
</metadata>
<data name="ilGames.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAEZTeXN0ZW0uV2luZG93cy5Gb3JtcywgQ3VsdHVyZT1uZXV0cmFs
LCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BQEAAAAmU3lzdGVtLldpbmRvd3MuRm9ybXMu
SW1hZ2VMaXN0U3RyZWFtZXIBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAoh8AAAJNU0Z0AUkBTAIBAQIB
AAFQAQEBUAEBASABAAEgAQAE/wEhAQAI/wFCAU0BNgcAATYDAAEoAwABgAMAASADAAEBAQABIAYAAUB6
AANcAecBCAEKAQAB/wMqAUAMAAMqAUADNgFXAz8BbAM/AWwDPwFsAz8BbAM/AWwDPwFsAz8BbAM/AWwD
PwFsAz8BbAM/AWwDPwFsAz8BbAM/AWwDPwFsAz8BbAI7AToBYgMzAVEDGAEh/wB1AAMhATADRgGAFAAB
FQEfAQQB/wENARUBAAH/AQgBCgEAAf8BCAEKAQAB/wwAA0QBegNTAacCYQFdAc8CYQFdAc8CYQFdAc8C
YQFdAc8CYQFdAc8CYQFdAc8CYQFdAc8CYQFdAc8CYQFdAc8CYQFdAc8CYQFdAc8CYQFdAc8CYQFdAc8C
YQFdAc8CYQFdAc8CYAFdAc4DWQG7AlABTwGbAyoBQP8AaQADWgG/AQgBCgEAAf8BCAEKAQAB/wEIAQoB
AAH/AQgBCgEAAf8BCAEKAQAB/wEIAQoBAAH/AQgBCgEAAf8DWgG/A1oBvwFDAXQBBwH/AUcBdwEMAf8B
JQFHAQAB/wEOARkBAAH/DAACSwFKAYoCWgFYAb0CZwFdAeoCZwFdAeoCZwFdAeoCZwFdAeoCZwFdAeoC
ZwFdAeoCZwFdAeoCZwFdA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SAaQC
QAFBAXEDJQE2AxMBGf8A0QAEAQMLAQ4DJgE4AzkBXgNGAX0CSgFLAYsDSgGJAz4BawMqAT8DFwEfAwIB
A/8ABQABQgFNAT4HAAE+AwABKAMAAYADAAEgAwABAQEAAQEGAAECFgAD/wEAA/8BxwIAAQcB/wgAAv8B
zwGHAgABBwH/CAAB/wH+AQABBwIAAQcB/wgAAf8B/AEAAQcCAAEHAf8IAAH/AfgBAAEPAgABBwH/CAAB
/wHwAQABBwIAAQcB/wgAAf8B4AEAAQMCAAEHAf8IAAH/AcABAAEBAfwBAwL/CAAB/wHAAQABAQH8AQMC
/wgAAf8B4AIAAfwBAwHgAR8IAAH/AfwBIAEAAfwBAwHgAR8IAAH/Af4B4AEAAfwBAwHgAR8IAAH/AcAC
AAH8AQMB4AEfCAAB/wGAAgAB/AEDAeABHwgAAf8DAAH8AQMB4AEfCAAB/gIAAQEBAAEDAeABHwgAAfwC
AAEBAQABAwH4AR8IAAH4AgABAQEAAQMB+AEfCAAB+AIAAQMBAAEDAfgBAwgAAfgCAAEHAQABAwH4AQMI
AAH4AgABDwEAAQMB+AkAAfgBAAFEAX8BAAEDAfgJAAH4AQABAQH/AYABAwH4CQAB+AIAAX8BgAEDAfwJ
AAH8AgABfwHwAQMBgQGACAAB/gIAAf8B8AEDAYEBgAgAAf8CAAH/AfwBAwGACQAB/wGAAQEB/wH+AQMB
gAkAAf8BAAEDA/8BgAkAAf8BDAEPA/8BwAkAAf8B3wT/AcAJAAb/AfABAQgACw==
</value>
</data>
<metadata name="ilTabIcons.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>20, 44</value>
</metadata>
<data name="ilTabIcons.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAEZTeXN0ZW0uV2luZG93cy5Gb3JtcywgQ3VsdHVyZT1uZXV0cmFs
LCBQdWJsaWNLZXl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gHSA1EBngM5AV8DEQEWAwUBBhQAAw8BEwNHAYIDZAHbAn4BbwH8A2cB6gNUAagDKAE7HAAD
PAFlA14B0gH/Ae8B4AL/AdwBvAL/Ac0BnwL/AcEBigL/AbsBfwL/Ab8BhgL/Ac0BoQL/AekB1gH/A1wB
xAM1AVUIAAFCAU0BPgcAAT4DAAEoAwABQAMAASADAAEBAQABAQYAAQEWAAP/hQAB/wH8AcABAwQAAf8B
/AGAAQEEAAH/AfkGAAH/AfkGAAHwARMGAAHAAQMEAAL/AYABAQQAAcABAQGAAQEEAAGAAgABAQcAAQEH
AAEBBwABAQcAAQEGAAGAAQEGAAHAAQMBgAEBAgABwAEBAfABHwHAAQML
</value> </value>
</data> </data>
<metadata name="ctxmChangeStatus.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="ctxmChangeStatus.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
@ -603,8 +628,14 @@
AB/+AAA//wAAf/+AAP//4AP///4///////8= AB/+AAA//wAAf/+AAP//4AP///4///////8=
</value> </value>
</data> </data>
<metadata name="ctxmAdminUserList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>461, 24</value>
</metadata>
<metadata name="ctxmAdminRoomList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>461, 49</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>133</value> <value>90</value>
</metadata> </metadata>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>

View File

@ -37,25 +37,22 @@
btnDecline = new Button(); btnDecline = new Button();
btnCancelRequest = new Button(); btnCancelRequest = new Button();
btnMessage = new Button(); btnMessage = new Button();
pbUserStatus = new PictureBox();
pbCurrencyIcon = new PictureBox(); pbCurrencyIcon = new PictureBox();
lblCurrencyAmount = new Label(); lblCurrencyAmount = new Label();
flpUsernameCurrency = new FlowLayoutPanel(); flpUsernameCurrency = new FlowLayoutPanel();
panel1 = new Panel(); pCurrency = new Panel();
((System.ComponentModel.ISupportInitialize)pbUserPfp).BeginInit(); ((System.ComponentModel.ISupportInitialize)pbUserPfp).BeginInit();
((System.ComponentModel.ISupportInitialize)pbUserStatus).BeginInit();
((System.ComponentModel.ISupportInitialize)pbCurrencyIcon).BeginInit(); ((System.ComponentModel.ISupportInitialize)pbCurrencyIcon).BeginInit();
flpUsernameCurrency.SuspendLayout(); flpUsernameCurrency.SuspendLayout();
panel1.SuspendLayout(); pCurrency.SuspendLayout();
SuspendLayout(); SuspendLayout();
// //
// pbUserPfp // pbUserPfp
// //
pbUserPfp.BorderStyle = BorderStyle.FixedSingle;
pbUserPfp.Image = Properties.Resources.DefaultPfp; pbUserPfp.Image = Properties.Resources.DefaultPfp;
pbUserPfp.Location = new Point(12, 12); pbUserPfp.Location = new Point(9, 5);
pbUserPfp.Name = "pbUserPfp"; pbUserPfp.Name = "pbUserPfp";
pbUserPfp.Size = new Size(128, 126); pbUserPfp.Size = new Size(139, 138);
pbUserPfp.SizeMode = PictureBoxSizeMode.StretchImage; pbUserPfp.SizeMode = PictureBoxSizeMode.StretchImage;
pbUserPfp.TabIndex = 2; pbUserPfp.TabIndex = 2;
pbUserPfp.TabStop = false; pbUserPfp.TabStop = false;
@ -64,7 +61,7 @@
// //
lblUsername.AutoSize = true; lblUsername.AutoSize = true;
lblUsername.Font = new Font("Segoe UI Light", 15F, FontStyle.Bold); lblUsername.Font = new Font("Segoe UI Light", 15F, FontStyle.Bold);
lblUsername.ForeColor = SystemColors.ControlLight; lblUsername.ForeColor = Color.White;
lblUsername.Location = new Point(3, 0); lblUsername.Location = new Point(3, 0);
lblUsername.Name = "lblUsername"; lblUsername.Name = "lblUsername";
lblUsername.Size = new Size(105, 28); lblUsername.Size = new Size(105, 28);
@ -149,17 +146,6 @@
btnMessage.Visible = false; btnMessage.Visible = false;
btnMessage.Click += btnMessage_Click; btnMessage.Click += btnMessage_Click;
// //
// pbUserStatus
//
pbUserStatus.BackColor = Color.Transparent;
pbUserStatus.Image = Properties.Resources.OfflineIcon;
pbUserStatus.Location = new Point(115, 1);
pbUserStatus.Name = "pbUserStatus";
pbUserStatus.Size = new Size(32, 32);
pbUserStatus.SizeMode = PictureBoxSizeMode.StretchImage;
pbUserStatus.TabIndex = 10;
pbUserStatus.TabStop = false;
//
// pbCurrencyIcon // pbCurrencyIcon
// //
pbCurrencyIcon.Image = Properties.Resources.CurrencyIcon; pbCurrencyIcon.Image = Properties.Resources.CurrencyIcon;
@ -188,21 +174,21 @@
// //
flpUsernameCurrency.BackColor = Color.Transparent; flpUsernameCurrency.BackColor = Color.Transparent;
flpUsernameCurrency.Controls.Add(lblUsername); flpUsernameCurrency.Controls.Add(lblUsername);
flpUsernameCurrency.Controls.Add(panel1); flpUsernameCurrency.Controls.Add(pCurrency);
flpUsernameCurrency.Location = new Point(152, 8); flpUsernameCurrency.Location = new Point(152, 8);
flpUsernameCurrency.Name = "flpUsernameCurrency"; flpUsernameCurrency.Name = "flpUsernameCurrency";
flpUsernameCurrency.Size = new Size(246, 33); flpUsernameCurrency.Size = new Size(246, 33);
flpUsernameCurrency.TabIndex = 13; flpUsernameCurrency.TabIndex = 13;
flpUsernameCurrency.WrapContents = false; flpUsernameCurrency.WrapContents = false;
// //
// panel1 // pCurrency
// //
panel1.Controls.Add(pbCurrencyIcon); pCurrency.Controls.Add(pbCurrencyIcon);
panel1.Controls.Add(lblCurrencyAmount); pCurrency.Controls.Add(lblCurrencyAmount);
panel1.Location = new Point(114, 3); pCurrency.Location = new Point(114, 3);
panel1.Name = "panel1"; pCurrency.Name = "pCurrency";
panel1.Size = new Size(73, 24); pCurrency.Size = new Size(73, 24);
panel1.TabIndex = 14; pCurrency.TabIndex = 14;
// //
// Profile // Profile
// //
@ -214,12 +200,12 @@
Controls.Add(btnAccept); Controls.Add(btnAccept);
Controls.Add(btnDecline); Controls.Add(btnDecline);
Controls.Add(btnCancelRequest); Controls.Add(btnCancelRequest);
Controls.Add(pbUserStatus);
Controls.Add(btnAddContact); Controls.Add(btnAddContact);
Controls.Add(rtxtBio); Controls.Add(rtxtBio);
Controls.Add(pbUserPfp); Controls.Add(pbUserPfp);
Controls.Add(btnMessage); Controls.Add(btnMessage);
Font = new Font("Segoe UI Light", 9F); Font = new Font("Segoe UI Light", 9F);
ForeColor = Color.White;
FormBorderStyle = FormBorderStyle.FixedDialog; FormBorderStyle = FormBorderStyle.FixedDialog;
Icon = (Icon)resources.GetObject("$this.Icon"); Icon = (Icon)resources.GetObject("$this.Icon");
MaximizeBox = false; MaximizeBox = false;
@ -230,12 +216,11 @@
FormClosed += Profile_FormClosed; FormClosed += Profile_FormClosed;
Load += frmProfile_Load; Load += frmProfile_Load;
((System.ComponentModel.ISupportInitialize)pbUserPfp).EndInit(); ((System.ComponentModel.ISupportInitialize)pbUserPfp).EndInit();
((System.ComponentModel.ISupportInitialize)pbUserStatus).EndInit();
((System.ComponentModel.ISupportInitialize)pbCurrencyIcon).EndInit(); ((System.ComponentModel.ISupportInitialize)pbCurrencyIcon).EndInit();
flpUsernameCurrency.ResumeLayout(false); flpUsernameCurrency.ResumeLayout(false);
flpUsernameCurrency.PerformLayout(); flpUsernameCurrency.PerformLayout();
panel1.ResumeLayout(false); pCurrency.ResumeLayout(false);
panel1.PerformLayout(); pCurrency.PerformLayout();
ResumeLayout(false); ResumeLayout(false);
} }
@ -249,10 +234,9 @@
private Button btnDecline; private Button btnDecline;
private Button btnCancelRequest; private Button btnCancelRequest;
private Button btnMessage; private Button btnMessage;
private PictureBox pbUserStatus;
private PictureBox pbCurrencyIcon; private PictureBox pbCurrencyIcon;
private Label lblCurrencyAmount; private Label lblCurrencyAmount;
private FlowLayoutPanel flpUsernameCurrency; private FlowLayoutPanel flpUsernameCurrency;
private Panel panel1; private Panel pCurrency;
} }
} }

View File

@ -1,72 +1,96 @@
using QtCNETAPI.Dtos.User; using qtc_net_client_2.ClientModel;
using QtCNETAPI.Services.ApiService; using qtc_net_client_2.Properties;
using qtc_net_client_2.Services;
using QtCNETAPI.Dtos.User;
using QtCNETAPI.Models; using QtCNETAPI.Models;
using QtCNETAPI.Schema;
using QtCNETAPI.Services.ApiService;
using QtCNETAPI.Services.GatewayService;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
using System.Diagnostics;
using System.Drawing; using System.Drawing;
using System.Drawing.Design;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.IO;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using QtCNETAPI.Services.GatewayService;
using qtc_net_client_2.ClientModel;
using qtc_net_client_2.Properties;
namespace qtc_net_client_2.Forms namespace qtc_net_client_2.Forms
{ {
public partial class Profile : Form public partial class Profile : Form
{ {
private UserInformationDto _userInformationDto; private UserInformationDto _userInformationDto;
private ImageFactory _imgFactory = new();
private IApiService _apiService; private IApiService _apiService;
private IGatewayService _gatewayService; private IGatewayService _gatewayService;
private ServiceResponse<byte[]>? pfpRes; private ServiceResponse<byte[]>? pfpRes;
byte[]? cosmeticRes;
private List<Contact> contactsList; private List<Contact> contactsList;
public Profile(UserInformationDto userInfo, ServiceResponse<byte[]>? pfp, List<Contact> contacts, IApiService apiService, IGatewayService gatewayService) public Profile(UserInformationDto userInfo, ServiceResponse<byte[]>? pfp, List<Contact> contacts, IApiService apiService, IGatewayService gatewayService, byte[]? cosmetic = null)
{ {
_userInformationDto = userInfo; _userInformationDto = userInfo;
_apiService = apiService; _apiService = apiService;
_gatewayService = gatewayService; _gatewayService = gatewayService;
pfpRes = pfp; pfpRes = pfp;
cosmeticRes = cosmetic;
contactsList = contacts; contactsList = contacts;
InitializeComponent(); InitializeComponent();
} }
private void frmProfile_Load(object sender, EventArgs e) private async void frmProfile_Load(object sender, EventArgs e)
{ {
lblUsername.Text = _userInformationDto.Username; lblUsername.Text = _userInformationDto.Username;
lblCurrencyAmount.Text = _userInformationDto.CurrencyAmount.ToString("N0"); lblCurrencyAmount.Text = _userInformationDto.CurrencyAmount.ToString("N0");
rtxtBio.Text = _userInformationDto.Bio; rtxtBio.Text = _userInformationDto.Bio;
Bitmap? pfp = null;
if (pfpRes != null && pfpRes.Success && pfpRes.Data != null) if (pfpRes != null && pfpRes.Success && pfpRes.Data != null)
{ {
using (var ms = new MemoryStream(pfpRes.Data)) using (var ms = new MemoryStream(pfpRes.Data))
{ {
pbUserPfp.Image = Image.FromStream(ms); pfp = new Bitmap(ms);
ms.Dispose();
} }
} }
var userStatus = (UserStatus)_userInformationDto.Status; var userStatus = (UserStatus)_userInformationDto.Status;
Bitmap precenseImage = Resources.OnlineIcon;
switch (userStatus) switch (userStatus)
{ {
case UserStatus.Online: case UserStatus.Online:
pbUserStatus.Image = Resources.OnlineIcon; precenseImage = Resources.OnlineIcon;
break; break;
case UserStatus.Away: case UserStatus.Away:
pbUserStatus.Image = Resources.AwayIcon; precenseImage = Resources.AwayIcon;
break; break;
case UserStatus.DoNotDisturb: case UserStatus.DoNotDisturb:
pbUserStatus.Image = Resources.DNDIcon; precenseImage = Resources.DNDIcon;
break; break;
case UserStatus.Offline: case UserStatus.Offline:
pbUserStatus.Image = Resources.OfflineIcon; precenseImage = Resources.OfflineIcon;
break; break;
} }
Bitmap? cosmetic = null;
if(cosmeticRes != null)
{
using var ms = new MemoryStream(cosmeticRes);
cosmetic = new Bitmap(ms);
}
pbUserPfp.Image = _imgFactory.CreateProfileImage(precenseImage, pfp, cosmetic);
precenseImage.Dispose();
pfp?.Dispose();
cosmetic?.Dispose();
if (_userInformationDto.Id == _apiService.CurrentUser!.Id) if (_userInformationDto.Id == _apiService.CurrentUser!.Id)
{ {
btnAddContact.Visible = false; btnAddContact.Visible = false;
@ -153,21 +177,20 @@ namespace qtc_net_client_2.Forms
btnAddContact.Enabled = false; btnAddContact.Enabled = false;
using (var ms = new MemoryStream(Resources.RequestSentIcon)) { btnAddContact.Image = Image.FromStream(ms); ms.Dispose(); } using (var ms = new MemoryStream(Resources.RequestSentIcon)) { btnAddContact.Image = Image.FromStream(ms); ms.Dispose(); }
btnCancelRequest.Visible = true; btnCancelRequest.Visible = true;
await _gatewayService.RefreshContactsForUser(_userInformationDto);
} }
} }
private async void btnAddContact_Click_Remove(object sender, EventArgs e) private async void btnAddContact_Click_Remove(object sender, EventArgs e)
{ {
var msgBoxResult = MessageBox.Show("Are You Sure You Want To Remove This User From Your Contacts?", "Question", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (msgBoxResult == DialogResult.No) return;
var result = await _apiService.RemoveContactFromCurrentUser(_userInformationDto.Id); var result = await _apiService.RemoveContactFromCurrentUser(_userInformationDto.Id);
if (result.Success) if (result.Success)
{ {
btnAddContact.Image = Resources.AddContactIcon; btnAddContact.Image = Resources.AddContactIcon;
btnAddContact.Click += btnAddContact_Click_Add; btnAddContact.Click += btnAddContact_Click_Add;
btnMessage.Visible = false; btnMessage.Visible = false;
await _gatewayService.RefreshContactsForUser(_userInformationDto);
} }
} }
@ -183,13 +206,14 @@ namespace qtc_net_client_2.Forms
btnAddContact.Image = Resources.RemoveContactIcon; btnAddContact.Image = Resources.RemoveContactIcon;
btnAddContact.Click += btnAddContact_Click_Remove; btnAddContact.Click += btnAddContact_Click_Remove;
if (_userInformationDto.Status >= 1) btnMessage.Visible = true; if (_userInformationDto.Status >= 1) btnMessage.Visible = true;
await _gatewayService.RefreshContactsForUser(_userInformationDto);
} }
} }
private async void btnDecline_Click(object sender, EventArgs e) private async void btnDecline_Click(object sender, EventArgs e)
{ {
var msgBoxResult = MessageBox.Show("Are You Sure You Want To Decline This Request?", "Question", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (msgBoxResult == DialogResult.No) return;
var result = await _apiService.RemoveContactFromCurrentUser(_userInformationDto.Id); var result = await _apiService.RemoveContactFromCurrentUser(_userInformationDto.Id);
if (result.Success) if (result.Success)
{ {
@ -199,13 +223,14 @@ namespace qtc_net_client_2.Forms
btnAddContact.Visible = true; btnAddContact.Visible = true;
btnAddContact.Image = Resources.AddContactIcon; btnAddContact.Image = Resources.AddContactIcon;
btnAddContact.Click += btnAddContact_Click_Add; btnAddContact.Click += btnAddContact_Click_Add;
await _gatewayService.RefreshContactsForUser(_userInformationDto);
} }
} }
private async void btnCancelRequest_Click(object sender, EventArgs e) private async void btnCancelRequest_Click(object sender, EventArgs e)
{ {
var msgBoxResult = MessageBox.Show("Are You Sure You Want To Cancel This Request?", "Question", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (msgBoxResult == DialogResult.No) return;
var result = await _apiService.RemoveContactFromCurrentUser(_userInformationDto.Id); var result = await _apiService.RemoveContactFromCurrentUser(_userInformationDto.Id);
if (result.Success) if (result.Success)
{ {
@ -214,8 +239,6 @@ namespace qtc_net_client_2.Forms
btnAddContact.Click += btnAddContact_Click_Add; btnAddContact.Click += btnAddContact_Click_Add;
btnCancelRequest.Visible = false; btnCancelRequest.Visible = false;
await _gatewayService.RefreshContactsForUser(_userInformationDto);
} }
} }

View File

@ -33,6 +33,8 @@
rtxtBio = new RichTextBox(); rtxtBio = new RichTextBox();
lblBio = new Label(); lblBio = new Label();
btnSave = new Button(); btnSave = new Button();
cbCosmetic = new ComboBox();
lblCosmetic = new Label();
SuspendLayout(); SuspendLayout();
// //
// tbUsername // tbUsername
@ -71,7 +73,7 @@
// btnSave // btnSave
// //
btnSave.ForeColor = Color.Black; btnSave.ForeColor = Color.Black;
btnSave.Location = new Point(76, 148); btnSave.Location = new Point(76, 177);
btnSave.Name = "btnSave"; btnSave.Name = "btnSave";
btnSave.Size = new Size(43, 23); btnSave.Size = new Size(43, 23);
btnSave.TabIndex = 4; btnSave.TabIndex = 4;
@ -79,12 +81,32 @@
btnSave.UseVisualStyleBackColor = true; btnSave.UseVisualStyleBackColor = true;
btnSave.Click += btnSave_Click; btnSave.Click += btnSave_Click;
// //
// frmProfileEdit // cbCosmetic
//
cbCosmetic.FormattingEnabled = true;
cbCosmetic.Items.AddRange(new object[] { "(None)" });
cbCosmetic.Location = new Point(76, 148);
cbCosmetic.Name = "cbCosmetic";
cbCosmetic.Size = new Size(121, 23);
cbCosmetic.TabIndex = 5;
//
// lblCosmetic
//
lblCosmetic.AutoSize = true;
lblCosmetic.Location = new Point(21, 151);
lblCosmetic.Name = "lblCosmetic";
lblCosmetic.Size = new Size(53, 15);
lblCosmetic.TabIndex = 6;
lblCosmetic.Text = "Cosmetic";
//
// ProfileEdit
// //
AutoScaleDimensions = new SizeF(6F, 15F); AutoScaleDimensions = new SizeF(6F, 15F);
AutoScaleMode = AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
BackColor = Color.DodgerBlue; BackColor = Color.DodgerBlue;
ClientSize = new Size(345, 187); ClientSize = new Size(345, 208);
Controls.Add(lblCosmetic);
Controls.Add(cbCosmetic);
Controls.Add(btnSave); Controls.Add(btnSave);
Controls.Add(lblBio); Controls.Add(lblBio);
Controls.Add(rtxtBio); Controls.Add(rtxtBio);
@ -95,7 +117,7 @@
FormBorderStyle = FormBorderStyle.FixedDialog; FormBorderStyle = FormBorderStyle.FixedDialog;
MaximizeBox = false; MaximizeBox = false;
MinimizeBox = false; MinimizeBox = false;
Name = "frmProfileEdit"; Name = "ProfileEdit";
StartPosition = FormStartPosition.CenterParent; StartPosition = FormStartPosition.CenterParent;
Text = "QtC.NET Client - Edit Profile"; Text = "QtC.NET Client - Edit Profile";
Load += frmProfileEdit_Load; Load += frmProfileEdit_Load;
@ -110,5 +132,7 @@
private RichTextBox rtxtBio; private RichTextBox rtxtBio;
private Label lblBio; private Label lblBio;
private Button btnSave; private Button btnSave;
private ComboBox cbCosmetic;
private Label lblCosmetic;
} }
} }

View File

@ -1,4 +1,6 @@
using QtCNETAPI.Dtos.User; using Microsoft.AspNetCore.Mvc.TagHelpers;
using qtc_net_client_2.ClientModel;
using QtCNETAPI.Dtos.User;
using QtCNETAPI.Services.ApiService; using QtCNETAPI.Services.ApiService;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
@ -15,22 +17,63 @@ namespace qtc_net_client_2.Forms
public partial class ProfileEdit : Form public partial class ProfileEdit : Form
{ {
IApiService _apiService; IApiService _apiService;
private int currentCosmetic = 0;
public ProfileEdit(IApiService apiService) public ProfileEdit(IApiService apiService)
{ {
_apiService = apiService; _apiService = apiService;
InitializeComponent(); InitializeComponent();
} }
private void frmProfileEdit_Load(object sender, EventArgs e) private async void frmProfileEdit_Load(object sender, EventArgs e)
{ {
tbUsername.Text = _apiService.CurrentUser!.Username; tbUsername.Text = _apiService.CurrentUser.Username;
rtxtBio.Text = _apiService.CurrentUser!.Bio; rtxtBio.Text = _apiService.CurrentUser.Bio;
// get all owned cosmetics
var boughtItems = await _apiService.GetOwnedStoreItems();
List<ComboBoxItem> items = new List<ComboBoxItem>();
if(boughtItems != null && boughtItems.Success && boughtItems.Data != null)
{
items.Add(new ComboBoxItem
{
Name = "(None)",
Value = 0
});
foreach (var item in boughtItems.Data)
{
// get item from the store
var storeItem = await _apiService.GetStoreItem(item.StoreItemId);
if(storeItem != null && storeItem.Success && storeItem.Data != null)
{
var cbi = new ComboBoxItem
{
Name = storeItem.Data.Name,
Value = storeItem.Data.Id
};
items.Add(cbi);
}
}
} else
{
items.Add(new ComboBoxItem
{
Name = "(None)",
Value = 0
});
}
cbCosmetic.DataSource = items;
cbCosmetic.SelectedIndex = cbCosmetic.Items.IndexOf(items.FirstOrDefault(e => (int?)e.Value == _apiService.CurrentUser.ActiveProfileCosmetic));
currentCosmetic = cbCosmetic.Items.IndexOf(items.FirstOrDefault(e => (int?)e.Value == _apiService.CurrentUser.ActiveProfileCosmetic));
} }
private async void btnSave_Click(object sender, EventArgs e) private async void btnSave_Click(object sender, EventArgs e)
{ {
if(!string.IsNullOrEmpty(tbUsername.Text) && (tbUsername.Text != _apiService.CurrentUser!.Username || rtxtBio.Text != _apiService.CurrentUser!.Bio)) ComboBoxItem? selectedItem = (ComboBoxItem?)cbCosmetic.SelectedItem;
{ int selectedItemId = 0;
// update user info // update user info
UserUpdateInformationDto userUpdateInformationDto = new UserUpdateInformationDto UserUpdateInformationDto userUpdateInformationDto = new UserUpdateInformationDto
{ {
@ -40,11 +83,18 @@ namespace qtc_net_client_2.Forms
DateOfBirth = _apiService.CurrentUser.DateOfBirth DateOfBirth = _apiService.CurrentUser.DateOfBirth
}; };
if (selectedItem != null)
{
selectedItemId = (int?)selectedItem.Value ?? 0;
userUpdateInformationDto.ProfileCosmeticId = selectedItemId;
}
var res = await _apiService.UpdateUserInformationAsync(userUpdateInformationDto); var res = await _apiService.UpdateUserInformationAsync(userUpdateInformationDto);
if (res.Success) if (res.Success)
{ {
DialogResult = DialogResult.OK; if (currentCosmetic != selectedItemId) DialogResult = DialogResult.Yes; // trigger ui refresh
else DialogResult = DialogResult.OK;
Close(); Close();
} }
else else
@ -55,5 +105,4 @@ namespace qtc_net_client_2.Forms
} }
} }
} }
}
} }

View File

@ -43,6 +43,7 @@ namespace qtc_net_client_2.Forms
if(registerResult.Success) if(registerResult.Success)
{ {
MessageBox.Show("Registration Complete. If the server has email verification on, you may need to check your email for a verification link.\nIf you do not receive one, try logging in.");
DialogResult = DialogResult.OK; DialogResult = DialogResult.OK;
Close(); Close();
} else } else

View File

@ -0,0 +1,104 @@
namespace qtc_net_client_2.Forms
{
partial class ResendVerificationEmail
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
pbLoginBanner = new PictureBox();
tbEmail = new TextBox();
lblHeader = new Label();
btnSend = new Button();
((System.ComponentModel.ISupportInitialize)pbLoginBanner).BeginInit();
SuspendLayout();
//
// pbLoginBanner
//
pbLoginBanner.Image = Properties.Resources.LoginBanner;
pbLoginBanner.Location = new Point(-4, 0);
pbLoginBanner.Name = "pbLoginBanner";
pbLoginBanner.Size = new Size(521, 99);
pbLoginBanner.SizeMode = PictureBoxSizeMode.StretchImage;
pbLoginBanner.TabIndex = 1;
pbLoginBanner.TabStop = false;
//
// tbEmail
//
tbEmail.Location = new Point(50, 124);
tbEmail.Name = "tbEmail";
tbEmail.Size = new Size(424, 23);
tbEmail.TabIndex = 3;
//
// lblHeader
//
lblHeader.AutoSize = true;
lblHeader.Font = new Font("Segoe UI Light", 9F);
lblHeader.ForeColor = SystemColors.ControlLight;
lblHeader.Location = new Point(54, 106);
lblHeader.Name = "lblHeader";
lblHeader.Size = new Size(412, 15);
lblHeader.TabIndex = 5;
lblHeader.Text = "Please Enter Your Email, If An Account Exists With This Email, We'll Send You A Link";
//
// btnSend
//
btnSend.Location = new Point(224, 153);
btnSend.Name = "btnSend";
btnSend.Size = new Size(75, 23);
btnSend.TabIndex = 6;
btnSend.Text = "Send";
btnSend.UseVisualStyleBackColor = true;
btnSend.Click += btnSend_Click;
//
// ResendVerificationEmail
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
BackColor = Color.DodgerBlue;
ClientSize = new Size(515, 187);
Controls.Add(btnSend);
Controls.Add(lblHeader);
Controls.Add(tbEmail);
Controls.Add(pbLoginBanner);
FormBorderStyle = FormBorderStyle.FixedDialog;
MaximizeBox = false;
MinimizeBox = false;
Name = "ResendVerificationEmail";
StartPosition = FormStartPosition.CenterScreen;
Text = "QtC.NET Client - Resend Verification Email";
((System.ComponentModel.ISupportInitialize)pbLoginBanner).EndInit();
ResumeLayout(false);
PerformLayout();
}
#endregion
private PictureBox pbLoginBanner;
private TextBox tbEmail;
private Label lblHeader;
private Button btnSend;
}
}

View File

@ -0,0 +1,43 @@
using QtCNETAPI.Services.ApiService;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace qtc_net_client_2.Forms
{
public partial class ResendVerificationEmail : Form
{
private IApiService _apiService;
public ResendVerificationEmail(IApiService apiService)
{
_apiService = apiService;
InitializeComponent();
}
private async void btnSend_Click(object sender, EventArgs e)
{
if(!string.IsNullOrEmpty(tbEmail.Text))
{
tbEmail.Enabled = false;
btnSend.Enabled = false;
var result = await _apiService.ResendVerificationEmail(tbEmail.Text);
if(result != null && result.Success && result.Data)
{
MessageBox.Show("Got It! You should receive an email shortly.\nIf you do not receive an email, check your spam.", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
Close();
} else
{
MessageBox.Show("Sorry, This Server Doesn't Have Email Features Enabled Or Something Went Wrong.\nIf you cannot login, you may need to contact the server admin.", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
Close();
}
}
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,221 @@
namespace qtc_net_client_2.Forms
{
partial class ResetPassword
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
pEmailBox = new Panel();
btnSend = new Button();
lblHeader = new Label();
tbEmail = new TextBox();
pResetPasswordBox = new Panel();
btnResetPassword = new Button();
tbConfirmPassword = new TextBox();
lblConfirmPassword = new Label();
tbNewPassword = new TextBox();
lblNewPassword = new Label();
tbToken = new TextBox();
lblToken = new Label();
pbLoginBanner = new PictureBox();
pEmailBox.SuspendLayout();
pResetPasswordBox.SuspendLayout();
((System.ComponentModel.ISupportInitialize)pbLoginBanner).BeginInit();
SuspendLayout();
//
// pEmailBox
//
pEmailBox.Anchor = AnchorStyles.Bottom;
pEmailBox.BorderStyle = BorderStyle.FixedSingle;
pEmailBox.Controls.Add(btnSend);
pEmailBox.Controls.Add(lblHeader);
pEmailBox.Controls.Add(tbEmail);
pEmailBox.Location = new Point(101, 125);
pEmailBox.Name = "pEmailBox";
pEmailBox.Size = new Size(458, 94);
pEmailBox.TabIndex = 0;
//
// btnSend
//
btnSend.Location = new Point(193, 59);
btnSend.Name = "btnSend";
btnSend.Size = new Size(75, 23);
btnSend.TabIndex = 9;
btnSend.Text = "Send";
btnSend.UseVisualStyleBackColor = true;
btnSend.Click += btnSend_Click;
//
// lblHeader
//
lblHeader.AutoSize = true;
lblHeader.Font = new Font("Segoe UI Light", 9F);
lblHeader.ForeColor = SystemColors.ControlLight;
lblHeader.Location = new Point(23, 12);
lblHeader.Name = "lblHeader";
lblHeader.Size = new Size(412, 15);
lblHeader.TabIndex = 8;
lblHeader.Text = "Please Enter Your Email, If An Account Exists With This Email, We'll Send You A Link";
//
// tbEmail
//
tbEmail.Location = new Point(19, 30);
tbEmail.Name = "tbEmail";
tbEmail.Size = new Size(424, 23);
tbEmail.TabIndex = 7;
//
// pResetPasswordBox
//
pResetPasswordBox.Anchor = AnchorStyles.Bottom;
pResetPasswordBox.BorderStyle = BorderStyle.FixedSingle;
pResetPasswordBox.Controls.Add(btnResetPassword);
pResetPasswordBox.Controls.Add(tbConfirmPassword);
pResetPasswordBox.Controls.Add(lblConfirmPassword);
pResetPasswordBox.Controls.Add(tbNewPassword);
pResetPasswordBox.Controls.Add(lblNewPassword);
pResetPasswordBox.Controls.Add(tbToken);
pResetPasswordBox.Controls.Add(lblToken);
pResetPasswordBox.Location = new Point(17, 106);
pResetPasswordBox.Name = "pResetPasswordBox";
pResetPasswordBox.Size = new Size(596, 138);
pResetPasswordBox.TabIndex = 1;
pResetPasswordBox.Visible = false;
//
// btnResetPassword
//
btnResetPassword.Location = new Point(270, 102);
btnResetPassword.Name = "btnResetPassword";
btnResetPassword.Size = new Size(100, 23);
btnResetPassword.TabIndex = 15;
btnResetPassword.Text = "Reset Password";
btnResetPassword.UseVisualStyleBackColor = true;
btnResetPassword.Click += btnResetPassword_Click;
//
// tbConfirmPassword
//
tbConfirmPassword.Location = new Point(123, 73);
tbConfirmPassword.Name = "tbConfirmPassword";
tbConfirmPassword.PasswordChar = '*';
tbConfirmPassword.Size = new Size(424, 23);
tbConfirmPassword.TabIndex = 14;
//
// lblConfirmPassword
//
lblConfirmPassword.AutoSize = true;
lblConfirmPassword.Font = new Font("Segoe UI Light", 9F);
lblConfirmPassword.ForeColor = SystemColors.ControlLight;
lblConfirmPassword.Location = new Point(20, 76);
lblConfirmPassword.Name = "lblConfirmPassword";
lblConfirmPassword.Size = new Size(97, 15);
lblConfirmPassword.TabIndex = 13;
lblConfirmPassword.Text = "Confirm Password";
//
// tbNewPassword
//
tbNewPassword.Location = new Point(123, 44);
tbNewPassword.Name = "tbNewPassword";
tbNewPassword.PasswordChar = '*';
tbNewPassword.Size = new Size(424, 23);
tbNewPassword.TabIndex = 12;
//
// lblNewPassword
//
lblNewPassword.AutoSize = true;
lblNewPassword.Font = new Font("Segoe UI Light", 9F);
lblNewPassword.ForeColor = SystemColors.ControlLight;
lblNewPassword.Location = new Point(36, 47);
lblNewPassword.Name = "lblNewPassword";
lblNewPassword.Size = new Size(81, 15);
lblNewPassword.TabIndex = 11;
lblNewPassword.Text = "New Password";
//
// tbToken
//
tbToken.Location = new Point(123, 15);
tbToken.Name = "tbToken";
tbToken.Size = new Size(424, 23);
tbToken.TabIndex = 10;
//
// lblToken
//
lblToken.AutoSize = true;
lblToken.Font = new Font("Segoe UI Light", 9F);
lblToken.ForeColor = SystemColors.ControlLight;
lblToken.Location = new Point(82, 18);
lblToken.Name = "lblToken";
lblToken.Size = new Size(35, 15);
lblToken.TabIndex = 9;
lblToken.Text = "Token";
//
// pbLoginBanner
//
pbLoginBanner.Image = Properties.Resources.LoginBanner;
pbLoginBanner.Location = new Point(-3, -1);
pbLoginBanner.Name = "pbLoginBanner";
pbLoginBanner.Size = new Size(521, 99);
pbLoginBanner.SizeMode = PictureBoxSizeMode.StretchImage;
pbLoginBanner.TabIndex = 2;
pbLoginBanner.TabStop = false;
//
// ResetPassword
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
BackColor = Color.DodgerBlue;
ClientSize = new Size(622, 256);
Controls.Add(pEmailBox);
Controls.Add(pResetPasswordBox);
Controls.Add(pbLoginBanner);
FormBorderStyle = FormBorderStyle.FixedDialog;
MaximizeBox = false;
MinimizeBox = false;
Name = "ResetPassword";
StartPosition = FormStartPosition.CenterScreen;
Text = "QtC.NET Client - Reset Password";
pEmailBox.ResumeLayout(false);
pEmailBox.PerformLayout();
pResetPasswordBox.ResumeLayout(false);
pResetPasswordBox.PerformLayout();
((System.ComponentModel.ISupportInitialize)pbLoginBanner).EndInit();
ResumeLayout(false);
}
#endregion
private Panel pEmailBox;
private Button btnSend;
private Label lblHeader;
private TextBox tbEmail;
private Panel pResetPasswordBox;
private TextBox tbConfirmPassword;
private Label lblConfirmPassword;
private TextBox tbNewPassword;
private Label lblNewPassword;
private TextBox tbToken;
private Label lblToken;
private Button btnResetPassword;
private PictureBox pbLoginBanner;
}
}

View File

@ -0,0 +1,68 @@
using QtCNETAPI.Services.ApiService;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace qtc_net_client_2.Forms
{
public partial class ResetPassword : Form
{
private IApiService _apiService;
public ResetPassword(IApiService apiService)
{
_apiService = apiService;
InitializeComponent();
}
private async void btnSend_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(tbEmail.Text))
{
tbEmail.Enabled = false;
btnSend.Enabled = false;
var result = await _apiService.SendPasswordResetEmail(tbEmail.Text);
if (result != null && result.Success && result.Data)
{
pEmailBox.Visible = false;
pResetPasswordBox.Visible = true;
MessageBox.Show("Got It! You should receive an email shortly.\nIf you do not receive an email, check your spam.");
}
else
{
MessageBox.Show("Sorry, This Server Doesn't Have Email Features Enabled Or Something Went Wrong.\nIf you cannot login, you may need to contact the server admin.", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
Close();
}
}
}
private async void btnResetPassword_Click(object sender, EventArgs e)
{
if(!string.IsNullOrEmpty(tbToken.Text) && !string.IsNullOrEmpty(tbNewPassword.Text) && !string.IsNullOrEmpty(tbConfirmPassword.Text))
{
tbToken.Enabled = false;
tbNewPassword.Enabled = false;
tbConfirmPassword.Enabled = false;
btnResetPassword.Enabled = false;
var result = await _apiService.ResetPassword(new QtCNETAPI.Dtos.User.UserPasswordResetDto { Token = tbToken.Text, Password = tbNewPassword.Text });
if(result != null && result.Success && result.Data)
{
MessageBox.Show("Your Password Has Been Reset. You may now login with the new password.", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
Close();
} else
{
MessageBox.Show(result?.Message, "", MessageBoxButtons.OK, MessageBoxIcon.Error);
Close();
}
}
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -52,7 +52,7 @@
pStockManagement.Controls.Add(btnSell); pStockManagement.Controls.Add(btnSell);
pStockManagement.Controls.Add(btnBuy); pStockManagement.Controls.Add(btnBuy);
pStockManagement.Controls.Add(lblStockCount); pStockManagement.Controls.Add(lblStockCount);
pStockManagement.Location = new Point(242, 134); pStockManagement.Location = new Point(230, 138);
pStockManagement.Name = "pStockManagement"; pStockManagement.Name = "pStockManagement";
pStockManagement.Size = new Size(135, 81); pStockManagement.Size = new Size(135, 81);
pStockManagement.TabIndex = 3; pStockManagement.TabIndex = 3;
@ -106,7 +106,7 @@
pMarketStatus.Controls.Add(lblMarketStatus); pMarketStatus.Controls.Add(lblMarketStatus);
pMarketStatus.Controls.Add(pbDollarSignRight); pMarketStatus.Controls.Add(pbDollarSignRight);
pMarketStatus.Controls.Add(pbDollarSignLeft); pMarketStatus.Controls.Add(pbDollarSignLeft);
pMarketStatus.Location = new Point(9, 7); pMarketStatus.Location = new Point(3, 7);
pMarketStatus.Name = "pMarketStatus"; pMarketStatus.Name = "pMarketStatus";
pMarketStatus.Size = new Size(586, 100); pMarketStatus.Size = new Size(586, 100);
pMarketStatus.TabIndex = 4; pMarketStatus.TabIndex = 4;
@ -135,7 +135,7 @@
// pbDollarSignRight // pbDollarSignRight
// //
pbDollarSignRight.Image = Properties.Resources.dollar_money; pbDollarSignRight.Image = Properties.Resources.dollar_money;
pbDollarSignRight.Location = new Point(498, 3); pbDollarSignRight.Location = new Point(500, 3);
pbDollarSignRight.Name = "pbDollarSignRight"; pbDollarSignRight.Name = "pbDollarSignRight";
pbDollarSignRight.Size = new Size(83, 94); pbDollarSignRight.Size = new Size(83, 94);
pbDollarSignRight.SizeMode = PictureBoxSizeMode.Zoom; pbDollarSignRight.SizeMode = PictureBoxSizeMode.Zoom;
@ -145,7 +145,7 @@
// pbDollarSignLeft // pbDollarSignLeft
// //
pbDollarSignLeft.Image = Properties.Resources.dollar_money; pbDollarSignLeft.Image = Properties.Resources.dollar_money;
pbDollarSignLeft.Location = new Point(6, 3); pbDollarSignLeft.Location = new Point(3, 3);
pbDollarSignLeft.Name = "pbDollarSignLeft"; pbDollarSignLeft.Name = "pbDollarSignLeft";
pbDollarSignLeft.Size = new Size(83, 94); pbDollarSignLeft.Size = new Size(83, 94);
pbDollarSignLeft.SizeMode = PictureBoxSizeMode.Zoom; pbDollarSignLeft.SizeMode = PictureBoxSizeMode.Zoom;
@ -156,7 +156,7 @@
// //
btnRefresh.Enabled = false; btnRefresh.Enabled = false;
btnRefresh.ForeColor = Color.Black; btnRefresh.ForeColor = Color.Black;
btnRefresh.Location = new Point(282, 109); btnRefresh.Location = new Point(270, 113);
btnRefresh.Name = "btnRefresh"; btnRefresh.Name = "btnRefresh";
btnRefresh.Size = new Size(56, 23); btnRefresh.Size = new Size(56, 23);
btnRefresh.TabIndex = 10; btnRefresh.TabIndex = 10;
@ -169,7 +169,7 @@
AutoScaleDimensions = new SizeF(7F, 15F); AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
BackColor = Color.DodgerBlue; BackColor = Color.DodgerBlue;
ClientSize = new Size(606, 227); ClientSize = new Size(595, 227);
Controls.Add(btnRefresh); Controls.Add(btnRefresh);
Controls.Add(pMarketStatus); Controls.Add(pMarketStatus);
Controls.Add(pStockManagement); Controls.Add(pStockManagement);

View File

@ -44,19 +44,6 @@ namespace qtc_net_client_2.Forms
_apiService.CurrentUser.StockAmount = result.Data.StockAmount; _apiService.CurrentUser.StockAmount = result.Data.StockAmount;
_apiService.CurrentUser.CurrencyAmount = result.Data.CurrencyAmount; _apiService.CurrentUser.CurrencyAmount = result.Data.CurrencyAmount;
Main? mainWindow = (Main?)Application.OpenForms[0];
if (mainWindow != null)
{
if (mainWindow.InvokeRequired)
{
mainWindow.Invoke(mainWindow.RefreshCurrencyCounter);
}
else
{
mainWindow.RefreshCurrencyCounter();
}
}
nudStockBuySellAmount.Enabled = true; nudStockBuySellAmount.Enabled = true;
nudStockBuySellAmount.Value = 0; nudStockBuySellAmount.Value = 0;
btnBuy.Enabled = true; btnBuy.Enabled = true;
@ -95,19 +82,6 @@ namespace qtc_net_client_2.Forms
_apiService.CurrentUser.StockAmount = result.Data.StockAmount; _apiService.CurrentUser.StockAmount = result.Data.StockAmount;
_apiService.CurrentUser.CurrencyAmount = result.Data.CurrencyAmount; _apiService.CurrentUser.CurrencyAmount = result.Data.CurrencyAmount;
Main? mainWindow = (Main?)Application.OpenForms[0];
if (mainWindow != null)
{
if (mainWindow.InvokeRequired)
{
mainWindow.Invoke(mainWindow.RefreshCurrencyCounter);
}
else
{
mainWindow.RefreshCurrencyCounter();
}
}
nudStockBuySellAmount.Enabled = true; nudStockBuySellAmount.Enabled = true;
nudStockBuySellAmount.Value = 0; nudStockBuySellAmount.Value = 0;
btnBuy.Enabled = true; btnBuy.Enabled = true;

View File

@ -0,0 +1,135 @@
namespace qtc_net_client_2.Forms
{
partial class StoreItemDisplay
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(StoreItemDisplay));
pbItemThumbnail = new PictureBox();
lblName = new Label();
lblDescription = new Label();
btnBuy = new Button();
pbCurrencyIcon = new PictureBox();
lblPrice = new Label();
((System.ComponentModel.ISupportInitialize)pbItemThumbnail).BeginInit();
((System.ComponentModel.ISupportInitialize)pbCurrencyIcon).BeginInit();
SuspendLayout();
//
// pbItemThumbnail
//
pbItemThumbnail.Location = new Point(12, 12);
pbItemThumbnail.Name = "pbItemThumbnail";
pbItemThumbnail.Size = new Size(148, 141);
pbItemThumbnail.SizeMode = PictureBoxSizeMode.StretchImage;
pbItemThumbnail.TabIndex = 0;
pbItemThumbnail.TabStop = false;
//
// lblName
//
lblName.AutoSize = true;
lblName.Font = new Font("Segoe UI", 21.75F, FontStyle.Bold | FontStyle.Italic, GraphicsUnit.Point, 0);
lblName.Location = new Point(165, 7);
lblName.Name = "lblName";
lblName.Size = new Size(239, 40);
lblName.TabIndex = 1;
lblName.Text = "Item Name Here";
//
// lblDescription
//
lblDescription.Location = new Point(169, 44);
lblDescription.Name = "lblDescription";
lblDescription.Size = new Size(448, 109);
lblDescription.TabIndex = 2;
lblDescription.Text = resources.GetString("lblDescription.Text");
//
// btnBuy
//
btnBuy.ForeColor = Color.Black;
btnBuy.Location = new Point(542, 157);
btnBuy.Name = "btnBuy";
btnBuy.Size = new Size(75, 23);
btnBuy.TabIndex = 3;
btnBuy.Text = "Buy";
btnBuy.UseVisualStyleBackColor = true;
btnBuy.Click += btnBuy_Click;
//
// pbCurrencyIcon
//
pbCurrencyIcon.Image = Properties.Resources.CurrencyIcon;
pbCurrencyIcon.Location = new Point(48, 161);
pbCurrencyIcon.Name = "pbCurrencyIcon";
pbCurrencyIcon.Size = new Size(15, 14);
pbCurrencyIcon.SizeMode = PictureBoxSizeMode.StretchImage;
pbCurrencyIcon.TabIndex = 19;
pbCurrencyIcon.TabStop = false;
//
// lblPrice
//
lblPrice.AutoEllipsis = true;
lblPrice.Font = new Font("Segoe UI", 8F, FontStyle.Bold, GraphicsUnit.Point, 0);
lblPrice.Location = new Point(64, 162);
lblPrice.Name = "lblPrice";
lblPrice.Size = new Size(61, 13);
lblPrice.TabIndex = 20;
lblPrice.Text = "99,999,999";
//
// StoreItemDisplay
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
BackColor = Color.DodgerBlue;
ClientSize = new Size(629, 188);
Controls.Add(lblPrice);
Controls.Add(pbCurrencyIcon);
Controls.Add(btnBuy);
Controls.Add(lblDescription);
Controls.Add(lblName);
Controls.Add(pbItemThumbnail);
ForeColor = Color.White;
FormBorderStyle = FormBorderStyle.FixedDialog;
MaximizeBox = false;
MinimizeBox = false;
Name = "StoreItemDisplay";
StartPosition = FormStartPosition.CenterScreen;
Text = "QtC.NET Client - Store Item";
Load += StoreItemDisplay_Load;
((System.ComponentModel.ISupportInitialize)pbItemThumbnail).EndInit();
((System.ComponentModel.ISupportInitialize)pbCurrencyIcon).EndInit();
ResumeLayout(false);
PerformLayout();
}
#endregion
private PictureBox pbItemThumbnail;
private Label lblName;
private Label lblDescription;
private Button btnBuy;
private PictureBox pbCurrencyIcon;
private Label lblPrice;
}
}

View File

@ -0,0 +1,99 @@
using QtCNETAPI.Dtos.User;
using QtCNETAPI.Schema;
using QtCNETAPI.Services;
using QtCNETAPI.Services.ApiService;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace qtc_net_client_2.Forms
{
public partial class StoreItemDisplay : Form
{
private StoreItem StoreItem { get; set; }
private LoggingService _loggingService;
private IApiService _apiService;
public StoreItemDisplay(StoreItem item, LoggingService loggingService, IApiService apiService)
{
StoreItem = item;
_loggingService = loggingService;
_apiService = apiService;
InitializeComponent();
}
private async void StoreItemDisplay_Load(object sender, EventArgs e)
{
lblName.Text = StoreItem.Name;
lblDescription.Text = StoreItem.Description;
lblPrice.Text = StoreItem.Price.ToString("N0");
// does the user already own this item?
var ownedItem = await _apiService.GetOwnedStoreItem(StoreItem.Id);
if (ownedItem != null && ownedItem.Success && ownedItem.Data != null)
{
btnBuy.Enabled = false;
btnBuy.Text = "Bought";
}
try
{
using HttpClient client = new();
var response = await client.GetAsync(StoreItem.ThumbnailUrl);
if (response != null && response.IsSuccessStatusCode)
{
using var stream = await response.Content.ReadAsStreamAsync();
Image image = Image.FromStream(stream);
stream.Dispose();
pbItemThumbnail.Image = image;
}
else if (response != null) _loggingService.LogString($"Store Item Thumbnail Could Not Be Loaded Due To Status Code {response.StatusCode}");
else _loggingService.LogString("Store Item Thumbnail Could Not Be Loaded");
client.Dispose();
}
catch (Exception ex)
{
_loggingService.LogString("Store Item Thumbnail Could Not Be Loaded\n" + ex.Message);
}
}
private async void btnBuy_Click(object sender, EventArgs e)
{
Enabled = false;
// attempt to buy item
var ownedStoreItem = await _apiService.BuyStoreItem(StoreItem.Id);
if (ownedStoreItem != null && ownedStoreItem.Success)
{
Enabled = true;
var result = MessageBox.Show($"Successfully Bought '{StoreItem.Name}'! Would You Like To Wear It Now?", "Success!", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (result == DialogResult.Yes)
{
// send an update dto that only updates the current users cosmetic
UserUpdateInformationDto updateDto = new UserUpdateInformationDto
{
Id = _apiService.CurrentUser.Id,
Bio = _apiService.CurrentUser.Bio,
DateOfBirth = _apiService.CurrentUser.DateOfBirth,
Username = _apiService.CurrentUser.Username,
ProfileCosmeticId = StoreItem.Id
};
await _apiService.UpdateUserInformationAsync(updateDto);
DialogResult = DialogResult.Yes;
}
}
else MessageBox.Show("We Weren't Able To Complete Your Purchase.\nYou May Not Have Enough Funds For This Item.", "Oops.", MessageBoxButtons.OK, MessageBoxIcon.Error);
DialogResult = DialogResult.OK;
Close();
}
}
}

View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="lblDescription.Text" xml:space="preserve">
<value>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum</value>
</data>
</root>

View File

@ -0,0 +1,457 @@
namespace qtc_net_client_2
{
partial class TicTacToeGame
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
pBoard = new Panel();
btnSquare9 = new Button();
btnSquare1 = new Button();
btnSquare7 = new Button();
btnSquare8 = new Button();
btnSquare6 = new Button();
btnSquare4 = new Button();
btnSquare5 = new Button();
btnSquare3 = new Button();
btnSquare2 = new Button();
pbBoard = new PictureBox();
pSymbolSelection = new Panel();
btnOSelect = new Button();
btnXSelect = new Button();
label1 = new Label();
pLoading = new Panel();
btnPlayAgain = new Button();
lblPlayAgain = new Label();
lblLoadStatus = new Label();
lblPlayerOne = new Label();
lblP1Username = new Label();
lblP2Username = new Label();
lblPlayerTwo = new Label();
lvUserlist = new ListView();
rtxtChatbox = new RichTextBox();
btnSend = new Button();
rtxtChat = new RichTextBox();
lblJackpotWon = new Label();
pBoard.SuspendLayout();
((System.ComponentModel.ISupportInitialize)pbBoard).BeginInit();
pSymbolSelection.SuspendLayout();
pLoading.SuspendLayout();
SuspendLayout();
//
// pBoard
//
pBoard.Controls.Add(btnSquare9);
pBoard.Controls.Add(btnSquare1);
pBoard.Controls.Add(btnSquare7);
pBoard.Controls.Add(btnSquare8);
pBoard.Controls.Add(btnSquare6);
pBoard.Controls.Add(btnSquare4);
pBoard.Controls.Add(btnSquare5);
pBoard.Controls.Add(btnSquare3);
pBoard.Controls.Add(btnSquare2);
pBoard.Controls.Add(pbBoard);
pBoard.Enabled = false;
pBoard.Location = new Point(30, 18);
pBoard.Name = "pBoard";
pBoard.Size = new Size(541, 474);
pBoard.TabIndex = 0;
//
// btnSquare9
//
btnSquare9.BackgroundImageLayout = ImageLayout.Stretch;
btnSquare9.FlatAppearance.BorderSize = 0;
btnSquare9.FlatStyle = FlatStyle.Flat;
btnSquare9.Location = new Point(374, 341);
btnSquare9.Name = "btnSquare9";
btnSquare9.Size = new Size(99, 90);
btnSquare9.TabIndex = 11;
btnSquare9.UseVisualStyleBackColor = true;
btnSquare9.Click += btnSquareX_Click;
//
// btnSquare1
//
btnSquare1.BackgroundImageLayout = ImageLayout.Stretch;
btnSquare1.FlatAppearance.BorderSize = 0;
btnSquare1.FlatStyle = FlatStyle.Flat;
btnSquare1.Location = new Point(79, 49);
btnSquare1.Name = "btnSquare1";
btnSquare1.Size = new Size(99, 90);
btnSquare1.TabIndex = 4;
btnSquare1.UseVisualStyleBackColor = true;
btnSquare1.Click += btnSquareX_Click;
//
// btnSquare7
//
btnSquare7.BackgroundImageLayout = ImageLayout.Stretch;
btnSquare7.FlatAppearance.BorderSize = 0;
btnSquare7.FlatStyle = FlatStyle.Flat;
btnSquare7.Location = new Point(79, 341);
btnSquare7.Name = "btnSquare7";
btnSquare7.Size = new Size(99, 90);
btnSquare7.TabIndex = 10;
btnSquare7.UseVisualStyleBackColor = true;
btnSquare7.Click += btnSquareX_Click;
//
// btnSquare8
//
btnSquare8.BackgroundImageLayout = ImageLayout.Stretch;
btnSquare8.FlatAppearance.BorderSize = 0;
btnSquare8.FlatStyle = FlatStyle.Flat;
btnSquare8.Location = new Point(229, 341);
btnSquare8.Name = "btnSquare8";
btnSquare8.Size = new Size(99, 90);
btnSquare8.TabIndex = 9;
btnSquare8.UseVisualStyleBackColor = true;
btnSquare8.Click += btnSquareX_Click;
//
// btnSquare6
//
btnSquare6.BackgroundImageLayout = ImageLayout.Stretch;
btnSquare6.FlatAppearance.BorderSize = 0;
btnSquare6.FlatStyle = FlatStyle.Flat;
btnSquare6.Location = new Point(374, 195);
btnSquare6.Name = "btnSquare6";
btnSquare6.Size = new Size(99, 90);
btnSquare6.TabIndex = 8;
btnSquare6.UseVisualStyleBackColor = true;
btnSquare6.Click += btnSquareX_Click;
//
// btnSquare4
//
btnSquare4.BackgroundImageLayout = ImageLayout.Stretch;
btnSquare4.FlatAppearance.BorderSize = 0;
btnSquare4.FlatStyle = FlatStyle.Flat;
btnSquare4.Location = new Point(79, 195);
btnSquare4.Name = "btnSquare4";
btnSquare4.Size = new Size(99, 90);
btnSquare4.TabIndex = 7;
btnSquare4.UseVisualStyleBackColor = true;
btnSquare4.Click += btnSquareX_Click;
//
// btnSquare5
//
btnSquare5.BackgroundImageLayout = ImageLayout.Stretch;
btnSquare5.FlatAppearance.BorderSize = 0;
btnSquare5.FlatStyle = FlatStyle.Flat;
btnSquare5.Location = new Point(229, 195);
btnSquare5.Name = "btnSquare5";
btnSquare5.Size = new Size(99, 90);
btnSquare5.TabIndex = 6;
btnSquare5.UseVisualStyleBackColor = true;
btnSquare5.Click += btnSquareX_Click;
//
// btnSquare3
//
btnSquare3.BackgroundImageLayout = ImageLayout.Stretch;
btnSquare3.FlatAppearance.BorderSize = 0;
btnSquare3.FlatStyle = FlatStyle.Flat;
btnSquare3.Location = new Point(374, 49);
btnSquare3.Name = "btnSquare3";
btnSquare3.Size = new Size(99, 90);
btnSquare3.TabIndex = 5;
btnSquare3.UseVisualStyleBackColor = true;
btnSquare3.Click += btnSquareX_Click;
//
// btnSquare2
//
btnSquare2.BackgroundImageLayout = ImageLayout.Stretch;
btnSquare2.FlatAppearance.BorderSize = 0;
btnSquare2.FlatStyle = FlatStyle.Flat;
btnSquare2.Location = new Point(229, 49);
btnSquare2.Name = "btnSquare2";
btnSquare2.Size = new Size(99, 90);
btnSquare2.TabIndex = 3;
btnSquare2.UseVisualStyleBackColor = true;
btnSquare2.Click += btnSquareX_Click;
//
// pbBoard
//
pbBoard.Image = Properties.Resources.Tic_tac_toe;
pbBoard.Location = new Point(27, 15);
pbBoard.Name = "pbBoard";
pbBoard.Size = new Size(501, 444);
pbBoard.SizeMode = PictureBoxSizeMode.Zoom;
pbBoard.TabIndex = 0;
pbBoard.TabStop = false;
//
// pSymbolSelection
//
pSymbolSelection.BorderStyle = BorderStyle.FixedSingle;
pSymbolSelection.Controls.Add(btnOSelect);
pSymbolSelection.Controls.Add(btnXSelect);
pSymbolSelection.Controls.Add(label1);
pSymbolSelection.Location = new Point(161, 109);
pSymbolSelection.Name = "pSymbolSelection";
pSymbolSelection.Size = new Size(275, 255);
pSymbolSelection.TabIndex = 3;
pSymbolSelection.Visible = false;
//
// btnOSelect
//
btnOSelect.BackgroundImage = Properties.Resources.O;
btnOSelect.BackgroundImageLayout = ImageLayout.Stretch;
btnOSelect.FlatAppearance.BorderSize = 0;
btnOSelect.FlatStyle = FlatStyle.Flat;
btnOSelect.Location = new Point(157, 104);
btnOSelect.Name = "btnOSelect";
btnOSelect.Size = new Size(91, 89);
btnOSelect.TabIndex = 2;
btnOSelect.UseVisualStyleBackColor = true;
btnOSelect.Click += btnOSelect_Click;
//
// btnXSelect
//
btnXSelect.BackgroundImage = Properties.Resources.X;
btnXSelect.BackgroundImageLayout = ImageLayout.Stretch;
btnXSelect.FlatAppearance.BorderSize = 0;
btnXSelect.FlatStyle = FlatStyle.Flat;
btnXSelect.Location = new Point(34, 103);
btnXSelect.Name = "btnXSelect";
btnXSelect.Size = new Size(91, 89);
btnXSelect.TabIndex = 1;
btnXSelect.UseVisualStyleBackColor = true;
btnXSelect.Click += btnXSelect_Click;
//
// label1
//
label1.Font = new Font("Segoe UI", 15F, FontStyle.Bold, GraphicsUnit.Point, 0);
label1.ForeColor = Color.White;
label1.Location = new Point(11, 14);
label1.Name = "label1";
label1.Size = new Size(250, 49);
label1.TabIndex = 0;
label1.Text = "Please Select Symbol";
label1.TextAlign = ContentAlignment.MiddleCenter;
//
// pLoading
//
pLoading.BorderStyle = BorderStyle.FixedSingle;
pLoading.Controls.Add(btnPlayAgain);
pLoading.Controls.Add(lblPlayAgain);
pLoading.Controls.Add(lblLoadStatus);
pLoading.Location = new Point(161, 109);
pLoading.Name = "pLoading";
pLoading.Size = new Size(275, 255);
pLoading.TabIndex = 2;
pLoading.Visible = false;
//
// btnPlayAgain
//
btnPlayAgain.Location = new Point(97, 223);
btnPlayAgain.Name = "btnPlayAgain";
btnPlayAgain.Size = new Size(75, 23);
btnPlayAgain.TabIndex = 2;
btnPlayAgain.Text = "Play Again";
btnPlayAgain.UseVisualStyleBackColor = true;
btnPlayAgain.Visible = false;
btnPlayAgain.Click += btnPlayAgain_Click;
//
// lblPlayAgain
//
lblPlayAgain.ForeColor = Color.White;
lblPlayAgain.Location = new Point(28, 134);
lblPlayAgain.Name = "lblPlayAgain";
lblPlayAgain.Size = new Size(218, 86);
lblPlayAgain.TabIndex = 1;
lblPlayAgain.Text = "If you wish to play with a different user, you can close\r\nthis window and match up again. Otherwise click\r\n\"Play Again\"";
lblPlayAgain.TextAlign = ContentAlignment.MiddleCenter;
lblPlayAgain.Visible = false;
//
// lblLoadStatus
//
lblLoadStatus.Font = new Font("Segoe UI", 21.75F, FontStyle.Bold, GraphicsUnit.Point, 0);
lblLoadStatus.ForeColor = Color.White;
lblLoadStatus.Location = new Point(11, 4);
lblLoadStatus.Name = "lblLoadStatus";
lblLoadStatus.Size = new Size(250, 130);
lblLoadStatus.TabIndex = 0;
lblLoadStatus.Text = "Text";
lblLoadStatus.TextAlign = ContentAlignment.MiddleCenter;
//
// lblPlayerOne
//
lblPlayerOne.Font = new Font("Segoe UI", 12F, FontStyle.Bold | FontStyle.Italic);
lblPlayerOne.ForeColor = Color.White;
lblPlayerOne.Location = new Point(30, 501);
lblPlayerOne.Name = "lblPlayerOne";
lblPlayerOne.Size = new Size(29, 23);
lblPlayerOne.TabIndex = 2;
lblPlayerOne.Text = "P1";
//
// lblP1Username
//
lblP1Username.AutoSize = true;
lblP1Username.Font = new Font("Segoe UI", 15F, FontStyle.Bold | FontStyle.Italic);
lblP1Username.ForeColor = Color.White;
lblP1Username.Location = new Point(26, 519);
lblP1Username.Name = "lblP1Username";
lblP1Username.Size = new Size(105, 28);
lblP1Username.TabIndex = 3;
lblP1Username.Text = "Username";
//
// lblP2Username
//
lblP2Username.AutoSize = true;
lblP2Username.Font = new Font("Segoe UI", 15F, FontStyle.Bold | FontStyle.Italic);
lblP2Username.ForeColor = Color.White;
lblP2Username.Location = new Point(466, 519);
lblP2Username.Name = "lblP2Username";
lblP2Username.Size = new Size(105, 28);
lblP2Username.TabIndex = 5;
lblP2Username.Text = "Username";
lblP2Username.TextAlign = ContentAlignment.MiddleRight;
//
// lblPlayerTwo
//
lblPlayerTwo.Font = new Font("Segoe UI", 12F, FontStyle.Bold | FontStyle.Italic);
lblPlayerTwo.ForeColor = Color.White;
lblPlayerTwo.Location = new Point(540, 501);
lblPlayerTwo.Name = "lblPlayerTwo";
lblPlayerTwo.Size = new Size(29, 23);
lblPlayerTwo.TabIndex = 4;
lblPlayerTwo.Text = "P2";
//
// lvUserlist
//
lvUserlist.Alignment = ListViewAlignment.Left;
lvUserlist.Location = new Point(577, 48);
lvUserlist.MultiSelect = false;
lvUserlist.Name = "lvUserlist";
lvUserlist.Size = new Size(309, 211);
lvUserlist.TabIndex = 6;
lvUserlist.UseCompatibleStateImageBehavior = false;
lvUserlist.View = View.SmallIcon;
//
// rtxtChatbox
//
rtxtChatbox.Location = new Point(577, 497);
rtxtChatbox.Name = "rtxtChatbox";
rtxtChatbox.Size = new Size(230, 49);
rtxtChatbox.TabIndex = 8;
rtxtChatbox.Text = "";
rtxtChatbox.KeyDown += rtxtChatbox_KeyDown;
//
// btnSend
//
btnSend.BackgroundImage = Properties.Resources.SendIcon;
btnSend.BackgroundImageLayout = ImageLayout.Zoom;
btnSend.FlatAppearance.BorderSize = 0;
btnSend.FlatStyle = FlatStyle.Flat;
btnSend.Location = new Point(811, 497);
btnSend.Name = "btnSend";
btnSend.Size = new Size(75, 50);
btnSend.TabIndex = 9;
btnSend.UseVisualStyleBackColor = true;
btnSend.Click += btnSend_Click;
//
// rtxtChat
//
rtxtChat.Font = new Font("Segoe UI", 10F);
rtxtChat.HideSelection = false;
rtxtChat.Location = new Point(577, 265);
rtxtChat.Name = "rtxtChat";
rtxtChat.ReadOnly = true;
rtxtChat.Size = new Size(309, 227);
rtxtChat.TabIndex = 10;
rtxtChat.Text = "";
//
// lblJackpotWon
//
lblJackpotWon.AutoSize = true;
lblJackpotWon.Font = new Font("Segoe UI", 12F, FontStyle.Bold | FontStyle.Italic);
lblJackpotWon.ForeColor = Color.Blue;
lblJackpotWon.Location = new Point(744, 18);
lblJackpotWon.Name = "lblJackpotWon";
lblJackpotWon.Size = new Size(142, 21);
lblJackpotWon.TabIndex = 11;
lblJackpotWon.Text = "3 Wins = Jackpot!";
//
// TicTacToeGame
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
BackColor = Color.DodgerBlue;
ClientSize = new Size(898, 558);
Controls.Add(lblJackpotWon);
Controls.Add(rtxtChat);
Controls.Add(btnSend);
Controls.Add(rtxtChatbox);
Controls.Add(lvUserlist);
Controls.Add(lblP2Username);
Controls.Add(lblPlayerTwo);
Controls.Add(lblP1Username);
Controls.Add(lblPlayerOne);
Controls.Add(pLoading);
Controls.Add(pSymbolSelection);
Controls.Add(pBoard);
FormBorderStyle = FormBorderStyle.FixedDialog;
MaximizeBox = false;
Name = "TicTacToeGame";
StartPosition = FormStartPosition.CenterScreen;
Text = "QtC.NET qGame - qTic-Tac-Toe";
FormClosed += TicTacToeGame_FormClosed;
Load += Main_Load;
pBoard.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)pbBoard).EndInit();
pSymbolSelection.ResumeLayout(false);
pLoading.ResumeLayout(false);
ResumeLayout(false);
PerformLayout();
}
#endregion
private Panel pBoard;
private PictureBox pbBoard;
private Button btnSquare9;
private Button btnSquare7;
private Button btnSquare8;
private Button btnSquare6;
private Button btnSquare4;
private Button btnSquare5;
private Button btnSquare3;
private Button btnSquare1;
private Button btnSquare2;
private Panel pLoading;
private Label lblLoadStatus;
private Label lblPlayerOne;
private Label lblP1Username;
private Label lblP2Username;
private Label lblPlayerTwo;
private Panel pSymbolSelection;
private Button btnOSelect;
private Button btnXSelect;
private Label label1;
private ListView lvUserlist;
private RichTextBox rtxtChatbox;
private Button btnSend;
private Label lblPlayAgain;
private Button btnPlayAgain;
private RichTextBox rtxtChat;
private Label lblJackpotWon;
}
}

View File

@ -0,0 +1,520 @@
using Microsoft.AspNetCore.SignalR.Client;
using qtc_net_client_2.Forms;
using qtc_net_client_2.Services;
using QtCNETAPI.Enums;
using QtCNETAPI.Models;
using QtCNETAPI.Schema;
using QtCNETAPI.Services.ApiService;
using System.Threading.Tasks;
using qtc_net_client_2.ClientModel;
namespace qtc_net_client_2
{
public partial class TicTacToeGame : Form
{
private HubConnection? GameHubConnection { get; set; }
private GameRoom? CurrentRoom { get; set; }
private IApiService _apiService;
private Config _config;
private AudioService _audioService = new();
private int WinCount { get; set; }
private bool JackpotWon { get; set; } = false;
public TicTacToeGame(IApiService apiService, Config config)
{
_apiService = apiService;
_config = config;
InitializeComponent();
}
private async void Main_Load(object sender, EventArgs e)
{
// first, connect to the game hub
GameHubConnection = new HubConnectionBuilder()
.WithUrl($"{_config.ServerUrl}/tttgame", options =>
{
options.AccessTokenProvider = () => Task.FromResult(_apiService.SessionToken)!;
})
.WithAutomaticReconnect()
.Build();
pLoading.Visible = true;
lblLoadStatus.Text = "Connecting\nTo\nHub...";
GameHubConnection.On<GameRoom>("WaitingForPlayer", (room) =>
{
CurrentRoom = room;
BeginInvoke(delegate ()
{
if (room.Player1 != null)
{
lblP1Username.Text = room.Player1.Username;
lvUserlist.Items.Add(room.Player1.Id, room.Player1.Username, room.Player1.Status);
}
lblLoadStatus.Text = "Waiting\nFor\nPlayer...";
});
});
GameHubConnection.On<GameRoom>("GameStart", (room) =>
{
CurrentRoom = room;
BeginInvoke(delegate ()
{
pLoading.Visible = false;
pSymbolSelection.Visible = false;
});
});
GameHubConnection.On<GameRoom, string?>("GameEnd", (room, usernameDisconnected) =>
{
CurrentRoom = room;
BeginInvoke(delegate ()
{
if (room.Player1 == null) lblP1Username.Text = "Username";
if (room.Player2 == null) lblP2Username.Text = "Username";
ToggleBoardControl(false);
switch (room.Status)
{
case GameStatus.P1Win:
{
if (_apiService.CurrentUser.Id == room.Player1?.Id)
{
lblLoadStatus.Text = "You Won!";
WinCount++;
if (WinCount >= 3)
{
JackpotWon = true;
lblJackpotWon.Text = "You Won A Spin!";
}
}
else lblLoadStatus.Text = "You Lost!";
lblPlayAgain.Visible = true;
btnPlayAgain.Visible = true;
break;
}
case GameStatus.P2Win:
{
if (_apiService.CurrentUser.Id == room.Player2?.Id)
{
lblLoadStatus.Text = "You Won!";
WinCount++;
if (WinCount >= 3)
{
JackpotWon = true;
lblJackpotWon.Text = "You Won A Spin!";
}
}
else lblLoadStatus.Text = "You Lost!";
lblPlayAgain.Visible = true;
btnPlayAgain.Visible = true;
break;
}
case GameStatus.PlayerDisconnected:
{
if (!string.IsNullOrEmpty(usernameDisconnected))
lblLoadStatus.Text = $"Game Ended.\nUser {usernameDisconnected}\nDisconnected.";
lblPlayAgain.Visible = false;
btnPlayAgain.Visible = false;
break;
}
case GameStatus.NoWin:
lblLoadStatus.Text = "It's a draw!";
lblPlayAgain.Visible = true;
btnPlayAgain.Visible = true;
break;
}
pLoading.Visible = true;
});
});
GameHubConnection.On<GameRoom>("RestartGame", (room) =>
{
CurrentRoom = room;
BeginInvoke(delegate ()
{
if (pLoading.Visible) pLoading.Visible = false;
});
ClearBoard();
ToggleBoardControl(true);
BeginInvoke(delegate ()
{
List<Button> buttons = [btnSquare1, btnSquare2, btnSquare3, btnSquare4, btnSquare5, btnSquare6, btnSquare7, btnSquare8, btnSquare9];
foreach (Button button in buttons)
{
if (button.BackgroundImage == null)
button.Enabled = true;
}
});
});
GameHubConnection.On<GameRoom>("SelectSymbol", (room) =>
{
CurrentRoom = room;
BeginInvoke(delegate ()
{
if (room.Player1 != null)
{
lblP1Username.Text = room.Player1.Username;
if (!lvUserlist.Items.ContainsKey(room.Player1.Id)) lvUserlist.Items.Add(room.Player1.Id, room.Player1.Username, room.Player1.Status);
}
if (room.Player2 != null)
{
lblP2Username.Text = room.Player2.Username;
if (!lvUserlist.Items.ContainsKey(room.Player2.Id)) lvUserlist.Items.Add(room.Player2.Id, room.Player2.Username, room.Player2.Status);
}
if (pLoading.Visible) pLoading.Visible = false;
pSymbolSelection.Visible = true;
pBoard.Enabled = true;
ToggleAllSquareButtons(false);
});
});
GameHubConnection.On<GameRoom>("SelectingSymbol", (room) =>
{
CurrentRoom = room;
BeginInvoke(delegate ()
{
if (pSymbolSelection.Visible) return;
if (room.Player1 != null)
{
lblP1Username.Text = room.Player1.Username;
if (!lvUserlist.Items.ContainsKey(room.Player1.Id)) lvUserlist.Items.Add(room.Player1.Id, room.Player1.Username, room.Player1.Status);
}
if (room.Player2 != null)
{
lblP2Username.Text = room.Player2.Username;
if (!lvUserlist.Items.ContainsKey(room.Player2.Id)) lvUserlist.Items.Add(room.Player2.Id, room.Player2.Username, room.Player2.Status);
}
pLoading.Visible = true;
lblLoadStatus.Text = $"Player 1\nIs Selecting\nSymbol...";
});
});
GameHubConnection.On<GameRoom, TicTacToeMove>("UpdateBoard", (room, move) =>
{
CurrentRoom = room;
UpdateBoardUI(move);
});
GameHubConnection.On<GameRoom>("StartTurn", (room) =>
{
CurrentRoom = room;
ToggleBoardControl(true);
AddChatMessage("[SERVER] Your Turn!");
});
GameHubConnection.On<GameRoom>("EndTurn", (room) =>
{
CurrentRoom = room;
ToggleBoardControl(false);
AddChatMessage("[SERVER] Other Players Turn");
});
GameHubConnection.On<string>("ReceiveMessage", (msg) =>
{
AddChatMessage(msg);
if (msg.Split('[')[1] != _apiService.CurrentUser.Username)
_audioService.PlaySoundEffect("sndMessage");
});
try { await GameHubConnection.StartAsync(); }
catch (HttpRequestException ex)
{
MessageBox.Show($"Sorry, We Couldn't Connect To The Game Server Due To An Error. Please Try Again Later.\n\n{ex.Message}", "Oops.", MessageBoxButtons.OK, MessageBoxIcon.Error);
Environment.Exit(0);
}
lblLoadStatus.Text = "Finding\nRoom...";
await GameHubConnection.SendAsync("FindRoom");
}
private async void TicTacToeGame_FormClosed(object sender, FormClosedEventArgs e)
{
if (GameHubConnection != null && GameHubConnection.State == HubConnectionState.Connected)
{
if(JackpotWon)
{
// start a jackpot spin
CurrencyJackpotSpinner currencyJackpotSpinner = new CurrencyJackpotSpinner();
var dialogResult = currencyJackpotSpinner.ShowDialog();
if (dialogResult == DialogResult.OK)
{
await _apiService.AddCurrencyToCurrentUser(currencyJackpotSpinner.TokensWon, false);
_apiService.CurrentUser.CurrencyAmount += currencyJackpotSpinner.TokensWon;
}
}
// stop and dispose connection
await GameHubConnection.StopAsync();
await GameHubConnection.DisposeAsync();
GameHubConnection = null;
}
}
private async void btnXSelect_Click(object sender, EventArgs e) => await SelectSymbol(TicTacToeSymbol.X);
private async void btnOSelect_Click(object sender, EventArgs e) => await SelectSymbol(TicTacToeSymbol.O);
private async void btnPlayAgain_Click(object sender, EventArgs e)
{
if (GameHubConnection != null && GameHubConnection.State == HubConnectionState.Connected && CurrentRoom != null)
{
await GameHubConnection.SendAsync("RestartGame", CurrentRoom.Id);
}
}
private async void btnSquareX_Click(object sender, EventArgs e)
{
// create move
TicTacToeMove move = new TicTacToeMove
{
User = _apiService.CurrentUser
};
if (sender is Button btn)
{
switch (btn.Name)
{
case "btnSquare1":
move.Point = 1;
break;
case "btnSquare2":
move.Point = 2;
break;
case "btnSquare3":
move.Point = 3;
break;
case "btnSquare4":
move.Point = 4;
break;
case "btnSquare5":
move.Point = 5;
break;
case "btnSquare6":
move.Point = 6;
break;
case "btnSquare7":
move.Point = 7;
break;
case "btnSquare8":
move.Point = 8;
break;
case "btnSquare9":
move.Point = 9;
break;
}
}
// send move
if (GameHubConnection != null && GameHubConnection.State == HubConnectionState.Connected && CurrentRoom != null)
await GameHubConnection.SendAsync("MakeMove", CurrentRoom.Id, move);
}
private async void btnSend_Click(object sender, EventArgs e)
{
if ((GameHubConnection != null && GameHubConnection.State == HubConnectionState.Connected && CurrentRoom != null) &&
!string.IsNullOrWhiteSpace(rtxtChatbox.Text))
{
await GameHubConnection.SendAsync("SendRoomMessage", CurrentRoom.Id, $"[{_apiService.CurrentUser.Username}] {rtxtChatbox.Text}");
_audioService.PlaySoundEffect("sndSendClick");
rtxtChatbox.Clear();
}
}
private void rtxtChatbox_KeyDown(object sender, KeyEventArgs e)
{
if(e.KeyCode == Keys.Enter)
btnSend_Click(sender, e);
}
private void ToggleBoardControl(bool toggle)
{
if (IsHandleCreated && !IsDisposed)
{
Invoke(delegate ()
{
pBoard.Enabled = toggle;
});
}
}
private void ToggleAllSquareButtons(bool toggle)
{
if (IsHandleCreated && !IsDisposed)
{
Invoke(delegate ()
{
List<Button> buttons = [btnSquare1, btnSquare2, btnSquare3, btnSquare4, btnSquare5, btnSquare6, btnSquare7, btnSquare8, btnSquare9];
foreach (Button button in buttons)
button.Enabled = toggle;
});
}
}
private async Task SelectSymbol(TicTacToeSymbol symbol)
{
if (GameHubConnection != null && GameHubConnection.State == HubConnectionState.Connected && CurrentRoom != null)
{
await GameHubConnection.SendAsync("SetSymbol", CurrentRoom.Id, symbol);
ToggleAllSquareButtons(true);
}
}
private void UpdateBoardUI(TicTacToeMove move)
{
if (IsHandleCreated && !IsDisposed && CurrentRoom != null)
{
// play move made sound
_audioService.PlaySoundEffect("sndTTTMoveMade");
Invoke(delegate ()
{
switch (CurrentRoom.Board.Square1)
{
case TicTacToeSymbol.X:
btnSquare1.BackgroundImage = Properties.Resources.X;
btnSquare1.Enabled = false;
break;
case TicTacToeSymbol.O:
btnSquare1.BackgroundImage = Properties.Resources.O;
btnSquare1.Enabled = false;
break;
}
switch (CurrentRoom.Board.Square2)
{
case TicTacToeSymbol.X:
btnSquare2.BackgroundImage = Properties.Resources.X;
btnSquare2.Enabled = false;
break;
case TicTacToeSymbol.O:
btnSquare2.BackgroundImage = Properties.Resources.O;
btnSquare2.Enabled = false;
break;
}
switch (CurrentRoom.Board.Square3)
{
case TicTacToeSymbol.X:
btnSquare3.BackgroundImage = Properties.Resources.X;
btnSquare3.Enabled = false;
break;
case TicTacToeSymbol.O:
btnSquare3.BackgroundImage = Properties.Resources.O;
btnSquare3.Enabled = false;
break;
}
switch (CurrentRoom.Board.Square4)
{
case TicTacToeSymbol.X:
btnSquare4.BackgroundImage = Properties.Resources.X;
btnSquare4.Enabled = false;
break;
case TicTacToeSymbol.O:
btnSquare4.BackgroundImage = Properties.Resources.O;
btnSquare4.Enabled = false;
break;
}
switch (CurrentRoom.Board.Square5)
{
case TicTacToeSymbol.X:
btnSquare5.BackgroundImage = Properties.Resources.X;
btnSquare5.Enabled = false;
break;
case TicTacToeSymbol.O:
btnSquare5.BackgroundImage = Properties.Resources.O;
btnSquare5.Enabled = false;
break;
}
switch (CurrentRoom.Board.Square6)
{
case TicTacToeSymbol.X:
btnSquare6.BackgroundImage = Properties.Resources.X;
btnSquare6.Enabled = false;
break;
case TicTacToeSymbol.O:
btnSquare6.BackgroundImage = Properties.Resources.O;
btnSquare6.Enabled = false;
break;
}
switch (CurrentRoom.Board.Square7)
{
case TicTacToeSymbol.X:
btnSquare7.BackgroundImage = Properties.Resources.X;
btnSquare7.Enabled = false;
break;
case TicTacToeSymbol.O:
btnSquare7.BackgroundImage = Properties.Resources.O;
btnSquare7.Enabled = false;
break;
}
switch (CurrentRoom.Board.Square8)
{
case TicTacToeSymbol.X:
btnSquare8.BackgroundImage = Properties.Resources.X;
btnSquare8.Enabled = false;
break;
case TicTacToeSymbol.O:
btnSquare8.BackgroundImage = Properties.Resources.O;
btnSquare8.Enabled = false;
break;
}
switch (CurrentRoom.Board.Square9)
{
case TicTacToeSymbol.X:
btnSquare9.BackgroundImage = Properties.Resources.X;
btnSquare9.Enabled = false;
break;
case TicTacToeSymbol.O:
btnSquare9.BackgroundImage = Properties.Resources.O;
btnSquare9.Enabled = false;
break;
}
});
}
}
private void AddChatMessage(string msg)
{
if (IsHandleCreated && !IsDisposed)
{
Invoke(delegate ()
{
rtxtChat.AppendText($"{msg}\n");
});
}
}
private void ClearBoard()
{
if (IsHandleCreated && !IsDisposed)
{
Invoke(delegate ()
{
List<Button> buttons = [btnSquare1, btnSquare2, btnSquare3, btnSquare4, btnSquare5, btnSquare6, btnSquare7, btnSquare8, btnSquare9];
foreach (Button button in buttons)
button.BackgroundImage = null;
});
}
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -1,5 +1,6 @@
using qtc_net_client_2.ClientModel; using qtc_net_client_2.ClientModel;
using qtc_net_client_2.Services; using qtc_net_client_2.Services;
using QtCNETAPI.Services;
using QtCNETAPI.Services.ApiService; using QtCNETAPI.Services.ApiService;
using QtCNETAPI.Services.GatewayService; using QtCNETAPI.Services.GatewayService;
using System.Text.Json; using System.Text.Json;
@ -23,8 +24,7 @@ namespace qtc_net_client_2
if(System.Diagnostics.Debugger.IsAttached) if(System.Diagnostics.Debugger.IsAttached)
{ {
// use localhost // use localhost
clientConfig.ApiEndpoint = "http://localhost:5268/api"; clientConfig.ServerUrl = "http://localhost:5268";
clientConfig.GatewayEndpoint = "http://localhost:5268/chat";
} }
// find config file // find config file
@ -53,8 +53,8 @@ namespace qtc_net_client_2
// instantiate new ApiService and GatewayService for this session // instantiate new ApiService and GatewayService for this session
// this will keep the gateway thread in the main thread (i think) // this will keep the gateway thread in the main thread (i think)
IApiService api = new ApiService(clientConfig.ApiEndpoint); IApiService api = new ApiService($"{clientConfig.ServerUrl}/api", loggingService);
IGatewayService gateway = new GatewayService(clientConfig.GatewayEndpoint, api); IGatewayService gateway = new GatewayService($"{clientConfig.ServerUrl}/chat", api, loggingService);
// ping api // ping api
var pingResult = await api.PingServerAsync(); var pingResult = await api.PingServerAsync();

View File

@ -19,7 +19,7 @@ namespace qtc_net_client_2.Properties {
// class via a tool like ResGen or Visual Studio. // class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen // To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project. // with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "18.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources { internal class Resources {
@ -81,7 +81,7 @@ namespace qtc_net_client_2.Properties {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to 5.0. /// Looks up a localized string similar to 6.5.5.
/// </summary> /// </summary>
internal static string AssemblyVersion { internal static string AssemblyVersion {
get { get {
@ -109,6 +109,16 @@ namespace qtc_net_client_2.Properties {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap cobalt_sittingatputer {
get {
object obj = ResourceManager.GetObject("cobalt_sittingatputer", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>
@ -159,6 +169,16 @@ namespace qtc_net_client_2.Properties {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap donatebtn {
get {
object obj = ResourceManager.GetObject("donatebtn", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>
@ -189,6 +209,16 @@ namespace qtc_net_client_2.Properties {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap O {
get {
object obj = ResourceManager.GetObject("O", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>
@ -239,6 +269,16 @@ namespace qtc_net_client_2.Properties {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap RoomsChatIcon {
get {
object obj = ResourceManager.GetObject("RoomsChatIcon", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>
@ -248,5 +288,35 @@ namespace qtc_net_client_2.Properties {
return ((System.Drawing.Bitmap)(obj)); return ((System.Drawing.Bitmap)(obj));
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap support_me_on_kofi_badge_blue {
get {
object obj = ResourceManager.GetObject("support_me_on_kofi_badge_blue", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Tic_tac_toe {
get {
object obj = ResourceManager.GetObject("Tic-tac-toe", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap X {
get {
object obj = ResourceManager.GetObject("X", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
} }
} }

View File

@ -124,15 +124,21 @@
<data name="SendIcon" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="SendIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Icons\SendIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Icons\SendIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="X" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\X.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="left-horn-animated" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="left-horn-animated" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Anims\left-horn-animated.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Anims\left-horn-animated.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="DefaultPfp" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\DefaultPfp.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="OfflineIcon" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="OfflineIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Icons\OfflineIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Icons\OfflineIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="dollar-money" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Anims\dollar-money.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Tic-tac-toe" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Tic-tac-toe1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="OnlineIcon" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="OnlineIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Icons\OnlineIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Icons\OnlineIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
@ -154,6 +160,12 @@
<data name="RequestSentIcon" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="RequestSentIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Icons\RequestSentIcon.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>..\Icons\RequestSentIcon.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="support_me_on_kofi_badge_blue" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\support_me_on_kofi_badge_blue.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="O" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\O.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="RemoveContactIcon" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="RemoveContactIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Icons\RemoveContactIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Icons\RemoveContactIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
@ -161,7 +173,10 @@
<value>..\Icons\MessageIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Icons\MessageIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="AssemblyVersion" xml:space="preserve"> <data name="AssemblyVersion" xml:space="preserve">
<value>5.0</value> <value>6.5.5</value>
</data>
<data name="cobalt_sittingatputer" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\cobalt_sittingatputer.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="LoginBanner" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="LoginBanner" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\LoginBanner.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\LoginBanner.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -169,10 +184,16 @@
<data name="DeclineContactIcon" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="DeclineContactIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Icons\DeclineContactIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Icons\DeclineContactIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="donatebtn" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\donatebtn.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="AcceptContactIcon" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="AcceptContactIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Icons\AcceptContactIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Icons\AcceptContactIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="dollar-money" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="DefaultPfp" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Anims\dollar-money.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\DefaultPfp.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="RoomsChatIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Icons\RoomsChatIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
</root> </root>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -0,0 +1,40 @@
using qtc_net_client_2.Properties;
using System;
using System.Collections.Generic;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace qtc_net_client_2.Services
{
public class ImageFactory
{
public Bitmap CreateProfileImage(Bitmap? precenseImage = null, Bitmap? pfp = null, Bitmap? cosmetic = null)
{
Bitmap combined = new Bitmap(139, 138);
using Graphics g = Graphics.FromImage(combined);
g.Clear(Color.Transparent);
g.CompositingMode = CompositingMode.SourceOver;
pfp ??= Resources.DefaultPfp;
g.DrawImage(pfp, 4, 6, 128, 128);
if (cosmetic != null)
{
cosmetic.MakeTransparent();
g.DrawImage(cosmetic, 0, 0, 139, 138);
}
if(precenseImage != null)
{
precenseImage.MakeTransparent();
g.DrawImage(precenseImage, 104, 0, 35, 35);
}
return combined;
}
}
}

View File

@ -1,52 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
using System.Text.Json;
namespace qtc_net_client_2.Services
{
public class LoggingService : IDisposable
{
private DateTime LogDate { get; set; }
private string LogFilePath { get; set; }
private StreamWriter LogFile { get; set; }
public LoggingService()
{
LogDate = DateTime.Now;
LogFilePath = $"./Logs/QtCClientLog_{LogDate.ToString("ddMMyyy-hhmm")}.log";
// create log file
if (!Directory.Exists("./Logs")) Directory.CreateDirectory("./Logs");
LogFile = new StreamWriter(File.Create(LogFilePath));
Debug.WriteLine($"Log File Created At {LogFilePath}");
}
public void LogString(string message)
{
Debug.WriteLine($"({DateTime.Now.ToLocalTime().ToString("hh:mm")}) {message}");
LogFile.WriteLine($"({DateTime.Now.ToLocalTime().ToString("hh:mm")}) {message}");
}
public void LogModel<T>(T model)
{
// serialize the model as json
string modelSerialized = JsonSerializer.Serialize(model, options: new JsonSerializerOptions { WriteIndented = true });
// log it
Debug.WriteLine($"({DateTime.Now.ToLocalTime().ToString("hh:mm")}) {modelSerialized}");
LogFile.WriteLine($"({DateTime.Now.ToLocalTime().ToString("hh:mm")}) {modelSerialized}");
}
public void Dispose()
{
LogFile.WriteLine("--- END OF LOG ---");
LogFile.Close();
LogFile.Dispose();
}
}
}

View File

@ -68,6 +68,9 @@ namespace qtc_net_client_2.Services
try try
{ {
// if bak file already exists, delete it
if (File.Exists($"/{updateInfo.ClientFileName}.bak")) File.Delete($"/{updateInfo.ClientFileName}.bak");
// move old client to backup file // move old client to backup file
File.Move($"./{updateInfo.ClientFileName}", $"{updateInfo.ClientFileName}.bak"); File.Move($"./{updateInfo.ClientFileName}", $"{updateInfo.ClientFileName}.bak");

Binary file not shown.

View File

@ -62,6 +62,9 @@
<None Update="Sounds\sndTokenWin.wav"> <None Update="Sounds\sndTokenWin.wav">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Update="Sounds\sndTTTMoveMade.wav">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup> </ItemGroup>
</Project> </Project>