Esempio n. 1
0
void ToolBox::OnClose(wxCloseEvent& event)
{
	TextFile ofp;
	wxString text;
	ofp.Open("boxdiag.txt");

	if(servant || child) {
		Show(false);
		ofp.WriteLine(text.Format("hide box %d, child %d", boxindex, child));
	}
	else if(canclose) {
		ofp.WriteLine(text.Format("close box %d, mod boxes %d", boxindex, toolset->numtools));
		//if(mod != NULL) mod->modtools.RemoveBox(boxindex);
		//mainwin->toolset.RemoveBox(boxindex);
		toolset->RemoveBox(boxindex);
		Destroy();
	}

	ofp.Close();
}
Esempio n. 2
0
void GraphBase::BaseStore(wxString path, wxString tag)
{
	int i;
	TextFile outfile;
	wxString text, filename, filetag;

	filename = "gbase-" + tag + ".dat";

	//outfile.New(initpath + "/Graphs/" + filename);
	outfile.New(path + "/" + filename);
	for(i=0; i<numgraphs; i++) {
		outfile.WriteLine(graphstore[i].StoreDat(GetTag(i)));
		//outfile.WriteLine(text.Format
	}
	outfile.Close();
}
Esempio n. 3
0
void Model::GHistStore()
{
	wxString filename, filepath;
	wxString text;
	TextFile outfile;
	int i;

	//if(path == "") filepath = "Init";
	//else filepath = path;
	filepath = GetPath();

	wxComboBox *gstag = mainwin->scalebox->gstag;
	
	filename = modname + "gshist.ini";
	outfile.New(filepath + "/" + filename);
	for(i=gstag->GetCount()-1; i>=0; i--) 
		outfile.WriteLine(text.Format("graph %s", gstag->GetString(i)));
	outfile.Close();
}
Esempio n. 4
0
TagBox::~TagBox()
{
	int i;
	wxString filename, filepath, outline, text;
	TextFile opfile;

	//if(diagbox) diagbox->Write(text.Format("closing tag box %s\n", name)); 

	// Tag history
	if(name == "") return;
	filename = name + "tags.ini";
	filepath = path + "/Tags/";
	if(!wxDirExists(filepath)) wxMkdir(filepath);
	opfile.New(filepath + filename);

	for(i=GetCount()-1; i>=0; i--) {
		outline.Printf("tag %s", GetString(i));
		opfile.WriteLine(outline);
	}
	opfile.Close();
}
Esempio n. 5
0
void HypoMain::OptionStore()
{
    wxString filename;
    wxString outline;
    
    filename = "Init/hypoprefs.ini";
    
    TextFile opfile;
    opfile.New(filename);
    
    opfile.WriteLine(outline.Format("startmod %d", startmod));
    
    opfile.WriteLine(outline.Format("numdraw %d", numdraw));
    
    opfile.WriteLine(outline.Format("viewheight %d", viewheight));
    
    opfile.WriteLine(outline.Format("viewwidth %d", viewwidth));
    
    opfile.WriteLine(outline.Format("ylabels %d", ylabels));
    
    opfile.WriteLine(outline.Format("datsample %d", datsample));
    
    opfile.WriteLine(outline.Format("basic %d", basic));
    
    opfile.WriteLine(outline.Format("diagnostic %d", diagnostic));
    
    opfile.Close();
    
    filename = "Init/hypopaths.ini";
    opfile.New(filename);
    opfile.WriteLine(datapath);
    opfile.WriteLine(parampath);
    opfile.WriteLine(outpath);
    opfile.WriteLine(modpath);
    opfile.Close();
}