removed hwnd from json

This commit is contained in:
seraphima
2024-05-27 16:23:03 +02:00
parent 9f61f0793d
commit 2b71d97449
6 changed files with 0 additions and 12 deletions

View File

@@ -31,8 +31,6 @@ namespace ProjectsEditor.Data
public int Height { get; set; }
}
public long Hwnd { get; set; }
public string Application { get; set; }
public string ApplicationPath { get; set; }

View File

@@ -33,8 +33,6 @@ namespace ProjectsEditor.Models
public int Height { get; set; }
}
public IntPtr Hwnd { get; set; }
public string AppName { get; set; }
public string AppPath { get; set; }

View File

@@ -202,7 +202,6 @@ namespace ProjectsEditor.Models
{
Applications.Add(new Application()
{
Hwnd = item.Hwnd,
AppPath = item.AppPath,
AppTitle = item.AppTitle,
CommandLineArguments = item.CommandLineArguments,

View File

@@ -102,7 +102,6 @@ namespace ProjectsEditor.Utils
{
newProject.Applications.Add(new Models.Application()
{
Hwnd = new IntPtr(app.Hwnd),
AppName = app.Application,
AppPath = app.ApplicationPath,
AppTitle = app.Title,
@@ -158,7 +157,6 @@ namespace ProjectsEditor.Utils
{
wrapper.Applications.Add(new ProjectsData.ApplicationWrapper
{
Hwnd = app.Hwnd,
Application = app.AppName,
ApplicationPath = app.AppPath,
Title = app.AppTitle,

View File

@@ -122,7 +122,6 @@ int main(int argc, char* argv[])
}
Project::Application app {
.hwnd = window,
.name = data.value().name,
.title = title,
.path = data.value().installPath,

View File

@@ -23,7 +23,6 @@ struct Project
}
};
HWND hwnd{};
std::wstring name;
std::wstring title;
std::wstring path;
@@ -125,7 +124,6 @@ namespace JsonUtils
const static wchar_t* AppNameID = L"application";
const static wchar_t* AppPathID = L"application-path";
const static wchar_t* AppPackageFullNameID = L"package-full-name";
const static wchar_t* HwndID = L"hwnd";
const static wchar_t* AppTitleID = L"title";
const static wchar_t* CommandLineArgsID = L"command-line-arguments";
const static wchar_t* MinimizedID = L"minimized";
@@ -137,7 +135,6 @@ namespace JsonUtils
inline json::JsonObject ToJson(const Project::Application& data)
{
json::JsonObject json{};
json.SetNamedValue(NonLocalizable::HwndID, json::value(static_cast<double>(reinterpret_cast<long long>(data.hwnd))));
json.SetNamedValue(NonLocalizable::AppNameID, json::value(data.name));
json.SetNamedValue(NonLocalizable::AppPathID, json::value(data.path));
json.SetNamedValue(NonLocalizable::AppTitleID, json::value(data.title));
@@ -156,7 +153,6 @@ namespace JsonUtils
Project::Application result;
try
{
result.hwnd = reinterpret_cast<HWND>(static_cast<long long>(json.GetNamedNumber(NonLocalizable::HwndID)));
if (json.HasKey(NonLocalizable::AppNameID))
{
result.name = json.GetNamedString(NonLocalizable::AppNameID);