Exemple #1
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();
}
Exemple #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();
}
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();
}
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();
}