diff --git a/src/client_frontend/.vs/client_frontend/v17/.suo b/src/client_frontend/.vs/client_frontend/v17/.suo index a243bd8..ff74e78 100644 Binary files a/src/client_frontend/.vs/client_frontend/v17/.suo and b/src/client_frontend/.vs/client_frontend/v17/.suo differ diff --git a/src/client_frontend/.vs/client_frontend/v17/Browse.VC.db b/src/client_frontend/.vs/client_frontend/v17/Browse.VC.db index 3f06dd1..80550ea 100644 Binary files a/src/client_frontend/.vs/client_frontend/v17/Browse.VC.db and b/src/client_frontend/.vs/client_frontend/v17/Browse.VC.db differ diff --git a/src/client_frontend/.vs/client_frontend/v17/DocumentLayout.json b/src/client_frontend/.vs/client_frontend/v17/DocumentLayout.json new file mode 100644 index 0000000..ab70a06 --- /dev/null +++ b/src/client_frontend/.vs/client_frontend/v17/DocumentLayout.json @@ -0,0 +1,122 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{644C9824-2298-46C6-9A62-7E080C98A0BB}|client_frontend.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend\\ui.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", + "RelativeMoniker": "D:0:0:{644C9824-2298-46C6-9A62-7E080C98A0BB}|client_frontend.vcxproj|solutionrelative:ui.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" + }, + { + "AbsoluteMoniker": "D:0:0:{644C9824-2298-46C6-9A62-7E080C98A0BB}|client_frontend.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend\\choose_element.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", + "RelativeMoniker": "D:0:0:{644C9824-2298-46C6-9A62-7E080C98A0BB}|client_frontend.vcxproj|solutionrelative:choose_element.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" + }, + { + "AbsoluteMoniker": "D:0:0:{644C9824-2298-46C6-9A62-7E080C98A0BB}|client_frontend.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend\\choose_element.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", + "RelativeMoniker": "D:0:0:{644C9824-2298-46C6-9A62-7E080C98A0BB}|client_frontend.vcxproj|solutionrelative:choose_element.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" + }, + { + "AbsoluteMoniker": "D:0:0:{644C9824-2298-46C6-9A62-7E080C98A0BB}|client_frontend.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend\\client_frontend.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", + "RelativeMoniker": "D:0:0:{644C9824-2298-46C6-9A62-7E080C98A0BB}|client_frontend.vcxproj|solutionrelative:client_frontend.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" + }, + { + "AbsoluteMoniker": "D:0:0:{644C9824-2298-46C6-9A62-7E080C98A0BB}|client_frontend.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend\\id.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", + "RelativeMoniker": "D:0:0:{644C9824-2298-46C6-9A62-7E080C98A0BB}|client_frontend.vcxproj|solutionrelative:id.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" + }, + { + "AbsoluteMoniker": "D:0:0:{644C9824-2298-46C6-9A62-7E080C98A0BB}|client_frontend.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend\\ui.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", + "RelativeMoniker": "D:0:0:{644C9824-2298-46C6-9A62-7E080C98A0BB}|client_frontend.vcxproj|solutionrelative:ui.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 4, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 2, + "Title": "choose_element.h", + "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend\\choose_element.h", + "RelativeDocumentMoniker": "choose_element.h", + "ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend\\choose_element.h", + "RelativeToolTip": "choose_element.h", + "ViewState": "AQIAAAAAAAAAAAAAAAAAAAUAAAAGAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|", + "WhenOpened": "2024-03-14T17:06:27.941Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "choose_element.cpp", + "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend\\choose_element.cpp", + "RelativeDocumentMoniker": "choose_element.cpp", + "ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend\\choose_element.cpp", + "RelativeToolTip": "choose_element.cpp", + "ViewState": "AQIAAAAAAAAAAAAAAAAAABcAAABJAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", + "WhenOpened": "2024-03-14T17:06:16.884Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 4, + "Title": "id.h", + "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend\\id.h", + "RelativeDocumentMoniker": "id.h", + "ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend\\id.h", + "RelativeToolTip": "id.h", + "ViewState": "AQIAAAAAAAAAAAAAAAAAAAEAAAAQAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|", + "WhenOpened": "2024-03-14T16:31:43.692Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 5, + "Title": "ui.h", + "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend\\ui.h", + "RelativeDocumentMoniker": "ui.h", + "ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend\\ui.h", + "RelativeToolTip": "ui.h", + "ViewState": "AQIAAAAAAAAAAAAAAAAAAAMAAAAQAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|", + "WhenOpened": "2024-03-14T16:28:38.361Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "ui.cpp", + "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend\\ui.cpp", + "RelativeDocumentMoniker": "ui.cpp", + "ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend\\ui.cpp", + "RelativeToolTip": "ui.cpp", + "ViewState": "AQIAACoAAAAAAAAAAAAwwC8AAAAwAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", + "WhenOpened": "2024-03-14T16:28:29.863Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 3, + "Title": "client_frontend.cpp", + "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend\\client_frontend.cpp", + "RelativeDocumentMoniker": "client_frontend.cpp", + "ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend\\client_frontend.cpp", + "RelativeToolTip": "client_frontend.cpp", + "ViewState": "AQIAAHsAAAAAAAAAAAAAAJwAAAA3AAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", + "WhenOpened": "2024-03-14T16:22:29.931Z", + "EditorCaption": "" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/client_frontend/choose_element.cpp b/src/client_frontend/choose_element.cpp new file mode 100644 index 0000000..7826566 --- /dev/null +++ b/src/client_frontend/choose_element.cpp @@ -0,0 +1,33 @@ +#include "choose_element.h" +#include +#include +#include +std::wstring open_file(HWND hWnd) +{ + OPENFILENAME ofn; + WCHAR szFile[MAX_PATH] = L""; + + ZeroMemory(&ofn, sizeof(ofn)); + ofn.lStructSize = sizeof(ofn); + ofn.hwndOwner = hWnd; + ofn.lpstrFile = szFile; + ofn.lpstrFile[0] = '\0'; + ofn.nMaxFile = sizeof(szFile); + ofn.lpstrFilter = L"All Files\0*.*\0"; // Filter for all files + ofn.nFilterIndex = 1; + ofn.lpstrFileTitle = NULL; + ofn.nMaxFileTitle = 0; + ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST; + + if (GetOpenFileName(&ofn) == TRUE) + { + // User selected a file, 'szFile' contains the selected file path + return std::wstring(szFile); + } + else + { + // User canceled the dialog + //MessageBox(hWnd, L"File selection canceled.", L"Canceled", MB_OK | MB_ICONEXCLAMATION); + return L"cancel"; + } +} \ No newline at end of file diff --git a/src/client_frontend/choose_element.h b/src/client_frontend/choose_element.h new file mode 100644 index 0000000..b19aca4 --- /dev/null +++ b/src/client_frontend/choose_element.h @@ -0,0 +1,6 @@ +#pragma once +#include "id.h" +#include +#include +#include +std::wstring open_file(HWND hWnd); \ No newline at end of file diff --git a/src/client_frontend/client_frontend.cpp b/src/client_frontend/client_frontend.cpp index 93a3939..f5a4abf 100644 --- a/src/client_frontend/client_frontend.cpp +++ b/src/client_frontend/client_frontend.cpp @@ -1,19 +1,21 @@ // client_frontend.cpp : Definiert den Einstiegspunkt für die Anwendung. // - +#include #include "framework.h" #include "client_frontend.h" -#define width 1000 -#define height 700 +#include "ui.h" +#include "id.h" +#include "choose_element.h" #define MAX_LOADSTRING 100 + // Globale Variablen: HINSTANCE hInst; // Aktuelle Instanz WCHAR szTitle[MAX_LOADSTRING]; // Titelleistentext WCHAR szWindowClass[MAX_LOADSTRING]; // Der Klassenname des Hauptfensters. // Vorwärtsdeklarationen der in diesem Codemodul enthaltenen Funktionen: -ATOM MyRegisterClass(HINSTANCE hInstance); +ATOM frontend_class(HINSTANCE hInstance); BOOL InitInstance(HINSTANCE, int); LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM); @@ -31,7 +33,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, // Globale Zeichenfolgen initialisieren LoadStringW(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); LoadStringW(hInstance, IDC_CLIENTFRONTEND, szWindowClass, MAX_LOADSTRING); - MyRegisterClass(hInstance); + frontend_class(hInstance); // Anwendungsinitialisierung ausführen: if (!InitInstance (hInstance, nCmdShow)) @@ -63,7 +65,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, // // ZWECK: Registriert die Fensterklasse. // -ATOM MyRegisterClass(HINSTANCE hInstance) +ATOM frontend_class(HINSTANCE hInstance) { WNDCLASSEXW wcex; @@ -99,7 +101,7 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) hInst = hInstance; // Instanzenhandle in der globalen Variablen speichern HWND hWnd = CreateWindowW(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, 0, width,height, nullptr, nullptr, hInstance, nullptr); + CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, nullptr, nullptr, hInstance, nullptr); if (!hWnd) { @@ -121,69 +123,66 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) // WM_PAINT - Darstellen des Hauptfensters // WM_DESTROY - Ausgeben einer Beendenmeldung und zurückkehren // -//main loop +// LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { + int windowWidth=0; + int windowHeight=0; + RECT clientRect; + GetClientRect(hWnd, &clientRect); + windowWidth = clientRect.right - clientRect.left; + windowHeight = clientRect.bottom - clientRect.top; switch (message) { case WM_COMMAND: + { + int wmId = LOWORD(wParam); + // Menüauswahl analysieren: + switch (wmId) { - int wmId = LOWORD(wParam); - // Menüauswahl analysieren: - switch (wmId) - { - case IDM_ABOUT: - DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About); - break; - case IDM_EXIT: - DestroyWindow(hWnd); - break; - default: - return DefWindowProc(hWnd, message, wParam, lParam); - } + case IDM_ABOUT: + DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About); + break; + case IDM_EXIT: + DestroyWindow(hWnd); + break; + case ID_HOME_BUTTON: // Handle the home button click + //set page to 0 + ui_clear(); + ui_display_page(0, windowWidth, windowHeight, hWnd); + break; + case ID_SCAN_FILE_BUTTON: // Handle the scan file button click + //set page to 1 + ui_clear(); + ui_display_page(1, windowWidth, windowHeight, hWnd); + break; + default: + return DefWindowProc(hWnd, message, wParam, lParam); } - break; + } + break; case WM_PAINT: - { - PAINTSTRUCT ps; - HDC hdc = BeginPaint(hWnd, &ps); - // TODO: Zeichencode, der hdc verwendet, hier einfügen... - EndPaint(hWnd, &ps); - } - break; + { + PAINTSTRUCT ps; + HDC hdc = BeginPaint(hWnd, &ps); + // TODO: Zeichencode, der hdc verwendet, hier einfügen... + EndPaint(hWnd, &ps); + } + break; + case WM_CREATE: + { + //ui_create(); + ui_display_page(0, windowWidth, windowHeight, hWnd); + } + break; case WM_DESTROY: PostQuitMessage(0); break; - case WM_CREATE: - { - HWND textbox_, learn_button_, make_button_, settings_button_; - //for this text we need to get some data from the backend - //e.g. rtp - //database status - //infected files - //etc - textbox_ = CreateWindow(L"EDIT", - L"Welcome to cyberhex\r\n\r\nPlease select an option:\r\n\r\n", - WS_VISIBLE | WS_CHILD | ES_READONLY | ES_MULTILINE, - 10, 10, width - 30, height - 200, - hWnd, (HMENU)0, NULL, NULL); - learn_button_ = CreateWindow(L"BUTTON", - L"Learn a set of Voc", - WS_VISIBLE | WS_CHILD | WS_BORDER, - 160, 550, 200, 30, //wo, xy // wie gross xy - hWnd, (HMENU)1, NULL, NULL); - make_button_ = CreateWindow(L"BUTTON", - L"Make a set of Voc", - WS_VISIBLE | WS_CHILD | WS_BORDER, - 380, 550, 200, 30, - hWnd, (HMENU)2, NULL, NULL); - settings_button_ = CreateWindow(L"BUTTON", - L"Settings", - WS_VISIBLE | WS_CHILD | WS_BORDER, - 600, 550, 200, 30, - hWnd, (HMENU)3, NULL, NULL); - break; - } + case WM_SIZE: + //ui_resize(); + ui_clear(); + ui_display_page(0, windowWidth, windowHeight, hWnd); + break; default: return DefWindowProc(hWnd, message, wParam, lParam); } diff --git a/src/client_frontend/client_frontend.rc b/src/client_frontend/client_frontend.rc index 1e7a778..6982983 100644 Binary files a/src/client_frontend/client_frontend.rc and b/src/client_frontend/client_frontend.rc differ diff --git a/src/client_frontend/client_frontend.sln b/src/client_frontend/client_frontend.sln index 945aa6c..e75fda4 100644 --- a/src/client_frontend/client_frontend.sln +++ b/src/client_frontend/client_frontend.sln @@ -1,9 +1,9 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 -VisualStudioVersion = 17.8.34330.188 +VisualStudioVersion = 17.9.34701.34 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "client_frontend", "client_frontend.vcxproj", "{714B1F08-886A-4AB5-89D4-B9919264F524}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "client_frontend", "client_frontend.vcxproj", "{644C9824-2298-46C6-9A62-7E080C98A0BB}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -13,19 +13,19 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {714B1F08-886A-4AB5-89D4-B9919264F524}.Debug|x64.ActiveCfg = Debug|x64 - {714B1F08-886A-4AB5-89D4-B9919264F524}.Debug|x64.Build.0 = Debug|x64 - {714B1F08-886A-4AB5-89D4-B9919264F524}.Debug|x86.ActiveCfg = Debug|Win32 - {714B1F08-886A-4AB5-89D4-B9919264F524}.Debug|x86.Build.0 = Debug|Win32 - {714B1F08-886A-4AB5-89D4-B9919264F524}.Release|x64.ActiveCfg = Release|x64 - {714B1F08-886A-4AB5-89D4-B9919264F524}.Release|x64.Build.0 = Release|x64 - {714B1F08-886A-4AB5-89D4-B9919264F524}.Release|x86.ActiveCfg = Release|Win32 - {714B1F08-886A-4AB5-89D4-B9919264F524}.Release|x86.Build.0 = Release|Win32 + {644C9824-2298-46C6-9A62-7E080C98A0BB}.Debug|x64.ActiveCfg = Debug|x64 + {644C9824-2298-46C6-9A62-7E080C98A0BB}.Debug|x64.Build.0 = Debug|x64 + {644C9824-2298-46C6-9A62-7E080C98A0BB}.Debug|x86.ActiveCfg = Debug|Win32 + {644C9824-2298-46C6-9A62-7E080C98A0BB}.Debug|x86.Build.0 = Debug|Win32 + {644C9824-2298-46C6-9A62-7E080C98A0BB}.Release|x64.ActiveCfg = Release|x64 + {644C9824-2298-46C6-9A62-7E080C98A0BB}.Release|x64.Build.0 = Release|x64 + {644C9824-2298-46C6-9A62-7E080C98A0BB}.Release|x86.ActiveCfg = Release|Win32 + {644C9824-2298-46C6-9A62-7E080C98A0BB}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {D94BC215-E973-42E4-A7F3-33EFCC3C89C9} + SolutionGuid = {F67EF8DC-E0C4-4EE3-9BBA-D7BD7AC687A9} EndGlobalSection EndGlobal diff --git a/src/client_frontend/client_frontend.vcxproj b/src/client_frontend/client_frontend.vcxproj index 7f54844..34e54f1 100644 --- a/src/client_frontend/client_frontend.vcxproj +++ b/src/client_frontend/client_frontend.vcxproj @@ -21,7 +21,7 @@ 17.0 Win32Proj - {714b1f08-886a-4ab5-89d4-b9919264f524} + {644c9824-2298-46c6-9a62-7e080c98a0bb} clientfrontend 10.0 @@ -127,13 +127,18 @@ + + + + + diff --git a/src/client_frontend/client_frontend.vcxproj.filters b/src/client_frontend/client_frontend.vcxproj.filters index a3c6340..dee5a9f 100644 --- a/src/client_frontend/client_frontend.vcxproj.filters +++ b/src/client_frontend/client_frontend.vcxproj.filters @@ -27,11 +27,26 @@ Headerdateien + + Headerdateien + + + Headerdateien + + + Headerdateien + Quelldateien + + Headerdateien + + + Headerdateien + diff --git a/src/client_frontend/x64/Debug/client_frontend.exe.recipe b/src/client_frontend/client_frontend/x64/Debug/client_frontend.exe.recipe similarity index 100% rename from src/client_frontend/x64/Debug/client_frontend.exe.recipe rename to src/client_frontend/client_frontend/x64/Debug/client_frontend.exe.recipe diff --git a/src/client_frontend/client_frontend/x64/Debug/client_frontend.ilk b/src/client_frontend/client_frontend/x64/Debug/client_frontend.ilk new file mode 100644 index 0000000..9057ca3 Binary files /dev/null and b/src/client_frontend/client_frontend/x64/Debug/client_frontend.ilk differ diff --git a/src/client_frontend/x64/Debug/client_frontend.log b/src/client_frontend/client_frontend/x64/Debug/client_frontend.log similarity index 83% rename from src/client_frontend/x64/Debug/client_frontend.log rename to src/client_frontend/client_frontend/x64/Debug/client_frontend.log index d86a234..c299e1b 100644 --- a/src/client_frontend/x64/Debug/client_frontend.log +++ b/src/client_frontend/client_frontend/x64/Debug/client_frontend.log @@ -1,2 +1,2 @@ - client_frontend.cpp + ui.cpp client_frontend.vcxproj -> C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend\x64\Debug\client_frontend.exe diff --git a/src/client_frontend/x64/Debug/client_frontend.res b/src/client_frontend/client_frontend/x64/Debug/client_frontend.res similarity index 99% rename from src/client_frontend/x64/Debug/client_frontend.res rename to src/client_frontend/client_frontend/x64/Debug/client_frontend.res index 04fddd7..64954da 100644 Binary files a/src/client_frontend/x64/Debug/client_frontend.res and b/src/client_frontend/client_frontend/x64/Debug/client_frontend.res differ diff --git a/src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/CL.command.1.tlog b/src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/CL.command.1.tlog new file mode 100644 index 0000000..9e008c3 Binary files /dev/null and b/src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/CL.command.1.tlog differ diff --git a/src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/CL.read.1.tlog b/src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/CL.read.1.tlog new file mode 100644 index 0000000..84cdf16 Binary files /dev/null and b/src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/CL.read.1.tlog differ diff --git a/src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/CL.write.1.tlog b/src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/CL.write.1.tlog new file mode 100644 index 0000000..37057b1 Binary files /dev/null and b/src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/CL.write.1.tlog differ diff --git a/src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/Cl.items.tlog b/src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/Cl.items.tlog new file mode 100644 index 0000000..90a40bf --- /dev/null +++ b/src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/Cl.items.tlog @@ -0,0 +1,3 @@ +C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend\choose_element.cpp;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend\client_frontend\x64\Debug\choose_element.obj +C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend\client_frontend.cpp;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend\client_frontend\x64\Debug\client_frontend.obj +C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend\ui.cpp;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend\client_frontend\x64\Debug\ui.obj diff --git a/src/client_frontend/x64/Debug/client_frontend.tlog/client_frontend.lastbuildstate b/src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/client_frontend.lastbuildstate similarity index 70% rename from src/client_frontend/x64/Debug/client_frontend.tlog/client_frontend.lastbuildstate rename to src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/client_frontend.lastbuildstate index 5403ed4..c6aee5b 100644 --- a/src/client_frontend/x64/Debug/client_frontend.tlog/client_frontend.lastbuildstate +++ b/src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/client_frontend.lastbuildstate @@ -1,2 +1,2 @@ -PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.38.33130:TargetPlatformVersion=10.0.22621.0:VcpkgTriplet=x64-windows: +PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.39.33519:TargetPlatformVersion=10.0.22621.0:VcpkgTriplet=x64-windows: Debug|x64|C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend\| diff --git a/src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/link.command.1.tlog b/src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/link.command.1.tlog new file mode 100644 index 0000000..5a41b57 Binary files /dev/null and b/src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/link.command.1.tlog differ diff --git a/src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/link.read.1.tlog b/src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/link.read.1.tlog new file mode 100644 index 0000000..5670a98 Binary files /dev/null and b/src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/link.read.1.tlog differ diff --git a/src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/link.secondary.1.tlog b/src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/link.secondary.1.tlog new file mode 100644 index 0000000..9edfbe3 --- /dev/null +++ b/src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/link.secondary.1.tlog @@ -0,0 +1,2 @@ +^C:\USERS\JANIS\DOCUMENTS\PROJEKTE_MIT_C\MA\MA\SRC\CLIENT_FRONTEND\CLIENT_FRONTEND\X64\DEBUG\CHOOSE_ELEMENT.OBJ|C:\USERS\JANIS\DOCUMENTS\PROJEKTE_MIT_C\MA\MA\SRC\CLIENT_FRONTEND\CLIENT_FRONTEND\X64\DEBUG\CLIENT_FRONTEND.OBJ|C:\USERS\JANIS\DOCUMENTS\PROJEKTE_MIT_C\MA\MA\SRC\CLIENT_FRONTEND\CLIENT_FRONTEND\X64\DEBUG\CLIENT_FRONTEND.RES|C:\USERS\JANIS\DOCUMENTS\PROJEKTE_MIT_C\MA\MA\SRC\CLIENT_FRONTEND\CLIENT_FRONTEND\X64\DEBUG\UI.OBJ +C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend\client_frontend\x64\Debug\client_frontend.ilk diff --git a/src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/link.write.1.tlog b/src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/link.write.1.tlog new file mode 100644 index 0000000..dac96c2 Binary files /dev/null and b/src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/link.write.1.tlog differ diff --git a/src/client_frontend/x64/Debug/client_frontend.tlog/rc.command.1.tlog b/src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/rc.command.1.tlog similarity index 56% rename from src/client_frontend/x64/Debug/client_frontend.tlog/rc.command.1.tlog rename to src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/rc.command.1.tlog index ea082cb..003ad19 100644 Binary files a/src/client_frontend/x64/Debug/client_frontend.tlog/rc.command.1.tlog and b/src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/rc.command.1.tlog differ diff --git a/src/client_frontend/x64/Debug/client_frontend.tlog/rc.read.1.tlog b/src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/rc.read.1.tlog similarity index 96% rename from src/client_frontend/x64/Debug/client_frontend.tlog/rc.read.1.tlog rename to src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/rc.read.1.tlog index cdf24cd..6266d04 100644 Binary files a/src/client_frontend/x64/Debug/client_frontend.tlog/rc.read.1.tlog and b/src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/rc.read.1.tlog differ diff --git a/src/client_frontend/x64/Debug/client_frontend.tlog/rc.write.1.tlog b/src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/rc.write.1.tlog similarity index 75% rename from src/client_frontend/x64/Debug/client_frontend.tlog/rc.write.1.tlog rename to src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/rc.write.1.tlog index 20c55db..1e02373 100644 Binary files a/src/client_frontend/x64/Debug/client_frontend.tlog/rc.write.1.tlog and b/src/client_frontend/client_frontend/x64/Debug/client_frontend.tlog/rc.write.1.tlog differ diff --git a/src/client_frontend/client_frontend/x64/Debug/vc143.idb b/src/client_frontend/client_frontend/x64/Debug/vc143.idb new file mode 100644 index 0000000..406354d Binary files /dev/null and b/src/client_frontend/client_frontend/x64/Debug/vc143.idb differ diff --git a/src/client_frontend/client_frontend/x64/Debug/vc143.pdb b/src/client_frontend/client_frontend/x64/Debug/vc143.pdb new file mode 100644 index 0000000..a3842f4 Binary files /dev/null and b/src/client_frontend/client_frontend/x64/Debug/vc143.pdb differ diff --git a/src/client_frontend/x64/Debug/vcpkg.applocal.log b/src/client_frontend/client_frontend/x64/Debug/vcpkg.applocal.log similarity index 100% rename from src/client_frontend/x64/Debug/vcpkg.applocal.log rename to src/client_frontend/client_frontend/x64/Debug/vcpkg.applocal.log diff --git a/src/client_frontend/id.h b/src/client_frontend/id.h new file mode 100644 index 0000000..eea2e1f --- /dev/null +++ b/src/client_frontend/id.h @@ -0,0 +1,8 @@ +#pragma once +#define ID_HOME_BUTTON 0 +#define ID_STARTUP_BUTTON 1 +#define ID_SCAN_FILE_BUTTON 2 +#define ID_SCAN_FOLDER_BUTTON 3 +#define ID_SETTINGS_BUTTON 4 + +#define ID_WELCOME_TEXT 1000 \ No newline at end of file diff --git a/src/client_frontend/ui.cpp b/src/client_frontend/ui.cpp new file mode 100644 index 0000000..cb7a7cf --- /dev/null +++ b/src/client_frontend/ui.cpp @@ -0,0 +1,95 @@ +#include "ui.h" +#include "id.h" +#include +#include "choose_element.h" +HWND hwnd_[100]; +int num_hwnd = 0; + +void draw_main_page(int window_width, int window_height, HWND hwnd); +void draw_scan_file_page(int window_width, int window_height, HWND hwnd); + +void ui_display_page(int page_id,int window_width, int window_height, HWND hwnd) { + //create one button in middle of screen + //hwnd_[num_hwnd] = CreateWindowW(L"BUTTON", L"OK", WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON,(window_width-50)/2,(window_height-15)/2, 100, 30, hwnd, (HMENU)ID_STARTUP_BUTTON, NULL, NULL); + //num_hwnd++; + switch (page_id) { + case 0: //main page + draw_main_page(window_width,window_height,hwnd); + break; + case 1: //scan file page + draw_scan_file_page(window_width, window_height, hwnd); + break; + } +} + +void ui_clear() { + //clear all windows + for (int i = 0; i < num_hwnd; i++) { + if (hwnd_[i] != NULL) { + DestroyWindow(hwnd_[i]); + } + } + num_hwnd = 0; +} + +void draw_main_page(int window_width, int window_height, HWND hwnd) { + //draw main page + hwnd_[num_hwnd] = CreateWindow(L"EDIT", + L"Welcome to cyberhex\r\n\r\nPlease select an option:\r\n\r\n", + WS_VISIBLE | WS_CHILD | ES_READONLY | ES_MULTILINE, + 10, 10, window_width - 30, window_height - 200, + hwnd, (HMENU)0, NULL, NULL); + num_hwnd++; + + hwnd_[num_hwnd]= CreateWindow(L"BUTTON", + L"Scan a file", + WS_VISIBLE | WS_CHILD | WS_BORDER, + (window_width)/4-100, window_height - 150, 200, 30, + hwnd, (HMENU)ID_SCAN_FILE_BUTTON, NULL, NULL); + num_hwnd++; + hwnd_[num_hwnd] = CreateWindow(L"BUTTON", + L"Scan a folder", + WS_VISIBLE | WS_CHILD | WS_BORDER, + (2* window_width) / 4-100, window_height - 150, 200, 30, + hwnd, (HMENU)ID_SCAN_FOLDER_BUTTON, NULL, NULL); + num_hwnd++; + hwnd_[num_hwnd] = CreateWindow(L"BUTTON", + L"Settings", + WS_VISIBLE | WS_CHILD | WS_BORDER, + (3* window_width) / 4-100, window_height - 150, 200, 30, + hwnd, (HMENU)ID_SETTINGS_BUTTON, NULL, NULL); + num_hwnd++; +} + +void draw_scan_file_page(int window_width, int window_height, HWND hwnd) { + //draw scan file page + std::wstring message = L"File to scan: "; + std::wstring path=open_file(hwnd); + if (path == L"cancel") { + ui_clear(); + ui_display_page(0, window_width, window_height, hwnd); + return; + } + message += path; + hwnd_[num_hwnd] = CreateWindow(L"EDIT", + message.c_str(), + WS_VISIBLE | WS_CHILD | ES_READONLY | ES_MULTILINE, + 10, 10, window_width - 30, window_height - 200, + hwnd, (HMENU)0, NULL, NULL); + num_hwnd++; + + hwnd_[num_hwnd] = CreateWindow(L"BUTTON", + L"Home", + WS_VISIBLE | WS_CHILD | WS_BORDER, + 10, window_height - 50, 200, 30, + hwnd, (HMENU)ID_HOME_BUTTON, NULL, NULL); + num_hwnd++; +} + +void update_scan_results(int window_width, int window_height, HWND hwnd,std::wstring& message) { + //draw scan results + //get value from the text field of draw_scan_file_page + //add to thetextfield the string message + + +} \ No newline at end of file diff --git a/src/client_frontend/ui.h b/src/client_frontend/ui.h new file mode 100644 index 0000000..b8693a7 --- /dev/null +++ b/src/client_frontend/ui.h @@ -0,0 +1,4 @@ +#pragma once +#include +void ui_display_page(int page_id, int window_width, int window_height, HWND hwnd); +void ui_clear(); \ No newline at end of file diff --git a/src/client_frontend/x64/Debug/client_frontend.ilk b/src/client_frontend/x64/Debug/client_frontend.ilk deleted file mode 100644 index 12097e8..0000000 Binary files a/src/client_frontend/x64/Debug/client_frontend.ilk and /dev/null differ diff --git a/src/client_frontend/x64/Debug/client_frontend.pdb b/src/client_frontend/x64/Debug/client_frontend.pdb index 94577df..8624171 100644 Binary files a/src/client_frontend/x64/Debug/client_frontend.pdb and b/src/client_frontend/x64/Debug/client_frontend.pdb differ diff --git a/src/client_frontend/x64/Debug/client_frontend.tlog/CL.command.1.tlog b/src/client_frontend/x64/Debug/client_frontend.tlog/CL.command.1.tlog deleted file mode 100644 index 5f9a2bd..0000000 Binary files a/src/client_frontend/x64/Debug/client_frontend.tlog/CL.command.1.tlog and /dev/null differ diff --git a/src/client_frontend/x64/Debug/client_frontend.tlog/CL.read.1.tlog b/src/client_frontend/x64/Debug/client_frontend.tlog/CL.read.1.tlog deleted file mode 100644 index b8d14a9..0000000 Binary files a/src/client_frontend/x64/Debug/client_frontend.tlog/CL.read.1.tlog and /dev/null differ diff --git a/src/client_frontend/x64/Debug/client_frontend.tlog/Cl.items.tlog b/src/client_frontend/x64/Debug/client_frontend.tlog/Cl.items.tlog deleted file mode 100644 index 12b895b..0000000 --- a/src/client_frontend/x64/Debug/client_frontend.tlog/Cl.items.tlog +++ /dev/null @@ -1 +0,0 @@ -C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend\client_frontend.cpp;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend\x64\Debug\client_frontend.obj diff --git a/src/client_frontend/x64/Debug/client_frontend.tlog/link.command.1.tlog b/src/client_frontend/x64/Debug/client_frontend.tlog/link.command.1.tlog deleted file mode 100644 index f749616..0000000 Binary files a/src/client_frontend/x64/Debug/client_frontend.tlog/link.command.1.tlog and /dev/null differ diff --git a/src/client_frontend/x64/Debug/client_frontend.tlog/link.write.1.tlog b/src/client_frontend/x64/Debug/client_frontend.tlog/link.write.1.tlog deleted file mode 100644 index b06ecb3..0000000 Binary files a/src/client_frontend/x64/Debug/client_frontend.tlog/link.write.1.tlog and /dev/null differ diff --git a/src/client_frontend/x64/Debug/vc143.idb b/src/client_frontend/x64/Debug/vc143.idb deleted file mode 100644 index b8d4e83..0000000 Binary files a/src/client_frontend/x64/Debug/vc143.idb and /dev/null differ diff --git a/src/client_frontend/x64/Debug/vc143.pdb b/src/client_frontend/x64/Debug/vc143.pdb deleted file mode 100644 index d6ef763..0000000 Binary files a/src/client_frontend/x64/Debug/vc143.pdb and /dev/null differ diff --git a/src/client_frontend_guilite/.vs/client_frontend_guilite/v17/.suo b/src/client_frontend_guilite/.vs/client_frontend_guilite/v17/.suo new file mode 100644 index 0000000..7c1c102 Binary files /dev/null and b/src/client_frontend_guilite/.vs/client_frontend_guilite/v17/.suo differ diff --git a/src/client_frontend_guilite/.vs/client_frontend_guilite/v17/Browse.VC.db b/src/client_frontend_guilite/.vs/client_frontend_guilite/v17/Browse.VC.db new file mode 100644 index 0000000..a8503e2 Binary files /dev/null and b/src/client_frontend_guilite/.vs/client_frontend_guilite/v17/Browse.VC.db differ diff --git a/src/client_frontend_guilite/.vs/client_frontend_guilite/v17/DocumentLayout.json b/src/client_frontend_guilite/.vs/client_frontend_guilite/v17/DocumentLayout.json new file mode 100644 index 0000000..bb57b20 --- /dev/null +++ b/src/client_frontend_guilite/.vs/client_frontend_guilite/v17/DocumentLayout.json @@ -0,0 +1,53 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{C434E5CA-752E-4D35-9986-BECF1CC34A98}|client_frontend_guilite.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\main.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", + "RelativeMoniker": "D:0:0:{C434E5CA-752E-4D35-9986-BECF1CC34A98}|client_frontend_guilite.vcxproj|solutionrelative:main.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" + }, + { + "AbsoluteMoniker": "D:0:0:{C434E5CA-752E-4D35-9986-BECF1CC34A98}|client_frontend_guilite.vcxproj|C:\\VCPKG\\VCPKG-2023.08.09\\INSTALLED\\X64-WINDOWS\\INCLUDE\\NANOGUI\\GLUTIL.H||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 1, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "glutil.h", + "DocumentMoniker": "C:\\vcpkg\\vcpkg-2023.08.09\\installed\\x64-windows\\include\\nanogui\\glutil.h", + "RelativeDocumentMoniker": "..\\..\\..\\..\\..\\..\\..\\..\\vcpkg\\vcpkg-2023.08.09\\installed\\x64-windows\\include\\nanogui\\glutil.h", + "ToolTip": "C:\\vcpkg\\vcpkg-2023.08.09\\installed\\x64-windows\\include\\nanogui\\glutil.h", + "RelativeToolTip": "..\\..\\..\\..\\..\\..\\..\\..\\vcpkg\\vcpkg-2023.08.09\\installed\\x64-windows\\include\\nanogui\\glutil.h", + "ViewState": "AQIAANwAAAAAAAAAAAD4v/gAAAAKAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|", + "WhenOpened": "2024-03-14T20:21:24.734Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "main.cpp", + "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\main.cpp", + "RelativeDocumentMoniker": "main.cpp", + "ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\main.cpp", + "RelativeToolTip": "main.cpp", + "ViewState": "AQIAAA0AAAAAAAAAAAD4vxUAAAA5AAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", + "WhenOpened": "2024-03-14T19:45:55.142Z", + "EditorCaption": "" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/client_frontend_guilite/.vs/client_frontend_guilite/v17/fileList.bin b/src/client_frontend_guilite/.vs/client_frontend_guilite/v17/fileList.bin new file mode 100644 index 0000000..be14991 Binary files /dev/null and b/src/client_frontend_guilite/.vs/client_frontend_guilite/v17/fileList.bin differ diff --git a/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_f.c434e5ca.tlog/CL.command.1.tlog b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_f.c434e5ca.tlog/CL.command.1.tlog new file mode 100644 index 0000000..5979398 Binary files /dev/null and b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_f.c434e5ca.tlog/CL.command.1.tlog differ diff --git a/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_f.c434e5ca.tlog/CL.read.1.tlog b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_f.c434e5ca.tlog/CL.read.1.tlog new file mode 100644 index 0000000..c6de8df Binary files /dev/null and b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_f.c434e5ca.tlog/CL.read.1.tlog differ diff --git a/src/client_frontend/x64/Debug/client_frontend.tlog/CL.write.1.tlog b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_f.c434e5ca.tlog/CL.write.1.tlog similarity index 60% rename from src/client_frontend/x64/Debug/client_frontend.tlog/CL.write.1.tlog rename to src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_f.c434e5ca.tlog/CL.write.1.tlog index aac515f..ee02041 100644 Binary files a/src/client_frontend/x64/Debug/client_frontend.tlog/CL.write.1.tlog and b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_f.c434e5ca.tlog/CL.write.1.tlog differ diff --git a/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_f.c434e5ca.tlog/Cl.items.tlog b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_f.c434e5ca.tlog/Cl.items.tlog new file mode 100644 index 0000000..3290d00 --- /dev/null +++ b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_f.c434e5ca.tlog/Cl.items.tlog @@ -0,0 +1 @@ +C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend_guilite\main.cpp;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend_guilite\client_f.c434e5ca\x64\Debug\main.obj diff --git a/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_f.c434e5ca.tlog/client_frontend_guilite.lastbuildstate b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_f.c434e5ca.tlog/client_frontend_guilite.lastbuildstate new file mode 100644 index 0000000..809f7f2 --- /dev/null +++ b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_f.c434e5ca.tlog/client_frontend_guilite.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.39.33519:TargetPlatformVersion=10.0.22621.0:VcpkgTriplet=x64-windows: +Debug|x64|C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend_guilite\| diff --git a/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_f.c434e5ca.tlog/client_frontend_guilite.write.1u.tlog b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_f.c434e5ca.tlog/client_frontend_guilite.write.1u.tlog new file mode 100644 index 0000000..1d548c2 Binary files /dev/null and b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_f.c434e5ca.tlog/client_frontend_guilite.write.1u.tlog differ diff --git a/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_f.c434e5ca.tlog/link.command.1.tlog b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_f.c434e5ca.tlog/link.command.1.tlog new file mode 100644 index 0000000..2185688 Binary files /dev/null and b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_f.c434e5ca.tlog/link.command.1.tlog differ diff --git a/src/client_frontend/x64/Debug/client_frontend.tlog/link.read.1.tlog b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_f.c434e5ca.tlog/link.read.1.tlog similarity index 73% rename from src/client_frontend/x64/Debug/client_frontend.tlog/link.read.1.tlog rename to src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_f.c434e5ca.tlog/link.read.1.tlog index 612c95e..ff721ee 100644 Binary files a/src/client_frontend/x64/Debug/client_frontend.tlog/link.read.1.tlog and b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_f.c434e5ca.tlog/link.read.1.tlog differ diff --git a/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_f.c434e5ca.tlog/link.secondary.1.tlog b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_f.c434e5ca.tlog/link.secondary.1.tlog new file mode 100644 index 0000000..c81bc17 --- /dev/null +++ b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_f.c434e5ca.tlog/link.secondary.1.tlog @@ -0,0 +1,2 @@ +^C:\USERS\JANIS\DOCUMENTS\PROJEKTE_MIT_C\MA\MA\SRC\CLIENT_FRONTEND_GUILITE\CLIENT_F.C434E5CA\X64\DEBUG\MAIN.OBJ +C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend_guilite\client_f.c434e5ca\x64\Debug\client_frontend_guilite.ilk diff --git a/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_f.c434e5ca.tlog/link.write.1.tlog b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_f.c434e5ca.tlog/link.write.1.tlog new file mode 100644 index 0000000..b4257de Binary files /dev/null and b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_f.c434e5ca.tlog/link.write.1.tlog differ diff --git a/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_frontend_guilite.exe.recipe b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_frontend_guilite.exe.recipe new file mode 100644 index 0000000..25e9fef --- /dev/null +++ b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_frontend_guilite.exe.recipe @@ -0,0 +1,11 @@ + + + + + C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend_guilite\x64\Debug\client_frontend_guilite.exe + + + + + + \ No newline at end of file diff --git a/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_frontend_guilite.ilk b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_frontend_guilite.ilk new file mode 100644 index 0000000..d7ed4f4 Binary files /dev/null and b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_frontend_guilite.ilk differ diff --git a/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_frontend_guilite.log b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_frontend_guilite.log new file mode 100644 index 0000000..dc99186 --- /dev/null +++ b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_frontend_guilite.log @@ -0,0 +1,8 @@ + main.cpp +C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared\minwindef.h(130,1): warning C4005: "APIENTRY": Makro-Neudefinition + (Quelldatei „main.cpp“ wird kompiliert) + C:\vcpkg\vcpkg-2023.08.09\installed\x64-windows\include\GLFW\glfw3.h(123,1): + Siehe vorherige Definition von "APIENTRY" + +LINK : warning LNK4044: Nicht erkannte Option /lOpenGL; wird ignoriert. + client_frontend_guilite.vcxproj -> C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend_guilite\x64\Debug\client_frontend_guilite.exe diff --git a/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_frontend_guilite.vcxproj.FileListAbsolute.txt b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_frontend_guilite.vcxproj.FileListAbsolute.txt new file mode 100644 index 0000000..c10309b --- /dev/null +++ b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/client_frontend_guilite.vcxproj.FileListAbsolute.txt @@ -0,0 +1,2 @@ +C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend_guilite\x64\Debug\glfw3.dll +C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend_guilite\client_f.c434e5ca\x64\Debug\client_f.58F0C424.Up2Date diff --git a/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/vc143.idb b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/vc143.idb new file mode 100644 index 0000000..24362d3 Binary files /dev/null and b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/vc143.idb differ diff --git a/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/vc143.pdb b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/vc143.pdb new file mode 100644 index 0000000..2592c67 Binary files /dev/null and b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/vc143.pdb differ diff --git a/src/client_frontend/x64/Debug/client_frontend.vcxproj.FileListAbsolute.txt b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/vcpkg.applocal.log similarity index 66% rename from src/client_frontend/x64/Debug/client_frontend.vcxproj.FileListAbsolute.txt rename to src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/vcpkg.applocal.log index 4586d81..37bb27f 100644 --- a/src/client_frontend/x64/Debug/client_frontend.vcxproj.FileListAbsolute.txt +++ b/src/client_frontend_guilite/client_f.c434e5ca/x64/Debug/vcpkg.applocal.log @@ -1 +1,2 @@ -C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend\x64\Debug\client_frontend.exe + +C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend_guilite\x64\Debug\glfw3.dll diff --git a/src/client_frontend_guilite/client_frontend_guilite.sln b/src/client_frontend_guilite/client_frontend_guilite.sln new file mode 100644 index 0000000..73e8779 --- /dev/null +++ b/src/client_frontend_guilite/client_frontend_guilite.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.9.34701.34 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "client_frontend_guilite", "client_frontend_guilite.vcxproj", "{C434E5CA-752E-4D35-9986-BECF1CC34A98}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C434E5CA-752E-4D35-9986-BECF1CC34A98}.Debug|x64.ActiveCfg = Debug|x64 + {C434E5CA-752E-4D35-9986-BECF1CC34A98}.Debug|x64.Build.0 = Debug|x64 + {C434E5CA-752E-4D35-9986-BECF1CC34A98}.Debug|x86.ActiveCfg = Debug|Win32 + {C434E5CA-752E-4D35-9986-BECF1CC34A98}.Debug|x86.Build.0 = Debug|Win32 + {C434E5CA-752E-4D35-9986-BECF1CC34A98}.Release|x64.ActiveCfg = Release|x64 + {C434E5CA-752E-4D35-9986-BECF1CC34A98}.Release|x64.Build.0 = Release|x64 + {C434E5CA-752E-4D35-9986-BECF1CC34A98}.Release|x86.ActiveCfg = Release|Win32 + {C434E5CA-752E-4D35-9986-BECF1CC34A98}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {4C17868F-AC7A-4A40-8081-8BB25B004F6A} + EndGlobalSection +EndGlobal diff --git a/src/client_frontend_guilite/client_frontend_guilite.vcxproj b/src/client_frontend_guilite/client_frontend_guilite.vcxproj new file mode 100644 index 0000000..602c189 --- /dev/null +++ b/src/client_frontend_guilite/client_frontend_guilite.vcxproj @@ -0,0 +1,137 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {c434e5ca-752e-4d35-9986-becf1cc34a98} + clientfrontendguilite + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + $(VCPKG_ROOT) + + + Console + true + $(CoreLibraryDependencies);%(AdditionalDependencies);-lOpenGL + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/src/client_frontend_guilite/client_frontend_guilite.vcxproj.filters b/src/client_frontend_guilite/client_frontend_guilite.vcxproj.filters new file mode 100644 index 0000000..87acf48 --- /dev/null +++ b/src/client_frontend_guilite/client_frontend_guilite.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Quelldateien + + + \ No newline at end of file diff --git a/src/client_frontend_guilite/client_frontend_guilite.vcxproj.user b/src/client_frontend_guilite/client_frontend_guilite.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/src/client_frontend_guilite/client_frontend_guilite.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/client_frontend_guilite/main.cpp b/src/client_frontend_guilite/main.cpp new file mode 100644 index 0000000..d467bcb --- /dev/null +++ b/src/client_frontend_guilite/main.cpp @@ -0,0 +1,123 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +// Function to simulate file scanning +void scan_file(nanogui::Screen* screen, const std::string& filePath) { + // Simulate file scanning by waiting for 10 seconds + std::this_thread::sleep_for(std::chrono::seconds(10)); + // Display the scanned file path in the window + screen->add("Scanned file: " + filePath); + // Refresh layout to ensure the new label is visible + screen->performLayout(); +} + +// Function to simulate folder scanning +void scan_folder(nanogui::Screen* screen, const std::string& folderPath) { + // Simulate folder scanning by waiting for 10 seconds + std::this_thread::sleep_for(std::chrono::seconds(10)); + // Display the scanned folder path in the window + screen->add("Scanned folder: " + folderPath); + // Refresh layout to ensure the new label is visible + screen->performLayout(); +} +std::string getFolderPath() { + std::string selectedFolderPath; + + // Initialize COM + CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE); + + // Display the folder picker dialog + BROWSEINFO browseInfo = { 0 }; + TCHAR selectedPath[MAX_PATH]; + browseInfo.hwndOwner = NULL; // Use the desktop window as the owner + browseInfo.pidlRoot = NULL; // Start from the desktop + browseInfo.pszDisplayName = selectedPath; + browseInfo.lpszTitle = TEXT("Select a folder"); + browseInfo.ulFlags = BIF_RETURNONLYFSDIRS | BIF_NEWDIALOGSTYLE; + + LPITEMIDLIST pidlSelected = SHBrowseForFolder(&browseInfo); + if (pidlSelected != NULL) { + SHGetPathFromIDList(pidlSelected, selectedPath); + + // Convert TCHAR array to std::string + std::wstring_convert> converter; + selectedFolderPath = converter.to_bytes(selectedPath); + + // Free the PIDL + IMalloc* pMalloc; + if (SUCCEEDED(SHGetMalloc(&pMalloc))) { + pMalloc->Free(pidlSelected); + pMalloc->Release(); + } + } + + // Uninitialize COM + CoUninitialize(); + + return selectedFolderPath; +} +int main() { + // Initialize NanoGUI + nanogui::init(); + + // Create a NanoGUI screen + nanogui::Screen screen(nanogui::Vector2i(400, 300), "Antivirus"); + + // Create a layout for the buttons + nanogui::Widget* buttonWidget = new nanogui::Widget(&screen); + nanogui::BoxLayout* buttonLayout = new nanogui::BoxLayout(nanogui::Orientation::Vertical, + nanogui::Alignment::Middle, + 5, 5); + buttonWidget->setLayout(buttonLayout); + + // Create a button for scanning a file + nanogui::Button* scanFileButton = new nanogui::Button(buttonWidget, "Scan File"); + scanFileButton->setFixedWidth(150); + scanFileButton->setCallback([&] { + // Open file dialog to select a file + std::string selectedFile = nanogui::file_dialog( + { {"*", "All Files"} }, + false + ); + if (!selectedFile.empty()) { + // Call scan_file function in a separate thread + std::thread(scan_file, &screen, selectedFile).detach(); + } + }); + + // Create a button for scanning a folder + nanogui::Button* scanFolderButton = new nanogui::Button(buttonWidget, "Scan Folder"); + scanFolderButton->setFixedWidth(150); + scanFolderButton->setCallback([&] { + // Open file dialog to select a folder + std::string selectedFolder = getFolderPath(); + if (!selectedFolder.empty()) { + // Call scan_folder function in a separate thread + std::thread(scan_folder, &screen, selectedFolder).detach(); + } + }); + + // Set the layout for the main screen + nanogui::BoxLayout* layout = new nanogui::BoxLayout(nanogui::Orientation::Horizontal, + nanogui::Alignment::Middle, + 10, 10); + screen.setLayout(layout); + + // Draw NanoGUI + screen.performLayout(); + screen.setVisible(true); + + // Main event loop + nanogui::mainloop(); + + // Shutdown NanoGUI + nanogui::shutdown(); + + return 0; +} diff --git a/src/client_frontend_guilite/x64/Debug/client_frontend_guilite.pdb b/src/client_frontend_guilite/x64/Debug/client_frontend_guilite.pdb new file mode 100644 index 0000000..9ee3ace Binary files /dev/null and b/src/client_frontend_guilite/x64/Debug/client_frontend_guilite.pdb differ diff --git a/src/server/cyberhex-code/system/secure_zone/php/index.php b/src/server/cyberhex-code/system/secure_zone/php/index.php index 1d332a9..8d3adb4 100644 --- a/src/server/cyberhex-code/system/secure_zone/php/index.php +++ b/src/server/cyberhex-code/system/secure_zone/php/index.php @@ -13,7 +13,7 @@ $perms = $_SESSION["perms"]; if(isset($_GET["page"])){ $page=$_GET["page"]; }else{ - $page="welcome.php"; + $page="welcome.php"; //this is actually the Dashboard } ?> @@ -67,7 +67,10 @@ if(isset($_GET["page"])){ echo('
  • User List
  • '); ?> -

    Log

    + Log

    "); + ?> -

    Cyberhex settings

    + Cyberhex settings

    "); + ?> -

    Clients

    + Clients

    "); + ?>