45
|
1 // Filename : mover.h
|
47
|
2 // Last Change: 2020-04-21 ‰Î 11:50:30.
|
45
|
3 //
|
|
4 #pragma once
|
|
5
|
|
6 #include <wx/artprov.h>
|
|
7 #include <wx/xrc/xmlres.h>
|
|
8 #include <wx/string.h>
|
|
9 #include <wx/stattext.h>
|
|
10 #include <wx/gdicmn.h>
|
|
11 #include <wx/font.h>
|
|
12 #include <wx/colour.h>
|
|
13 #include <wx/settings.h>
|
|
14 #include <wx/filepicker.h>
|
|
15 #include <wx/listctrl.h>
|
|
16 #include <wx/bitmap.h>
|
|
17 #include <wx/image.h>
|
|
18 #include <wx/icon.h>
|
|
19 #include <wx/button.h>
|
|
20 #include <wx/sizer.h>
|
|
21 #include <wx/checkbox.h>
|
|
22 #include <wx/frame.h>
|
|
23 #include <wx/dataview.h>
|
|
24 #include <wx/statbmp.h>
|
|
25 #include <wx/textctrl.h>
|
|
26 #include <wx/datectrl.h>
|
|
27 #include <wx/dateevt.h>
|
|
28 #include <wx/choice.h>
|
|
29 #include <wx/gbsizer.h>
|
|
30
|
|
31 /* marksheet rect */
|
|
32 #define MS_X 1340
|
|
33 #define MS_Y 324
|
|
34 #define MS_W 596
|
|
35 #define MS_H 509
|
|
36
|
|
37 /* lookin-window width & height */
|
|
38 #define HNAME_WW 288
|
|
39 #define HNAME_WH 86
|
|
40 #define HNO_WW 288
|
|
41 #define HNO_WH 49
|
|
42
|
|
43 /* sub image size */
|
|
44 #define HNAME_X 238
|
|
45 #define HNAME_Y 540
|
|
46 #define HNAME_W 656
|
|
47 #define HNAME_H 170
|
|
48 #define HNO_X 1340
|
|
49 #define HNO_Y 238
|
|
50 #define HNO_W 600
|
|
51 #define HNO_H 94
|
|
52
|
|
53 /* thumbnail size */
|
|
54 #define THUMB_W 115
|
|
55 #define THUMB_H 155
|
|
56
|
|
57 /* right pane size */
|
|
58 #define RIGHT_W 940
|
|
59 #define RIGHT_H1 100
|
|
60 #define RIGHT_H2 220
|
|
61
|
|
62 WX_DECLARE_STRING_HASH_MAP(wxString, HhsHash);
|
|
63
|
|
64 class MoveFrame : public wxFrame
|
|
65 {
|
|
66 private:
|
|
67 HhsHash m_hhash;
|
|
68 wxArrayString m_sss;
|
|
69 wxString m_addr, m_port;
|
47
|
70 int m_offx, m_offy;
|
|
71 wxString m_maxhno;
|
|
72 wxString m_curms; // current marksheet
|
45
|
73
|
|
74 protected:
|
|
75 wxDirPickerCtrl* m_dirPicker;
|
|
76 wxButton* m_buttonAuto;
|
|
77 wxCheckBox* m_checkBox;
|
|
78
|
|
79 wxDataViewListCtrl* m_dataViewListCtrl;
|
|
80 wxDataViewColumn* m_dataViewListColumnNo;
|
|
81 wxDataViewColumn* m_dataViewListColumnHno;
|
|
82 wxDataViewColumn* m_dataViewListColumnName;
|
|
83 wxDataViewColumn* m_dataViewListColumnChecked;
|
|
84
|
|
85 wxStaticBitmap* m_bitmapName;
|
|
86 wxTextCtrl* m_textCtrlName;
|
|
87
|
|
88 wxStaticBitmap* m_bitmapHno;
|
|
89 wxTextCtrl* m_textCtrlHno;
|
47
|
90 wxStaticText* m_staticTextHnoMsg;
|
45
|
91
|
|
92 wxListView* m_listViewThumb;
|
|
93
|
|
94 wxStaticBitmap* m_bitmapTk;
|
|
95 wxStaticBitmap* m_bitmapIk;
|
|
96
|
|
97 wxStaticText* m_staticTextDate;
|
|
98 wxDatePickerCtrl* m_datePicker;
|
|
99 wxStaticText* m_staticTextCcn;
|
|
100 wxChoice* m_choiceCcn;
|
|
101 wxButton* m_buttonSave;
|
|
102 wxTextCtrl* m_textCtrlMsg;
|
|
103
|
|
104 virtual void OnKey(wxKeyEvent& event);
|
|
105 virtual void OnAuto(wxCommandEvent& event);
|
|
106 virtual void OnListChar(wxKeyEvent& event);
|
|
107 virtual void OnSelect(wxDataViewEvent& event);
|
47
|
108 virtual void OnName(wxCommandEvent& event);
|
45
|
109 virtual void OnHnoChar(wxKeyEvent& event);
|
|
110 virtual void OnHno(wxCommandEvent& event);
|
|
111 virtual void OnCheck(wxCommandEvent& event);
|
|
112 virtual void OnSave(wxCommandEvent& event);
|
|
113 virtual void OnThumbDeselected(wxListEvent& event);
|
|
114 virtual void OnThumbSelected(wxListEvent& event);
|
|
115 virtual void OnThumbDClick(wxListEvent& event);
|
|
116
|
|
117 void CreateControls();
|
|
118 void InitializeControlsValue();
|
|
119 void LoadDefaultImages();
|
|
120 void LoadDB();
|
|
121 void AutoDetect();
|
47
|
122 void SelectItem(int r);
|
45
|
123 void ThumbnailPaper();
|
47
|
124 wxString AnalizeHhsno(wxString file, int offx, int offy);
|
|
125 void MoveLookWin(int x, int y);
|
45
|
126
|
|
127 public:
|
|
128 MoveFrame(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL);
|
|
129 ~MoveFrame();
|
|
130 };
|
|
131
|