private void BtnStart_Click(object sender, EventArgs e) { string fileName = "Results.txt"; var api = new APIWolframAlfa(); string toWrite = ""; foreach (var formula in formulas) { toWrite += formula.m_toFind + " = " + api.Solve(formula) + "[" + formula.m_units + "]" + Environment.NewLine; } MessageBox.Show(toWrite, "Results"); if (checkBoxAppend.Checked) { FileWorker.AppendToFile(toWrite, fileName); } else { FileWorker.WriteToFile(toWrite, fileName); } }
public APIWolframAlfa() { link = "http://api.wolframalpha.com/v2/query?input={0};&appid=" + FileWorker.readID() + "&includepodid=Result&format=plaintext"; }