Skip to content

Commit c4b78bf

Browse files
committed
Implement Plus/Pro Activation (untested)
because I don't have such a license
1 parent d173136 commit c4b78bf

File tree

4 files changed

+4232
-4221
lines changed

4 files changed

+4232
-4221
lines changed

source/activation.cpp

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,18 @@ void MainFrameDerived::OnActivatePersonal(wxCommandEvent& event) {
1818
if (selected != -1) {
1919
const auto& editor = editors[selected];
2020
auto dlg = new PersonalActivationDlg(this, editor);
21-
dlg->Show();
21+
dlg->ShowModal();
2222
}
2323
}
2424

2525
void MainFrameDerived::OnActivateProPlus(wxCommandEvent& event) {
26-
auto dlg = new PlusProActivationDlg(this, editor{});
27-
dlg->Show();
26+
auto selected = installsList->GetSelection();
27+
if (selected != -1) {
28+
const auto& editor = editors[selected];
29+
auto dlg = new PlusProActivationDlg(this, editor);
30+
dlg->ShowModal();
31+
}
32+
2833
}
2934

3035
void PersonalActivationDlg::OnCreateHit(wxCommandEvent& evt)
@@ -58,5 +63,11 @@ void PersonalActivationDlg::OnActivateHit(wxCommandEvent&)
5863

5964
void PlusProActivationDlg::OnActivateHit(wxCommandEvent&)
6065
{
61-
66+
std::string username = plusProActivUsernameCtrl->GetValue();
67+
std::string password = plusProActivPasswordCtrl->GetValue();
68+
std::string serial = plusProActivationSerialCtrl->GetValue();
69+
70+
auto cmd = fmt::format("{} -batchmode -username {} -password {} -serial {} –quit",the_editor.executablePath().string(),username,password,serial);
71+
72+
wxExecute(cmd, wxEXEC_SYNC);
6273
}

0 commit comments

Comments
 (0)