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