//[Input("Apply")] //ISpread<bool> FInApply; //[Output("Variable Name")] //ISpread<string> FOutVarName; //[Output("Preset Value")] //ISpread<double> FOutValue; #region IPluginEvaluate Members public void Evaluate(int SpreadMax) { if (this.FInEngine.PluginIO.IsConnected) { if (this.FInDoLoad[0]) { string path = this.FInPath[0]; try { if (File.Exists(path)) { StreamReader sr = null; try { sr = new StreamReader(path); string xml = sr.ReadToEnd(); sr.Close(); TodoPresetWrapper.LoadXml(this.FInEngine[0], xml); } catch { if (sr != null) { sr.Close(); } } } } catch { } } } }
public void Evaluate(int SpreadMax) { if (this.FInEngine.PluginIO.IsConnected) { if (this.FInDoSave[0]) { string path = this.FInPath[0]; try { StreamWriter sw = new StreamWriter(path); sw.Write(TodoPresetWrapper.Persist(this.FInEngine[0], this.FInVarName.ToArray())); sw.Close(); } catch { } } } }