Fixed listbox on windows.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7160 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -418,38 +418,13 @@ void MyFrame::OnSaveProject(wxCommandEvent& event)
|
|||||||
|
|
||||||
void MyFrame::OnListBoxDoubleClick( wxCommandEvent &event )
|
void MyFrame::OnListBoxDoubleClick( wxCommandEvent &event )
|
||||||
{
|
{
|
||||||
wxString str = event.GetString();
|
int item;
|
||||||
if(strcmp(str, "closeold")==0)
|
|
||||||
{
|
|
||||||
m_textWindow->WriteText("closeold\n");
|
|
||||||
}
|
|
||||||
else if(strcmp(str, "system")==0)
|
|
||||||
{
|
|
||||||
wxTextEntryDialog dialog2(this,
|
|
||||||
"Please enter the command to execute",
|
|
||||||
appName,
|
|
||||||
"",
|
|
||||||
wxOK | wxCANCEL);
|
|
||||||
|
|
||||||
if (dialog2.ShowModal() == wxID_OK)
|
item = m_listBox->GetSelection();
|
||||||
{
|
|
||||||
m_textWindow->WriteText("system,");
|
|
||||||
m_textWindow->WriteText(dialog2.GetValue());
|
|
||||||
m_textWindow->WriteText("\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(strcmp(str, "grabfile")==0)
|
|
||||||
{
|
|
||||||
wxFileDialog dialog2(this, "Choose file to grab", "", "", "*", 0);
|
|
||||||
|
|
||||||
if (dialog2.ShowModal() == wxID_OK)
|
switch(item)
|
||||||
{
|
{
|
||||||
m_textWindow->WriteText("grabfile,");
|
case 0:
|
||||||
m_textWindow->WriteText(dialog2.GetFilename());
|
|
||||||
m_textWindow->WriteText("\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(strcmp(str, "loadwxr")==0)
|
|
||||||
{
|
{
|
||||||
wxFileDialog dialog2(this, "Choose wxr filename", "", "", "*.wxr", 0);
|
wxFileDialog dialog2(this, "Choose wxr filename", "", "", "*.wxr", 0);
|
||||||
|
|
||||||
@@ -466,7 +441,13 @@ void MyFrame::OnListBoxDoubleClick( wxCommandEvent &event )
|
|||||||
wxExecute(tempbuf);
|
wxExecute(tempbuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(strcmp(str, "mleview")==0)
|
break;
|
||||||
|
case 1:
|
||||||
|
{
|
||||||
|
m_textWindow->WriteText("closeold\n");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
{
|
{
|
||||||
wxFileDialog dialog2(this, "Choose filename to view", "", "", "*.txt", 0);
|
wxFileDialog dialog2(this, "Choose filename to view", "", "", "*.txt", 0);
|
||||||
|
|
||||||
@@ -488,7 +469,8 @@ void MyFrame::OnListBoxDoubleClick( wxCommandEvent &event )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(strcmp(str, "setbutton")==0)
|
break;
|
||||||
|
case 3:
|
||||||
{
|
{
|
||||||
wxFileDialog dialog2(this, "Choose script to attach to button", "", "", "*.ini", 0);
|
wxFileDialog dialog2(this, "Choose script to attach to button", "", "", "*.ini", 0);
|
||||||
|
|
||||||
@@ -510,85 +492,8 @@ void MyFrame::OnListBoxDoubleClick( wxCommandEvent &event )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(strcmp(str, "startinst")==0)
|
break;
|
||||||
{
|
case 4:
|
||||||
wxFileDialog dialog2(this, "Choose script to run at installation completion", "", "", "*.ini", 0);
|
|
||||||
|
|
||||||
if (dialog2.ShowModal() == wxID_OK)
|
|
||||||
{
|
|
||||||
wxTextEntryDialog dialog3(this,
|
|
||||||
"Please enter name of the gauge widget",
|
|
||||||
appName,
|
|
||||||
"",
|
|
||||||
wxOK | wxCANCEL);
|
|
||||||
|
|
||||||
if (dialog3.ShowModal() == wxID_OK)
|
|
||||||
{
|
|
||||||
m_textWindow->WriteText("startinst,");
|
|
||||||
m_textWindow->WriteText(dialog3.GetValue());
|
|
||||||
m_textWindow->WriteText(",");
|
|
||||||
m_textWindow->WriteText(dialog2.GetFilename());
|
|
||||||
m_textWindow->WriteText("\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(strcmp(str, "remove")==0)
|
|
||||||
{
|
|
||||||
wxFileDialog dialog2(this, "Choose file to remove", "", "", "*", 0);
|
|
||||||
|
|
||||||
if (dialog2.ShowModal() == wxID_OK)
|
|
||||||
{
|
|
||||||
m_textWindow->WriteText("remove,");
|
|
||||||
m_textWindow->WriteText(dialog2.GetFilename());
|
|
||||||
m_textWindow->WriteText("\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(strcmp(str, "message")==0)
|
|
||||||
{
|
|
||||||
wxTextEntryDialog dialog2(this,
|
|
||||||
"Please enter the message to display to the user",
|
|
||||||
appName,
|
|
||||||
"",
|
|
||||||
wxOK | wxCANCEL);
|
|
||||||
|
|
||||||
if (dialog2.ShowModal() == wxID_OK)
|
|
||||||
{
|
|
||||||
m_textWindow->WriteText("message,\"");
|
|
||||||
m_textWindow->WriteText(dialog2.GetValue());
|
|
||||||
m_textWindow->WriteText("\"\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(strcmp(str, "gettext")==0)
|
|
||||||
{
|
|
||||||
wxTextEntryDialog dialog2(this,
|
|
||||||
"Please enter text widget name to get from",
|
|
||||||
appName,
|
|
||||||
"",
|
|
||||||
wxOK | wxCANCEL);
|
|
||||||
|
|
||||||
if (dialog2.ShowModal() == wxID_OK)
|
|
||||||
{
|
|
||||||
m_textWindow->WriteText("gettext,");
|
|
||||||
m_textWindow->WriteText(dialog2.GetValue());
|
|
||||||
m_textWindow->WriteText("\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(strcmp(str, "settext")==0)
|
|
||||||
{
|
|
||||||
wxTextEntryDialog dialog2(this,
|
|
||||||
"Please enter text widget name to set from",
|
|
||||||
appName,
|
|
||||||
"",
|
|
||||||
wxOK | wxCANCEL);
|
|
||||||
|
|
||||||
if (dialog2.ShowModal() == wxID_OK)
|
|
||||||
{
|
|
||||||
m_textWindow->WriteText("settext,");
|
|
||||||
m_textWindow->WriteText(dialog2.GetValue());
|
|
||||||
m_textWindow->WriteText("\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(strcmp(str, "getcheck")==0)
|
|
||||||
{
|
{
|
||||||
wxFileDialog dialog2(this, "Choose script to run if not checked", "", "", "*.ini", 0);
|
wxFileDialog dialog2(this, "Choose script to run if not checked", "", "", "*.ini", 0);
|
||||||
|
|
||||||
@@ -610,7 +515,24 @@ void MyFrame::OnListBoxDoubleClick( wxCommandEvent &event )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(strcmp(str, "disable")==0)
|
break;
|
||||||
|
case 5:
|
||||||
|
{
|
||||||
|
wxTextEntryDialog dialog2(this,
|
||||||
|
"Please enter the message to display to the user",
|
||||||
|
appName,
|
||||||
|
"",
|
||||||
|
wxOK | wxCANCEL);
|
||||||
|
|
||||||
|
if (dialog2.ShowModal() == wxID_OK)
|
||||||
|
{
|
||||||
|
m_textWindow->WriteText("message,\"");
|
||||||
|
m_textWindow->WriteText(dialog2.GetValue());
|
||||||
|
m_textWindow->WriteText("\"\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
{
|
{
|
||||||
wxTextEntryDialog dialog2(this,
|
wxTextEntryDialog dialog2(this,
|
||||||
"Please enter the widget name to disable",
|
"Please enter the widget name to disable",
|
||||||
@@ -625,5 +547,101 @@ void MyFrame::OnListBoxDoubleClick( wxCommandEvent &event )
|
|||||||
m_textWindow->WriteText("\n");
|
m_textWindow->WriteText("\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
{
|
||||||
|
wxTextEntryDialog dialog2(this,
|
||||||
|
"Please enter text widget name to set from",
|
||||||
|
appName,
|
||||||
|
"",
|
||||||
|
wxOK | wxCANCEL);
|
||||||
|
|
||||||
|
if (dialog2.ShowModal() == wxID_OK)
|
||||||
|
{
|
||||||
|
m_textWindow->WriteText("settext,");
|
||||||
|
m_textWindow->WriteText(dialog2.GetValue());
|
||||||
|
m_textWindow->WriteText("\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
{
|
||||||
|
wxTextEntryDialog dialog2(this,
|
||||||
|
"Please enter text widget name to get from",
|
||||||
|
appName,
|
||||||
|
"",
|
||||||
|
wxOK | wxCANCEL);
|
||||||
|
|
||||||
|
if (dialog2.ShowModal() == wxID_OK)
|
||||||
|
{
|
||||||
|
m_textWindow->WriteText("gettext,");
|
||||||
|
m_textWindow->WriteText(dialog2.GetValue());
|
||||||
|
m_textWindow->WriteText("\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
{
|
||||||
|
wxFileDialog dialog2(this, "Choose file to grab", "", "", "*", 0);
|
||||||
|
|
||||||
|
if (dialog2.ShowModal() == wxID_OK)
|
||||||
|
{
|
||||||
|
m_textWindow->WriteText("grabfile,");
|
||||||
|
m_textWindow->WriteText(dialog2.GetFilename());
|
||||||
|
m_textWindow->WriteText("\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
{
|
||||||
|
wxFileDialog dialog2(this, "Choose file to remove", "", "", "*", 0);
|
||||||
|
|
||||||
|
if (dialog2.ShowModal() == wxID_OK)
|
||||||
|
{
|
||||||
|
m_textWindow->WriteText("remove,");
|
||||||
|
m_textWindow->WriteText(dialog2.GetFilename());
|
||||||
|
m_textWindow->WriteText("\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
{
|
||||||
|
wxTextEntryDialog dialog2(this,
|
||||||
|
"Please enter the command to execute",
|
||||||
|
appName,
|
||||||
|
"",
|
||||||
|
wxOK | wxCANCEL);
|
||||||
|
|
||||||
|
if (dialog2.ShowModal() == wxID_OK)
|
||||||
|
{
|
||||||
|
m_textWindow->WriteText("system,");
|
||||||
|
m_textWindow->WriteText(dialog2.GetValue());
|
||||||
|
m_textWindow->WriteText("\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
{
|
||||||
|
wxFileDialog dialog2(this, "Choose script to run at installation completion", "", "", "*.ini", 0);
|
||||||
|
|
||||||
|
if (dialog2.ShowModal() == wxID_OK)
|
||||||
|
{
|
||||||
|
wxTextEntryDialog dialog3(this,
|
||||||
|
"Please enter name of the gauge widget",
|
||||||
|
appName,
|
||||||
|
"",
|
||||||
|
wxOK | wxCANCEL);
|
||||||
|
|
||||||
|
if (dialog3.ShowModal() == wxID_OK)
|
||||||
|
{
|
||||||
|
m_textWindow->WriteText("startinst,");
|
||||||
|
m_textWindow->WriteText(dialog3.GetValue());
|
||||||
|
m_textWindow->WriteText(",");
|
||||||
|
m_textWindow->WriteText(dialog2.GetFilename());
|
||||||
|
m_textWindow->WriteText("\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user