0
|
1 // Filename : myframe.cpp
|
3
|
2 // Last Change: 16-Oct-2011.
|
0
|
3 //
|
|
4
|
|
5 #include "main.h"
|
|
6 #include "myframe.h"
|
1
|
7 #include "marksheet.h"
|
0
|
8
|
|
9 //////////////////////////////////////////////////////////////////////////
|
|
10 // frame constructor
|
|
11 MyFrame::MyFrame( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
|
|
12 {
|
|
13 this->SetBackgroundColour( wxColour(wxT("WHEAT")) );
|
|
14 // set the frame icon
|
|
15 //SetIcon(wxICON(sample));
|
|
16
|
|
17 // メニューバー
|
|
18 m_menubarFile = new wxMenuBar();
|
|
19 m_menuFile = new wxMenu();
|
|
20 wxMenuItem* m_menuItemParam;
|
|
21 m_menuItemParam = new wxMenuItem( m_menuFile, ID_MENUITEMPARAM, wxString( wxT("パラメータ(&P)") ) , wxEmptyString, wxITEM_NORMAL );
|
|
22 m_menuFile->Append( m_menuItemParam );
|
|
23
|
|
24 wxMenuItem* m_menuItemAppDIr;
|
|
25 m_menuItemAppDIr = new wxMenuItem( m_menuFile, ID_MENUITEMAPPDIR, wxString( wxT("アプリフォルダを開く(&O)") ) , wxEmptyString, wxITEM_NORMAL );
|
|
26 m_menuFile->Append( m_menuItemAppDIr );
|
|
27
|
|
28 wxMenuItem* m_separator;
|
|
29 m_separator = m_menuFile->AppendSeparator(); // ----
|
|
30
|
|
31 wxMenuItem* m_menuItemQuit;
|
|
32 m_menuItemQuit = new wxMenuItem( m_menuFile, ID_MENUITEMQUIT, wxString( wxT("終了(&X)") ) , wxEmptyString, wxITEM_NORMAL );
|
|
33 m_menuFile->Append( m_menuItemQuit );
|
|
34
|
|
35 m_menubarFile->Append( m_menuFile, wxT("ファイル(&F)") );
|
|
36
|
|
37 this->SetMenuBar( m_menubarFile );
|
|
38
|
|
39 // コントロール
|
|
40 wxBoxSizer* bSizerTop = new wxBoxSizer( wxVERTICAL );
|
|
41
|
|
42 wxBoxSizer* bSizerFrom = new wxBoxSizer( wxHORIZONTAL );
|
|
43
|
|
44 m_staticTextWork = new wxStaticText( this, wxID_ANY, wxT("作業フォルダ"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
45 bSizerFrom->Add( m_staticTextWork, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
|
46
|
|
47 m_dirPickerWork = new wxDirPickerCtrl( this, wxID_ANY, wxGetApp().workdir, wxT("Select a folder"), wxDefaultPosition, wxDefaultSize, wxDIRP_DEFAULT_STYLE );
|
|
48 bSizerFrom->Add( m_dirPickerWork, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
|
49
|
|
50 bSizerTop->Add( bSizerFrom, 0, wxEXPAND, 5 );
|
|
51
|
1
|
52 wxBoxSizer* bSizerDist = new wxBoxSizer( wxHORIZONTAL );
|
|
53
|
|
54 m_staticTextDist = new wxStaticText( this, wxID_ANY, wxT("保存フォルダ"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
55 bSizerDist->Add( m_staticTextDist, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
|
56
|
|
57 m_textCtrlDist = new wxTextCtrl( this, ID_TEXTCTRLDIST, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
|
58 m_textCtrlDist->SetMaxLength( 15 );
|
|
59 bSizerDist->Add( m_textCtrlDist, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
|
60 bSizerDist->Add( 0, 0, 1, wxEXPAND, 5 );
|
0
|
61
|
|
62 m_staticTextDrive = new wxStaticText( this, wxID_ANY, wxT("ドライブ"), wxDefaultPosition, wxDefaultSize, 0 );
|
1
|
63 bSizerDist->Add( m_staticTextDrive, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
0
|
64
|
|
65 wxArrayString drives;
|
|
66 drives.Add(wxT("C:"));
|
|
67 drives.Add(wxT("Y:"));
|
|
68 drives.Add(wxT("Z:"));
|
|
69 m_comboBoxDrive = new wxComboBox( this, wxID_ANY, wxT("C:"), wxDefaultPosition, wxSize(50,-1), drives, 0 );
|
1
|
70 bSizerDist->Add( m_comboBoxDrive, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
0
|
71
|
|
72 m_staticTextDate = new wxStaticText( this, wxID_ANY, wxT("開催日"), wxDefaultPosition, wxDefaultSize, 0 );
|
1
|
73 bSizerDist->Add( m_staticTextDate, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
0
|
74
|
|
75 m_datePicker = new wxDatePickerCtrl( this, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DROPDOWN );
|
1
|
76 bSizerDist->Add( m_datePicker, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
0
|
77
|
|
78 m_staticTextCcn = new wxStaticText( this, wxID_ANY, wxT("合議体"), wxDefaultPosition, wxDefaultSize, 0 );
|
1
|
79 bSizerDist->Add( m_staticTextCcn, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
0
|
80
|
|
81 wxArrayString ccns;
|
|
82 ccns.Add(wxT("角館1")); ccns.Add(wxT("角館2")); ccns.Add(wxT("角館3")); ccns.Add(wxT("角館4"));
|
|
83 ccns.Add(wxT("西仙1")); ccns.Add(wxT("西仙2")); ccns.Add(wxT("西仙3"));
|
|
84 ccns.Add(wxT("千畑1")); ccns.Add(wxT("千畑2")); ccns.Add(wxT("千畑3"));
|
|
85 ccns.Add(wxT("大曲1")); ccns.Add(wxT("大曲2")); ccns.Add(wxT("大曲3")); ccns.Add(wxT("大曲4")); ccns.Add(wxT("大曲5")); ccns.Add(wxT("大曲6"));
|
|
86 ccns.Add(wxT("六郷1")); ccns.Add(wxT("六郷2")); ccns.Add(wxT("六郷3"));
|
|
87 m_comboBoxCcn = new wxComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(100,-1), ccns, 0 );
|
1
|
88 bSizerDist->Add( m_comboBoxCcn, 0, wxALL, 5 );
|
0
|
89
|
|
90 m_buttonMkDir = new wxButton( this, ID_BUTTONMKDIR, wxT("適用"), wxDefaultPosition, wxDefaultSize, 0 );
|
1
|
91 bSizerDist->Add( m_buttonMkDir, 0, wxALL, 5 );
|
0
|
92
|
|
93
|
|
94 bSizerTop->Add( bSizerDist, 0, wxEXPAND, 5 );
|
|
95
|
|
96 wxBoxSizer* bSizerManip = new wxBoxSizer( wxHORIZONTAL );
|
|
97
|
|
98 wxBoxSizer* bSizerGuess = new wxBoxSizer( wxVERTICAL );
|
|
99
|
|
100 m_staticTextName = new wxStaticText( this, wxID_ANY, wxT("氏名"), wxDefaultPosition, wxDefaultSize, 0 );
|
1
|
101 bSizerGuess->Add( m_staticTextName, 0, wxTOP|wxLEFT, 5 );
|
|
102 m_bitmapName = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize(320,95), 0 );
|
0
|
103 bSizerGuess->Add( m_bitmapName, 0, wxALL, 5 );
|
|
104
|
|
105 m_staticTextHhsno = new wxStaticText( this, wxID_ANY, wxT("被保険者番号"), wxDefaultPosition, wxDefaultSize, 0 );
|
1
|
106 bSizerGuess->Add( m_staticTextHhsno, 0, wxTOP|wxLEFT, 5 );
|
|
107 m_bitmapHHsno = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize(320,54), 0 );
|
0
|
108 bSizerGuess->Add( m_bitmapHHsno, 0, wxALL, 5 );
|
|
109
|
|
110 m_staticTextGuess = new wxStaticText( this, wxID_ANY, wxT("推定値"), wxDefaultPosition, wxDefaultSize, 0 );
|
1
|
111 bSizerGuess->Add( m_staticTextGuess, 0, wxTOP|wxLEFT, 5 );
|
0
|
112 m_textCtrlGuess = new wxTextCtrl( this, ID_TEXTCTRLGUESS, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
|
113 m_textCtrlGuess->SetMaxLength( 10 );
|
|
114 bSizerGuess->Add( m_textCtrlGuess, 0, wxALL, 5 );
|
|
115
|
|
116 bSizerManip->Add( bSizerGuess, 0, wxEXPAND, 5 );
|
|
117
|
|
118 m_listCtrlView = new wxListCtrl( this, ID_LISTCTRLVIEW, wxDefaultPosition, wxDefaultSize, wxLC_ICON );
|
1
|
119 m_listCtrlView->SetBackgroundColour(wxT("LIGHT GREY"));
|
0
|
120 bSizerManip->Add( m_listCtrlView, 1, wxALL|wxEXPAND, 5 );
|
1
|
121 m_imageList = new wxImageList( 189, 267 );
|
0
|
122 m_listCtrlView->AssignImageList( m_imageList, wxIMAGE_LIST_NORMAL );
|
|
123
|
|
124 wxBoxSizer* bSizerButton = new wxBoxSizer( wxVERTICAL );
|
|
125
|
1
|
126 m_buttonDetect = new wxButton( this, ID_BUTTONDETECT, wxT("検知"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
127 bSizerButton->Add( m_buttonDetect, 0, wxALL, 5 );
|
0
|
128 m_buttonMove = new wxButton( this, ID_BUTTONMOVE, wxT("移動"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
129 bSizerButton->Add( m_buttonMove, 0, wxALL, 5 );
|
1
|
130 m_buttonMD = new wxButton( this, ID_BUTTONMD, wxT("移動&検知"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
131 bSizerButton->Add( m_buttonMD, 0, wxALL, 5 );
|
0
|
132 m_buttonDel = new wxButton( this, ID_BUTTONDEL, wxT("削除"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
133 bSizerButton->Add( m_buttonDel, 0, wxALL, 5 );
|
|
134 m_buttonUndo = new wxButton( this, ID_BUTTONUNDO, wxT("戻す"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
135 bSizerButton->Add( m_buttonUndo, 0, wxALL, 5 );
|
|
136
|
|
137 bSizerManip->Add( bSizerButton, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
|
138
|
|
139 bSizerTop->Add( bSizerManip, 1, wxEXPAND, 5 );
|
|
140
|
|
141 this->SetSizer( bSizerTop );
|
|
142 this->Layout();
|
|
143
|
|
144 // ステータスバー
|
3
|
145 int widths[] = { 150, 250, -1, 120 };
|
0
|
146 m_statusBar = this->CreateStatusBar( WXSIZEOF(widths), wxST_SIZEGRIP );
|
|
147 m_statusBar->SetStatusWidths( WXSIZEOF(widths), widths );
|
|
148 m_statusBar->SetStatusText( wxEmptyString, 0 );
|
|
149
|
|
150 this->Centre( wxBOTH );
|
|
151 }
|
|
152
|
|
153 // destructor
|
|
154 MyFrame::~MyFrame()
|
|
155 {
|
|
156 }
|
|
157
|
|
158 // Event Table
|
|
159 BEGIN_EVENT_TABLE( MyFrame, wxFrame )
|
1
|
160 EVT_SIZE( MyFrame::OnWinSize )
|
|
161 EVT_MOVE( MyFrame::OnWinMove )
|
|
162 EVT_MENU( ID_MENUITEMPARAM, MyFrame::OnParam )
|
|
163 EVT_MENU( ID_MENUITEMAPPDIR, MyFrame::OnOpenAppDir )
|
|
164 EVT_MENU( wxID_EXIT, MyFrame::OnQuit )
|
3
|
165 EVT_BUTTON( ID_BUTTONMKDIR, MyFrame::OnMakeDir )
|
1
|
166 EVT_BUTTON( ID_BUTTONDETECT, MyFrame::OnDetect )
|
|
167 EVT_BUTTON( ID_BUTTONMOVE, MyFrame::OnMove )
|
|
168 EVT_BUTTON( ID_BUTTONMD, MyFrame::OnMoveAndDetect )
|
|
169 //EVT_BUTTON( ID_BUTTONDEL, MyFrame::Delete )
|
|
170 //EVT_BUTTON( ID_BUTTONUNDO, MyFrame::Undo )
|
3
|
171 EVT_LIST_ITEM_SELECTED( ID_LISTCTRLVIEW, MyFrame::GetImageInfo )
|
|
172 EVT_LIST_ITEM_ACTIVATED( ID_LISTCTRLVIEW, MyFrame::ViewLarge )
|
0
|
173 EVT_CLOSE( MyFrame::SaveConfig )
|
|
174 END_EVENT_TABLE()
|
|
175
|
|
176 // Event Handlers
|
|
177 /* 移動先フォルダ作成 */
|
3
|
178 void MyFrame::OnMakeDir(wxCommandEvent& WXUNUSED(event))
|
0
|
179 {
|
1
|
180 wxString to;
|
|
181 to.Append( m_comboBoxDrive->GetValue() );
|
|
182 to.Append( wxFILE_SEP_PATH );
|
|
183 wxDateTime dt = m_datePicker->GetValue();
|
|
184 to.Append( dt.Format(wxT("%Y%m%d")) );
|
|
185 to.Append( wxFILE_SEP_PATH );
|
|
186 to.Append( m_comboBoxCcn->GetValue() );
|
|
187 m_textCtrlDist->SetValue( to );
|
|
188
|
0
|
189 wxString ccn = m_comboBoxCcn->GetValue();
|
1
|
190 if ( to.Len() < 15 || ccn.IsEmpty() ) {
|
0
|
191 wxMessageBox(wxT("フォルダを指定してください."));
|
|
192 return;
|
|
193 }
|
|
194
|
1
|
195 wxStringTokenizer tkz( to, wxFILE_SEP_PATH );
|
0
|
196 wxString d;
|
|
197 while ( tkz.HasMoreTokens() ) {
|
|
198 d.Append( tkz.GetNextToken() );
|
|
199 d.Append( wxFILE_SEP_PATH );
|
|
200 if ( !wxDirExists( d ) ) wxMkdir( d );
|
|
201 }
|
|
202
|
|
203 wxMessageBox(wxT("移動先フォルダ準備完了"));
|
1
|
204 wxString cmd = wxT("explorer ") + to;
|
0
|
205 wxExecute( cmd );
|
|
206 }
|
|
207
|
1
|
208 /* 移動 */
|
|
209 void MyFrame::OnMove(wxCommandEvent& WXUNUSED(event))
|
|
210 {
|
|
211 MoveImage();
|
|
212 }
|
|
213 /* 検知 */
|
|
214 void MyFrame::OnDetect(wxCommandEvent& WXUNUSED(event))
|
|
215 {
|
|
216 ReadyImage();
|
|
217 }
|
|
218 /* 移動し検知 */
|
|
219 void MyFrame::OnMoveAndDetect(wxCommandEvent& WXUNUSED(event))
|
0
|
220 {
|
|
221 MoveImage();
|
|
222 ReadyImage();
|
|
223 }
|
|
224
|
|
225 /* 画像をリストコントロールに表示 */
|
|
226 void MyFrame::ReadyImage()
|
|
227 {
|
|
228 wxString workdir = m_dirPickerWork->GetPath();
|
|
229 wxDir dir( workdir );
|
|
230 if ( !dir.IsOpened() ) return;
|
|
231
|
|
232 wxString filename;
|
|
233 bool cout = dir.GetFirst( &filename, wxT("*.jpg"), wxDIR_FILES );
|
|
234
|
|
235 int i = 0;
|
|
236 m_listCtrlView->DeleteAllItems();
|
|
237 m_imageList->RemoveAll();
|
|
238 wxListItem item;
|
1
|
239 wxString first;
|
|
240 float b; long l;
|
0
|
241 while ( cout ) {
|
3
|
242 wxString imagefile = workdir + wxFILE_SEP_PATH + filename;
|
0
|
243
|
3
|
244 m_listCtrlView->InsertItem( i, filename );
|
|
245 m_listCtrlView->SetItem( i, 0, filename, i );
|
0
|
246
|
1
|
247 wxImage image( imagefile, wxBITMAP_TYPE_JPEG );
|
|
248 wxBitmap bmp( image.Scale( 189, 267, wxIMAGE_QUALITY_HIGH ) );
|
0
|
249 m_imageList->Add( bmp );
|
3
|
250
|
|
251 if ( i == 0 ) {
|
|
252 IsMarksheet( imagefile, &b, &l );
|
|
253 first = imagefile;
|
|
254 SetStatusText( wxString::Format(wxT("1st image : z = %f, l = %d"),b,l), 1 );
|
|
255 }
|
|
256 else {
|
|
257 if ( i > 7 || IsMarksheet( imagefile, &b, &l ) ) {
|
|
258 break;
|
|
259 }
|
|
260 }
|
|
261 m_listCtrlView->SetItemState( i, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED );
|
|
262
|
0
|
263 // write log
|
|
264 i++;
|
|
265 cout = dir.GetNext( &filename );
|
|
266 }
|
1
|
267
|
|
268 wxImage marksheet( first, wxBITMAP_TYPE_JPEG );
|
|
269 wxImage name_image;
|
|
270 name_image = marksheet.GetSubImage( wxRect( wxPoint(300,550), wxSize(640,190) ) );
|
|
271 wxBitmap name_bmp = ( name_image.Scale( 320, 95, wxIMAGE_QUALITY_HIGH ) );
|
|
272 m_bitmapName->SetBitmap( name_bmp );
|
|
273
|
|
274 wxImage hhsno_image;
|
|
275 hhsno_image = marksheet.GetSubImage( wxRect( wxPoint(1800,210), wxSize(594,100) ) );
|
|
276 wxBitmap hhsno_bmp = ( hhsno_image.Scale( 320, 54, wxIMAGE_QUALITY_HIGH ) );
|
|
277 m_bitmapHHsno->SetBitmap( hhsno_bmp );
|
|
278
|
|
279 wxString hhsno = GuessHhs( first );
|
|
280 m_textCtrlGuess->SetValue( hhsno );
|
0
|
281 }
|
|
282
|
|
283 /* 画像移動 */
|
|
284 void MyFrame::MoveImage()
|
|
285 {
|
|
286 wxString distdir = m_textCtrlDist->GetValue();
|
|
287 wxString ccn = m_comboBoxCcn->GetValue();
|
|
288 if ( distdir.IsEmpty() || ccn.IsEmpty() ) {
|
|
289 wxMessageBox(wxT("フォルダを指定してください."));
|
|
290 return;
|
|
291 }
|
|
292
|
|
293 distdir.Append( wxFILE_SEP_PATH );
|
|
294 if ( !wxDirExists( distdir ) ) {
|
|
295 wxMessageBox(wxT("フォルダが存在しません."));
|
|
296 return;
|
|
297 }
|
|
298
|
|
299 /*
|
|
300 wxString to = distdir + wxFILE_SEP_PATH + hhs + wxFILE_SEP_PATH + filename;
|
|
301 wxRenameFile( from, to, false );
|
|
302 */
|
|
303 }
|
|
304
|
1
|
305 /* 画像を選択 */
|
3
|
306 void MyFrame::GetImageInfo(wxListEvent& event)
|
1
|
307 {
|
3
|
308 SetStatusText( wxEmptyString, 2 );
|
2
|
309 int i = event.GetIndex();
|
|
310
|
3
|
311 wxString filename = event.GetText();
|
|
312 wxString workdir = m_dirPickerWork->GetPath();
|
|
313 wxString imagefile = workdir + wxFILE_SEP_PATH + filename;
|
|
314 float b; long l;
|
|
315 wxString msg;
|
|
316 if ( IsMarksheet( imagefile, &b, &l ) ) {
|
|
317 msg = wxT("Success detection");
|
2
|
318 }
|
3
|
319 SetStatusText( wxString::Format(wxT("selected image : z = %f, l = %d ...")+msg, b, l ), 2 );
|
2
|
320 }
|
|
321
|
|
322 /* 画像のスクリーン表示*/
|
|
323 void MyFrame::ViewLarge(wxListEvent& event)
|
|
324 {
|
|
325 int i = event.GetIndex();
|
|
326 wxListItem item;
|
|
327 item.SetId(i);
|
|
328
|
|
329 wxString filename = event.GetText();
|
|
330 wxString workdir = m_dirPickerWork->GetPath();
|
|
331 wxString imagefile = workdir + wxFILE_SEP_PATH + filename;
|
|
332
|
|
333 wxImage image( imagefile, wxBITMAP_TYPE_JPEG );
|
|
334 wxBitmap bmp( image.Scale( 707, 1000, wxIMAGE_QUALITY_HIGH ) );
|
|
335 wxSplashScreen* splash = new wxSplashScreen( bmp,
|
|
336 wxSPLASH_CENTRE_ON_SCREEN|wxSPLASH_TIMEOUT,
|
|
337 3000, NULL, -1, wxDefaultPosition, wxDefaultSize,
|
|
338 wxSIMPLE_BORDER|wxSTAY_ON_TOP );
|
|
339 wxYield();
|
1
|
340 }
|
|
341
|
|
342 /* パラメータダイアログ */
|
|
343 void MyFrame::OnParam(wxCommandEvent& WXUNUSED(event))
|
|
344 {
|
|
345 }
|
|
346
|
0
|
347 // 以下,定型もの
|
|
348 /* アプリフォルダを開く */
|
|
349 void MyFrame::OnOpenAppDir(wxCommandEvent& WXUNUSED(event))
|
|
350 {
|
|
351 wxString appdir = m_dirPickerWork->GetPath();
|
|
352 wxString execmd = wxT("explorer ") + appdir;
|
|
353 wxExecute( execmd );
|
|
354 }
|
|
355
|
|
356 /* サイズ変更 */
|
1
|
357 void MyFrame::OnWinSize(wxSizeEvent& event)
|
0
|
358 {
|
|
359 this->Refresh( true, NULL );
|
|
360 TellLocation();
|
|
361 event.Skip();
|
|
362 }
|
|
363 /* ウィンドウ移動 */
|
1
|
364 void MyFrame::OnWinMove(wxMoveEvent& WXUNUSED(event))
|
0
|
365 {
|
|
366 TellLocation();
|
|
367 return;
|
|
368 }
|
|
369 /* ウィンドウ位置とサイズを表示 */
|
|
370 void MyFrame::TellLocation( void )
|
|
371 {
|
|
372 wxRect r = this->GetRect();
|
|
373 int x = r.GetX();
|
|
374 int y = r.GetY();
|
|
375 int w = r.GetWidth();
|
|
376 int h = r.GetHeight();
|
1
|
377 SetStatusText( wxString::Format(wxT("(%d,%d) %dx%d"),x,y,w,h), 3 );
|
0
|
378 }
|
|
379 /* 終了 */
|
|
380 void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
|
381 {
|
|
382 Close(true);
|
|
383 }
|
|
384 /* 設定を保存 */
|
|
385 void MyFrame::SaveConfig(wxCloseEvent& WXUNUSED(event))
|
|
386 {
|
|
387 if ( !IsIconized() && !IsMaximized() ) {
|
|
388 wxGetApp().rect = this->GetRect();
|
|
389 }
|
|
390 wxGetApp().workdir = m_dirPickerWork->GetPath();
|
|
391
|
|
392 Destroy();
|
|
393 }
|
|
394
|