From 5253d1ab77fab1995ede03fb934edd67f1359ba8 Mon Sep 17 00:00:00 2001 From: s_nakamoto Date: Mon, 15 Feb 2010 04:03:07 +0000 Subject: [PATCH] strip out unfinished product, review and market stuff, enable _() instead of wxT() in uiproject.fbp so it uses wxGetTranslation for the wxFormBuilder generated part of the UI git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@64 1a98c847-1fd6-4fd8-948a-caf3550aa51b --- db.cpp | 21 - db.h | 39 - headers.h | 1 - main.cpp | 24 +- makefile | 7 +- makefile.unix.wx2.8 | 7 +- makefile.unix.wx2.9 | 7 +- makefile.vc | 7 +- market.cpp | 264 -- market.h | 182 -- net.cpp | 9 - net.h | 6 - serialize.h | 2 +- ui.cpp | 930 +------ ui.h | 142 +- uibase.cpp | 853 +------ uibase.h | 287 +-- uiproject.fbp | 5805 +------------------------------------------ 18 files changed, 128 insertions(+), 8465 deletions(-) delete mode 100644 market.cpp delete mode 100644 market.h diff --git a/db.cpp b/db.cpp index ff9ece52b..bbf24a0e7 100644 --- a/db.cpp +++ b/db.cpp @@ -507,27 +507,6 @@ bool LoadAddresses() -// -// CReviewDB -// - -bool CReviewDB::ReadReviews(uint256 hash, vector& vReviews) -{ - vReviews.size(); // msvc workaround, just need to do anything with vReviews - return Read(make_pair(string("reviews"), hash), vReviews); -} - -bool CReviewDB::WriteReviews(uint256 hash, const vector& vReviews) -{ - return Write(make_pair(string("reviews"), hash), vReviews); -} - - - - - - - // // CWalletDB // diff --git a/db.h b/db.h index 538076b5a..fb4e9268c 100644 --- a/db.h +++ b/db.h @@ -285,45 +285,6 @@ public: -class CReviewDB : public CDB -{ -public: - CReviewDB(const char* pszMode="r+") : CDB("reviews.dat", pszMode) { } -private: - CReviewDB(const CReviewDB&); - void operator=(const CReviewDB&); -public: - bool ReadUser(uint256 hash, CUser& user) - { - return Read(make_pair(string("user"), hash), user); - } - - bool WriteUser(uint256 hash, const CUser& user) - { - return Write(make_pair(string("user"), hash), user); - } - - bool ReadReviews(uint256 hash, vector& vReviews); - bool WriteReviews(uint256 hash, const vector& vReviews); -}; - - - - - -class CMarketDB : public CDB -{ -public: - CMarketDB(const char* pszMode="r+") : CDB("market.dat", pszMode) { } -private: - CMarketDB(const CMarketDB&); - void operator=(const CMarketDB&); -}; - - - - - class CAddrDB : public CDB { public: diff --git a/headers.h b/headers.h index dda4f9caf..7fb227ec4 100644 --- a/headers.h +++ b/headers.h @@ -99,7 +99,6 @@ using namespace boost; #include "net.h" #include "irc.h" #include "main.h" -#include "market.h" #include "rpc.h" #include "uibase.h" #include "ui.h" diff --git a/main.cpp b/main.cpp index 0c7aff842..3391a2994 100644 --- a/main.cpp +++ b/main.cpp @@ -1706,10 +1706,8 @@ bool AlreadyHave(CTxDB& txdb, const CInv& inv) { switch (inv.type) { - case MSG_TX: return mapTransactions.count(inv.hash) || txdb.ContainsTx(inv.hash); - case MSG_BLOCK: return mapBlockIndex.count(inv.hash) || mapOrphanBlocks.count(inv.hash); - case MSG_REVIEW: return true; - case MSG_PRODUCT: return mapProducts.count(inv.hash); + case MSG_TX: return mapTransactions.count(inv.hash) || txdb.ContainsTx(inv.hash); + case MSG_BLOCK: return mapBlockIndex.count(inv.hash) || mapOrphanBlocks.count(inv.hash); } // Don't know what it is, just say we already got one return true; @@ -2108,24 +2106,6 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) } - else if (strCommand == "review") - { - CDataStream vMsg(vRecv); - CReview review; - vRecv >> review; - - CInv inv(MSG_REVIEW, review.GetHash()); - pfrom->AddInventoryKnown(inv); - - if (review.AcceptReview()) - { - // Relay the original message as-is in case it's a higher version than we know how to parse - RelayMessage(inv, vMsg); - mapAlreadyAskedFor.erase(inv); - } - } - - else if (strCommand == "block") { auto_ptr pblock(new CBlock); diff --git a/makefile b/makefile index affbe517c..fb8dd2746 100644 --- a/makefile +++ b/makefile @@ -25,7 +25,7 @@ LIBS= \ -l kernel32 -l user32 -l gdi32 -l comdlg32 -l winspool -l winmm -l shell32 -l comctl32 -l ole32 -l oleaut32 -l uuid -l rpcrt4 -l advapi32 -l ws2_32 -l shlwapi WXDEFS=-DWIN32 -D__WXMSW__ -D_WINDOWS -DNOPCH CFLAGS=-mthreads -O0 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(WXDEFS) $(INCLUDEPATHS) -HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h script.h db.h net.h irc.h main.h market.h rpc.h uibase.h ui.h +HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h script.h db.h net.h irc.h main.h rpc.h uibase.h ui.h @@ -50,9 +50,6 @@ obj/net.o: net.cpp $(HEADERS) obj/main.o: main.cpp $(HEADERS) sha.h g++ -c $(CFLAGS) -o $@ $< -obj/market.o: market.cpp $(HEADERS) - g++ -c $(CFLAGS) -o $@ $< - obj/ui.o: ui.cpp $(HEADERS) g++ -c $(CFLAGS) -o $@ $< @@ -73,7 +70,7 @@ obj/ui_res.o: ui.rc rc/bitcoin.ico rc/check.ico rc/send16.bmp rc/send16mask.bmp -OBJS=obj/util.o obj/script.o obj/db.o obj/net.o obj/main.o obj/market.o \ +OBJS=obj/util.o obj/script.o obj/db.o obj/net.o obj/main.o \ obj/ui.o obj/uibase.o obj/sha.o obj/irc.o obj/rpc.o \ obj/ui_res.o diff --git a/makefile.unix.wx2.8 b/makefile.unix.wx2.8 index d3358ab2d..38d9bc0e9 100644 --- a/makefile.unix.wx2.8 +++ b/makefile.unix.wx2.8 @@ -35,7 +35,7 @@ LIBS= \ WXDEFS=-D__WXGTK__ -DNOPCH CFLAGS=-O0 -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(WXDEFS) $(INCLUDEPATHS) -HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h script.h db.h net.h irc.h main.h market.h rpc.h uibase.h ui.h +HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h script.h db.h net.h irc.h main.h rpc.h uibase.h ui.h @@ -60,9 +60,6 @@ obj/net.o: net.cpp $(HEADERS) obj/main.o: main.cpp $(HEADERS) sha.h g++ -c $(CFLAGS) -o $@ $< -obj/market.o: market.cpp $(HEADERS) - g++ -c $(CFLAGS) -o $@ $< - obj/ui.o: ui.cpp $(HEADERS) g++ -c $(CFLAGS) -o $@ $< @@ -80,7 +77,7 @@ obj/rpc.o: rpc.cpp $(HEADERS) -OBJS=obj/util.o obj/script.o obj/db.o obj/net.o obj/main.o obj/market.o \ +OBJS=obj/util.o obj/script.o obj/db.o obj/net.o obj/main.o \ obj/ui.o obj/uibase.o obj/sha.o obj/irc.o obj/rpc.o bitcoin: headers.h.gch $(OBJS) diff --git a/makefile.unix.wx2.9 b/makefile.unix.wx2.9 index 8defcbb6f..0b3b09b57 100644 --- a/makefile.unix.wx2.9 +++ b/makefile.unix.wx2.9 @@ -35,7 +35,7 @@ LIBS= \ WXDEFS=-D__WXGTK__ -DNOPCH CFLAGS=-O0 -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(WXDEFS) $(INCLUDEPATHS) -HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h script.h db.h net.h irc.h main.h market.h rpc.h uibase.h ui.h +HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h script.h db.h net.h irc.h main.h rpc.h uibase.h ui.h @@ -60,9 +60,6 @@ obj/net.o: net.cpp $(HEADERS) obj/main.o: main.cpp $(HEADERS) sha.h g++ -c $(CFLAGS) -o $@ $< -obj/market.o: market.cpp $(HEADERS) - g++ -c $(CFLAGS) -o $@ $< - obj/ui.o: ui.cpp $(HEADERS) g++ -c $(CFLAGS) -o $@ $< @@ -80,7 +77,7 @@ obj/rpc.o: rpc.cpp $(HEADERS) -OBJS=obj/util.o obj/script.o obj/db.o obj/net.o obj/main.o obj/market.o \ +OBJS=obj/util.o obj/script.o obj/db.o obj/net.o obj/main.o \ obj/ui.o obj/uibase.o obj/sha.o obj/irc.o obj/rpc.o bitcoin: headers.h.gch $(OBJS) diff --git a/makefile.vc b/makefile.vc index 527f24676..5ca8de464 100644 --- a/makefile.vc +++ b/makefile.vc @@ -23,7 +23,7 @@ LIBS= \ kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib ws2_32.lib shlwapi.lib WXDEFS=/DWIN32 /D__WXMSW__ /D_WINDOWS /DNOPCH CFLAGS=/c /nologo /Ob0 /MD$(D) /EHsc /GR /Zm300 $(DEBUGFLAGS) $(WXDEFS) $(INCLUDEPATHS) -HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h script.h db.h net.h irc.h main.h market.h rpc.h uibase.h ui.h +HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h script.h db.h net.h irc.h main.h rpc.h uibase.h ui.h @@ -45,9 +45,6 @@ obj\net.obj: net.cpp $(HEADERS) obj\main.obj: main.cpp $(HEADERS) sha.h cl $(CFLAGS) /Fo$@ %s -obj\market.obj: market.cpp $(HEADERS) - cl $(CFLAGS) /Fo$@ %s - obj\ui.obj: ui.cpp $(HEADERS) cl $(CFLAGS) /Fo$@ %s @@ -68,7 +65,7 @@ obj\ui.res: ui.rc rc/bitcoin.ico rc/check.ico rc/send16.bmp rc/send16mask.bmp r -OBJS=obj\util.obj obj\script.obj obj\db.obj obj\net.obj obj\main.obj obj\market.obj \ +OBJS=obj\util.obj obj\script.obj obj\db.obj obj\net.obj obj\main.obj \ obj\ui.obj obj\uibase.obj obj\sha.obj obj\irc.obj obj\rpc.obj \ obj\ui.res diff --git a/market.cpp b/market.cpp deleted file mode 100644 index 22b5365fa..000000000 --- a/market.cpp +++ /dev/null @@ -1,264 +0,0 @@ -// Copyright (c) 2009 Satoshi Nakamoto -// Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. - -#include "headers.h" - - - - - - - - - - -// -// Global state variables -// - -//// later figure out how these are persisted -map mapMyProducts; - - - - -map mapProducts; -CCriticalSection cs_mapProducts; - -bool AdvertInsert(const CProduct& product) -{ - uint256 hash = product.GetHash(); - bool fNew = false; - bool fUpdated = false; - - CRITICAL_BLOCK(cs_mapProducts) - { - // Insert or find existing product - pair::iterator, bool> item = mapProducts.insert(make_pair(hash, product)); - CProduct* pproduct = &(*(item.first)).second; - fNew = item.second; - - // Update if newer - if (product.nSequence > pproduct->nSequence) - { - *pproduct = product; - fUpdated = true; - } - } - - //if (fNew) - // NotifyProductAdded(hash); - //else if (fUpdated) - // NotifyProductUpdated(hash); - - return (fNew || fUpdated); -} - -void AdvertErase(const CProduct& product) -{ - uint256 hash = product.GetHash(); - CRITICAL_BLOCK(cs_mapProducts) - mapProducts.erase(hash); - //NotifyProductDeleted(hash); -} - - - - - - - - - - - - - - - - - - - -template -unsigned int Union(T& v1, T& v2) -{ - // v1 = v1 union v2 - // v1 and v2 must be sorted - // returns the number of elements added to v1 - - ///// need to check that this is equivalent, then delete this comment - //vector vUnion(v1.size() + v2.size()); - //vUnion.erase(set_union(v1.begin(), v1.end(), - // v2.begin(), v2.end(), - // vUnion.begin()), - // vUnion.end()); - - T vUnion; - vUnion.reserve(v1.size() + v2.size()); - set_union(v1.begin(), v1.end(), - v2.begin(), v2.end(), - back_inserter(vUnion)); - unsigned int nAdded = vUnion.size() - v1.size(); - if (nAdded > 0) - v1 = vUnion; - return nAdded; -} - -void CUser::AddAtom(unsigned short nAtom, bool fOrigin) -{ - // Ignore duplicates - if (binary_search(vAtomsIn.begin(), vAtomsIn.end(), nAtom) || - find(vAtomsNew.begin(), vAtomsNew.end(), nAtom) != vAtomsNew.end()) - return; - - //// instead of zero atom, should change to free atom that propagates, - //// limited to lower than a certain value like 5 so conflicts quickly - // The zero atom never propagates, - // new atoms always propagate through the user that created them - if (nAtom == 0 || fOrigin) - { - vector vTmp(1, nAtom); - Union(vAtomsIn, vTmp); - if (fOrigin) - vAtomsOut.push_back(nAtom); - return; - } - - vAtomsNew.push_back(nAtom); - - if (vAtomsNew.size() >= nFlowthroughRate || vAtomsOut.empty()) - { - // Select atom to flow through to vAtomsOut - vAtomsOut.push_back(vAtomsNew[GetRand(vAtomsNew.size())]); - - // Merge vAtomsNew into vAtomsIn - sort(vAtomsNew.begin(), vAtomsNew.end()); - Union(vAtomsIn, vAtomsNew); - vAtomsNew.clear(); - } -} - -bool AddAtomsAndPropagate(uint256 hashUserStart, const vector& vAtoms, bool fOrigin) -{ - CReviewDB reviewdb; - map > pmapPropagate[2]; - pmapPropagate[0][hashUserStart] = vAtoms; - - for (int side = 0; !pmapPropagate[side].empty(); side = 1 - side) - { - map >& mapFrom = pmapPropagate[side]; - map >& mapTo = pmapPropagate[1 - side]; - - for (map >::iterator mi = mapFrom.begin(); mi != mapFrom.end(); ++mi) - { - const uint256& hashUser = (*mi).first; - const vector& vReceived = (*mi).second; - - ///// this would be a lot easier on the database if it put the new atom at the beginning of the list, - ///// so the change would be right next to the vector size. - - // Read user - CUser user; - reviewdb.ReadUser(hashUser, user); - unsigned int nIn = user.vAtomsIn.size(); - unsigned int nNew = user.vAtomsNew.size(); - unsigned int nOut = user.vAtomsOut.size(); - - // Add atoms received - foreach(unsigned short nAtom, vReceived) - user.AddAtom(nAtom, fOrigin); - fOrigin = false; - - // Don't bother writing to disk if no changes - if (user.vAtomsIn.size() == nIn && user.vAtomsNew.size() == nNew) - continue; - - // Propagate - if (user.vAtomsOut.size() > nOut) - foreach(const uint256& hash, user.vLinksOut) - mapTo[hash].insert(mapTo[hash].end(), user.vAtomsOut.begin() + nOut, user.vAtomsOut.end()); - - // Write back - if (!reviewdb.WriteUser(hashUser, user)) - return false; - } - mapFrom.clear(); - } - return true; -} - - - - - - -bool CReview::AcceptReview() -{ - // Timestamp - nTime = GetTime(); - - // Check signature - if (!CKey::Verify(vchPubKeyFrom, GetSigHash(), vchSig)) - return false; - - CReviewDB reviewdb; - - // Add review text to recipient - vector vReviews; - reviewdb.ReadReviews(hashTo, vReviews); - vReviews.push_back(*this); - if (!reviewdb.WriteReviews(hashTo, vReviews)) - return false; - - // Add link from sender - CUser user; - uint256 hashFrom = Hash(vchPubKeyFrom.begin(), vchPubKeyFrom.end()); - reviewdb.ReadUser(hashFrom, user); - user.vLinksOut.push_back(hashTo); - if (!reviewdb.WriteUser(hashFrom, user)) - return false; - - reviewdb.Close(); - - // Propagate atoms to recipient - vector vZeroAtom(1, 0); - if (!AddAtomsAndPropagate(hashTo, user.vAtomsOut.size() ? user.vAtomsOut : vZeroAtom, false)) - return false; - - return true; -} - - - - - -bool CProduct::CheckSignature() -{ - return (CKey::Verify(vchPubKeyFrom, GetSigHash(), vchSig)); -} - -bool CProduct::CheckProduct() -{ - if (!CheckSignature()) - return false; - - // Make sure it's a summary product - if (!mapDetails.empty() || !vOrderForm.empty()) - return false; - - // Look up seller's atom count - CReviewDB reviewdb("r"); - CUser user; - reviewdb.ReadUser(GetUserHash(), user); - nAtoms = user.GetAtomCount(); - reviewdb.Close(); - - ////// delme, this is now done by AdvertInsert - //// Store to memory - //CRITICAL_BLOCK(cs_mapProducts) - // mapProducts[GetHash()] = *this; - - return true; -} diff --git a/market.h b/market.h deleted file mode 100644 index 271478730..000000000 --- a/market.h +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) 2009 Satoshi Nakamoto -// Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. - -class CUser; -class CReview; -class CProduct; - -static const unsigned int nFlowthroughRate = 2; - - - - -bool AdvertInsert(const CProduct& product); -void AdvertErase(const CProduct& product); -bool AddAtomsAndPropagate(uint256 hashUserStart, const vector& vAtoms, bool fOrigin); - - - - - - - - -class CUser -{ -public: - vector vAtomsIn; - vector vAtomsNew; - vector vAtomsOut; - vector vLinksOut; - - CUser() - { - } - - IMPLEMENT_SERIALIZE - ( - if (!(nType & SER_GETHASH)) - READWRITE(nVersion); - READWRITE(vAtomsIn); - READWRITE(vAtomsNew); - READWRITE(vAtomsOut); - READWRITE(vLinksOut); - ) - - void SetNull() - { - vAtomsIn.clear(); - vAtomsNew.clear(); - vAtomsOut.clear(); - vLinksOut.clear(); - } - - uint256 GetHash() const { return SerializeHash(*this); } - - - int GetAtomCount() const - { - return (vAtomsIn.size() + vAtomsNew.size()); - } - - void AddAtom(unsigned short nAtom, bool fOrigin); -}; - - - - - - - -class CReview -{ -public: - int nVersion; - uint256 hashTo; - map mapValue; - vector vchPubKeyFrom; - vector vchSig; - - // memory only - unsigned int nTime; - int nAtoms; - - - CReview() - { - nVersion = 1; - hashTo = 0; - nTime = 0; - nAtoms = 0; - } - - IMPLEMENT_SERIALIZE - ( - READWRITE(this->nVersion); - nVersion = this->nVersion; - if (!(nType & SER_DISK)) - READWRITE(hashTo); - READWRITE(mapValue); - READWRITE(vchPubKeyFrom); - if (!(nType & SER_GETHASH)) - READWRITE(vchSig); - ) - - uint256 GetHash() const { return SerializeHash(*this); } - uint256 GetSigHash() const { return SerializeHash(*this, SER_GETHASH|SER_SKIPSIG); } - uint256 GetUserHash() const { return Hash(vchPubKeyFrom.begin(), vchPubKeyFrom.end()); } - - - bool AcceptReview(); -}; - - - - - - - -class CProduct -{ -public: - int nVersion; - CAddress addr; - map mapValue; - map mapDetails; - vector > vOrderForm; - unsigned int nSequence; - vector vchPubKeyFrom; - vector vchSig; - - // disk only - int nAtoms; - - // memory only - set setSources; - - CProduct() - { - nVersion = 1; - nAtoms = 0; - nSequence = 0; - } - - IMPLEMENT_SERIALIZE - ( - READWRITE(this->nVersion); - nVersion = this->nVersion; - READWRITE(addr); - READWRITE(mapValue); - if (!(nType & SER_GETHASH)) - { - READWRITE(mapDetails); - READWRITE(vOrderForm); - READWRITE(nSequence); - } - READWRITE(vchPubKeyFrom); - if (!(nType & SER_GETHASH)) - READWRITE(vchSig); - if (nType & SER_DISK) - READWRITE(nAtoms); - ) - - uint256 GetHash() const { return SerializeHash(*this); } - uint256 GetSigHash() const { return SerializeHash(*this, SER_GETHASH|SER_SKIPSIG); } - uint256 GetUserHash() const { return Hash(vchPubKeyFrom.begin(), vchPubKeyFrom.end()); } - - - bool CheckSignature(); - bool CheckProduct(); -}; - - - - - - - - -extern map mapProducts; -extern CCriticalSection cs_mapProducts; -extern map mapMyProducts; diff --git a/net.cpp b/net.cpp index 061f000a7..8e8127d73 100644 --- a/net.cpp +++ b/net.cpp @@ -381,11 +381,6 @@ void CNode::CancelSubscribe(unsigned int nChannel) foreach(CNode* pnode, vNodes) if (pnode != this) pnode->PushMessage("sub-cancel", nChannel); - - // Clear memory, no longer subscribed - if (nChannel == MSG_PRODUCT) - CRITICAL_BLOCK(cs_mapProducts) - mapProducts.clear(); } } @@ -497,10 +492,6 @@ void CNode::Cleanup() // All of a nodes broadcasts and subscriptions are automatically torn down // when it goes down, so a node has to stay up to keep its broadcast going. - CRITICAL_BLOCK(cs_mapProducts) - for (map::iterator mi = mapProducts.begin(); mi != mapProducts.end();) - AdvertRemoveSource(this, MSG_PRODUCT, 0, (*(mi++)).second); - // Cancel subscriptions for (unsigned int nChannel = 0; nChannel < vfSubscribe.size(); nChannel++) if (vfSubscribe[nChannel]) diff --git a/net.h b/net.h index ce6f772f4..c7d15460a 100644 --- a/net.h +++ b/net.h @@ -341,9 +341,6 @@ enum { MSG_TX = 1, MSG_BLOCK, - MSG_REVIEW, - MSG_PRODUCT, - MSG_TABLE, }; static const char* ppszTypeName[] = @@ -351,9 +348,6 @@ static const char* ppszTypeName[] = "ERROR", "tx", "block", - "review", - "product", - "table", }; class CInv diff --git a/serialize.h b/serialize.h index f73773147..12b58ad1c 100644 --- a/serialize.h +++ b/serialize.h @@ -20,7 +20,7 @@ class CDataStream; class CAutoFile; static const int VERSION = 201; -static const char* pszSubVer = ".1"; +static const char* pszSubVer = ".2"; diff --git a/ui.cpp b/ui.cpp index aad599c77..f506fcf3e 100644 --- a/ui.cpp +++ b/ui.cpp @@ -7,22 +7,15 @@ #include #endif -void ThreadRequestProductDetails(void* parg); -void ThreadRandSendTest(void* parg); bool GetStartOnSystemStartup(); void SetStartOnSystemStartup(bool fAutoStart); DEFINE_EVENT_TYPE(wxEVT_UITHREADCALL) -DEFINE_EVENT_TYPE(wxEVT_REPLY1) -DEFINE_EVENT_TYPE(wxEVT_REPLY2) -DEFINE_EVENT_TYPE(wxEVT_REPLY3) CMainFrame* pframeMain = NULL; CMyTaskBarIcon* ptaskbaricon = NULL; -bool fRandSendTest = false; -void RandSend(); extern int g_isPainting; bool fClosedToTray = false; @@ -210,93 +203,6 @@ int ThreadSafeMessageBox(const string& message, const string& caption, int style -////////////////////////////////////////////////////////////////////////////// -// -// Custom events -// -// If this code gets used again, it should be replaced with something like UIThreadCall - -set setCallbackAvailable; -CCriticalSection cs_setCallbackAvailable; - -void AddCallbackAvailable(void* p) -{ - CRITICAL_BLOCK(cs_setCallbackAvailable) - setCallbackAvailable.insert(p); -} - -void RemoveCallbackAvailable(void* p) -{ - CRITICAL_BLOCK(cs_setCallbackAvailable) - setCallbackAvailable.erase(p); -} - -bool IsCallbackAvailable(void* p) -{ - CRITICAL_BLOCK(cs_setCallbackAvailable) - return setCallbackAvailable.count(p); - return false; -} - -template -void AddPendingCustomEvent(wxEvtHandler* pevthandler, int nEventID, const T pbeginIn, const T pendIn) -{ - // Need to rewrite with something like UIThreadCall - // I'm tired of maintaining this hack that's only called by unfinished unused code. - assert(("Unimplemented", 0)); - //if (!pevthandler) - // return; - // - //const char* pbegin = (pendIn != pbeginIn) ? &pbeginIn[0] : NULL; - //const char* pend = pbegin + (pendIn - pbeginIn) * sizeof(pbeginIn[0]); - //wxCommandEvent event(nEventID); - //wxString strData(wxChar(0), (pend - pbegin) / sizeof(wxChar) + 1); - //memcpy(&strData[0], pbegin, pend - pbegin); - //event.SetString(strData); - //event.SetInt(pend - pbegin); - // - //pevthandler->AddPendingEvent(event); -} - -template -void AddPendingCustomEvent(wxEvtHandler* pevthandler, int nEventID, const T& obj) -{ - CDataStream ss; - ss << obj; - AddPendingCustomEvent(pevthandler, nEventID, ss.begin(), ss.end()); -} - -void AddPendingReplyEvent1(void* pevthandler, CDataStream& vRecv) -{ - if (IsCallbackAvailable(pevthandler)) - AddPendingCustomEvent((wxEvtHandler*)pevthandler, wxEVT_REPLY1, vRecv.begin(), vRecv.end()); -} - -void AddPendingReplyEvent2(void* pevthandler, CDataStream& vRecv) -{ - if (IsCallbackAvailable(pevthandler)) - AddPendingCustomEvent((wxEvtHandler*)pevthandler, wxEVT_REPLY2, vRecv.begin(), vRecv.end()); -} - -void AddPendingReplyEvent3(void* pevthandler, CDataStream& vRecv) -{ - if (IsCallbackAvailable(pevthandler)) - AddPendingCustomEvent((wxEvtHandler*)pevthandler, wxEVT_REPLY3, vRecv.begin(), vRecv.end()); -} - -CDataStream GetStreamFromEvent(const wxCommandEvent& event) -{ - wxString strData = event.GetString(); - const char* pszBegin = strData.c_str(); - return CDataStream(pszBegin, pszBegin + event.GetInt(), SER_NETWORK); -} - - - - - - - ////////////////////////////////////////////////////////////////////////////// // // CMainFrame @@ -1180,16 +1086,6 @@ void CMainFrame::OnMouseEventsAddress(wxMouseEvent& event) event.Skip(); } -void CMainFrame::OnButtonCopy(wxCommandEvent& event) -{ - // Copy address box to clipboard - if (wxTheClipboard->Open()) - { - wxTheClipboard->SetData(new wxTextDataObject(m_textCtrlAddress->GetValue())); - wxTheClipboard->Close(); - } -} - void CMainFrame::OnButtonChange(wxCommandEvent& event) { CYourAddressDialog dialog(this, string(m_textCtrlAddress->GetValue())); @@ -1208,6 +1104,16 @@ void CMainFrame::OnButtonChange(wxCommandEvent& event) } } +void CMainFrame::OnButtonCopy(wxCommandEvent& event) +{ + // Copy address box to clipboard + if (wxTheClipboard->Open()) + { + wxTheClipboard->SetData(new wxTextDataObject(m_textCtrlAddress->GetValue())); + wxTheClipboard->Close(); + } +} + void CMainFrame::OnListItemActivated(wxListEvent& event) { uint256 hash((string)GetItemText(m_listCtrl, event.GetIndex(), 1)); @@ -1228,28 +1134,6 @@ void CMainFrame::OnListItemActivated(wxListEvent& event) //pdialog->Show(); } -void CMainFrame::OnListItemActivatedProductsSent(wxListEvent& event) -{ - CProduct& product = *(CProduct*)event.GetItem().GetData(); - CEditProductDialog* pdialog = new CEditProductDialog(this); - pdialog->SetProduct(product); - pdialog->Show(); -} - -void CMainFrame::OnListItemActivatedOrdersSent(wxListEvent& event) -{ - CWalletTx& order = *(CWalletTx*)event.GetItem().GetData(); - CViewOrderDialog* pdialog = new CViewOrderDialog(this, order, false); - pdialog->Show(); -} - -void CMainFrame::OnListItemActivatedOrdersReceived(wxListEvent& event) -{ - CWalletTx& order = *(CWalletTx*)event.GetItem().GetData(); - CViewOrderDialog* pdialog = new CViewOrderDialog(this, order, true); - pdialog->Show(); -} - @@ -2525,800 +2409,6 @@ void CAddressBookDialog::OnClose(wxCloseEvent& event) -////////////////////////////////////////////////////////////////////////////// -// -// CProductsDialog -// - -bool CompareIntStringPairBestFirst(const pair& item1, const pair& item2) -{ - return (item1.first > item2.first); -} - -CProductsDialog::CProductsDialog(wxWindow* parent) : CProductsDialogBase(parent) -{ - // Init column headers - m_listCtrl->InsertColumn(0, "Title", wxLIST_FORMAT_LEFT, 200); - m_listCtrl->InsertColumn(1, "Price", wxLIST_FORMAT_LEFT, 80); - m_listCtrl->InsertColumn(2, "Seller", wxLIST_FORMAT_LEFT, 80); - m_listCtrl->InsertColumn(3, "Stars", wxLIST_FORMAT_LEFT, 50); - m_listCtrl->InsertColumn(4, "Power", wxLIST_FORMAT_LEFT, 50); - - // Tally top categories - map mapTopCategories; - CRITICAL_BLOCK(cs_mapProducts) - for (map::iterator mi = mapProducts.begin(); mi != mapProducts.end(); ++mi) - mapTopCategories[(*mi).second.mapValue["category"]]++; - - // Sort top categories - vector > vTopCategories; - for (map::iterator mi = mapTopCategories.begin(); mi != mapTopCategories.end(); ++mi) - vTopCategories.push_back(make_pair((*mi).second, (*mi).first)); - sort(vTopCategories.begin(), vTopCategories.end(), CompareIntStringPairBestFirst); - - // Fill categories combo box - int nLimit = 250; - for (vector >::iterator it = vTopCategories.begin(); it != vTopCategories.end() && nLimit-- > 0; ++it) - m_comboBoxCategory->Append((*it).second); - - // Fill window with initial search - //wxCommandEvent event; - //OnButtonSearch(event); -} - -void CProductsDialog::OnCombobox(wxCommandEvent& event) -{ - OnButtonSearch(event); -} - -bool CompareProductsBestFirst(const CProduct* p1, const CProduct* p2) -{ - return (p1->nAtoms > p2->nAtoms); -} - -void CProductsDialog::OnButtonSearch(wxCommandEvent& event) -{ - string strCategory = (string)m_comboBoxCategory->GetValue(); - string strSearch = (string)m_textCtrlSearch->GetValue(); - - // Search products - vector vProductsFound; - CRITICAL_BLOCK(cs_mapProducts) - { - for (map::iterator mi = mapProducts.begin(); mi != mapProducts.end(); ++mi) - { - CProduct& product = (*mi).second; - if (product.mapValue["category"].find(strCategory) != -1) - { - if (product.mapValue["title"].find(strSearch) != -1 || - product.mapValue["description"].find(strSearch) != -1 || - product.mapValue["seller"].find(strSearch) != -1) - { - vProductsFound.push_back(&product); - } - } - } - } - - // Sort - sort(vProductsFound.begin(), vProductsFound.end(), CompareProductsBestFirst); - - // Display - foreach(CProduct* pproduct, vProductsFound) - { - InsertLine(m_listCtrl, - pproduct->mapValue["title"], - pproduct->mapValue["price"], - pproduct->mapValue["seller"], - pproduct->mapValue["stars"], - itostr(pproduct->nAtoms)); - } -} - -void CProductsDialog::OnListItemActivated(wxListEvent& event) -{ - // Doubleclick opens product - CViewProductDialog* pdialog = new CViewProductDialog(this, m_vProduct[event.GetIndex()]); - pdialog->Show(); -} - - - - - - - -////////////////////////////////////////////////////////////////////////////// -// -// CEditProductDialog -// - -CEditProductDialog::CEditProductDialog(wxWindow* parent) : CEditProductDialogBase(parent) -{ - m_textCtrlLabel[0 ] = m_textCtrlLabel0; - m_textCtrlLabel[1 ] = m_textCtrlLabel1; - m_textCtrlLabel[2 ] = m_textCtrlLabel2; - m_textCtrlLabel[3 ] = m_textCtrlLabel3; - m_textCtrlLabel[4 ] = m_textCtrlLabel4; - m_textCtrlLabel[5 ] = m_textCtrlLabel5; - m_textCtrlLabel[6 ] = m_textCtrlLabel6; - m_textCtrlLabel[7 ] = m_textCtrlLabel7; - m_textCtrlLabel[8 ] = m_textCtrlLabel8; - m_textCtrlLabel[9 ] = m_textCtrlLabel9; - m_textCtrlLabel[10] = m_textCtrlLabel10; - m_textCtrlLabel[11] = m_textCtrlLabel11; - m_textCtrlLabel[12] = m_textCtrlLabel12; - m_textCtrlLabel[13] = m_textCtrlLabel13; - m_textCtrlLabel[14] = m_textCtrlLabel14; - m_textCtrlLabel[15] = m_textCtrlLabel15; - m_textCtrlLabel[16] = m_textCtrlLabel16; - m_textCtrlLabel[17] = m_textCtrlLabel17; - m_textCtrlLabel[18] = m_textCtrlLabel18; - m_textCtrlLabel[19] = m_textCtrlLabel19; - - m_textCtrlField[0 ] = m_textCtrlField0; - m_textCtrlField[1 ] = m_textCtrlField1; - m_textCtrlField[2 ] = m_textCtrlField2; - m_textCtrlField[3 ] = m_textCtrlField3; - m_textCtrlField[4 ] = m_textCtrlField4; - m_textCtrlField[5 ] = m_textCtrlField5; - m_textCtrlField[6 ] = m_textCtrlField6; - m_textCtrlField[7 ] = m_textCtrlField7; - m_textCtrlField[8 ] = m_textCtrlField8; - m_textCtrlField[9 ] = m_textCtrlField9; - m_textCtrlField[10] = m_textCtrlField10; - m_textCtrlField[11] = m_textCtrlField11; - m_textCtrlField[12] = m_textCtrlField12; - m_textCtrlField[13] = m_textCtrlField13; - m_textCtrlField[14] = m_textCtrlField14; - m_textCtrlField[15] = m_textCtrlField15; - m_textCtrlField[16] = m_textCtrlField16; - m_textCtrlField[17] = m_textCtrlField17; - m_textCtrlField[18] = m_textCtrlField18; - m_textCtrlField[19] = m_textCtrlField19; - - m_buttonDel[0 ] = m_buttonDel0; - m_buttonDel[1 ] = m_buttonDel1; - m_buttonDel[2 ] = m_buttonDel2; - m_buttonDel[3 ] = m_buttonDel3; - m_buttonDel[4 ] = m_buttonDel4; - m_buttonDel[5 ] = m_buttonDel5; - m_buttonDel[6 ] = m_buttonDel6; - m_buttonDel[7 ] = m_buttonDel7; - m_buttonDel[8 ] = m_buttonDel8; - m_buttonDel[9 ] = m_buttonDel9; - m_buttonDel[10] = m_buttonDel10; - m_buttonDel[11] = m_buttonDel11; - m_buttonDel[12] = m_buttonDel12; - m_buttonDel[13] = m_buttonDel13; - m_buttonDel[14] = m_buttonDel14; - m_buttonDel[15] = m_buttonDel15; - m_buttonDel[16] = m_buttonDel16; - m_buttonDel[17] = m_buttonDel17; - m_buttonDel[18] = m_buttonDel18; - m_buttonDel[19] = m_buttonDel19; - - for (int i = 1; i < FIELDS_MAX; i++) - ShowLine(i, false); - - LayoutAll(); -} - -void CEditProductDialog::LayoutAll() -{ - m_scrolledWindow->Layout(); - m_scrolledWindow->GetSizer()->Fit(m_scrolledWindow); - this->Layout(); -} - -void CEditProductDialog::ShowLine(int i, bool fShow) -{ - m_textCtrlLabel[i]->Show(fShow); - m_textCtrlField[i]->Show(fShow); - m_buttonDel[i]->Show(fShow); -} - -void CEditProductDialog::OnButtonDel0(wxCommandEvent& event) { OnButtonDel(event, 0); } -void CEditProductDialog::OnButtonDel1(wxCommandEvent& event) { OnButtonDel(event, 1); } -void CEditProductDialog::OnButtonDel2(wxCommandEvent& event) { OnButtonDel(event, 2); } -void CEditProductDialog::OnButtonDel3(wxCommandEvent& event) { OnButtonDel(event, 3); } -void CEditProductDialog::OnButtonDel4(wxCommandEvent& event) { OnButtonDel(event, 4); } -void CEditProductDialog::OnButtonDel5(wxCommandEvent& event) { OnButtonDel(event, 5); } -void CEditProductDialog::OnButtonDel6(wxCommandEvent& event) { OnButtonDel(event, 6); } -void CEditProductDialog::OnButtonDel7(wxCommandEvent& event) { OnButtonDel(event, 7); } -void CEditProductDialog::OnButtonDel8(wxCommandEvent& event) { OnButtonDel(event, 8); } -void CEditProductDialog::OnButtonDel9(wxCommandEvent& event) { OnButtonDel(event, 9); } -void CEditProductDialog::OnButtonDel10(wxCommandEvent& event) { OnButtonDel(event, 10); } -void CEditProductDialog::OnButtonDel11(wxCommandEvent& event) { OnButtonDel(event, 11); } -void CEditProductDialog::OnButtonDel12(wxCommandEvent& event) { OnButtonDel(event, 12); } -void CEditProductDialog::OnButtonDel13(wxCommandEvent& event) { OnButtonDel(event, 13); } -void CEditProductDialog::OnButtonDel14(wxCommandEvent& event) { OnButtonDel(event, 14); } -void CEditProductDialog::OnButtonDel15(wxCommandEvent& event) { OnButtonDel(event, 15); } -void CEditProductDialog::OnButtonDel16(wxCommandEvent& event) { OnButtonDel(event, 16); } -void CEditProductDialog::OnButtonDel17(wxCommandEvent& event) { OnButtonDel(event, 17); } -void CEditProductDialog::OnButtonDel18(wxCommandEvent& event) { OnButtonDel(event, 18); } -void CEditProductDialog::OnButtonDel19(wxCommandEvent& event) { OnButtonDel(event, 19); } - -void CEditProductDialog::OnButtonDel(wxCommandEvent& event, int n) -{ - Freeze(); - int x, y; - m_scrolledWindow->GetViewStart(&x, &y); - int i; - for (i = n; i < FIELDS_MAX-1; i++) - { - m_textCtrlLabel[i]->SetValue(m_textCtrlLabel[i+1]->GetValue()); - m_textCtrlField[i]->SetValue(m_textCtrlField[i+1]->GetValue()); - if (!m_buttonDel[i+1]->IsShown()) - break; - } - m_textCtrlLabel[i]->SetValue(""); - m_textCtrlField[i]->SetValue(""); - ShowLine(i, false); - m_buttonAddField->Enable(true); - LayoutAll(); - m_scrolledWindow->Scroll(0, y); - Thaw(); -} - -void CEditProductDialog::OnButtonAddField(wxCommandEvent& event) -{ - for (int i = 0; i < FIELDS_MAX; i++) - { - if (!m_buttonDel[i]->IsShown()) - { - Freeze(); - ShowLine(i, true); - if (i == FIELDS_MAX-1) - m_buttonAddField->Enable(false); - LayoutAll(); - m_scrolledWindow->Scroll(0, 99999); - Thaw(); - break; - } - } -} - -void AddToMyProducts(CProduct product) -{ - CProduct& productInsert = mapMyProducts[product.GetHash()]; - productInsert = product; - //InsertLine(pframeMain->m_listCtrlProductsSent, &productInsert, - // product.mapValue["category"], - // product.mapValue["title"].substr(0, 100), - // product.mapValue["description"].substr(0, 100), - // product.mapValue["price"], - // ""); -} - -void CEditProductDialog::OnButtonSend(wxCommandEvent& event) -{ - CProduct product; - GetProduct(product); - - // Sign the detailed product - product.vchPubKeyFrom = keyUser.GetPubKey(); - if (!keyUser.Sign(product.GetSigHash(), product.vchSig)) - { - wxMessageBox("Error digitally signing the product "); - return; - } - - // Save detailed product - AddToMyProducts(product); - - // Strip down to summary product - product.mapDetails.clear(); - product.vOrderForm.clear(); - - // Sign the summary product - if (!keyUser.Sign(product.GetSigHash(), product.vchSig)) - { - wxMessageBox("Error digitally signing the product "); - return; - } - - // Verify - if (!product.CheckProduct()) - { - wxMessageBox("Errors found in product "); - return; - } - - // Broadcast - AdvertStartPublish(pnodeLocalHost, MSG_PRODUCT, 0, product); - - Destroy(); -} - -void CEditProductDialog::OnButtonPreview(wxCommandEvent& event) -{ - CProduct product; - GetProduct(product); - CViewProductDialog* pdialog = new CViewProductDialog(this, product); - pdialog->Show(); -} - -void CEditProductDialog::OnButtonCancel(wxCommandEvent& event) -{ - Destroy(); -} - -void CEditProductDialog::SetProduct(const CProduct& productIn) -{ - CProduct product = productIn; - - m_comboBoxCategory->SetValue(product.mapValue["category"]); - m_textCtrlTitle->SetValue(product.mapValue["title"]); - m_textCtrlPrice->SetValue(product.mapValue["price"]); - m_textCtrlDescription->SetValue(product.mapValue["description"]); - m_textCtrlInstructions->SetValue(product.mapValue["instructions"]); - - for (int i = 0; i < FIELDS_MAX; i++) - { - bool fUsed = i < product.vOrderForm.size(); - m_buttonDel[i]->Show(fUsed); - m_textCtrlLabel[i]->Show(fUsed); - m_textCtrlField[i]->Show(fUsed); - if (!fUsed) - continue; - - m_textCtrlLabel[i]->SetValue(product.vOrderForm[i].first); - string strControl = product.vOrderForm[i].second; - if (strControl.substr(0, 5) == "text=") - m_textCtrlField[i]->SetValue(""); - else if (strControl.substr(0, 7) == "choice=") - m_textCtrlField[i]->SetValue(strControl.substr(7)); - else - m_textCtrlField[i]->SetValue(strControl); - } -} - -void CEditProductDialog::GetProduct(CProduct& product) -{ - // map mapValue; - // vector > vOrderForm; - - product.mapValue["category"] = m_comboBoxCategory->GetValue().Trim(); - product.mapValue["title"] = m_textCtrlTitle->GetValue().Trim(); - product.mapValue["price"] = m_textCtrlPrice->GetValue().Trim(); - product.mapValue["description"] = m_textCtrlDescription->GetValue().Trim(); - product.mapValue["instructions"] = m_textCtrlInstructions->GetValue().Trim(); - - for (int i = 0; i < FIELDS_MAX; i++) - { - if (m_buttonDel[i]->IsShown()) - { - string strLabel = (string)m_textCtrlLabel[i]->GetValue().Trim(); - string strControl = (string)m_textCtrlField[i]->GetValue(); - if (strControl.empty()) - strControl = "text="; - else - strControl = "choice=" + strControl; - product.vOrderForm.push_back(make_pair(strLabel, strControl)); - } - } -} - - - - - - - -////////////////////////////////////////////////////////////////////////////// -// -// CViewProductDialog -// - -CViewProductDialog::CViewProductDialog(wxWindow* parent, const CProduct& productIn) : CViewProductDialogBase(parent) -{ - Connect(wxEVT_REPLY1, wxCommandEventHandler(CViewProductDialog::OnReply1), NULL, this); - AddCallbackAvailable(GetEventHandler()); - - // Fill display with product summary while waiting for details - product = productIn; - UpdateProductDisplay(false); - - m_buttonBack->Enable(false); - m_buttonNext->Enable(!product.vOrderForm.empty()); - m_htmlWinReviews->Show(true); - m_scrolledWindow->Show(false); - this->Layout(); - - // Request details from seller - CreateThread(ThreadRequestProductDetails, new pair(product, GetEventHandler())); -} - -CViewProductDialog::~CViewProductDialog() -{ - RemoveCallbackAvailable(GetEventHandler()); -} - -void ThreadRequestProductDetails(void* parg) -{ - // Extract parameters - pair* pitem = (pair*)parg; - CProduct product = pitem->first; - wxEvtHandler* pevthandler = pitem->second; - delete pitem; - - // Connect to seller - CNode* pnode = ConnectNode(product.addr, 5 * 60); - if (!pnode) - { - CDataStream ssEmpty; - AddPendingReplyEvent1(pevthandler, ssEmpty); - return; - } - - // Request detailed product, with response going to OnReply1 via dialog's event handler - pnode->PushRequest("getdetails", product.GetHash(), AddPendingReplyEvent1, (void*)pevthandler); -} - -void CViewProductDialog::OnReply1(wxCommandEvent& event) -{ - CDataStream ss = GetStreamFromEvent(event); - if (ss.empty()) - { - product.mapValue["description"] = "-- CAN'T CONNECT TO SELLER --\n"; - UpdateProductDisplay(true); - return; - } - - int nRet; - CProduct product2; - try - { - ss >> nRet; - if (nRet > 0) - throw false; - ss >> product2; - if (product2.GetHash() != product.GetHash()) - throw false; - if (!product2.CheckSignature()) - throw false; - } - catch (...) - { - product.mapValue["description"] = "-- INVALID RESPONSE --\n"; - UpdateProductDisplay(true); - return; - } - - product = product2; - UpdateProductDisplay(true); -} - -bool CompareReviewsBestFirst(const CReview* p1, const CReview* p2) -{ - return (p1->nAtoms > p2->nAtoms); -} - -void CViewProductDialog::UpdateProductDisplay(bool fDetails) -{ - // Product and reviews - string strHTML; - strHTML.reserve(4000); - strHTML += "\n" - "\n" - "\n" - "\n" - "\n"; - strHTML += "Category: " + HtmlEscape(product.mapValue["category"]) + "
\n"; - strHTML += "Title: " + HtmlEscape(product.mapValue["title"]) + "
\n"; - strHTML += "Price: " + HtmlEscape(product.mapValue["price"]) + "
\n"; - - if (!fDetails) - strHTML += "Loading details...
\n
\n"; - else - strHTML += HtmlEscape(product.mapValue["description"], true) + "
\n
\n"; - - strHTML += "Reviews:
\n
\n"; - - if (!product.vchPubKeyFrom.empty()) - { - CReviewDB reviewdb("r"); - - // Get reviews - vector vReviews; - reviewdb.ReadReviews(product.GetUserHash(), vReviews); - - // Get reviewer's number of atoms - vector vSortedReviews; - vSortedReviews.reserve(vReviews.size()); - for (vector::reverse_iterator it = vReviews.rbegin(); it != vReviews.rend(); ++it) - { - CReview& review = *it; - CUser user; - reviewdb.ReadUser(review.GetUserHash(), user); - review.nAtoms = user.GetAtomCount(); - vSortedReviews.push_back(&review); - } - - reviewdb.Close(); - - // Sort - stable_sort(vSortedReviews.begin(), vSortedReviews.end(), CompareReviewsBestFirst); - - // Format reviews - foreach(CReview* preview, vSortedReviews) - { - CReview& review = *preview; - int nStars = atoi(review.mapValue["stars"].c_str()); - if (nStars < 1 || nStars > 5) - continue; - - strHTML += "" + itostr(nStars) + (nStars == 1 ? " star" : " stars") + ""; - strHTML += "     "; - strHTML += DateStr(atoi64(review.mapValue["date"])) + "
\n"; - strHTML += HtmlEscape(review.mapValue["review"], true); - strHTML += "
\n
\n"; - } - } - - strHTML += "\n\n"; - - // Shrink capacity to fit - string(strHTML.begin(), strHTML.end()).swap(strHTML); - - m_htmlWinReviews->SetPage(strHTML); - - ///// need to find some other indicator to use so can allow empty order form - if (product.vOrderForm.empty()) - return; - - // Order form - m_staticTextInstructions->SetLabel(product.mapValue["instructions"]); - for (int i = 0; i < FIELDS_MAX; i++) - { - m_staticTextLabel[i] = NULL; - m_textCtrlField[i] = NULL; - m_choiceField[i] = NULL; - } - - // Construct flexgridsizer - wxBoxSizer* bSizer21 = (wxBoxSizer*)m_scrolledWindow->GetSizer(); - wxFlexGridSizer* fgSizer; - fgSizer = new wxFlexGridSizer(0, 2, 0, 0); - fgSizer->AddGrowableCol(1); - fgSizer->SetFlexibleDirection(wxBOTH); - fgSizer->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED); - - // Construct order form fields - wxWindow* windowLast = NULL; - for (int i = 0; i < product.vOrderForm.size(); i++) - { - string strLabel = product.vOrderForm[i].first; - string strControl = product.vOrderForm[i].second; - - if (strLabel.size() < 20) - strLabel.insert(strLabel.begin(), 20 - strLabel.size(), ' '); - - m_staticTextLabel[i] = new wxStaticText(m_scrolledWindow, wxID_ANY, strLabel, wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); - m_staticTextLabel[i]->Wrap(-1); - fgSizer->Add(m_staticTextLabel[i], 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5); - - if (strControl.substr(0, 5) == "text=") - { - m_textCtrlField[i] = new wxTextCtrl(m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0); - fgSizer->Add(m_textCtrlField[i], 1, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5); - windowLast = m_textCtrlField[i]; - } - else if (strControl.substr(0, 7) == "choice=") - { - vector vChoices; - ParseString(strControl.substr(7), ',', vChoices); - - wxArrayString arraystring; - foreach(const string& str, vChoices) - arraystring.Add(str); - - m_choiceField[i] = new wxChoice(m_scrolledWindow, wxID_ANY, wxDefaultPosition, wxDefaultSize, arraystring, 0); - fgSizer->Add(m_choiceField[i], 0, wxALL|wxALIGN_CENTER_VERTICAL, 5); - windowLast = m_choiceField[i]; - } - else - { - m_textCtrlField[i] = new wxTextCtrl(m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0); - fgSizer->Add(m_textCtrlField[i], 1, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5); - m_staticTextLabel[i]->Show(false); - m_textCtrlField[i]->Show(false); - } - } - - // Insert after instructions and before submit/cancel buttons - bSizer21->Insert(2, fgSizer, 0, wxEXPAND|wxRIGHT|wxLEFT, 5); - m_scrolledWindow->Layout(); - bSizer21->Fit(m_scrolledWindow); - this->Layout(); - - // Fixup the tab order - m_buttonSubmitForm->MoveAfterInTabOrder(windowLast); - m_buttonCancelForm->MoveAfterInTabOrder(m_buttonSubmitForm); - //m_buttonBack->MoveAfterInTabOrder(m_buttonCancelForm); - //m_buttonNext->MoveAfterInTabOrder(m_buttonBack); - //m_buttonCancel->MoveAfterInTabOrder(m_buttonNext); - this->Layout(); -} - -void CViewProductDialog::GetOrder(CWalletTx& wtx) -{ - wtx.SetNull(); - for (int i = 0; i < product.vOrderForm.size(); i++) - { - string strValue; - if (m_textCtrlField[i]) - strValue = m_textCtrlField[i]->GetValue().Trim(); - else - strValue = m_choiceField[i]->GetStringSelection(); - wtx.vOrderForm.push_back(make_pair(m_staticTextLabel[i]->GetLabel(), strValue)); - } -} - -void CViewProductDialog::OnButtonSubmitForm(wxCommandEvent& event) -{ - m_buttonSubmitForm->Enable(false); - m_buttonCancelForm->Enable(false); - - CWalletTx wtx; - GetOrder(wtx); - - CSendingDialog* pdialog = new CSendingDialog(this, product.addr, atoi64(product.mapValue["price"]), wtx); - if (!pdialog->ShowModal()) - { - m_buttonSubmitForm->Enable(true); - m_buttonCancelForm->Enable(true); - return; - } -} - -void CViewProductDialog::OnButtonCancelForm(wxCommandEvent& event) -{ - Destroy(); -} - -void CViewProductDialog::OnButtonBack(wxCommandEvent& event) -{ - Freeze(); - m_htmlWinReviews->Show(true); - m_scrolledWindow->Show(false); - m_buttonBack->Enable(false); - m_buttonNext->Enable(!product.vOrderForm.empty()); - this->Layout(); - Thaw(); -} - -void CViewProductDialog::OnButtonNext(wxCommandEvent& event) -{ - if (!product.vOrderForm.empty()) - { - Freeze(); - m_htmlWinReviews->Show(false); - m_scrolledWindow->Show(true); - m_buttonBack->Enable(true); - m_buttonNext->Enable(false); - this->Layout(); - Thaw(); - } -} - -void CViewProductDialog::OnButtonCancel(wxCommandEvent& event) -{ - Destroy(); -} - - - - - - - -////////////////////////////////////////////////////////////////////////////// -// -// CViewOrderDialog -// - -CViewOrderDialog::CViewOrderDialog(wxWindow* parent, CWalletTx order, bool fReceived) : CViewOrderDialogBase(parent) -{ - int64 nPrice = (fReceived ? order.GetCredit() : order.GetDebit()); - - string strHTML; - strHTML.reserve(4000); - strHTML += "\n" - "\n" - "\n" - "\n" - "\n"; - strHTML += "Time: " + HtmlEscape(DateTimeStr(order.nTimeReceived)) + "
\n"; - strHTML += "Price: " + HtmlEscape(FormatMoney(nPrice)) + "
\n"; - strHTML += "Status: " + HtmlEscape(FormatTxStatus(order)) + "
\n"; - - strHTML += "\n"; - for (int i = 0; i < order.vOrderForm.size(); i++) - { - strHTML += " "; - strHTML += "\n"; - } - strHTML += "
" + HtmlEscape(order.vOrderForm[i].first) + ":" + HtmlEscape(order.vOrderForm[i].second) + "
\n"; - - strHTML += "\n\n"; - - // Shrink capacity to fit - // (strings are ref counted, so it may live on in SetPage) - string(strHTML.begin(), strHTML.end()).swap(strHTML); - - m_htmlWin->SetPage(strHTML); -} - -void CViewOrderDialog::OnButtonOK(wxCommandEvent& event) -{ - Destroy(); -} - - - - - - - -////////////////////////////////////////////////////////////////////////////// -// -// CEditReviewDialog -// - -CEditReviewDialog::CEditReviewDialog(wxWindow* parent) : CEditReviewDialogBase(parent) -{ -} - -void CEditReviewDialog::OnButtonSubmit(wxCommandEvent& event) -{ - if (m_choiceStars->GetSelection() == -1) - { - wxMessageBox("Please select a rating "); - return; - } - - CReview review; - GetReview(review); - - // Sign the review - review.vchPubKeyFrom = keyUser.GetPubKey(); - if (!keyUser.Sign(review.GetSigHash(), review.vchSig)) - { - wxMessageBox("Unable to digitally sign the review "); - return; - } - - // Broadcast - if (!review.AcceptReview()) - { - wxMessageBox("Save failed "); - return; - } - RelayMessage(CInv(MSG_REVIEW, review.GetHash()), review); - - Destroy(); -} - -void CEditReviewDialog::OnButtonCancel(wxCommandEvent& event) -{ - Destroy(); -} - -void CEditReviewDialog::GetReview(CReview& review) -{ - review.mapValue["time"] = i64tostr(GetAdjustedTime()); - review.mapValue["stars"] = itostr(m_choiceStars->GetSelection()+1); - review.mapValue["review"] = m_textCtrlReview->GetValue(); -} - - - - - - - ////////////////////////////////////////////////////////////////////////////// // // CMyTaskBarIcon diff --git a/ui.h b/ui.h index 43e056596..da1ada7de 100644 --- a/ui.h +++ b/ui.h @@ -6,12 +6,6 @@ DECLARE_EVENT_TYPE(wxEVT_UITHREADCALL, -1) -DECLARE_EVENT_TYPE(wxEVT_REPLY1, -1) -DECLARE_EVENT_TYPE(wxEVT_REPLY2, -1) -DECLARE_EVENT_TYPE(wxEVT_REPLY3, -1) - - - extern map mapArgs; @@ -57,8 +51,8 @@ protected: void OnButtonAddressBook(wxCommandEvent& event); void OnSetFocusAddress(wxFocusEvent& event); void OnMouseEventsAddress(wxMouseEvent& event); - void OnButtonCopy(wxCommandEvent& event); void OnButtonChange(wxCommandEvent& event); + void OnButtonCopy(wxCommandEvent& event); void OnListColBeginDrag(wxListEvent& event); void OnListItemActivated(wxListEvent& event); void OnListItemActivatedProductsSent(wxListEvent& event); @@ -263,138 +257,6 @@ public: -class CProductsDialog : public CProductsDialogBase -{ -protected: - // Event handlers - void OnKeyDown(wxKeyEvent& event) { HandleCtrlA(event); } - void OnCombobox(wxCommandEvent& event); - void OnButtonSearch(wxCommandEvent& event); - void OnListItemActivated(wxListEvent& event); - -public: - /** Constructor */ - CProductsDialog(wxWindow* parent); - - // Custom - vector m_vProduct; -}; - - - -class CEditProductDialog : public CEditProductDialogBase -{ -protected: - // Event handlers - void OnKeyDown(wxKeyEvent& event) { HandleCtrlA(event); } - void OnButtonDel0(wxCommandEvent& event); - void OnButtonDel1(wxCommandEvent& event); - void OnButtonDel2(wxCommandEvent& event); - void OnButtonDel3(wxCommandEvent& event); - void OnButtonDel4(wxCommandEvent& event); - void OnButtonDel5(wxCommandEvent& event); - void OnButtonDel6(wxCommandEvent& event); - void OnButtonDel7(wxCommandEvent& event); - void OnButtonDel8(wxCommandEvent& event); - void OnButtonDel9(wxCommandEvent& event); - void OnButtonDel10(wxCommandEvent& event); - void OnButtonDel11(wxCommandEvent& event); - void OnButtonDel12(wxCommandEvent& event); - void OnButtonDel13(wxCommandEvent& event); - void OnButtonDel14(wxCommandEvent& event); - void OnButtonDel15(wxCommandEvent& event); - void OnButtonDel16(wxCommandEvent& event); - void OnButtonDel17(wxCommandEvent& event); - void OnButtonDel18(wxCommandEvent& event); - void OnButtonDel19(wxCommandEvent& event); - void OnButtonAddField(wxCommandEvent& event); - void OnButtonSend(wxCommandEvent& event); - void OnButtonPreview(wxCommandEvent& event); - void OnButtonCancel(wxCommandEvent& event); - -public: - /** Constructor */ - CEditProductDialog(wxWindow* parent); - - // Custom - enum { FIELDS_MAX = 20 }; - wxTextCtrl* m_textCtrlLabel[FIELDS_MAX]; - wxTextCtrl* m_textCtrlField[FIELDS_MAX]; - wxButton* m_buttonDel[FIELDS_MAX]; - - void LayoutAll(); - void ShowLine(int i, bool fShow=true); - void OnButtonDel(wxCommandEvent& event, int n); - void SetProduct(const CProduct& productIn); - void GetProduct(CProduct& product); - -}; - - - -class CViewProductDialog : public CViewProductDialogBase -{ -protected: - // Event handlers - void OnButtonSubmitForm(wxCommandEvent& event); - void OnButtonCancelForm(wxCommandEvent& event); - void OnButtonBack(wxCommandEvent& event); - void OnButtonNext(wxCommandEvent& event); - void OnButtonCancel(wxCommandEvent& event); - -public: - /** Constructor */ - CViewProductDialog(wxWindow* parent, const CProduct& productIn); - ~CViewProductDialog(); - - // Custom - CProduct product; - enum { FIELDS_MAX = 20 }; - wxStaticText* m_staticTextLabel[FIELDS_MAX]; - wxTextCtrl* m_textCtrlField[FIELDS_MAX]; - wxChoice* m_choiceField[FIELDS_MAX]; - - void GetOrder(CWalletTx& order); - void UpdateProductDisplay(bool fDetails); - void OnReply1(wxCommandEvent& event); -}; - - - -class CViewOrderDialog : public CViewOrderDialogBase -{ -protected: - // Event handlers - void OnButtonOK(wxCommandEvent& event); - -public: - /** Constructor */ - CViewOrderDialog(wxWindow* parent, CWalletTx order, bool fReceived); - - // Custom - bool fReceived; -}; - - - -class CEditReviewDialog : public CEditReviewDialogBase -{ -protected: - // Event handlers - void OnKeyDown(wxKeyEvent& event) { HandleCtrlA(event); } - void OnButtonSubmit(wxCommandEvent& event); - void OnButtonCancel(wxCommandEvent& event); - -public: - /** Constructor */ - CEditReviewDialog(wxWindow* parent); - - // Custom - void GetReview(CReview& review); -}; - - - class CGetTextFromUserDialog : public CGetTextFromUserDialogBase { protected: @@ -430,6 +292,8 @@ public: m_textCtrl2->SetValue(strValue2); SetSize(wxDefaultCoord, 180); } + if (!fWindows) + SetSize(1.14 * GetSize().GetWidth(), 1.14 * GetSize().GetHeight()); } // Custom diff --git a/uibase.cpp b/uibase.cpp index 08c025fac..03bd79122 100644 --- a/uibase.cpp +++ b/uibase.cpp @@ -27,39 +27,39 @@ CMainFrameBase::CMainFrameBase( wxWindow* parent, wxWindowID id, const wxString& m_menuFile = new wxMenu(); wxMenuItem* m_menuFileExit; - m_menuFileExit = new wxMenuItem( m_menuFile, wxID_ANY, wxString( wxT("E&xit") ) , wxEmptyString, wxITEM_NORMAL ); + m_menuFileExit = new wxMenuItem( m_menuFile, wxID_ANY, wxString( _("E&xit") ) , wxEmptyString, wxITEM_NORMAL ); m_menuFile->Append( m_menuFileExit ); - m_menubar->Append( m_menuFile, wxT("&File") ); + m_menubar->Append( m_menuFile, _("&File") ); m_menuView = new wxMenu(); wxMenuItem* m_menuViewShowGenerated; - m_menuViewShowGenerated = new wxMenuItem( m_menuView, wxID_VIEWSHOWGENERATED, wxString( wxT("&Show Generated Coins") ) , wxEmptyString, wxITEM_CHECK ); + m_menuViewShowGenerated = new wxMenuItem( m_menuView, wxID_VIEWSHOWGENERATED, wxString( _("&Show Generated Coins") ) , wxEmptyString, wxITEM_CHECK ); m_menuView->Append( m_menuViewShowGenerated ); - m_menubar->Append( m_menuView, wxT("&View") ); + m_menubar->Append( m_menuView, _("&View") ); m_menuOptions = new wxMenu(); wxMenuItem* m_menuOptionsGenerateBitcoins; - m_menuOptionsGenerateBitcoins = new wxMenuItem( m_menuOptions, wxID_OPTIONSGENERATEBITCOINS, wxString( wxT("&Generate Coins") ) , wxEmptyString, wxITEM_CHECK ); + m_menuOptionsGenerateBitcoins = new wxMenuItem( m_menuOptions, wxID_OPTIONSGENERATEBITCOINS, wxString( _("&Generate Coins") ) , wxEmptyString, wxITEM_CHECK ); m_menuOptions->Append( m_menuOptionsGenerateBitcoins ); wxMenuItem* m_menuOptionsChangeYourAddress; - m_menuOptionsChangeYourAddress = new wxMenuItem( m_menuOptions, wxID_ANY, wxString( wxT("&Change Your Address...") ) , wxEmptyString, wxITEM_NORMAL ); + m_menuOptionsChangeYourAddress = new wxMenuItem( m_menuOptions, wxID_ANY, wxString( _("&Change Your Address...") ) , wxEmptyString, wxITEM_NORMAL ); m_menuOptions->Append( m_menuOptionsChangeYourAddress ); wxMenuItem* m_menuOptionsOptions; - m_menuOptionsOptions = new wxMenuItem( m_menuOptions, wxID_MENUOPTIONSOPTIONS, wxString( wxT("&Options...") ) , wxEmptyString, wxITEM_NORMAL ); + m_menuOptionsOptions = new wxMenuItem( m_menuOptions, wxID_MENUOPTIONSOPTIONS, wxString( _("&Options...") ) , wxEmptyString, wxITEM_NORMAL ); m_menuOptions->Append( m_menuOptionsOptions ); - m_menubar->Append( m_menuOptions, wxT("&Options") ); + m_menubar->Append( m_menuOptions, _("&Options") ); m_menuHelp = new wxMenu(); wxMenuItem* m_menuHelpAbout; - m_menuHelpAbout = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( wxT("&About...") ) , wxEmptyString, wxITEM_NORMAL ); + m_menuHelpAbout = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("&About...") ) , wxEmptyString, wxITEM_NORMAL ); m_menuHelp->Append( m_menuHelpAbout ); - m_menubar->Append( m_menuHelp, wxT("&Help") ); + m_menubar->Append( m_menuHelp, _("&Help") ); this->SetMenuBar( m_menubar ); @@ -68,8 +68,8 @@ CMainFrameBase::CMainFrameBase( wxWindow* parent, wxWindowID id, const wxString& m_toolBar->SetToolSeparation( 1 ); m_toolBar->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) ); - m_toolBar->AddTool( wxID_BUTTONSEND, wxT("&Send Coins"), wxBitmap( send20_xpm ), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString ); - m_toolBar->AddTool( wxID_BUTTONRECEIVE, wxT("&Address Book"), wxBitmap( addressbook20_xpm ), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString ); + m_toolBar->AddTool( wxID_BUTTONSEND, _("&Send Coins"), wxBitmap( send20_xpm ), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString ); + m_toolBar->AddTool( wxID_BUTTONRECEIVE, _("&Address Book"), wxBitmap( addressbook20_xpm ), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString ); m_toolBar->Realize(); m_statusBar = this->CreateStatusBar( 1, wxST_SIZEGRIP, wxID_ANY ); @@ -84,7 +84,7 @@ CMainFrameBase::CMainFrameBase( wxWindow* parent, wxWindowID id, const wxString& wxBoxSizer* bSizer85; bSizer85 = new wxBoxSizer( wxHORIZONTAL ); - m_staticText32 = new wxStaticText( this, wxID_ANY, wxT("Your Bitcoin Address:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText32 = new wxStaticText( this, wxID_ANY, _("Your Bitcoin Address:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText32->Wrap( -1 ); bSizer85->Add( m_staticText32, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); @@ -93,14 +93,14 @@ CMainFrameBase::CMainFrameBase( wxWindow* parent, wxWindowID id, const wxString& bSizer85->Add( m_textCtrlAddress, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - m_buttonCopy = new wxButton( this, wxID_BUTTONCOPY, wxT(" &Copy to Clipboard "), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); + m_buttonNew = new wxButton( this, wxID_BUTTONCHANGE, _("&New..."), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonNew->Hide(); + + bSizer85->Add( m_buttonNew, 0, wxRIGHT, 5 ); + + m_buttonCopy = new wxButton( this, wxID_BUTTONCOPY, _(" &Copy to Clipboard "), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); bSizer85->Add( m_buttonCopy, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - m_button91 = new wxButton( this, wxID_BUTTONCHANGE, wxT("C&hange..."), wxDefaultPosition, wxDefaultSize, 0 ); - m_button91->Hide(); - - bSizer85->Add( m_button91, 0, wxRIGHT, 5 ); - bSizer85->Add( 0, 0, 0, wxEXPAND, 5 ); @@ -113,7 +113,7 @@ CMainFrameBase::CMainFrameBase( wxWindow* parent, wxWindowID id, const wxString& wxBoxSizer* bSizer66; bSizer66 = new wxBoxSizer( wxHORIZONTAL ); - m_staticText41 = new wxStaticText( m_panel14, wxID_ANY, wxT("Balance:"), wxDefaultPosition, wxSize( -1,15 ), 0 ); + m_staticText41 = new wxStaticText( m_panel14, wxID_ANY, _("Balance:"), wxDefaultPosition, wxSize( -1,15 ), 0 ); m_staticText41->Wrap( -1 ); bSizer66->Add( m_staticText41, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); @@ -132,7 +132,7 @@ CMainFrameBase::CMainFrameBase( wxWindow* parent, wxWindowID id, const wxString& bSizer3->Add( 0, 0, 0, wxEXPAND, 5 ); - wxString m_choiceFilterChoices[] = { wxT(" All"), wxT(" Sent"), wxT(" Received"), wxT(" In Progress") }; + wxString m_choiceFilterChoices[] = { _(" All"), _(" Sent"), _(" Received"), _(" In Progress") }; int m_choiceFilterNChoices = sizeof( m_choiceFilterChoices ) / sizeof( wxString ); m_choiceFilter = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxSize( 110,-1 ), m_choiceFilterNChoices, m_choiceFilterChoices, 0 ); m_choiceFilter->SetSelection( 0 ); @@ -191,8 +191,8 @@ CMainFrameBase::CMainFrameBase( wxWindow* parent, wxWindowID id, const wxString& m_textCtrlAddress->Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( CMainFrameBase::OnMouseEventsAddress ), NULL, this ); m_textCtrlAddress->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( CMainFrameBase::OnMouseEventsAddress ), NULL, this ); m_textCtrlAddress->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( CMainFrameBase::OnSetFocusAddress ), NULL, this ); + m_buttonNew->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CMainFrameBase::OnButtonChange ), NULL, this ); m_buttonCopy->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CMainFrameBase::OnButtonCopy ), NULL, this ); - m_button91->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CMainFrameBase::OnButtonChange ), NULL, this ); m_listCtrl->Connect( wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, wxListEventHandler( CMainFrameBase::OnListColBeginDrag ), NULL, this ); m_listCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( CMainFrameBase::OnListItemActivated ), NULL, this ); m_listCtrl->Connect( wxEVT_PAINT, wxPaintEventHandler( CMainFrameBase::OnPaintListCtrl ), NULL, this ); @@ -243,8 +243,8 @@ CMainFrameBase::~CMainFrameBase() m_textCtrlAddress->Disconnect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( CMainFrameBase::OnMouseEventsAddress ), NULL, this ); m_textCtrlAddress->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( CMainFrameBase::OnMouseEventsAddress ), NULL, this ); m_textCtrlAddress->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( CMainFrameBase::OnSetFocusAddress ), NULL, this ); + m_buttonNew->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CMainFrameBase::OnButtonChange ), NULL, this ); m_buttonCopy->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CMainFrameBase::OnButtonCopy ), NULL, this ); - m_button91->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CMainFrameBase::OnButtonChange ), NULL, this ); m_listCtrl->Disconnect( wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, wxListEventHandler( CMainFrameBase::OnListColBeginDrag ), NULL, this ); m_listCtrl->Disconnect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( CMainFrameBase::OnListItemActivated ), NULL, this ); m_listCtrl->Disconnect( wxEVT_PAINT, wxPaintEventHandler( CMainFrameBase::OnPaintListCtrl ), NULL, this ); @@ -268,7 +268,7 @@ CTxDetailsDialogBase::CTxDetailsDialogBase( wxWindow* parent, wxWindowID id, con wxBoxSizer* bSizer65; bSizer65 = new wxBoxSizer( wxHORIZONTAL ); - m_buttonOK = new wxButton( this, wxID_OK, wxT("OK"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); bSizer65->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); bSizer64->Add( bSizer65, 0, wxALIGN_RIGHT, 5 ); @@ -311,7 +311,7 @@ COptionsDialogBase::COptionsDialogBase( wxWindow* parent, wxWindowID id, const w bSizer69->Add( 0, 16, 0, wxEXPAND, 5 ); - m_staticText32 = new wxStaticText( m_panelMain, wxID_ANY, wxT("Optional transaction fee you give to the nodes that process your transactions."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText32 = new wxStaticText( m_panelMain, wxID_ANY, _("Optional transaction fee you give to the nodes that process your transactions."), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText32->Wrap( -1 ); m_staticText32->Hide(); @@ -320,7 +320,7 @@ COptionsDialogBase::COptionsDialogBase( wxWindow* parent, wxWindowID id, const w wxBoxSizer* bSizer56; bSizer56 = new wxBoxSizer( wxHORIZONTAL ); - m_staticText31 = new wxStaticText( m_panelMain, wxID_ANY, wxT("Transaction fee:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText31 = new wxStaticText( m_panelMain, wxID_ANY, _("Transaction fee:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText31->Wrap( -1 ); m_staticText31->Hide(); @@ -336,35 +336,35 @@ COptionsDialogBase::COptionsDialogBase( wxWindow* parent, wxWindowID id, const w wxBoxSizer* bSizer71; bSizer71 = new wxBoxSizer( wxHORIZONTAL ); - m_checkBoxLimitProcessors = new wxCheckBox( m_panelMain, wxID_ANY, wxT("&Limit coin generation to"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxLimitProcessors = new wxCheckBox( m_panelMain, wxID_ANY, _("&Limit coin generation to"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer71->Add( m_checkBoxLimitProcessors, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); m_spinCtrlLimitProcessors = new wxSpinCtrl( m_panelMain, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 48,-1 ), wxSP_ARROW_KEYS, 1, 999, 1 ); bSizer71->Add( m_spinCtrlLimitProcessors, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_staticText35 = new wxStaticText( m_panelMain, wxID_ANY, wxT("processors"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText35 = new wxStaticText( m_panelMain, wxID_ANY, _("processors"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText35->Wrap( -1 ); bSizer71->Add( m_staticText35, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); bSizer69->Add( bSizer71, 0, 0, 5 ); - m_checkBoxStartOnSystemStartup = new wxCheckBox( m_panelMain, wxID_ANY, wxT("&Start Bitcoin on system startup"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxStartOnSystemStartup = new wxCheckBox( m_panelMain, wxID_ANY, _("&Start Bitcoin on system startup"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer69->Add( m_checkBoxStartOnSystemStartup, 0, wxALL, 5 ); - m_checkBoxMinimizeToTray = new wxCheckBox( m_panelMain, wxID_ANY, wxT("&Minimize to the tray instead of the taskbar"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxMinimizeToTray = new wxCheckBox( m_panelMain, wxID_ANY, _("&Minimize to the tray instead of the taskbar"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer69->Add( m_checkBoxMinimizeToTray, 0, wxALL, 5 ); - m_checkBoxMinimizeOnClose = new wxCheckBox( m_panelMain, wxID_ANY, wxT("M&inimize to the tray on close"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxMinimizeOnClose = new wxCheckBox( m_panelMain, wxID_ANY, _("M&inimize to the tray on close"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer69->Add( m_checkBoxMinimizeOnClose, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); wxBoxSizer* bSizer102; bSizer102 = new wxBoxSizer( wxHORIZONTAL ); - m_checkBoxUseProxy = new wxCheckBox( m_panelMain, wxID_ANY, wxT("&Connect through socks4 proxy: "), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxUseProxy = new wxCheckBox( m_panelMain, wxID_ANY, _("&Connect through socks4 proxy: "), wxDefaultPosition, wxDefaultSize, 0 ); bSizer102->Add( m_checkBoxUseProxy, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); @@ -376,7 +376,7 @@ COptionsDialogBase::COptionsDialogBase( wxWindow* parent, wxWindowID id, const w bSizer103->Add( 18, 0, 0, 0, 5 ); - m_staticTextProxyIP = new wxStaticText( m_panelMain, wxID_ANY, wxT("Proxy &IP:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextProxyIP = new wxStaticText( m_panelMain, wxID_ANY, _("Proxy &IP:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextProxyIP->Wrap( -1 ); bSizer103->Add( m_staticTextProxyIP, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); @@ -384,7 +384,7 @@ COptionsDialogBase::COptionsDialogBase( wxWindow* parent, wxWindowID id, const w m_textCtrlProxyIP->SetMaxLength( 15 ); bSizer103->Add( m_textCtrlProxyIP, 0, wxALIGN_CENTER_VERTICAL, 5 ); - m_staticTextProxyPort = new wxStaticText( m_panelMain, wxID_ANY, wxT(" &Port:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextProxyPort = new wxStaticText( m_panelMain, wxID_ANY, _(" &Port:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextProxyPort->Wrap( -1 ); bSizer103->Add( m_staticTextProxyPort, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); @@ -406,19 +406,19 @@ COptionsDialogBase::COptionsDialogBase( wxWindow* parent, wxWindowID id, const w bSizer64->Add( 0, 16, 0, wxEXPAND, 5 ); - m_staticText321 = new wxStaticText( m_panelTest2, wxID_ANY, wxT("Test panel 2 for future expansion"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText321 = new wxStaticText( m_panelTest2, wxID_ANY, _("Test panel 2 for future expansion"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText321->Wrap( -1 ); bSizer64->Add( m_staticText321, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_staticText69 = new wxStaticText( m_panelTest2, wxID_ANY, wxT("Let's not start multiple pages until the first page is filled up"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText69 = new wxStaticText( m_panelTest2, wxID_ANY, _("Let's not start multiple pages until the first page is filled up"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText69->Wrap( -1 ); bSizer64->Add( m_staticText69, 0, wxALL, 5 ); - m_staticText70 = new wxStaticText( m_panelTest2, wxID_ANY, wxT("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText70 = new wxStaticText( m_panelTest2, wxID_ANY, _("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText70->Wrap( -1 ); bSizer64->Add( m_staticText70, 0, wxALL, 5 ); - m_staticText71 = new wxStaticText( m_panelTest2, wxID_ANY, wxT("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText71 = new wxStaticText( m_panelTest2, wxID_ANY, _("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText71->Wrap( -1 ); bSizer64->Add( m_staticText71, 0, wxALL, 5 ); @@ -437,13 +437,13 @@ COptionsDialogBase::COptionsDialogBase( wxWindow* parent, wxWindowID id, const w wxBoxSizer* bSizer58; bSizer58 = new wxBoxSizer( wxHORIZONTAL ); - m_buttonOK = new wxButton( this, wxID_OK, wxT("OK"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); bSizer58->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); bSizer58->Add( m_buttonCancel, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_buttonApply = new wxButton( this, wxID_APPLY, wxT("&Apply"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonApply = new wxButton( this, wxID_APPLY, _("&Apply"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); bSizer58->Add( m_buttonApply, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); bSizer55->Add( bSizer58, 0, wxALIGN_RIGHT, 5 ); @@ -504,13 +504,13 @@ CAboutDialogBase::CAboutDialogBase( wxWindow* parent, wxWindowID id, const wxStr wxBoxSizer* bSizer64; bSizer64 = new wxBoxSizer( wxHORIZONTAL ); - m_staticText40 = new wxStaticText( this, wxID_ANY, wxT("Bitcoin "), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText40 = new wxStaticText( this, wxID_ANY, _("Bitcoin "), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText40->Wrap( -1 ); m_staticText40->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Tahoma") ) ); bSizer64->Add( m_staticText40, 0, wxALIGN_BOTTOM|wxTOP|wxBOTTOM|wxLEFT, 5 ); - m_staticTextVersion = new wxStaticText( this, wxID_ANY, wxT("version"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextVersion = new wxStaticText( this, wxID_ANY, _("version"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextVersion->Wrap( -1 ); m_staticTextVersion->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) ); @@ -521,7 +521,7 @@ CAboutDialogBase::CAboutDialogBase( wxWindow* parent, wxWindowID id, const wxStr bSizer631->Add( 0, 4, 0, wxEXPAND, 5 ); - m_staticTextMain = new wxStaticText( this, wxID_ANY, wxT("Copyright © 2009-2010 Satoshi Nakamoto.\n\nThis is experimental software. Do not rely on it for actual financial transactions.\n\nDistributed under the MIT/X11 software license, see the accompanying file \nlicense.txt or http://www.opensource.org/licenses/mit-license.php.\n\nThis product includes software developed by the OpenSSL Project for use in the \nOpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by \nEric Young (eay@cryptsoft.com)."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextMain = new wxStaticText( this, wxID_ANY, _("Copyright © 2009-2010 Satoshi Nakamoto.\n\nThis is experimental software. Do not rely on it for actual financial transactions.\n\nDistributed under the MIT/X11 software license, see the accompanying file \nlicense.txt or http://www.opensource.org/licenses/mit-license.php.\n\nThis product includes software developed by the OpenSSL Project for use in the \nOpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by \nEric Young (eay@cryptsoft.com)."), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextMain->Wrap( -1 ); bSizer631->Add( m_staticTextMain, 0, wxALL, 5 ); @@ -538,7 +538,7 @@ CAboutDialogBase::CAboutDialogBase( wxWindow* parent, wxWindowID id, const wxStr bSizer61->Add( 0, 0, 1, wxEXPAND, 5 ); - m_buttonOK = new wxButton( this, wxID_OK, wxT("OK"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); bSizer61->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); bSizer60->Add( bSizer61, 0, wxALIGN_RIGHT|wxEXPAND|wxRIGHT, 5 ); @@ -577,7 +577,7 @@ CSendDialogBase::CSendDialogBase( wxWindow* parent, wxWindowID id, const wxStrin fgSizer1->Add( 0, 0, 0, wxEXPAND, 5 ); - m_staticTextInstructions = new wxStaticText( this, wxID_ANY, wxT("Enter the recipient's IP address (e.g. 123.45.6.7) for online transfer with comments and confirmation, \nor Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L) if recipient is not online."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextInstructions = new wxStaticText( this, wxID_ANY, _("Enter the recipient's IP address (e.g. 123.45.6.7) for online transfer with comments and confirmation, \nor Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L) if recipient is not online."), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextInstructions->Wrap( -1 ); fgSizer1->Add( m_staticTextInstructions, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); @@ -591,7 +591,7 @@ CSendDialogBase::CSendDialogBase( wxWindow* parent, wxWindowID id, const wxStrin m_bitmapCheckMark = new wxStaticBitmap( this, wxID_ANY, wxBitmap( check_xpm ), wxDefaultPosition, wxSize( 16,16 ), 0 ); bSizer47->Add( m_bitmapCheckMark, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - m_staticText36 = new wxStaticText( this, wxID_ANY, wxT("Pay &To:"), wxDefaultPosition, wxSize( -1,-1 ), wxALIGN_RIGHT ); + m_staticText36 = new wxStaticText( this, wxID_ANY, _("Pay &To:"), wxDefaultPosition, wxSize( -1,-1 ), wxALIGN_RIGHT ); m_staticText36->Wrap( -1 ); bSizer47->Add( m_staticText36, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); @@ -606,17 +606,17 @@ CSendDialogBase::CSendDialogBase( wxWindow* parent, wxWindowID id, const wxStrin wxBoxSizer* bSizer66; bSizer66 = new wxBoxSizer( wxHORIZONTAL ); - m_buttonPaste = new wxButton( this, wxID_BUTTONPASTE, wxT("&Paste"), wxDefaultPosition, wxSize( -1,-1 ), wxBU_EXACTFIT ); + m_buttonPaste = new wxButton( this, wxID_BUTTONPASTE, _("&Paste"), wxDefaultPosition, wxSize( -1,-1 ), wxBU_EXACTFIT ); bSizer66->Add( m_buttonPaste, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxEXPAND, 5 ); - m_buttonAddress = new wxButton( this, wxID_BUTTONADDRESSBOOK, wxT(" Address &Book..."), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonAddress = new wxButton( this, wxID_BUTTONADDRESSBOOK, _(" Address &Book..."), wxDefaultPosition, wxDefaultSize, 0 ); bSizer66->Add( m_buttonAddress, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxEXPAND, 5 ); bSizer19->Add( bSizer66, 0, wxALIGN_CENTER_VERTICAL, 5 ); fgSizer1->Add( bSizer19, 1, wxEXPAND|wxRIGHT, 5 ); - m_staticText19 = new wxStaticText( this, wxID_ANY, wxT("&Amount:"), wxDefaultPosition, wxSize( -1,-1 ), wxALIGN_RIGHT ); + m_staticText19 = new wxStaticText( this, wxID_ANY, _("&Amount:"), wxDefaultPosition, wxSize( -1,-1 ), wxALIGN_RIGHT ); m_staticText19->Wrap( -1 ); fgSizer1->Add( m_staticText19, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT|wxALIGN_RIGHT, 5 ); @@ -626,13 +626,13 @@ CSendDialogBase::CSendDialogBase( wxWindow* parent, wxWindowID id, const wxStrin fgSizer1->Add( m_textCtrlAmount, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - m_staticText20 = new wxStaticText( this, wxID_ANY, wxT("T&ransfer:"), wxDefaultPosition, wxSize( -1,-1 ), wxALIGN_RIGHT ); + m_staticText20 = new wxStaticText( this, wxID_ANY, _("T&ransfer:"), wxDefaultPosition, wxSize( -1,-1 ), wxALIGN_RIGHT ); m_staticText20->Wrap( -1 ); m_staticText20->Hide(); fgSizer1->Add( m_staticText20, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT, 5 ); - wxString m_choiceTransferTypeChoices[] = { wxT(" Standard") }; + wxString m_choiceTransferTypeChoices[] = { _(" Standard") }; int m_choiceTransferTypeNChoices = sizeof( m_choiceTransferTypeChoices ) / sizeof( wxString ); m_choiceTransferType = new wxChoice( this, wxID_CHOICETRANSFERTYPE, wxDefaultPosition, wxDefaultSize, m_choiceTransferTypeNChoices, m_choiceTransferTypeChoices, 0 ); m_choiceTransferType->SetSelection( 0 ); @@ -654,7 +654,7 @@ CSendDialogBase::CSendDialogBase( wxWindow* parent, wxWindowID id, const wxStrin wxBoxSizer* bSizer681; bSizer681 = new wxBoxSizer( wxVERTICAL ); - m_staticTextFrom = new wxStaticText( this, wxID_ANY, wxT("&From:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextFrom = new wxStaticText( this, wxID_ANY, _("&From:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextFrom->Wrap( -1 ); bSizer681->Add( m_staticTextFrom, 0, wxBOTTOM|wxLEFT, 5 ); @@ -671,7 +671,7 @@ CSendDialogBase::CSendDialogBase( wxWindow* parent, wxWindowID id, const wxStrin wxBoxSizer* bSizer68; bSizer68 = new wxBoxSizer( wxVERTICAL ); - m_staticTextMessage = new wxStaticText( this, wxID_ANY, wxT("&Message:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextMessage = new wxStaticText( this, wxID_ANY, _("&Message:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextMessage->Wrap( -1 ); bSizer68->Add( m_staticTextMessage, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); @@ -688,12 +688,12 @@ CSendDialogBase::CSendDialogBase( wxWindow* parent, wxWindowID id, const wxStrin bSizer23->Add( 0, 0, 1, wxEXPAND, 5 ); - m_buttonSend = new wxButton( this, wxID_BUTTONSEND, wxT("&Send"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonSend = new wxButton( this, wxID_BUTTONSEND, _("&Send"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); m_buttonSend->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) ); bSizer23->Add( m_buttonSend, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); bSizer23->Add( m_buttonCancel, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); bSizer21->Add( bSizer23, 0, wxEXPAND, 5 ); @@ -740,7 +740,7 @@ CSendingDialogBase::CSendingDialogBase( wxWindow* parent, wxWindowID id, const w m_staticTextSending->Wrap( -1 ); bSizer68->Add( m_staticTextSending, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 8 ); - m_textCtrlStatus = new wxTextCtrl( this, wxID_ANY, wxT("\n\nConnecting..."), wxDefaultPosition, wxDefaultSize, wxTE_CENTRE|wxTE_MULTILINE|wxTE_NO_VSCROLL|wxTE_READONLY|wxNO_BORDER ); + m_textCtrlStatus = new wxTextCtrl( this, wxID_ANY, _("\n\nConnecting..."), wxDefaultPosition, wxDefaultSize, wxTE_CENTRE|wxTE_MULTILINE|wxTE_NO_VSCROLL|wxTE_READONLY|wxNO_BORDER ); m_textCtrlStatus->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); bSizer68->Add( m_textCtrlStatus, 1, wxEXPAND|wxRIGHT|wxLEFT, 10 ); @@ -751,12 +751,12 @@ CSendingDialogBase::CSendingDialogBase( wxWindow* parent, wxWindowID id, const w bSizer69->Add( 0, 0, 1, wxEXPAND, 5 ); - m_buttonOK = new wxButton( this, wxID_ANY, wxT("OK"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonOK = new wxButton( this, wxID_ANY, _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonOK->Enable( false ); bSizer69->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); bSizer69->Add( m_buttonCancel, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); bSizer68->Add( bSizer69, 0, wxEXPAND, 5 ); @@ -790,7 +790,7 @@ CYourAddressDialogBase::CYourAddressDialogBase( wxWindow* parent, wxWindowID id, bSizer68->Add( 0, 5, 0, wxEXPAND, 5 ); - m_staticText45 = new wxStaticText( this, wxID_ANY, wxT("These are your Bitcoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you. The highlighted address is displayed in the main window."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText45 = new wxStaticText( this, wxID_ANY, _("These are your Bitcoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you. The highlighted address is displayed in the main window."), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText45->Wrap( 590 ); bSizer68->Add( m_staticText45, 0, wxALL, 5 ); @@ -803,19 +803,19 @@ CYourAddressDialogBase::CYourAddressDialogBase( wxWindow* parent, wxWindowID id, bSizer69->Add( 0, 0, 1, wxEXPAND, 5 ); - m_buttonRename = new wxButton( this, wxID_BUTTONRENAME, wxT("&Edit..."), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonRename = new wxButton( this, wxID_BUTTONRENAME, _("&Edit..."), wxDefaultPosition, wxDefaultSize, 0 ); bSizer69->Add( m_buttonRename, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_buttonNew = new wxButton( this, wxID_BUTTONNEW, wxT(" &New Address... "), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonNew = new wxButton( this, wxID_BUTTONNEW, _(" &New Address... "), wxDefaultPosition, wxSize( -1,-1 ), 0 ); bSizer69->Add( m_buttonNew, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_buttonCopy = new wxButton( this, wxID_BUTTONCOPY, wxT(" &Copy to Clipboard "), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonCopy = new wxButton( this, wxID_BUTTONCOPY, _(" &Copy to Clipboard "), wxDefaultPosition, wxSize( -1,-1 ), 0 ); bSizer69->Add( m_buttonCopy, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_buttonOK = new wxButton( this, wxID_OK, wxT("OK"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer69->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); m_buttonCancel->Hide(); bSizer69->Add( m_buttonCancel, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); @@ -861,7 +861,7 @@ CAddressBookDialogBase::CAddressBookDialogBase( wxWindow* parent, wxWindowID id, bSizer68->Add( 0, 5, 0, wxEXPAND, 5 ); - m_staticText55 = new wxStaticText( this, wxID_ANY, wxT("Bitcoin Address"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText55 = new wxStaticText( this, wxID_ANY, _("Bitcoin Address"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText55->Wrap( -1 ); m_staticText55->Hide(); @@ -876,19 +876,19 @@ CAddressBookDialogBase::CAddressBookDialogBase( wxWindow* parent, wxWindowID id, bSizer69->Add( 0, 0, 1, wxEXPAND, 5 ); - m_buttonEdit = new wxButton( this, wxID_BUTTONEDIT, wxT("&Edit..."), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonEdit = new wxButton( this, wxID_BUTTONEDIT, _("&Edit..."), wxDefaultPosition, wxDefaultSize, 0 ); bSizer69->Add( m_buttonEdit, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_buttonNew = new wxButton( this, wxID_BUTTONNEW, wxT(" &New Address... "), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonNew = new wxButton( this, wxID_BUTTONNEW, _(" &New Address... "), wxDefaultPosition, wxDefaultSize, 0 ); bSizer69->Add( m_buttonNew, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_buttonDelete = new wxButton( this, wxID_BUTTONDELETE, wxT("&Delete"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonDelete = new wxButton( this, wxID_BUTTONDELETE, _("&Delete"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer69->Add( m_buttonDelete, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_buttonOK = new wxButton( this, wxID_OK, wxT("OK"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); bSizer69->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); bSizer69->Add( m_buttonCancel, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); bSizer68->Add( bSizer69, 0, wxEXPAND, 5 ); @@ -922,713 +922,6 @@ CAddressBookDialogBase::~CAddressBookDialogBase() m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CAddressBookDialogBase::OnButtonCancel ), NULL, this ); } -CProductsDialogBase::CProductsDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizer22; - bSizer22 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer23; - bSizer23 = new wxBoxSizer( wxHORIZONTAL ); - - m_comboBoxCategory = new wxComboBox( this, wxID_ANY, wxT("(Any Category)"), wxDefaultPosition, wxSize( 150,-1 ), 0, NULL, 0 ); - m_comboBoxCategory->Append( wxT("(Any Category)") ); - bSizer23->Add( m_comboBoxCategory, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlSearch = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer23->Add( m_textCtrlSearch, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonSearch = new wxButton( this, wxID_ANY, wxT("&Search"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer23->Add( m_buttonSearch, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer22->Add( bSizer23, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - - m_listCtrl = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_NO_SORT_HEADER|wxLC_REPORT ); - bSizer22->Add( m_listCtrl, 1, wxALL|wxEXPAND, 5 ); - - this->SetSizer( bSizer22 ); - this->Layout(); - - // Connect Events - m_comboBoxCategory->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( CProductsDialogBase::OnCombobox ), NULL, this ); - m_textCtrlSearch->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CProductsDialogBase::OnKeyDown ), NULL, this ); - m_buttonSearch->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CProductsDialogBase::OnButtonSearch ), NULL, this ); - m_listCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( CProductsDialogBase::OnListItemActivated ), NULL, this ); -} - -CProductsDialogBase::~CProductsDialogBase() -{ - // Disconnect Events - m_comboBoxCategory->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( CProductsDialogBase::OnCombobox ), NULL, this ); - m_textCtrlSearch->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CProductsDialogBase::OnKeyDown ), NULL, this ); - m_buttonSearch->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CProductsDialogBase::OnButtonSearch ), NULL, this ); - m_listCtrl->Disconnect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( CProductsDialogBase::OnListItemActivated ), NULL, this ); -} - -CEditProductDialogBase::CEditProductDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_MENU ) ); - - wxBoxSizer* bSizer20; - bSizer20 = new wxBoxSizer( wxVERTICAL ); - - m_scrolledWindow = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxTAB_TRAVERSAL|wxVSCROLL ); - m_scrolledWindow->SetScrollRate( 5, 5 ); - m_scrolledWindow->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - - wxBoxSizer* bSizer21; - bSizer21 = new wxBoxSizer( wxVERTICAL ); - - wxFlexGridSizer* fgSizer8; - fgSizer8 = new wxFlexGridSizer( 0, 2, 0, 0 ); - fgSizer8->AddGrowableCol( 1 ); - fgSizer8->SetFlexibleDirection( wxBOTH ); - fgSizer8->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - m_staticText106 = new wxStaticText( m_scrolledWindow, wxID_ANY, wxT("Category"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT ); - m_staticText106->Wrap( -1 ); - fgSizer8->Add( m_staticText106, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT, 5 ); - - m_comboBoxCategory = new wxComboBox( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - m_comboBoxCategory->SetMinSize( wxSize( 180,-1 ) ); - - fgSizer8->Add( m_comboBoxCategory, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticText108 = new wxStaticText( m_scrolledWindow, wxID_ANY, wxT("Title"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT ); - m_staticText108->Wrap( -1 ); - fgSizer8->Add( m_staticText108, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT, 5 ); - - m_textCtrlTitle = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizer8->Add( m_textCtrlTitle, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_staticText107 = new wxStaticText( m_scrolledWindow, wxID_ANY, wxT("Price"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT ); - m_staticText107->Wrap( -1 ); - fgSizer8->Add( m_staticText107, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT, 5 ); - - m_textCtrlPrice = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_textCtrlPrice->SetMinSize( wxSize( 105,-1 ) ); - - fgSizer8->Add( m_textCtrlPrice, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizer21->Add( fgSizer8, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_staticText22 = new wxStaticText( m_scrolledWindow, wxID_ANY, wxT("Page 1: Description"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText22->Wrap( -1 ); - bSizer21->Add( m_staticText22, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_textCtrlDescription = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE ); - m_textCtrlDescription->SetMinSize( wxSize( -1,170 ) ); - - bSizer21->Add( m_textCtrlDescription, 0, wxALL|wxEXPAND, 5 ); - - m_staticText23 = new wxStaticText( m_scrolledWindow, wxID_ANY, wxT("Page 2: Order Form"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText23->Wrap( -1 ); - bSizer21->Add( m_staticText23, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_textCtrlInstructions = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE ); - m_textCtrlInstructions->SetMinSize( wxSize( -1,120 ) ); - - bSizer21->Add( m_textCtrlInstructions, 0, wxEXPAND|wxALL, 5 ); - - fgSizer5 = new wxFlexGridSizer( 0, 3, 0, 0 ); - fgSizer5->AddGrowableCol( 1 ); - fgSizer5->SetFlexibleDirection( wxBOTH ); - fgSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - m_staticText24 = new wxStaticText( m_scrolledWindow, wxID_ANY, wxT("Label"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText24->Wrap( -1 ); - fgSizer5->Add( m_staticText24, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_staticText25 = new wxStaticText( m_scrolledWindow, wxID_ANY, wxT("Comma separated list of choices, or leave blank for text field"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText25->Wrap( -1 ); - fgSizer5->Add( m_staticText25, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); - - - fgSizer5->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_textCtrlLabel0 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_textCtrlLabel0->SetMinSize( wxSize( 150,-1 ) ); - - fgSizer5->Add( m_textCtrlLabel0, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlField0 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 ); - fgSizer5->Add( m_textCtrlField0, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonDel0 = new wxButton( m_scrolledWindow, wxID_DEL0, wxT("Delete"), wxDefaultPosition, wxSize( 60,20 ), 0 ); - fgSizer5->Add( m_buttonDel0, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlLabel1 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_textCtrlLabel1->SetMinSize( wxSize( 150,-1 ) ); - - fgSizer5->Add( m_textCtrlLabel1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlField1 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 ); - fgSizer5->Add( m_textCtrlField1, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonDel1 = new wxButton( m_scrolledWindow, wxID_DEL1, wxT("Delete"), wxDefaultPosition, wxSize( 60,20 ), 0 ); - fgSizer5->Add( m_buttonDel1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - m_textCtrlLabel2 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_textCtrlLabel2->SetMinSize( wxSize( 150,-1 ) ); - - fgSizer5->Add( m_textCtrlLabel2, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlField2 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 ); - fgSizer5->Add( m_textCtrlField2, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonDel2 = new wxButton( m_scrolledWindow, wxID_DEL2, wxT("Delete"), wxDefaultPosition, wxSize( 60,20 ), 0 ); - fgSizer5->Add( m_buttonDel2, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - m_textCtrlLabel3 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_textCtrlLabel3->SetMinSize( wxSize( 150,-1 ) ); - - fgSizer5->Add( m_textCtrlLabel3, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlField3 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 ); - fgSizer5->Add( m_textCtrlField3, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonDel3 = new wxButton( m_scrolledWindow, wxID_DEL3, wxT("Delete"), wxDefaultPosition, wxSize( 60,20 ), 0 ); - fgSizer5->Add( m_buttonDel3, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - m_textCtrlLabel4 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_textCtrlLabel4->SetMinSize( wxSize( 150,-1 ) ); - - fgSizer5->Add( m_textCtrlLabel4, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlField4 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 ); - fgSizer5->Add( m_textCtrlField4, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonDel4 = new wxButton( m_scrolledWindow, wxID_DEL4, wxT("Delete"), wxDefaultPosition, wxSize( 60,20 ), 0 ); - fgSizer5->Add( m_buttonDel4, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - m_textCtrlLabel5 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_textCtrlLabel5->SetMinSize( wxSize( 150,-1 ) ); - - fgSizer5->Add( m_textCtrlLabel5, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlField5 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 ); - fgSizer5->Add( m_textCtrlField5, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonDel5 = new wxButton( m_scrolledWindow, wxID_DEL5, wxT("Delete"), wxDefaultPosition, wxSize( 60,20 ), 0 ); - fgSizer5->Add( m_buttonDel5, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - m_textCtrlLabel6 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_textCtrlLabel6->SetMinSize( wxSize( 150,-1 ) ); - - fgSizer5->Add( m_textCtrlLabel6, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlField6 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 ); - fgSizer5->Add( m_textCtrlField6, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonDel6 = new wxButton( m_scrolledWindow, wxID_DEL6, wxT("Delete"), wxDefaultPosition, wxSize( 60,20 ), 0 ); - fgSizer5->Add( m_buttonDel6, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - m_textCtrlLabel7 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_textCtrlLabel7->SetMinSize( wxSize( 150,-1 ) ); - - fgSizer5->Add( m_textCtrlLabel7, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlField7 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 ); - fgSizer5->Add( m_textCtrlField7, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonDel7 = new wxButton( m_scrolledWindow, wxID_DEL7, wxT("Delete"), wxDefaultPosition, wxSize( 60,20 ), 0 ); - fgSizer5->Add( m_buttonDel7, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - m_textCtrlLabel8 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_textCtrlLabel8->SetMinSize( wxSize( 150,-1 ) ); - - fgSizer5->Add( m_textCtrlLabel8, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlField8 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 ); - fgSizer5->Add( m_textCtrlField8, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonDel8 = new wxButton( m_scrolledWindow, wxID_DEL8, wxT("Delete"), wxDefaultPosition, wxSize( 60,20 ), 0 ); - fgSizer5->Add( m_buttonDel8, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - m_textCtrlLabel9 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_textCtrlLabel9->SetMinSize( wxSize( 150,-1 ) ); - - fgSizer5->Add( m_textCtrlLabel9, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlField9 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 ); - fgSizer5->Add( m_textCtrlField9, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonDel9 = new wxButton( m_scrolledWindow, wxID_DEL9, wxT("Delete"), wxDefaultPosition, wxSize( 60,20 ), 0 ); - fgSizer5->Add( m_buttonDel9, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - m_textCtrlLabel10 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_textCtrlLabel10->SetMinSize( wxSize( 150,-1 ) ); - - fgSizer5->Add( m_textCtrlLabel10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlField10 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 ); - fgSizer5->Add( m_textCtrlField10, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonDel10 = new wxButton( m_scrolledWindow, wxID_DEL10, wxT("Delete"), wxDefaultPosition, wxSize( 60,20 ), 0 ); - fgSizer5->Add( m_buttonDel10, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - m_textCtrlLabel11 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_textCtrlLabel11->SetMinSize( wxSize( 150,-1 ) ); - - fgSizer5->Add( m_textCtrlLabel11, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlField11 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 ); - fgSizer5->Add( m_textCtrlField11, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonDel11 = new wxButton( m_scrolledWindow, wxID_DEL11, wxT("Delete"), wxDefaultPosition, wxSize( 60,20 ), 0 ); - fgSizer5->Add( m_buttonDel11, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - m_textCtrlLabel12 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_textCtrlLabel12->SetMinSize( wxSize( 150,-1 ) ); - - fgSizer5->Add( m_textCtrlLabel12, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlField12 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 ); - fgSizer5->Add( m_textCtrlField12, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonDel12 = new wxButton( m_scrolledWindow, wxID_DEL12, wxT("Delete"), wxDefaultPosition, wxSize( 60,20 ), 0 ); - fgSizer5->Add( m_buttonDel12, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - m_textCtrlLabel13 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_textCtrlLabel13->SetMinSize( wxSize( 150,-1 ) ); - - fgSizer5->Add( m_textCtrlLabel13, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlField13 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 ); - fgSizer5->Add( m_textCtrlField13, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonDel13 = new wxButton( m_scrolledWindow, wxID_DEL13, wxT("Delete"), wxDefaultPosition, wxSize( 60,20 ), 0 ); - fgSizer5->Add( m_buttonDel13, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - m_textCtrlLabel14 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_textCtrlLabel14->SetMinSize( wxSize( 150,-1 ) ); - - fgSizer5->Add( m_textCtrlLabel14, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlField14 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 ); - fgSizer5->Add( m_textCtrlField14, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonDel14 = new wxButton( m_scrolledWindow, wxID_DEL14, wxT("Delete"), wxDefaultPosition, wxSize( 60,20 ), 0 ); - fgSizer5->Add( m_buttonDel14, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - m_textCtrlLabel15 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_textCtrlLabel15->SetMinSize( wxSize( 150,-1 ) ); - - fgSizer5->Add( m_textCtrlLabel15, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlField15 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 ); - fgSizer5->Add( m_textCtrlField15, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonDel15 = new wxButton( m_scrolledWindow, wxID_DEL15, wxT("Delete"), wxDefaultPosition, wxSize( 60,20 ), 0 ); - fgSizer5->Add( m_buttonDel15, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - m_textCtrlLabel16 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_textCtrlLabel16->SetMinSize( wxSize( 150,-1 ) ); - - fgSizer5->Add( m_textCtrlLabel16, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlField16 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 ); - fgSizer5->Add( m_textCtrlField16, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonDel16 = new wxButton( m_scrolledWindow, wxID_DEL16, wxT("Delete"), wxDefaultPosition, wxSize( 60,20 ), 0 ); - fgSizer5->Add( m_buttonDel16, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - m_textCtrlLabel17 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_textCtrlLabel17->SetMinSize( wxSize( 150,-1 ) ); - - fgSizer5->Add( m_textCtrlLabel17, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlField17 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 ); - fgSizer5->Add( m_textCtrlField17, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonDel17 = new wxButton( m_scrolledWindow, wxID_DEL17, wxT("Delete"), wxDefaultPosition, wxSize( 60,20 ), 0 ); - fgSizer5->Add( m_buttonDel17, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - m_textCtrlLabel18 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_textCtrlLabel18->SetMinSize( wxSize( 150,-1 ) ); - - fgSizer5->Add( m_textCtrlLabel18, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlField18 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 ); - fgSizer5->Add( m_textCtrlField18, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonDel18 = new wxButton( m_scrolledWindow, wxID_DEL18, wxT("Delete"), wxDefaultPosition, wxSize( 60,20 ), 0 ); - fgSizer5->Add( m_buttonDel18, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - m_textCtrlLabel19 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_textCtrlLabel19->SetMinSize( wxSize( 150,-1 ) ); - - fgSizer5->Add( m_textCtrlLabel19, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_textCtrlField19 = new wxTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 ); - fgSizer5->Add( m_textCtrlField19, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - - m_buttonDel19 = new wxButton( m_scrolledWindow, wxID_DEL19, wxT("Delete"), wxDefaultPosition, wxSize( 60,20 ), 0 ); - fgSizer5->Add( m_buttonDel19, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - bSizer21->Add( fgSizer5, 0, wxEXPAND, 5 ); - - wxBoxSizer* bSizer25; - bSizer25 = new wxBoxSizer( wxHORIZONTAL ); - - m_buttonAddField = new wxButton( m_scrolledWindow, wxID_ANY, wxT("&Add Field"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer25->Add( m_buttonAddField, 0, wxALL, 5 ); - - bSizer21->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_scrolledWindow->SetSizer( bSizer21 ); - m_scrolledWindow->Layout(); - bSizer21->Fit( m_scrolledWindow ); - bSizer20->Add( m_scrolledWindow, 1, wxEXPAND|wxALL, 5 ); - - wxBoxSizer* bSizer26; - bSizer26 = new wxBoxSizer( wxHORIZONTAL ); - - m_buttonOK = new wxButton( this, wxID_BUTTONSEND, wxT("&Send"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer26->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_buttonPreview = new wxButton( this, wxID_BUTTONPREVIEW, wxT("&Preview"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer26->Add( m_buttonPreview, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer26->Add( m_buttonCancel, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - bSizer20->Add( bSizer26, 0, wxALIGN_RIGHT, 5 ); - - this->SetSizer( bSizer20 ); - this->Layout(); - - // Connect Events - m_textCtrlTitle->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlPrice->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlDescription->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlInstructions->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlLabel0->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField0->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel0->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel0 ), NULL, this ); - m_textCtrlLabel1->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField1->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel1->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel1 ), NULL, this ); - m_textCtrlLabel2->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField2->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel2->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel2 ), NULL, this ); - m_textCtrlLabel3->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField3->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel3->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel3 ), NULL, this ); - m_textCtrlLabel4->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField4->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel4->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel4 ), NULL, this ); - m_textCtrlLabel5->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField5->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel5->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel5 ), NULL, this ); - m_textCtrlLabel6->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField6->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel6 ), NULL, this ); - m_textCtrlLabel7->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField7->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel7->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel7 ), NULL, this ); - m_textCtrlLabel8->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField8->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel8->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel8 ), NULL, this ); - m_textCtrlLabel9->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField9->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel9 ), NULL, this ); - m_textCtrlLabel10->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField10->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel10->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel10 ), NULL, this ); - m_textCtrlLabel11->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField11->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel11->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel11 ), NULL, this ); - m_textCtrlLabel12->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField12->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel12->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel12 ), NULL, this ); - m_textCtrlLabel13->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField13->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel13->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel13 ), NULL, this ); - m_textCtrlLabel14->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField14->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel14->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel14 ), NULL, this ); - m_textCtrlLabel15->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField15->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel15->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel15 ), NULL, this ); - m_textCtrlLabel16->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField16->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel16->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel16 ), NULL, this ); - m_textCtrlLabel17->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField17->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel17->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel17 ), NULL, this ); - m_textCtrlLabel18->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField18->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel18->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel18 ), NULL, this ); - m_textCtrlLabel19->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField19->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel19->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel19 ), NULL, this ); - m_buttonAddField->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonAddField ), NULL, this ); - m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonSend ), NULL, this ); - m_buttonPreview->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonPreview ), NULL, this ); - m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonCancel ), NULL, this ); -} - -CEditProductDialogBase::~CEditProductDialogBase() -{ - // Disconnect Events - m_textCtrlTitle->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlPrice->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlDescription->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlInstructions->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlLabel0->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField0->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel0->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel0 ), NULL, this ); - m_textCtrlLabel1->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField1->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel1->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel1 ), NULL, this ); - m_textCtrlLabel2->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField2->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel2->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel2 ), NULL, this ); - m_textCtrlLabel3->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField3->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel3->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel3 ), NULL, this ); - m_textCtrlLabel4->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField4->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel4->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel4 ), NULL, this ); - m_textCtrlLabel5->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField5->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel5->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel5 ), NULL, this ); - m_textCtrlLabel6->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField6->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel6 ), NULL, this ); - m_textCtrlLabel7->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField7->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel7->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel7 ), NULL, this ); - m_textCtrlLabel8->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField8->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel8->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel8 ), NULL, this ); - m_textCtrlLabel9->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField9->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel9 ), NULL, this ); - m_textCtrlLabel10->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField10->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel10 ), NULL, this ); - m_textCtrlLabel11->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField11->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel11->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel11 ), NULL, this ); - m_textCtrlLabel12->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField12->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel12->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel12 ), NULL, this ); - m_textCtrlLabel13->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField13->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel13->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel13 ), NULL, this ); - m_textCtrlLabel14->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField14->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel14->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel14 ), NULL, this ); - m_textCtrlLabel15->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField15->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel15->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel15 ), NULL, this ); - m_textCtrlLabel16->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField16->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel16->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel16 ), NULL, this ); - m_textCtrlLabel17->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField17->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel17->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel17 ), NULL, this ); - m_textCtrlLabel18->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField18->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel18->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel18 ), NULL, this ); - m_textCtrlLabel19->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_textCtrlField19->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditProductDialogBase::OnKeyDown ), NULL, this ); - m_buttonDel19->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonDel19 ), NULL, this ); - m_buttonAddField->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonAddField ), NULL, this ); - m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonSend ), NULL, this ); - m_buttonPreview->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonPreview ), NULL, this ); - m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditProductDialogBase::OnButtonCancel ), NULL, this ); -} - -CViewProductDialogBase::CViewProductDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_MENU ) ); - - wxBoxSizer* bSizer20; - bSizer20 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer116; - bSizer116 = new wxBoxSizer( wxHORIZONTAL ); - - m_htmlWinReviews = new wxHtmlWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO ); - m_htmlWinReviews->Hide(); - - bSizer116->Add( m_htmlWinReviews, 1, wxALL|wxEXPAND, 5 ); - - m_scrolledWindow = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxTAB_TRAVERSAL|wxVSCROLL ); - m_scrolledWindow->SetScrollRate( 5, 5 ); - m_scrolledWindow->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - - wxBoxSizer* bSizer21; - bSizer21 = new wxBoxSizer( wxVERTICAL ); - - m_richTextHeading = new wxRichTextCtrl( m_scrolledWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,50 ), wxTE_READONLY|wxNO_BORDER ); - bSizer21->Add( m_richTextHeading, 0, wxEXPAND, 5 ); - - m_staticTextInstructions = new wxStaticText( m_scrolledWindow, wxID_ANY, wxT("Order Form instructions here\nmultiple lines\n1\n2\n3\n4\n5\n6"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextInstructions->Wrap( -1 ); - bSizer21->Add( m_staticTextInstructions, 0, wxALL|wxEXPAND, 5 ); - - wxBoxSizer* bSizer25; - bSizer25 = new wxBoxSizer( wxHORIZONTAL ); - - m_buttonSubmitForm = new wxButton( m_scrolledWindow, wxID_BUTTONSAMPLE, wxT("&Submit"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer25->Add( m_buttonSubmitForm, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_buttonCancelForm = new wxButton( m_scrolledWindow, wxID_CANCEL2, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer25->Add( m_buttonCancelForm, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - bSizer21->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - m_scrolledWindow->SetSizer( bSizer21 ); - m_scrolledWindow->Layout(); - bSizer21->Fit( m_scrolledWindow ); - bSizer116->Add( m_scrolledWindow, 1, wxEXPAND|wxALL, 5 ); - - bSizer20->Add( bSizer116, 1, wxEXPAND, 5 ); - - wxBoxSizer* bSizer26; - bSizer26 = new wxBoxSizer( wxHORIZONTAL ); - - m_buttonBack = new wxButton( this, wxID_BUTTONBACK, wxT("< &Back "), wxDefaultPosition, wxDefaultSize, 0 ); - m_buttonBack->Enable( false ); - - bSizer26->Add( m_buttonBack, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_buttonNext = new wxButton( this, wxID_BUTTONNEXT, wxT(" &Next >"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer26->Add( m_buttonNext, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer26->Add( m_buttonCancel, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - bSizer20->Add( bSizer26, 0, wxALIGN_RIGHT, 5 ); - - this->SetSizer( bSizer20 ); - this->Layout(); - - // Connect Events - m_buttonSubmitForm->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CViewProductDialogBase::OnButtonSubmitForm ), NULL, this ); - m_buttonCancelForm->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CViewProductDialogBase::OnButtonCancelForm ), NULL, this ); - m_buttonBack->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CViewProductDialogBase::OnButtonBack ), NULL, this ); - m_buttonNext->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CViewProductDialogBase::OnButtonNext ), NULL, this ); - m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CViewProductDialogBase::OnButtonCancel ), NULL, this ); -} - -CViewProductDialogBase::~CViewProductDialogBase() -{ - // Disconnect Events - m_buttonSubmitForm->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CViewProductDialogBase::OnButtonSubmitForm ), NULL, this ); - m_buttonCancelForm->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CViewProductDialogBase::OnButtonCancelForm ), NULL, this ); - m_buttonBack->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CViewProductDialogBase::OnButtonBack ), NULL, this ); - m_buttonNext->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CViewProductDialogBase::OnButtonNext ), NULL, this ); - m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CViewProductDialogBase::OnButtonCancel ), NULL, this ); -} - -CViewOrderDialogBase::CViewOrderDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_MENU ) ); - - wxBoxSizer* bSizer20; - bSizer20 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer116; - bSizer116 = new wxBoxSizer( wxHORIZONTAL ); - - m_htmlWin = new wxHtmlWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO ); - bSizer116->Add( m_htmlWin, 1, wxALL|wxEXPAND, 5 ); - - bSizer20->Add( bSizer116, 1, wxEXPAND, 5 ); - - wxBoxSizer* bSizer26; - bSizer26 = new wxBoxSizer( wxHORIZONTAL ); - - m_buttonOK = new wxButton( this, wxID_OK, wxT("OK"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer26->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - bSizer20->Add( bSizer26, 0, wxALIGN_RIGHT, 5 ); - - this->SetSizer( bSizer20 ); - this->Layout(); - - // Connect Events - m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CViewOrderDialogBase::OnButtonOK ), NULL, this ); -} - -CViewOrderDialogBase::~CViewOrderDialogBase() -{ - // Disconnect Events - m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CViewOrderDialogBase::OnButtonOK ), NULL, this ); -} - -CEditReviewDialogBase::CEditReviewDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_MENU ) ); - - wxBoxSizer* bSizer112; - bSizer112 = new wxBoxSizer( wxVERTICAL ); - - - bSizer112->Add( 0, 3, 0, 0, 5 ); - - m_staticTextSeller = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextSeller->Wrap( -1 ); - bSizer112->Add( m_staticTextSeller, 0, wxALL|wxEXPAND, 5 ); - - - bSizer112->Add( 0, 3, 0, 0, 5 ); - - m_staticText110 = new wxStaticText( this, wxID_ANY, wxT("Rating"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText110->Wrap( -1 ); - bSizer112->Add( m_staticText110, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - wxString m_choiceStarsChoices[] = { wxT(" 1 star"), wxT(" 2 stars"), wxT(" 3 stars"), wxT(" 4 stars"), wxT(" 5 stars") }; - int m_choiceStarsNChoices = sizeof( m_choiceStarsChoices ) / sizeof( wxString ); - m_choiceStars = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceStarsNChoices, m_choiceStarsChoices, 0 ); - m_choiceStars->SetSelection( 0 ); - bSizer112->Add( m_choiceStars, 0, wxALL, 5 ); - - m_staticText43 = new wxStaticText( this, wxID_ANY, wxT("Review"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText43->Wrap( -1 ); - bSizer112->Add( m_staticText43, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_textCtrlReview = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE ); - bSizer112->Add( m_textCtrlReview, 1, wxALL|wxEXPAND, 5 ); - - wxBoxSizer* bSizer113; - bSizer113 = new wxBoxSizer( wxHORIZONTAL ); - - m_buttonSubmit = new wxButton( this, wxID_SUBMIT, wxT("&Submit"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer113->Add( m_buttonSubmit, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer113->Add( m_buttonCancel, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - bSizer112->Add( bSizer113, 0, wxALIGN_RIGHT, 5 ); - - this->SetSizer( bSizer112 ); - this->Layout(); - - // Connect Events - m_textCtrlReview->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditReviewDialogBase::OnKeyDown ), NULL, this ); - m_buttonSubmit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditReviewDialogBase::OnButtonSubmit ), NULL, this ); - m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditReviewDialogBase::OnButtonCancel ), NULL, this ); -} - -CEditReviewDialogBase::~CEditReviewDialogBase() -{ - // Disconnect Events - m_textCtrlReview->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CEditReviewDialogBase::OnKeyDown ), NULL, this ); - m_buttonSubmit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditReviewDialogBase::OnButtonSubmit ), NULL, this ); - m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CEditReviewDialogBase::OnButtonCancel ), NULL, this ); -} - CGetTextFromUserDialogBase::CGetTextFromUserDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); @@ -1671,10 +964,10 @@ CGetTextFromUserDialogBase::CGetTextFromUserDialogBase( wxWindow* parent, wxWind bSizer80->Add( 0, 0, 1, wxEXPAND, 5 ); - m_buttonOK = new wxButton( this, wxID_OK, wxT("OK"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); + m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); bSizer80->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer80->Add( m_buttonCancel, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); bSizer79->Add( bSizer80, 0, wxEXPAND, 5 ); diff --git a/uibase.h b/uibase.h index faef98298..2dfc2af14 100644 --- a/uibase.h +++ b/uibase.h @@ -11,6 +11,8 @@ #ifndef __uibase__ #define __uibase__ +#include + #include #include #include @@ -37,8 +39,6 @@ #include #include #include -#include -#include /////////////////////////////////////////////////////////////////////////// @@ -49,8 +49,8 @@ #define wxID_BUTTONSEND 1004 #define wxID_BUTTONRECEIVE 1005 #define wxID_TEXTCTRLADDRESS 1006 -#define wxID_BUTTONCOPY 1007 -#define wxID_BUTTONCHANGE 1008 +#define wxID_BUTTONCHANGE 1007 +#define wxID_BUTTONCOPY 1008 #define wxID_TRANSACTIONFEE 1009 #define wxID_PROXYIP 1010 #define wxID_PROXYPORT 1011 @@ -64,33 +64,7 @@ #define wxID_BUTTONNEW 1019 #define wxID_BUTTONEDIT 1020 #define wxID_BUTTONDELETE 1021 -#define wxID_DEL0 1022 -#define wxID_DEL1 1023 -#define wxID_DEL2 1024 -#define wxID_DEL3 1025 -#define wxID_DEL4 1026 -#define wxID_DEL5 1027 -#define wxID_DEL6 1028 -#define wxID_DEL7 1029 -#define wxID_DEL8 1030 -#define wxID_DEL9 1031 -#define wxID_DEL10 1032 -#define wxID_DEL11 1033 -#define wxID_DEL12 1034 -#define wxID_DEL13 1035 -#define wxID_DEL14 1036 -#define wxID_DEL15 1037 -#define wxID_DEL16 1038 -#define wxID_DEL17 1039 -#define wxID_DEL18 1040 -#define wxID_DEL19 1041 -#define wxID_BUTTONPREVIEW 1042 -#define wxID_BUTTONSAMPLE 1043 -#define wxID_CANCEL2 1044 -#define wxID_BUTTONBACK 1045 -#define wxID_BUTTONNEXT 1046 -#define wxID_SUBMIT 1047 -#define wxID_TEXTCTRL 1048 +#define wxID_TEXTCTRL 1022 /////////////////////////////////////////////////////////////////////////////// /// Class CMainFrameBase @@ -109,8 +83,8 @@ class CMainFrameBase : public wxFrame wxStaticText* m_staticText32; wxTextCtrl* m_textCtrlAddress; + wxButton* m_buttonNew; wxButton* m_buttonCopy; - wxButton* m_button91; wxPanel* m_panel14; wxStaticText* m_staticText41; @@ -137,8 +111,8 @@ class CMainFrameBase : public wxFrame virtual void OnKeyDown( wxKeyEvent& event ){ event.Skip(); } virtual void OnMouseEventsAddress( wxMouseEvent& event ){ event.Skip(); } virtual void OnSetFocusAddress( wxFocusEvent& event ){ event.Skip(); } - virtual void OnButtonCopy( wxCommandEvent& event ){ event.Skip(); } virtual void OnButtonChange( wxCommandEvent& event ){ event.Skip(); } + virtual void OnButtonCopy( wxCommandEvent& event ){ event.Skip(); } virtual void OnListColBeginDrag( wxListEvent& event ){ event.Skip(); } virtual void OnListItemActivated( wxListEvent& event ){ event.Skip(); } virtual void OnPaintListCtrl( wxPaintEvent& event ){ event.Skip(); } @@ -147,7 +121,7 @@ class CMainFrameBase : public wxFrame public: wxMenu* m_menuOptions; wxListCtrl* m_listCtrl; - CMainFrameBase( wxWindow* parent, wxWindowID id = wxID_MAINFRAME, const wxString& title = wxT("Bitcoin"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 712,484 ), long style = wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER|wxTAB_TRAVERSAL ); + CMainFrameBase( wxWindow* parent, wxWindowID id = wxID_MAINFRAME, const wxString& title = _("Bitcoin"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 712,484 ), long style = wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER|wxTAB_TRAVERSAL ); ~CMainFrameBase(); }; @@ -168,7 +142,7 @@ class CTxDetailsDialogBase : public wxDialog public: - CTxDetailsDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Transaction Details"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 620,450 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + CTxDetailsDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Transaction Details"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 620,450 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~CTxDetailsDialogBase(); }; @@ -223,7 +197,7 @@ class COptionsDialogBase : public wxDialog public: - COptionsDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 540,360 ), long style = wxDEFAULT_DIALOG_STYLE ); + COptionsDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 540,360 ), long style = wxDEFAULT_DIALOG_STYLE ); ~COptionsDialogBase(); }; @@ -251,7 +225,7 @@ class CAboutDialogBase : public wxDialog public: wxStaticText* m_staticTextVersion; - CAboutDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("About Bitcoin"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 532,329 ), long style = wxDEFAULT_DIALOG_STYLE ); + CAboutDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About Bitcoin"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 532,329 ), long style = wxDEFAULT_DIALOG_STYLE ); ~CAboutDialogBase(); }; @@ -298,7 +272,7 @@ class CSendDialogBase : public wxDialog public: - CSendDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Send Coins"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 675,312 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + CSendDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Send Coins"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 675,312 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~CSendDialogBase(); }; @@ -325,7 +299,7 @@ class CSendingDialogBase : public wxDialog public: - CSendingDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Sending..."), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 442,151 ), long style = wxDEFAULT_DIALOG_STYLE ); + CSendingDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Sending..."), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 442,151 ), long style = wxDEFAULT_DIALOG_STYLE ); ~CSendingDialogBase(); }; @@ -361,7 +335,7 @@ class CYourAddressDialogBase : public wxDialog public: - CYourAddressDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Your Bitcoin Addresses"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 610,390 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + CYourAddressDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Your Bitcoin Addresses"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 610,390 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~CYourAddressDialogBase(); }; @@ -397,242 +371,11 @@ class CAddressBookDialogBase : public wxDialog public: wxButton* m_buttonCancel; - CAddressBookDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Address Book"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 610,390 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + CAddressBookDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Address Book"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 610,390 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~CAddressBookDialogBase(); }; -/////////////////////////////////////////////////////////////////////////////// -/// Class CProductsDialogBase -/////////////////////////////////////////////////////////////////////////////// -class CProductsDialogBase : public wxDialog -{ - private: - - protected: - wxComboBox* m_comboBoxCategory; - wxTextCtrl* m_textCtrlSearch; - wxButton* m_buttonSearch; - wxListCtrl* m_listCtrl; - - // Virtual event handlers, overide them in your derived class - virtual void OnCombobox( wxCommandEvent& event ){ event.Skip(); } - virtual void OnKeyDown( wxKeyEvent& event ){ event.Skip(); } - virtual void OnButtonSearch( wxCommandEvent& event ){ event.Skip(); } - virtual void OnListItemActivated( wxListEvent& event ){ event.Skip(); } - - - public: - CProductsDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Marketplace"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 708,535 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~CProductsDialogBase(); - -}; - -/////////////////////////////////////////////////////////////////////////////// -/// Class CEditProductDialogBase -/////////////////////////////////////////////////////////////////////////////// -class CEditProductDialogBase : public wxFrame -{ - private: - - protected: - wxScrolledWindow* m_scrolledWindow; - wxStaticText* m_staticText106; - wxComboBox* m_comboBoxCategory; - wxStaticText* m_staticText108; - wxTextCtrl* m_textCtrlTitle; - wxStaticText* m_staticText107; - wxTextCtrl* m_textCtrlPrice; - wxStaticText* m_staticText22; - wxTextCtrl* m_textCtrlDescription; - wxStaticText* m_staticText23; - wxTextCtrl* m_textCtrlInstructions; - wxStaticText* m_staticText24; - wxStaticText* m_staticText25; - - wxTextCtrl* m_textCtrlLabel0; - wxTextCtrl* m_textCtrlField0; - wxButton* m_buttonDel0; - wxTextCtrl* m_textCtrlLabel1; - wxTextCtrl* m_textCtrlField1; - wxButton* m_buttonDel1; - wxTextCtrl* m_textCtrlLabel2; - wxTextCtrl* m_textCtrlField2; - wxButton* m_buttonDel2; - wxTextCtrl* m_textCtrlLabel3; - wxTextCtrl* m_textCtrlField3; - wxButton* m_buttonDel3; - wxTextCtrl* m_textCtrlLabel4; - wxTextCtrl* m_textCtrlField4; - wxButton* m_buttonDel4; - wxTextCtrl* m_textCtrlLabel5; - wxTextCtrl* m_textCtrlField5; - wxButton* m_buttonDel5; - wxTextCtrl* m_textCtrlLabel6; - wxTextCtrl* m_textCtrlField6; - wxButton* m_buttonDel6; - wxTextCtrl* m_textCtrlLabel7; - wxTextCtrl* m_textCtrlField7; - wxButton* m_buttonDel7; - wxTextCtrl* m_textCtrlLabel8; - wxTextCtrl* m_textCtrlField8; - wxButton* m_buttonDel8; - wxTextCtrl* m_textCtrlLabel9; - wxTextCtrl* m_textCtrlField9; - wxButton* m_buttonDel9; - wxTextCtrl* m_textCtrlLabel10; - wxTextCtrl* m_textCtrlField10; - wxButton* m_buttonDel10; - wxTextCtrl* m_textCtrlLabel11; - wxTextCtrl* m_textCtrlField11; - wxButton* m_buttonDel11; - wxTextCtrl* m_textCtrlLabel12; - wxTextCtrl* m_textCtrlField12; - wxButton* m_buttonDel12; - wxTextCtrl* m_textCtrlLabel13; - wxTextCtrl* m_textCtrlField13; - wxButton* m_buttonDel13; - wxTextCtrl* m_textCtrlLabel14; - wxTextCtrl* m_textCtrlField14; - wxButton* m_buttonDel14; - wxTextCtrl* m_textCtrlLabel15; - wxTextCtrl* m_textCtrlField15; - wxButton* m_buttonDel15; - wxTextCtrl* m_textCtrlLabel16; - wxTextCtrl* m_textCtrlField16; - wxButton* m_buttonDel16; - wxTextCtrl* m_textCtrlLabel17; - wxTextCtrl* m_textCtrlField17; - wxButton* m_buttonDel17; - wxTextCtrl* m_textCtrlLabel18; - wxTextCtrl* m_textCtrlField18; - wxButton* m_buttonDel18; - wxTextCtrl* m_textCtrlLabel19; - wxTextCtrl* m_textCtrlField19; - wxButton* m_buttonDel19; - wxButton* m_buttonAddField; - wxButton* m_buttonOK; - wxButton* m_buttonPreview; - wxButton* m_buttonCancel; - - // Virtual event handlers, overide them in your derived class - virtual void OnKeyDown( wxKeyEvent& event ){ event.Skip(); } - virtual void OnButtonDel0( wxCommandEvent& event ){ event.Skip(); } - virtual void OnButtonDel1( wxCommandEvent& event ){ event.Skip(); } - virtual void OnButtonDel2( wxCommandEvent& event ){ event.Skip(); } - virtual void OnButtonDel3( wxCommandEvent& event ){ event.Skip(); } - virtual void OnButtonDel4( wxCommandEvent& event ){ event.Skip(); } - virtual void OnButtonDel5( wxCommandEvent& event ){ event.Skip(); } - virtual void OnButtonDel6( wxCommandEvent& event ){ event.Skip(); } - virtual void OnButtonDel7( wxCommandEvent& event ){ event.Skip(); } - virtual void OnButtonDel8( wxCommandEvent& event ){ event.Skip(); } - virtual void OnButtonDel9( wxCommandEvent& event ){ event.Skip(); } - virtual void OnButtonDel10( wxCommandEvent& event ){ event.Skip(); } - virtual void OnButtonDel11( wxCommandEvent& event ){ event.Skip(); } - virtual void OnButtonDel12( wxCommandEvent& event ){ event.Skip(); } - virtual void OnButtonDel13( wxCommandEvent& event ){ event.Skip(); } - virtual void OnButtonDel14( wxCommandEvent& event ){ event.Skip(); } - virtual void OnButtonDel15( wxCommandEvent& event ){ event.Skip(); } - virtual void OnButtonDel16( wxCommandEvent& event ){ event.Skip(); } - virtual void OnButtonDel17( wxCommandEvent& event ){ event.Skip(); } - virtual void OnButtonDel18( wxCommandEvent& event ){ event.Skip(); } - virtual void OnButtonDel19( wxCommandEvent& event ){ event.Skip(); } - virtual void OnButtonAddField( wxCommandEvent& event ){ event.Skip(); } - virtual void OnButtonSend( wxCommandEvent& event ){ event.Skip(); } - virtual void OnButtonPreview( wxCommandEvent& event ){ event.Skip(); } - virtual void OnButtonCancel( wxCommandEvent& event ){ event.Skip(); } - - - public: - wxFlexGridSizer* fgSizer5; - CEditProductDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Edit Product"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 660,640 ), long style = wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER|wxTAB_TRAVERSAL ); - ~CEditProductDialogBase(); - -}; - -/////////////////////////////////////////////////////////////////////////////// -/// Class CViewProductDialogBase -/////////////////////////////////////////////////////////////////////////////// -class CViewProductDialogBase : public wxFrame -{ - private: - - protected: - wxHtmlWindow* m_htmlWinReviews; - wxScrolledWindow* m_scrolledWindow; - wxRichTextCtrl* m_richTextHeading; - wxStaticText* m_staticTextInstructions; - wxButton* m_buttonSubmitForm; - wxButton* m_buttonCancelForm; - wxButton* m_buttonBack; - wxButton* m_buttonNext; - wxButton* m_buttonCancel; - - // Virtual event handlers, overide them in your derived class - virtual void OnButtonSubmitForm( wxCommandEvent& event ){ event.Skip(); } - virtual void OnButtonCancelForm( wxCommandEvent& event ){ event.Skip(); } - virtual void OnButtonBack( wxCommandEvent& event ){ event.Skip(); } - virtual void OnButtonNext( wxCommandEvent& event ){ event.Skip(); } - virtual void OnButtonCancel( wxCommandEvent& event ){ event.Skip(); } - - - public: - CViewProductDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Order Form"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 630,520 ), long style = wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER|wxTAB_TRAVERSAL ); - ~CViewProductDialogBase(); - -}; - -/////////////////////////////////////////////////////////////////////////////// -/// Class CViewOrderDialogBase -/////////////////////////////////////////////////////////////////////////////// -class CViewOrderDialogBase : public wxFrame -{ - private: - - protected: - wxHtmlWindow* m_htmlWin; - wxButton* m_buttonOK; - - // Virtual event handlers, overide them in your derived class - virtual void OnButtonOK( wxCommandEvent& event ){ event.Skip(); } - - - public: - CViewOrderDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("View Order"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 630,520 ), long style = wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER|wxTAB_TRAVERSAL ); - ~CViewOrderDialogBase(); - -}; - -/////////////////////////////////////////////////////////////////////////////// -/// Class CEditReviewDialogBase -/////////////////////////////////////////////////////////////////////////////// -class CEditReviewDialogBase : public wxFrame -{ - private: - - protected: - - wxStaticText* m_staticTextSeller; - - wxStaticText* m_staticText110; - wxChoice* m_choiceStars; - wxStaticText* m_staticText43; - wxTextCtrl* m_textCtrlReview; - wxButton* m_buttonSubmit; - wxButton* m_buttonCancel; - - // Virtual event handlers, overide them in your derived class - virtual void OnKeyDown( wxKeyEvent& event ){ event.Skip(); } - virtual void OnButtonSubmit( wxCommandEvent& event ){ event.Skip(); } - virtual void OnButtonCancel( wxCommandEvent& event ){ event.Skip(); } - - - public: - CEditReviewDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Enter Review"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 630,440 ), long style = wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER|wxTAB_TRAVERSAL ); - ~CEditReviewDialogBase(); - -}; - /////////////////////////////////////////////////////////////////////////////// /// Class CGetTextFromUserDialogBase /////////////////////////////////////////////////////////////////////////////// diff --git a/uiproject.fbp b/uiproject.fbp index c24f6962b..5c6eaa55a 100644 --- a/uiproject.fbp +++ b/uiproject.fbp @@ -10,7 +10,7 @@ uibase 1000 none - 0 + 1 . @@ -18,7 +18,7 @@ 1 0 0 - + wxSYS_COLOUR_BTNFACE @@ -478,7 +478,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT + wxRIGHT 0 @@ -487,22 +487,22 @@ 1 - 0 - wxID_BUTTONCOPY - &Copy to Clipboard + 1 + wxID_BUTTONCHANGE + &New... - m_buttonCopy + m_buttonNew protected - wxBU_EXACTFIT + - OnButtonCopy + OnButtonChange @@ -530,7 +530,7 @@ 5 - wxRIGHT + wxALIGN_CENTER_VERTICAL|wxRIGHT 0 @@ -539,22 +539,22 @@ 1 - 1 - wxID_BUTTONCHANGE - C&hange... + 0 + wxID_BUTTONCOPY + &Copy to Clipboard - m_button91 + m_buttonCopy protected - + wxBU_EXACTFIT - OnButtonChange + OnButtonCopy @@ -5239,5779 +5239,6 @@ - - - - - 1 - - - - 0 - wxID_ANY - - - CProductsDialogBase - - 708,535 - wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - - Marketplace - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bSizer22 - wxVERTICAL - none - - 5 - wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT - 0 - - - bSizer23 - wxHORIZONTAL - none - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - - "(Any Category)" - - 1 - - - 0 - wxID_ANY - - - m_comboBoxCategory - protected - - 150,-1 - - - - (Any Category) - - - - - OnCombobox - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 1 - - - - 1 - - - 0 - wxID_ANY - - 0 - - m_textCtrlSearch - protected - - - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - - - 0 - 1 - - - 0 - wxID_ANY - &Search - - - m_buttonSearch - protected - - - - - - - - - OnButtonSearch - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 1 - - - - 1 - - - 0 - wxID_ANY - - - m_listCtrl - protected - - - wxLC_NO_SORT_HEADER|wxLC_REPORT - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OnListItemActivated - - - - - - - - - - - - - - - - - - - - - - - - - wxSYS_COLOUR_MENU - - - 1 - - - - 0 - wxID_ANY - - - CEditProductDialogBase - - 660,640 - wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER - - Edit Product - - - - wxTAB_TRAVERSAL - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bSizer20 - wxVERTICAL - none - - 5 - wxEXPAND|wxALL - 1 - - wxSYS_COLOUR_WINDOW - - 1 - - - 0 - wxID_ANY - - - m_scrolledWindow - protected - - 5 - 5 - - - - - - wxHSCROLL|wxTAB_TRAVERSAL|wxVSCROLL - - - - - - - - - - - - - - - - - - - - - - - - - - bSizer21 - wxVERTICAL - none - - 5 - wxEXPAND|wxTOP|wxRIGHT|wxLEFT - 0 - - 2 - wxBOTH - 1 - - 0 - - fgSizer8 - wxFLEX_GROWMODE_SPECIFIED - none - 0 - 0 - - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT - 0 - - - - 1 - - - 0 - wxID_ANY - Category - - - m_staticText106 - protected - - - wxALIGN_RIGHT - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - - - - 1 - - - 0 - wxID_ANY - - 180,-1 - m_comboBoxCategory - protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT - 0 - - - - 1 - - - 0 - wxID_ANY - Title - - - m_staticText108 - protected - - - wxALIGN_RIGHT - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND - 1 - - - - 1 - - - 0 - wxID_ANY - - 0 - - m_textCtrlTitle - protected - - - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT - 0 - - - - 1 - - - 0 - wxID_ANY - Price - - - m_staticText107 - protected - - - wxALIGN_RIGHT - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - 105,-1 - m_textCtrlPrice - protected - - - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - - - 1 - - - 0 - wxID_ANY - Page 1: Description - - - m_staticText22 - protected - - - - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - -1,170 - m_textCtrlDescription - protected - - - wxTE_MULTILINE - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - - - 1 - - - 0 - wxID_ANY - Page 2: Order Form - - - m_staticText23 - protected - - - - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxALL - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - -1,120 - m_textCtrlInstructions - protected - - - wxTE_MULTILINE - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 0 - - 3 - wxBOTH - 1 - - 0 - - fgSizer5 - wxFLEX_GROWMODE_SPECIFIED - public - 0 - 0 - - 5 - wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT - 0 - - - - 1 - - - 0 - wxID_ANY - Label - - - m_staticText24 - protected - - - - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT - 0 - - - - 1 - - - 0 - wxID_ANY - Comma separated list of choices, or leave blank for text field - - - m_staticText25 - protected - - - - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - 150,-1 - m_textCtrlLabel0 - protected - - - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - -1,-1 - 0 - -1,-1 - m_textCtrlField0 - protected - - -1,-1 - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL - 0 - - - - 0 - 1 - - - 0 - wxID_DEL0 - Delete - - -1,-1 - m_buttonDel0 - protected - - 60,20 - - - - - - - OnButtonDel0 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - 150,-1 - m_textCtrlLabel1 - protected - - - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - -1,-1 - 0 - -1,-1 - m_textCtrlField1 - protected - - -1,-1 - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - - - 0 - 1 - - - 0 - wxID_DEL1 - Delete - - -1,-1 - m_buttonDel1 - protected - - 60,20 - - - - - - - OnButtonDel1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - 150,-1 - m_textCtrlLabel2 - protected - - - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - -1,-1 - 0 - -1,-1 - m_textCtrlField2 - protected - - -1,-1 - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - - - 0 - 1 - - - 0 - wxID_DEL2 - Delete - - -1,-1 - m_buttonDel2 - protected - - 60,20 - - - - - - - OnButtonDel2 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - 150,-1 - m_textCtrlLabel3 - protected - - - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - -1,-1 - 0 - -1,-1 - m_textCtrlField3 - protected - - -1,-1 - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - - - 0 - 1 - - - 0 - wxID_DEL3 - Delete - - -1,-1 - m_buttonDel3 - protected - - 60,20 - - - - - - - OnButtonDel3 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - 150,-1 - m_textCtrlLabel4 - protected - - - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - -1,-1 - 0 - -1,-1 - m_textCtrlField4 - protected - - -1,-1 - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - - - 0 - 1 - - - 0 - wxID_DEL4 - Delete - - -1,-1 - m_buttonDel4 - protected - - 60,20 - - - - - - - OnButtonDel4 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - 150,-1 - m_textCtrlLabel5 - protected - - - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - -1,-1 - 0 - -1,-1 - m_textCtrlField5 - protected - - -1,-1 - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - - - 0 - 1 - - - 0 - wxID_DEL5 - Delete - - -1,-1 - m_buttonDel5 - protected - - 60,20 - - - - - - - OnButtonDel5 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - 150,-1 - m_textCtrlLabel6 - protected - - - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - -1,-1 - 0 - -1,-1 - m_textCtrlField6 - protected - - -1,-1 - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - - - 0 - 1 - - - 0 - wxID_DEL6 - Delete - - -1,-1 - m_buttonDel6 - protected - - 60,20 - - - - - - - OnButtonDel6 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - 150,-1 - m_textCtrlLabel7 - protected - - - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - -1,-1 - 0 - -1,-1 - m_textCtrlField7 - protected - - -1,-1 - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - - - 0 - 1 - - - 0 - wxID_DEL7 - Delete - - -1,-1 - m_buttonDel7 - protected - - 60,20 - - - - - - - OnButtonDel7 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - 150,-1 - m_textCtrlLabel8 - protected - - - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - -1,-1 - 0 - -1,-1 - m_textCtrlField8 - protected - - -1,-1 - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - - - 0 - 1 - - - 0 - wxID_DEL8 - Delete - - -1,-1 - m_buttonDel8 - protected - - 60,20 - - - - - - - OnButtonDel8 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - 150,-1 - m_textCtrlLabel9 - protected - - - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - -1,-1 - 0 - -1,-1 - m_textCtrlField9 - protected - - -1,-1 - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - - - 0 - 1 - - - 0 - wxID_DEL9 - Delete - - -1,-1 - m_buttonDel9 - protected - - 60,20 - - - - - - - OnButtonDel9 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - 150,-1 - m_textCtrlLabel10 - protected - - - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - -1,-1 - 0 - -1,-1 - m_textCtrlField10 - protected - - -1,-1 - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - - - 0 - 1 - - - 0 - wxID_DEL10 - Delete - - -1,-1 - m_buttonDel10 - protected - - 60,20 - - - - - - - OnButtonDel10 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - 150,-1 - m_textCtrlLabel11 - protected - - - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - -1,-1 - 0 - -1,-1 - m_textCtrlField11 - protected - - -1,-1 - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - - - 0 - 1 - - - 0 - wxID_DEL11 - Delete - - -1,-1 - m_buttonDel11 - protected - - 60,20 - - - - - - - OnButtonDel11 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - 150,-1 - m_textCtrlLabel12 - protected - - - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - -1,-1 - 0 - -1,-1 - m_textCtrlField12 - protected - - -1,-1 - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - - - 0 - 1 - - - 0 - wxID_DEL12 - Delete - - -1,-1 - m_buttonDel12 - protected - - 60,20 - - - - - - - OnButtonDel12 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - 150,-1 - m_textCtrlLabel13 - protected - - - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - -1,-1 - 0 - -1,-1 - m_textCtrlField13 - protected - - -1,-1 - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - - - 0 - 1 - - - 0 - wxID_DEL13 - Delete - - -1,-1 - m_buttonDel13 - protected - - 60,20 - - - - - - - OnButtonDel13 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - 150,-1 - m_textCtrlLabel14 - protected - - - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - -1,-1 - 0 - -1,-1 - m_textCtrlField14 - protected - - -1,-1 - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - - - 0 - 1 - - - 0 - wxID_DEL14 - Delete - - -1,-1 - m_buttonDel14 - protected - - 60,20 - - - - - - - OnButtonDel14 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - 150,-1 - m_textCtrlLabel15 - protected - - - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - -1,-1 - 0 - -1,-1 - m_textCtrlField15 - protected - - -1,-1 - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - - - 0 - 1 - - - 0 - wxID_DEL15 - Delete - - -1,-1 - m_buttonDel15 - protected - - 60,20 - - - - - - - OnButtonDel15 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - 150,-1 - m_textCtrlLabel16 - protected - - - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - -1,-1 - 0 - -1,-1 - m_textCtrlField16 - protected - - -1,-1 - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - - - 0 - 1 - - - 0 - wxID_DEL16 - Delete - - -1,-1 - m_buttonDel16 - protected - - 60,20 - - - - - - - OnButtonDel16 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - 150,-1 - m_textCtrlLabel17 - protected - - - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - -1,-1 - 0 - -1,-1 - m_textCtrlField17 - protected - - -1,-1 - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - - - 0 - 1 - - - 0 - wxID_DEL17 - Delete - - -1,-1 - m_buttonDel17 - protected - - 60,20 - - - - - - - OnButtonDel17 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - 150,-1 - m_textCtrlLabel18 - protected - - - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - -1,-1 - 0 - -1,-1 - m_textCtrlField18 - protected - - -1,-1 - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - - - 0 - 1 - - - 0 - wxID_DEL18 - Delete - - -1,-1 - m_buttonDel18 - protected - - 60,20 - - - - - - - OnButtonDel18 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - - 0 - 150,-1 - m_textCtrlLabel19 - protected - - - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL - 0 - - - - 1 - - - 0 - wxID_ANY - -1,-1 - 0 - -1,-1 - m_textCtrlField19 - protected - - -1,-1 - - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - - - 0 - 1 - - - 0 - wxID_DEL19 - Delete - - -1,-1 - m_buttonDel19 - protected - - 60,20 - - - - - - - OnButtonDel19 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_HORIZONTAL - 0 - - - bSizer25 - wxHORIZONTAL - none - - 5 - wxALL - 0 - - - - 0 - 1 - - - 0 - wxID_ANY - &Add Field - - - m_buttonAddField - protected - - - - - - - - - OnButtonAddField - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_RIGHT - 0 - - - bSizer26 - wxHORIZONTAL - none - - 5 - wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND - 0 - - - - 0 - 1 - - - 0 - wxID_BUTTONSEND - &Send - - -1,-1 - m_buttonOK - protected - - - - - - - - - OnButtonSend - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND - 0 - - - - 0 - 1 - - - 0 - wxID_BUTTONPREVIEW - &Preview - - -1,-1 - m_buttonPreview - protected - - - - - - - - - OnButtonPreview - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND - 0 - - - - 0 - 1 - - - 0 - wxID_CANCEL - Cancel - - -1,-1 - m_buttonCancel - protected - - - - - - - - - OnButtonCancel - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - wxSYS_COLOUR_MENU - - - 1 - - - - 0 - wxID_ANY - - - CViewProductDialogBase - - 630,520 - wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER - - Order Form - - - - wxTAB_TRAVERSAL - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bSizer20 - wxVERTICAL - none - - 5 - wxEXPAND - 1 - - - bSizer116 - wxHORIZONTAL - none - - 5 - wxALL|wxEXPAND - 1 - - - - 1 - - - 1 - wxID_ANY - - - m_htmlWinReviews - protected - - - wxHW_SCROLLBAR_AUTO - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxALL - 1 - - wxSYS_COLOUR_WINDOW - - 1 - - - 0 - wxID_ANY - - - m_scrolledWindow - protected - - 5 - 5 - - - - - - wxHSCROLL|wxTAB_TRAVERSAL|wxVSCROLL - - - - - - - - - - - - - - - - - - - - - - - - - - bSizer21 - wxVERTICAL - none - - 5 - wxEXPAND - 0 - - - - 1 - - - 0 - wxID_ANY - - -1,-1 - m_richTextHeading - protected - - -1,50 - wxTE_READONLY - - - - - wxNO_BORDER - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - - - 1 - - - 0 - wxID_ANY - Order Form instructions here multiple lines 1 2 3 4 5 6 - - - m_staticTextInstructions - protected - - - - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_HORIZONTAL - 0 - - - bSizer25 - wxHORIZONTAL - none - - 5 - wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND - 0 - - - - 0 - 1 - - - 0 - wxID_BUTTONSAMPLE - &Submit - - -1,-1 - m_buttonSubmitForm - protected - - - - - - - - - OnButtonSubmitForm - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND - 0 - - - - 0 - 1 - - - 0 - wxID_CANCEL2 - Cancel - - - m_buttonCancelForm - protected - - - - - - - - - OnButtonCancelForm - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_RIGHT - 0 - - - bSizer26 - wxHORIZONTAL - none - - 5 - wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND - 0 - - - - 0 - 0 - - - 0 - wxID_BUTTONBACK - < &Back - - -1,-1 - m_buttonBack - protected - - - - - - - - - OnButtonBack - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND - 0 - - - - 0 - 1 - - - 0 - wxID_BUTTONNEXT - &Next > - - -1,-1 - m_buttonNext - protected - - - - - - - - - OnButtonNext - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND - 0 - - - - 0 - 1 - - - 0 - wxID_CANCEL - Cancel - - -1,-1 - m_buttonCancel - protected - - - - - - - - - OnButtonCancel - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - wxSYS_COLOUR_MENU - - - 1 - - - - 0 - wxID_ANY - - - CViewOrderDialogBase - - 630,520 - wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER - - View Order - - - - wxTAB_TRAVERSAL - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bSizer20 - wxVERTICAL - none - - 5 - wxEXPAND - 1 - - - bSizer116 - wxHORIZONTAL - none - - 5 - wxALL|wxEXPAND - 1 - - - - 1 - - - 0 - wxID_ANY - - - m_htmlWin - protected - - - wxHW_SCROLLBAR_AUTO - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_RIGHT - 0 - - - bSizer26 - wxHORIZONTAL - none - - 5 - wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND - 0 - - - - 0 - 1 - - - 0 - wxID_OK - OK - - -1,-1 - m_buttonOK - protected - - - - - - - - - OnButtonOK - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - wxSYS_COLOUR_MENU - - - 1 - - - - 0 - wxID_ANY - - - CEditReviewDialogBase - - 630,440 - wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER - - Enter Review - - - - wxTAB_TRAVERSAL - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bSizer112 - wxVERTICAL - none - - 5 - - 0 - - 3 - protected - 0 - - - - 5 - wxALL|wxEXPAND - 0 - - - - 1 - - - 0 - wxID_ANY - - - - m_staticTextSeller - protected - - - - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - - 0 - - 3 - protected - 0 - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - - - 1 - - - 0 - wxID_ANY - Rating - - - m_staticText110 - protected - - - - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL - 0 - - - " 1 star" " 2 stars" " 3 stars" " 4 stars" " 5 stars" - - 1 - - - 0 - wxID_ANY - - - m_choiceStars - protected - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - - - 1 - - - 0 - wxID_ANY - Review - - - m_staticText43 - protected - - - - - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 1 - - - - 1 - - - 0 - wxID_ANY - - 0 - - m_textCtrlReview - protected - - - wxTE_MULTILINE - - - - - - - - - - OnKeyDown - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_RIGHT - 0 - - - bSizer113 - wxHORIZONTAL - none - - 5 - wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND - 0 - - - - 0 - 1 - - - 0 - wxID_SUBMIT - &Submit - - -1,-1 - m_buttonSubmit - protected - - - - - - - - - OnButtonSubmit - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND - 0 - - - - 0 - 1 - - - 0 - wxID_CANCEL - Cancel - - -1,-1 - m_buttonCancel - protected - - - - - - - - - OnButtonCancel - - - - - - - - - - - - - - - - - - - - - - - - - - - - -