public void OnPostSetAxiom() { DragFormHelper.TryGetFormData(Request.Form, "axiom", out AxiomInfos, out ErrorMsg); UpdateSession(); GetInfoFromSession(); }
public void OnPostNewRule() { GetInfoFromSession(); var source = Request.Form["source-module"]; if (string.IsNullOrWhiteSpace(source)) { ErrorMsg = "InternalError"; return; } DragFormHelper.TryGetFormData(Request.Form, "next", out var nextGenInfo, out var error); if (!string.IsNullOrWhiteSpace(error)) { ErrorMsg = error; } DragFormHelper.TryGetFormData(Request.Form, "left", out var leftContextInfo, out error); if (!string.IsNullOrWhiteSpace(error)) { ErrorMsg = error; } var leftContextNames = ExtractModuleNames(leftContextInfo); DragFormHelper.TryGetFormData(Request.Form, "right", out var rightContextInfo, out error); if (!string.IsNullOrWhiteSpace(error)) { ErrorMsg = error; } var rightContextNames = ExtractModuleNames(rightContextInfo); RuleInfos.Add(new RuleInfo { SourceModule = source, NextGeneration = nextGenInfo, LeftContext = leftContextNames, RightContext = rightContextNames, }); UpdateSession(); }