-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlsOverwriteScript.cpp
73 lines (61 loc) · 2.61 KB
/
lsOverwriteScript.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
59
60
61
62
63
64
65
66
67
68
69
70
71
#include "lsOverwriteScript.h"
//(*InternalHeaders(lsOverwriteScript)
#include <wx/string.h>
#include <wx/intl.h>
#include <wx/font.h>
//*)
extern wxString ScriptName;
extern bool islsoverwrite;
extern bool control_6;
//(*IdInit(lsOverwriteScript)
const long lsOverwriteScript::ID_STATICTEXT1 = wxNewId();
const long lsOverwriteScript::ID_STATICTEXT2 = wxNewId();
const long lsOverwriteScript::ID_BUTTON1 = wxNewId();
const long lsOverwriteScript::ID_BUTTON2 = wxNewId();
//*)
BEGIN_EVENT_TABLE(lsOverwriteScript,wxDialog)
//(*EventTable(lsOverwriteScript)
//*)
END_EVENT_TABLE()
lsOverwriteScript::lsOverwriteScript(wxWindow* parent,wxWindowID id,const wxPoint& pos,const wxSize& size)
{
//(*Initialize(lsOverwriteScript)
Create(parent, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T("wxID_ANY"));
SetClientSize(wxSize(400,154));
StaticText1 = new wxStaticText(this, ID_STATICTEXT1, _("Do you want to overwrite the current script file,"), wxPoint(56,32), wxDefaultSize, 0, _T("ID_STATICTEXT1"));
wxFont StaticText1Font(8,wxSWISS,wxFONTSTYLE_NORMAL,wxNORMAL,false,_T("Sans"),wxFONTENCODING_DEFAULT);
StaticText1->SetFont(StaticText1Font);
StaticText2 = new wxStaticText(this, ID_STATICTEXT2, _("Label"), wxPoint(56,56), wxSize(256,17), wxALIGN_CENTRE, _T("ID_STATICTEXT2"));
wxFont StaticText2Font(8,wxSWISS,wxFONTSTYLE_NORMAL,wxNORMAL,false,_T("Sans"),wxFONTENCODING_DEFAULT);
StaticText2->SetFont(StaticText2Font);
Button1 = new wxButton(this, ID_BUTTON1, _("Overwrite Script"), wxPoint(40,96), wxSize(136,29), 0, wxDefaultValidator, _T("ID_BUTTON1"));
wxFont Button1Font(8,wxSWISS,wxFONTSTYLE_NORMAL,wxNORMAL,false,_T("Sans"),wxFONTENCODING_DEFAULT);
Button1->SetFont(Button1Font);
Button2 = new wxButton(this, ID_BUTTON2, _("Cancel"), wxPoint(216,96), wxSize(136,29), 0, wxDefaultValidator, _T("ID_BUTTON2"));
wxFont Button2Font(8,wxSWISS,wxFONTSTYLE_NORMAL,wxNORMAL,false,_T("Sans"),wxFONTENCODING_DEFAULT);
Button2->SetFont(Button2Font);
Connect(ID_BUTTON1,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&lsOverwriteScript::OnButton1Click);
Connect(ID_BUTTON2,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&lsOverwriteScript::OnButton2Click);
//*)
StaticText2->SetLabel(ScriptName);
islsoverwrite = false;
}
lsOverwriteScript::~lsOverwriteScript()
{
//(*Destroy(lsOverwriteScript)
//*)
}
//overwrite button
void lsOverwriteScript::OnButton1Click(wxCommandEvent& event)
{
islsoverwrite = true;
control_6 = false;
Destroy();
}
//cancel button
void lsOverwriteScript::OnButton2Click(wxCommandEvent& event)
{
islsoverwrite = false;
control_6 = false;
Destroy();
}