diff --git a/WD7UVN_HFT_2023241.Client/RestService.cs b/WD7UVN_HFT_2023241.Client/Shared/RestService.cs similarity index 96% rename from WD7UVN_HFT_2023241.Client/RestService.cs rename to WD7UVN_HFT_2023241.Client/Shared/RestService.cs index 21c29f6..46d5e0a 100644 --- a/WD7UVN_HFT_2023241.Client/RestService.cs +++ b/WD7UVN_HFT_2023241.Client/Shared/RestService.cs @@ -1,265 +1,265 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; -using System.Net.Http; -using System.Net.Security; -using WD7UVN_HFT_2023241.Models; - -namespace WD7UVN_HFT_2023241.Client -{ - class RestService - { - private static HttpClient client; - - private static bool Ping(string url) - { - try - { - ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(delegate { return true; }); - - WebClient wc = new WebClient(); - wc.DownloadData(url); - return true; - } - catch - { - return false; - } - } - - public static void Init(string baseurl = "https://localhost:5001", string pingableEndpoint = "/swagger") - { - int tries = 0; - bool isOk = false; - do - { - isOk = Ping(baseurl + pingableEndpoint); - tries++; - } while (isOk == false && tries < 5); - - if (isOk == false) - { - throw new EndpointNotAvailableException("Endpoint is not available!"); - } - - HttpClientHandler handler = new HttpClientHandler(); - handler.ClientCertificateOptions = ClientCertificateOption.Manual; - handler.ServerCertificateCustomValidationCallback = - (httpRequestMessage, cert, cetChain, policyErrors) => - { - return true; - }; - - client = new HttpClient(handler); - client.BaseAddress = new Uri(baseurl); - client.DefaultRequestHeaders.Accept.Clear(); - client.DefaultRequestHeaders.Accept.Add( - new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue - ("application/json")); - try - { - client.GetAsync("").GetAwaiter().GetResult(); - } - catch (HttpRequestException e) - { - Console.WriteLine(e.Message); - throw new ArgumentException("Endpoint is not available!"); - } - - } - - public static List Get(string endpoint) - { - List items = new List(); - HttpResponseMessage response = client.GetAsync(endpoint).GetAwaiter().GetResult(); - if (response.IsSuccessStatusCode) - { - items = response.Content.ReadAsAsync>().GetAwaiter().GetResult(); - } - else - { - var error = response.Content.ReadAsAsync().GetAwaiter().GetResult(); - throw new ArgumentException(error.Msg); - } - return items; - } - - public static T GetSingle(string endpoint) - { - T item = default(T); - HttpResponseMessage response = client.GetAsync(endpoint).GetAwaiter().GetResult(); - if (response.IsSuccessStatusCode) - { - item = response.Content.ReadAsAsync().GetAwaiter().GetResult(); - } - else - { - var error = response.Content.ReadAsAsync().GetAwaiter().GetResult(); - throw new ArgumentException(error.Msg); - } - return item; - } - - public static T Get(int id, string endpoint) - { - T item = default(T); - HttpResponseMessage response = client.GetAsync(endpoint + id.ToString()).GetAwaiter().GetResult(); - if (response.IsSuccessStatusCode) - { - item = response.Content.ReadAsAsync().GetAwaiter().GetResult(); - } - else - { - var error = response.Content.ReadAsAsync().GetAwaiter().GetResult(); - throw new ArgumentException(error.Msg); - } - return item; - } - - public static void Post(T item, string endpoint) - { - HttpResponseMessage response = - client.PostAsJsonAsync(endpoint, item).GetAwaiter().GetResult(); - - if (!response.IsSuccessStatusCode) - { - var error = response.Content.ReadAsAsync().GetAwaiter().GetResult(); - throw new ArgumentException(error.Msg); - } - response.EnsureSuccessStatusCode(); - } - - public static void Delete(int id, string endpoint) - { - HttpResponseMessage response = - client.DeleteAsync(endpoint + id.ToString()).GetAwaiter().GetResult(); - - if (!response.IsSuccessStatusCode) - { - var error = response.Content.ReadAsAsync().GetAwaiter().GetResult(); - throw new ArgumentException(error.Msg); - } - - response.EnsureSuccessStatusCode(); - } - - public static void Put(T item, string endpoint) - { - HttpResponseMessage response = - client.PutAsJsonAsync(endpoint, item).GetAwaiter().GetResult(); - - if (!response.IsSuccessStatusCode) - { - var error = response.Content.ReadAsAsync().GetAwaiter().GetResult(); - throw new ArgumentException(error.Msg); - } - - response.EnsureSuccessStatusCode(); - } - - public static List WhoWorksInMaintainerTeam(int id) - { - var item = default(List); - HttpResponseMessage response = client.GetAsync("/api/WhoWorksInMaintainerTeam?id=" + id.ToString()).GetAwaiter().GetResult(); - if (response.IsSuccessStatusCode) - { - item = response.Content.ReadAsAsync>().GetAwaiter().GetResult(); - } - else - { - var error = response.Content.ReadAsAsync().GetAwaiter().GetResult(); - throw new ArgumentException(error.Msg); - } - return item; - } - - public static List GetSubordinates(int id) - { - var item = default(List); - HttpResponseMessage response = client.GetAsync("/api/GetSubordinates?id=" + id.ToString()).GetAwaiter().GetResult(); - if (response.IsSuccessStatusCode) - { - item = response.Content.ReadAsAsync>().GetAwaiter().GetResult(); - } - else - { - var error = response.Content.ReadAsAsync().GetAwaiter().GetResult(); - throw new ArgumentException(error.Msg); - } - return item; - } - - public static List WhoUsesService(int id) - { - var item = default(List); - HttpResponseMessage response = client.GetAsync("/api/WhoUsesService?id=" + id.ToString()).GetAwaiter().GetResult(); - if (response.IsSuccessStatusCode) - { - item = response.Content.ReadAsAsync>().GetAwaiter().GetResult(); - } - else - { - var error = response.Content.ReadAsAsync().GetAwaiter().GetResult(); - throw new ArgumentException(error.Msg); - } - return item; - } - - public static Employee WhoIsResponsibleForService(int id) - { - Employee item = default(Employee); - HttpResponseMessage response = client.GetAsync("/api/WhoIsResponsibleForService?id=" + id.ToString()).GetAwaiter().GetResult(); - if (response.IsSuccessStatusCode) - { - item = response.Content.ReadAsAsync().GetAwaiter().GetResult(); - } - else - { - var error = response.Content.ReadAsAsync().GetAwaiter().GetResult(); - throw new ArgumentException(error.Msg); - } - return item; - } - - public static List WhoMaintainsService(int id) - { - var item = default(List); - HttpResponseMessage response = client.GetAsync("/api/WhoMaintainsService?id=" + id.ToString()).GetAwaiter().GetResult(); - if (response.IsSuccessStatusCode) - { - item = response.Content.ReadAsAsync>().GetAwaiter().GetResult(); - } - else - { - var error = response.Content.ReadAsAsync().GetAwaiter().GetResult(); - throw new ArgumentException(error.Msg); - } - return item; - } - } - - public class RestExceptionInfo - { - public RestExceptionInfo() - { - - } - public string Msg { get; set; } - } - - public class EndpointNotAvailableException : Exception - { - public EndpointNotAvailableException() : base("The client could not reach the API endpoint.") - { - } - - public EndpointNotAvailableException(string message) : base(message) - { - } - - public EndpointNotAvailableException(string message, Exception innerException) : base(message, innerException) - { - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Net.Security; +using WD7UVN_HFT_2023241.Models; + +namespace WD7UVN_HFT_2023241.Client.Shared +{ + public class RestService + { + private static HttpClient client; + + private static bool Ping(string url) + { + try + { + ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(delegate { return true; }); + + WebClient wc = new WebClient(); + wc.DownloadData(url); + return true; + } + catch + { + return false; + } + } + + public static void Init(string baseurl = "https://localhost:5001", string pingableEndpoint = "/swagger") + { + int tries = 0; + bool isOk = false; + do + { + isOk = Ping(baseurl + pingableEndpoint); + tries++; + } while (isOk == false && tries < 5); + + if (isOk == false) + { + throw new EndpointNotAvailableException("Endpoint is not available!"); + } + + HttpClientHandler handler = new HttpClientHandler(); + handler.ClientCertificateOptions = ClientCertificateOption.Manual; + handler.ServerCertificateCustomValidationCallback = + (httpRequestMessage, cert, cetChain, policyErrors) => + { + return true; + }; + + client = new HttpClient(handler); + client.BaseAddress = new Uri(baseurl); + client.DefaultRequestHeaders.Accept.Clear(); + client.DefaultRequestHeaders.Accept.Add( + new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue + ("application/json")); + try + { + client.GetAsync("").GetAwaiter().GetResult(); + } + catch (HttpRequestException e) + { + Console.WriteLine(e.Message); + throw new ArgumentException("Endpoint is not available!"); + } + + } + + public static List Get(string endpoint) + { + List items = new List(); + HttpResponseMessage response = client.GetAsync(endpoint).GetAwaiter().GetResult(); + if (response.IsSuccessStatusCode) + { + items = response.Content.ReadAsAsync>().GetAwaiter().GetResult(); + } + else + { + var error = response.Content.ReadAsAsync().GetAwaiter().GetResult(); + throw new ArgumentException(error.Msg); + } + return items; + } + + public static T GetSingle(string endpoint) + { + T item = default(T); + HttpResponseMessage response = client.GetAsync(endpoint).GetAwaiter().GetResult(); + if (response.IsSuccessStatusCode) + { + item = response.Content.ReadAsAsync().GetAwaiter().GetResult(); + } + else + { + var error = response.Content.ReadAsAsync().GetAwaiter().GetResult(); + throw new ArgumentException(error.Msg); + } + return item; + } + + public static T Get(int id, string endpoint) + { + T item = default(T); + HttpResponseMessage response = client.GetAsync(endpoint + id.ToString()).GetAwaiter().GetResult(); + if (response.IsSuccessStatusCode) + { + item = response.Content.ReadAsAsync().GetAwaiter().GetResult(); + } + else + { + var error = response.Content.ReadAsAsync().GetAwaiter().GetResult(); + throw new ArgumentException(error.Msg); + } + return item; + } + + public static void Post(T item, string endpoint) + { + HttpResponseMessage response = + client.PostAsJsonAsync(endpoint, item).GetAwaiter().GetResult(); + + if (!response.IsSuccessStatusCode) + { + var error = response.Content.ReadAsAsync().GetAwaiter().GetResult(); + throw new ArgumentException(error.Msg); + } + response.EnsureSuccessStatusCode(); + } + + public static void Delete(int id, string endpoint) + { + HttpResponseMessage response = + client.DeleteAsync(endpoint + id.ToString()).GetAwaiter().GetResult(); + + if (!response.IsSuccessStatusCode) + { + var error = response.Content.ReadAsAsync().GetAwaiter().GetResult(); + throw new ArgumentException(error.Msg); + } + + response.EnsureSuccessStatusCode(); + } + + public static void Put(T item, string endpoint) + { + HttpResponseMessage response = + client.PutAsJsonAsync(endpoint, item).GetAwaiter().GetResult(); + + if (!response.IsSuccessStatusCode) + { + var error = response.Content.ReadAsAsync().GetAwaiter().GetResult(); + throw new ArgumentException(error.Msg); + } + + response.EnsureSuccessStatusCode(); + } + + public static List WhoWorksInMaintainerTeam(int id) + { + var item = default(List); + HttpResponseMessage response = client.GetAsync("/api/WhoWorksInMaintainerTeam?id=" + id.ToString()).GetAwaiter().GetResult(); + if (response.IsSuccessStatusCode) + { + item = response.Content.ReadAsAsync>().GetAwaiter().GetResult(); + } + else + { + var error = response.Content.ReadAsAsync().GetAwaiter().GetResult(); + throw new ArgumentException(error.Msg); + } + return item; + } + + public static List GetSubordinates(int id) + { + var item = default(List); + HttpResponseMessage response = client.GetAsync("/api/GetSubordinates?id=" + id.ToString()).GetAwaiter().GetResult(); + if (response.IsSuccessStatusCode) + { + item = response.Content.ReadAsAsync>().GetAwaiter().GetResult(); + } + else + { + var error = response.Content.ReadAsAsync().GetAwaiter().GetResult(); + throw new ArgumentException(error.Msg); + } + return item; + } + + public static List WhoUsesService(int id) + { + var item = default(List); + HttpResponseMessage response = client.GetAsync("/api/WhoUsesService?id=" + id.ToString()).GetAwaiter().GetResult(); + if (response.IsSuccessStatusCode) + { + item = response.Content.ReadAsAsync>().GetAwaiter().GetResult(); + } + else + { + var error = response.Content.ReadAsAsync().GetAwaiter().GetResult(); + throw new ArgumentException(error.Msg); + } + return item; + } + + public static Employee WhoIsResponsibleForService(int id) + { + Employee item = default(Employee); + HttpResponseMessage response = client.GetAsync("/api/WhoIsResponsibleForService?id=" + id.ToString()).GetAwaiter().GetResult(); + if (response.IsSuccessStatusCode) + { + item = response.Content.ReadAsAsync().GetAwaiter().GetResult(); + } + else + { + var error = response.Content.ReadAsAsync().GetAwaiter().GetResult(); + throw new ArgumentException(error.Msg); + } + return item; + } + + public static List WhoMaintainsService(int id) + { + var item = default(List); + HttpResponseMessage response = client.GetAsync("/api/WhoMaintainsService?id=" + id.ToString()).GetAwaiter().GetResult(); + if (response.IsSuccessStatusCode) + { + item = response.Content.ReadAsAsync>().GetAwaiter().GetResult(); + } + else + { + var error = response.Content.ReadAsAsync().GetAwaiter().GetResult(); + throw new ArgumentException(error.Msg); + } + return item; + } + } + + public class RestExceptionInfo + { + public RestExceptionInfo() + { + + } + public string Msg { get; set; } + } + + public class EndpointNotAvailableException : Exception + { + public EndpointNotAvailableException() : base("The client could not reach the API endpoint.") + { + } + + public EndpointNotAvailableException(string message) : base(message) + { + } + + public EndpointNotAvailableException(string message, Exception innerException) : base(message, innerException) + { + } + } +} diff --git a/WD7UVN_HFT_2023241.Client/Shared/WD7UVN_HFT_2023241.Client.Shared.csproj b/WD7UVN_HFT_2023241.Client/Shared/WD7UVN_HFT_2023241.Client.Shared.csproj new file mode 100644 index 0000000..26dd80b --- /dev/null +++ b/WD7UVN_HFT_2023241.Client/Shared/WD7UVN_HFT_2023241.Client.Shared.csproj @@ -0,0 +1,15 @@ + + + + net5.0 + + + + + + + + + + + diff --git a/WD7UVN_HFT_2023241.Client/CRUD.cs b/WD7UVN_HFT_2023241.Client/TUI/CRUD.cs similarity index 98% rename from WD7UVN_HFT_2023241.Client/CRUD.cs rename to WD7UVN_HFT_2023241.Client/TUI/CRUD.cs index 8219643..176a7d1 100644 --- a/WD7UVN_HFT_2023241.Client/CRUD.cs +++ b/WD7UVN_HFT_2023241.Client/TUI/CRUD.cs @@ -4,8 +4,9 @@ using System.Net.NetworkInformation; using System.Reflection; using ConsoleTools; using WD7UVN_HFT_2023241.Models; +using WD7UVN_HFT_2023241.Client.Shared; -namespace WD7UVN_HFT_2023241.Client +namespace WD7UVN_HFT_2023241.Client.TUI { public class CRUD { diff --git a/WD7UVN_HFT_2023241.Client/NonCRUD.cs b/WD7UVN_HFT_2023241.Client/TUI/NonCRUD.cs similarity index 98% rename from WD7UVN_HFT_2023241.Client/NonCRUD.cs rename to WD7UVN_HFT_2023241.Client/TUI/NonCRUD.cs index 459011b..67879a6 100644 --- a/WD7UVN_HFT_2023241.Client/NonCRUD.cs +++ b/WD7UVN_HFT_2023241.Client/TUI/NonCRUD.cs @@ -2,9 +2,10 @@ using System; using System.Linq; using System.Collections.Generic; using ConsoleTools; +using WD7UVN_HFT_2023241.Client.Shared; using WD7UVN_HFT_2023241.Models; -namespace WD7UVN_HFT_2023241.Client +namespace WD7UVN_HFT_2023241.Client.TUI { public class NonCRUD { diff --git a/WD7UVN_HFT_2023241.Client/Program.cs b/WD7UVN_HFT_2023241.Client/TUI/Program.cs similarity index 95% rename from WD7UVN_HFT_2023241.Client/Program.cs rename to WD7UVN_HFT_2023241.Client/TUI/Program.cs index b156627..e6061cc 100644 --- a/WD7UVN_HFT_2023241.Client/Program.cs +++ b/WD7UVN_HFT_2023241.Client/TUI/Program.cs @@ -1,83 +1,84 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using ConsoleTools; - -namespace WD7UVN_HFT_2023241.Client -{ - public enum CRUDActions - { - GetAll, - GetById, - Create, - Update, - Delete - } - - public class Program - { - private static async Task Main(string[] args) - { - try - { - RestService.Init(); - } - catch (EndpointNotAvailableException e) - { - Console.WriteLine(e.Message); - Environment.Exit(1); - } - - // var commonConfig = new MenuConfig - // { - // Selector = "--> ", - // EnableFilter = true, - // EnableBreadcrumb = true, - // WriteBreadcrumbAction = titles => Console.WriteLine(string.Join(" / ", titles)), - // }; - - var nonCrudMenu = new ConsoleMenu(args, level: 2) - .Add("Who maintains specified service?", () => NonCRUD.WhoMaintainsService()) - .Add("Get employee's subordinates", () => NonCRUD.GetSubordinates()) - .Add("Get clients using a specified service", () => NonCRUD.WhoUsesService()) - .Add("Get employees in specified maintainer team", () => NonCRUD.WhoWorksInMaintainerTeam()) - .Add("Get employee responsible for specified service", () => NonCRUD.WhoIsResponsibleForService()) - .Add("Back", ConsoleMenu.Close) - .Add("Exit", () => Environment.Exit(0)) - //.Configure(commonConfig) - .Configure(config => - { - config.Title = "Non-CRUD Operations"; - }); - - var crudMenu = new ConsoleMenu(args, level: 1) - .Add("Get all", () => CRUD.TypeSelectorMenu(CRUDActions.GetAll)) - .Add("Get by id", () => CRUD.TypeSelectorMenu(CRUDActions.GetById)) - .Add("Create", () => CRUD.TypeSelectorMenu(CRUDActions.Create)) - .Add("Update", () => CRUD.TypeSelectorMenu(CRUDActions.Update)) - .Add("Delete", () => CRUD.TypeSelectorMenu(CRUDActions.Delete)) - .Add("Back", ConsoleMenu.Close) - .Add("Exit", () => Environment.Exit(0)) - //.Configure(commonConfig) - .Configure(config => - { - config.Title = "Tables"; - }); - - var menu = new ConsoleMenu(args, level: 0) - .Add("CRUD", crudMenu.Show) - .Add("Non-CRUD", nonCrudMenu.Show) - .Add("Exit", () => Environment.Exit(0)) - //.Configure(commonConfig) - .Configure(config => - { - config.Title = "Main menu"; - config.EnableWriteTitle = true; - config.EnableBreadcrumb = true; - }); - - var token = new CancellationTokenSource().Token; - await menu.ShowAsync(token); - } - } -} +using System; +using System.Threading; +using System.Threading.Tasks; +using ConsoleTools; +using WD7UVN_HFT_2023241.Client.Shared; + +namespace WD7UVN_HFT_2023241.Client.TUI +{ + public enum CRUDActions + { + GetAll, + GetById, + Create, + Update, + Delete + } + + public class Program + { + private static async Task Main(string[] args) + { + try + { + RestService.Init(); + } + catch (EndpointNotAvailableException e) + { + Console.WriteLine(e.Message); + Environment.Exit(1); + } + + // var commonConfig = new MenuConfig + // { + // Selector = "--> ", + // EnableFilter = true, + // EnableBreadcrumb = true, + // WriteBreadcrumbAction = titles => Console.WriteLine(string.Join(" / ", titles)), + // }; + + var nonCrudMenu = new ConsoleMenu(args, level: 2) + .Add("Who maintains specified service?", () => NonCRUD.WhoMaintainsService()) + .Add("Get employee's subordinates", () => NonCRUD.GetSubordinates()) + .Add("Get clients using a specified service", () => NonCRUD.WhoUsesService()) + .Add("Get employees in specified maintainer team", () => NonCRUD.WhoWorksInMaintainerTeam()) + .Add("Get employee responsible for specified service", () => NonCRUD.WhoIsResponsibleForService()) + .Add("Back", ConsoleMenu.Close) + .Add("Exit", () => Environment.Exit(0)) + //.Configure(commonConfig) + .Configure(config => + { + config.Title = "Non-CRUD Operations"; + }); + + var crudMenu = new ConsoleMenu(args, level: 1) + .Add("Get all", () => CRUD.TypeSelectorMenu(CRUDActions.GetAll)) + .Add("Get by id", () => CRUD.TypeSelectorMenu(CRUDActions.GetById)) + .Add("Create", () => CRUD.TypeSelectorMenu(CRUDActions.Create)) + .Add("Update", () => CRUD.TypeSelectorMenu(CRUDActions.Update)) + .Add("Delete", () => CRUD.TypeSelectorMenu(CRUDActions.Delete)) + .Add("Back", ConsoleMenu.Close) + .Add("Exit", () => Environment.Exit(0)) + //.Configure(commonConfig) + .Configure(config => + { + config.Title = "Tables"; + }); + + var menu = new ConsoleMenu(args, level: 0) + .Add("CRUD", crudMenu.Show) + .Add("Non-CRUD", nonCrudMenu.Show) + .Add("Exit", () => Environment.Exit(0)) + //.Configure(commonConfig) + .Configure(config => + { + config.Title = "Main menu"; + config.EnableWriteTitle = true; + config.EnableBreadcrumb = true; + }); + + var token = new CancellationTokenSource().Token; + await menu.ShowAsync(token); + } + } +} diff --git a/WD7UVN_HFT_2023241.Client/WD7UVN_HFT_2023241.Client.csproj b/WD7UVN_HFT_2023241.Client/TUI/WD7UVN_HFT_2023241.Client.TUI.csproj similarity index 53% rename from WD7UVN_HFT_2023241.Client/WD7UVN_HFT_2023241.Client.csproj rename to WD7UVN_HFT_2023241.Client/TUI/WD7UVN_HFT_2023241.Client.TUI.csproj index 9e7da78..1157649 100644 --- a/WD7UVN_HFT_2023241.Client/WD7UVN_HFT_2023241.Client.csproj +++ b/WD7UVN_HFT_2023241.Client/TUI/WD7UVN_HFT_2023241.Client.TUI.csproj @@ -1,17 +1,17 @@ - - - - Exe - net5.0 - - - - - - + + + + Exe + net5.0 + + + + + + + - - - - + + + diff --git a/WD7UVN_HFT_2023241.sln b/WD7UVN_HFT_2023241.sln index 48843e7..36d6821 100644 --- a/WD7UVN_HFT_2023241.sln +++ b/WD7UVN_HFT_2023241.sln @@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.0.31903.59 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WD7UVN_HFT_2023241.Client", "WD7UVN_HFT_2023241.Client\WD7UVN_HFT_2023241.Client.csproj", "{1B081783-46AB-44BF-A934-DF672F8A6228}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WD7UVN_HFT_2023241.Models", "WD7UVN_HFT_2023241.Models\WD7UVN_HFT_2023241.Models.csproj", "{BF8B019B-979F-4612-A126-5886A4C7D4F0}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WD7UVN_HFT_2023241.Logic", "WD7UVN_HFT_2023241.Logic\WD7UVN_HFT_2023241.Logic.csproj", "{EEBE5ED0-A0D2-45C2-82F8-E7ECD62BEE8A}" @@ -21,16 +19,18 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Frontend", "Frontend", "{8F EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{18D51E10-9339-4A0D-AC44-625FF7A19050}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WD7UVN_HFT_2023241.Client.TUI", "WD7UVN_HFT_2023241.Client\TUI\WD7UVN_HFT_2023241.Client.TUI.csproj", "{F68C5B1A-C3B9-4AFC-BBD3-9DCC02A22EA0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WD7UVN_HFT_2023241.Client.Shared", "WD7UVN_HFT_2023241.Client\Shared\WD7UVN_HFT_2023241.Client.Shared.csproj", "{77C8BEDB-0D81-4703-8FBC-B4DCD32584BD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WD7UVN_SzTGUI_2023242.Client.WPF", "WD7UVN_SzTGUI_2023242.Client.WPF\WD7UVN_SzTGUI_2023242.Client.WPF.csproj", "{0A994D03-066F-43E7-872E-4D239FC6F764}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {1B081783-46AB-44BF-A934-DF672F8A6228}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1B081783-46AB-44BF-A934-DF672F8A6228}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1B081783-46AB-44BF-A934-DF672F8A6228}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1B081783-46AB-44BF-A934-DF672F8A6228}.Release|Any CPU.Build.0 = Release|Any CPU {BF8B019B-979F-4612-A126-5886A4C7D4F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BF8B019B-979F-4612-A126-5886A4C7D4F0}.Debug|Any CPU.Build.0 = Debug|Any CPU {BF8B019B-979F-4612-A126-5886A4C7D4F0}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -51,17 +51,31 @@ Global {63F3B585-3E8C-41F5-8D6C-FB59932D0819}.Debug|Any CPU.Build.0 = Debug|Any CPU {63F3B585-3E8C-41F5-8D6C-FB59932D0819}.Release|Any CPU.ActiveCfg = Release|Any CPU {63F3B585-3E8C-41F5-8D6C-FB59932D0819}.Release|Any CPU.Build.0 = Release|Any CPU + {F68C5B1A-C3B9-4AFC-BBD3-9DCC02A22EA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F68C5B1A-C3B9-4AFC-BBD3-9DCC02A22EA0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F68C5B1A-C3B9-4AFC-BBD3-9DCC02A22EA0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F68C5B1A-C3B9-4AFC-BBD3-9DCC02A22EA0}.Release|Any CPU.Build.0 = Release|Any CPU + {77C8BEDB-0D81-4703-8FBC-B4DCD32584BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {77C8BEDB-0D81-4703-8FBC-B4DCD32584BD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {77C8BEDB-0D81-4703-8FBC-B4DCD32584BD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {77C8BEDB-0D81-4703-8FBC-B4DCD32584BD}.Release|Any CPU.Build.0 = Release|Any CPU + {0A994D03-066F-43E7-872E-4D239FC6F764}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0A994D03-066F-43E7-872E-4D239FC6F764}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0A994D03-066F-43E7-872E-4D239FC6F764}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0A994D03-066F-43E7-872E-4D239FC6F764}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {1B081783-46AB-44BF-A934-DF672F8A6228} = {8FABCF39-D228-4E36-927D-09B4CCF88935} {BF8B019B-979F-4612-A126-5886A4C7D4F0} = {18D51E10-9339-4A0D-AC44-625FF7A19050} {EEBE5ED0-A0D2-45C2-82F8-E7ECD62BEE8A} = {E7A96BA5-BFD6-4265-A90F-880015BEFE07} {9430B2D2-3137-4DCA-BEFB-7E926D4E3583} = {E7A96BA5-BFD6-4265-A90F-880015BEFE07} {316342CA-7521-4A01-8BDB-5AA76D4DE855} = {E7A96BA5-BFD6-4265-A90F-880015BEFE07} {63F3B585-3E8C-41F5-8D6C-FB59932D0819} = {E7A96BA5-BFD6-4265-A90F-880015BEFE07} + {F68C5B1A-C3B9-4AFC-BBD3-9DCC02A22EA0} = {8FABCF39-D228-4E36-927D-09B4CCF88935} + {77C8BEDB-0D81-4703-8FBC-B4DCD32584BD} = {8FABCF39-D228-4E36-927D-09B4CCF88935} + {0A994D03-066F-43E7-872E-4D239FC6F764} = {8FABCF39-D228-4E36-927D-09B4CCF88935} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {B8B81AFF-A1C2-46B5-8CF1-BBA9BAEB756F} diff --git a/WD7UVN_SzTGUI_2023242.Client.WPF/App.xaml b/WD7UVN_SzTGUI_2023242.Client.WPF/App.xaml new file mode 100644 index 0000000..7c0a300 --- /dev/null +++ b/WD7UVN_SzTGUI_2023242.Client.WPF/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/WD7UVN_SzTGUI_2023242.Client.WPF/App.xaml.cs b/WD7UVN_SzTGUI_2023242.Client.WPF/App.xaml.cs new file mode 100644 index 0000000..16c727b --- /dev/null +++ b/WD7UVN_SzTGUI_2023242.Client.WPF/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace WD7UVN_SzTGUI_2023242.Client.WPF +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/WD7UVN_SzTGUI_2023242.Client.WPF/AssemblyInfo.cs b/WD7UVN_SzTGUI_2023242.Client.WPF/AssemblyInfo.cs new file mode 100644 index 0000000..b0ec827 --- /dev/null +++ b/WD7UVN_SzTGUI_2023242.Client.WPF/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Windows; + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/WD7UVN_SzTGUI_2023242.Client.WPF/MainWindow.xaml b/WD7UVN_SzTGUI_2023242.Client.WPF/MainWindow.xaml new file mode 100644 index 0000000..c7c69d8 --- /dev/null +++ b/WD7UVN_SzTGUI_2023242.Client.WPF/MainWindow.xaml @@ -0,0 +1,12 @@ + + + + + diff --git a/WD7UVN_SzTGUI_2023242.Client.WPF/MainWindow.xaml.cs b/WD7UVN_SzTGUI_2023242.Client.WPF/MainWindow.xaml.cs new file mode 100644 index 0000000..bf595d8 --- /dev/null +++ b/WD7UVN_SzTGUI_2023242.Client.WPF/MainWindow.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace WD7UVN_SzTGUI_2023242.Client.WPF +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + } + } +} diff --git a/WD7UVN_SzTGUI_2023242.Client.WPF/WD7UVN_SzTGUI_2023242.Client.WPF.csproj b/WD7UVN_SzTGUI_2023242.Client.WPF/WD7UVN_SzTGUI_2023242.Client.WPF.csproj new file mode 100644 index 0000000..0f40828 --- /dev/null +++ b/WD7UVN_SzTGUI_2023242.Client.WPF/WD7UVN_SzTGUI_2023242.Client.WPF.csproj @@ -0,0 +1,10 @@ + + + + WinExe + net5.0-windows + enable + true + + + diff --git a/WD7UVN_SzTGUI_2023242.Client.WPF/WD7UVN_SzTGUI_2023242.Client.WPF.csproj.user b/WD7UVN_SzTGUI_2023242.Client.WPF/WD7UVN_SzTGUI_2023242.Client.WPF.csproj.user new file mode 100644 index 0000000..644b0a6 --- /dev/null +++ b/WD7UVN_SzTGUI_2023242.Client.WPF/WD7UVN_SzTGUI_2023242.Client.WPF.csproj.user @@ -0,0 +1,14 @@ + + + + + + Designer + + + + + Designer + + + \ No newline at end of file