void WXCrystMainFrame::OnLoad(wxCommandEvent& event) { wxFileDialog *open; switch(event.GetId()) { #if 0 case MENU_FILE_LOAD_OXY: { open= new wxFileDialog(this,"Choose File :", "","","*.oxy",wxOPEN | wxFILE_MUST_EXIST); if(open->ShowModal() != wxID_OK) return; IOCrystFileLoadAllObject(open->GetPath().c_str()); break; } #endif case MENU_FILE_LOAD: { open= new wxFileDialog(this,"Choose File :", "","","*.xml",wxOPEN | wxFILE_MUST_EXIST); if(open->ShowModal() != wxID_OK) return; XMLCrystFileLoadAllObject(open->GetPath().c_str()); break; } } open->Destroy(); }
void WXCrystMainFrame::OnDebugTest(wxCommandEvent& event){	static long saveId=-1;	static long saveId2=-1;	switch(event.GetId())	{		case MENU_DEBUG_TEST1:		{			if(saveId==-1) saveId=gScattererRegistry.GetObj(0).CreateParamSet();			else gScattererRegistry.GetObj(0).SaveParamSet(saveId);			gScattererRegistry.GetObj(0).GlobalOptRandomMove(1);			gCrystalRegistry.GetObj(0).UpdateDisplay();			if(saveId2==-1) saveId2=gScattererRegistry.GetObj(0).CreateParamSet();			else gScattererRegistry.GetObj(0).SaveParamSet(saveId2);			break;		}		case MENU_DEBUG_TEST2:		{			gScattererRegistry.GetObj(0).RestoreParamSet(saveId);			gCrystalRegistry.GetObj(0).UpdateDisplay();			break;		}		case MENU_DEBUG_TEST3:		{			gScattererRegistry.GetObj(0).RestoreParamSet(saveId2);			gCrystalRegistry.GetObj(0).UpdateDisplay();			break;		}	}}