-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
58 lines (44 loc) · 1.64 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#include <CtrlLib/CtrlLib.h>
#define LAYOUTFILE <ld_decode_gui/decode_gui.lay>
#include <CtrlCore/lay.h>
using namespace Upp;
struct MyAppWindow : public Withdecode<TopWindow> {
MyAppWindow() {
CtrlLayout(*this, "LD DECODE");
standard_list.Add("NTSC");
standard_list.Add("NTSC-J");
standard_list.Add("PAL");
standard_list.SetIndex(0);
btn_input_file << [=] {
FileSel file;
file.ExecuteOpen();
if(file.GetFile(0) != "")
{
//PathFile = file.GetFile(0);
text_input_file.SetText(file.GetFile(0));
//PromptOK("you have selected (" + PathFile + ")");
}
};
btn_output_folder << [=] {
FileSel folder;
folder.ExecuteSelectDir();
if(folder.GetFile(0) != "")
{
//PathFolder = folder.GetFile(0);
text_output_folder.SetText(folder.GetFile(0));
//PromptOK("you have selected (" + PathFolder + ")");
}
};
btn_decode << [=] {
String command;
option_dotPy.Get() ? (command = "ld-decode.py --") : (command = "ld-decode.py --");
command += standard_list.GetValue().ToString() + " --start " + numeric_start.GetText().ToString() + " --length " + numeric_length.GetText().ToString() + " " + text_input_file.GetText().ToString() + " " + text_output_folder.GetText().ToString();
system("msg %username% " + command);
system(command);
};
}
};
GUI_APP_MAIN
{
MyAppWindow().Run();
}