00001
00002
00003
00004
00005
00006
00007
00008
00009
00011
00012 #ifndef _UPLOADDLG_H_
00013 #define _UPLOADDLG_H_
00014
00015
00020 #include <wx/dialog.h>
00021
00022
00032
00033 #define SYMBOL_WXPACKAGEUPLOADDLG_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
00034 #define SYMBOL_WXPACKAGEUPLOADDLG_TITLE _("Upload package by FTP")
00035 #define SYMBOL_WXPACKAGEUPLOADDLG_IDNAME wxID_ANY
00036 #define SYMBOL_WXPACKAGEUPLOADDLG_SIZE wxSize(400, 300)
00037 #define SYMBOL_WXPACKAGEUPLOADDLG_POSITION wxDefaultPosition
00038 #define ID_UPLOAD_FILENAME 10007
00039 #define ID_UPLOAD_USER 10008
00040 #define ID_UPLOAD_PASSWORD 10009
00041 #define ID_UPLOAD_ANONYMOUS 10001
00042 #define ID_UPLOAD_DIRECTORY 10010
00044
00045
00046
00047
00048
00049
00050 class wxPackageUploadDlg: public wxDialog
00051 {
00052 DECLARE_DYNAMIC_CLASS( wxPackageUploadDlg )
00053 DECLARE_EVENT_TABLE()
00054
00055 public:
00057 wxPackageUploadDlg( );
00058 wxPackageUploadDlg( wxWindow* parent, wxWindowID id = SYMBOL_WXPACKAGEUPLOADDLG_IDNAME, const wxString& caption = SYMBOL_WXPACKAGEUPLOADDLG_TITLE, const wxPoint& pos = SYMBOL_WXPACKAGEUPLOADDLG_POSITION, const wxSize& size = SYMBOL_WXPACKAGEUPLOADDLG_SIZE, long style = SYMBOL_WXPACKAGEUPLOADDLG_STYLE );
00059
00061 bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WXPACKAGEUPLOADDLG_IDNAME, const wxString& caption = SYMBOL_WXPACKAGEUPLOADDLG_TITLE, const wxPoint& pos = SYMBOL_WXPACKAGEUPLOADDLG_POSITION, const wxSize& size = SYMBOL_WXPACKAGEUPLOADDLG_SIZE, long style = SYMBOL_WXPACKAGEUPLOADDLG_STYLE );
00062
00064 void CreateControls();
00065
00067 static bool ShowToolTips();
00068
00069 public:
00070
00071 void OnAnonymous(wxCommandEvent &event);
00072
00073 public:
00074
00075 void SetFileToUpload(const wxString &packagefile);
00076 void SetDefaults(const wxString &defaults);
00077
00078 wxString GetUser() const
00079 { return m_pUser->GetValue(); }
00080 wxString GetPassword() const
00081 { return m_pPassword->GetValue(); }
00082 wxString GetPath() const;
00083 wxString GetServer() const;
00084
00085 protected:
00086
00088 wxStaticText* m_pFileSizeLabel;
00089 wxTextCtrl* m_pFile;
00090 wxTextCtrl* m_pUser;
00091 wxTextCtrl* m_pPassword;
00092 wxCheckBox* m_pAnonymous;
00093 wxTextCtrl* m_pDir;
00095 };
00096
00097 #endif
00098