private bool InitGaTables() { _log.Append("Initializing GA Data..."); labelStatus.Text = _log.ToString(); Application.DoEvents(); try { GMacLookupTables.Choose(1, 1); _log.AppendLine("Done").AppendLine(); labelStatus.Text = _log.ToString(); Application.DoEvents(); return(true); } catch (Exception e) { _log.AppendLine("Failed").AppendLine(e.Message).AppendLine(); labelStatus.Text = _log.ToString(); Application.DoEvents(); return(false); } }
public static string InitializeGMac() { var log = new LinearComposer(); try { log.Append("Initializing GA Data..."); GMacLookupTables.Choose(1, 1); log.AppendLine("Done").AppendLine(); log.Append("Initializing GMac Resources..."); if (Directory.Exists(IconsPath) == false) { Directory.CreateDirectory(IconsPath); } SaveIcon(Resources.BasisVector64, "BasisVector64"); SaveIcon(Resources.Compile64, "Compile64"); SaveIcon(Resources.Constant64, "Constant64"); SaveIcon(Resources.Filter64, "Filter64"); SaveIcon(Resources.Frame64, "Frame64"); SaveIcon(Resources.GMacAST64, "GMacAST64"); SaveIcon(Resources.GMac_Icon64, "GMac_Icon64"); SaveIcon(Resources.Idea64, "Idea64"); SaveIcon(Resources.Input64, "Input64"); SaveIcon(Resources.Macro64, "Macro64"); SaveIcon(Resources.Namespace64, "Namespace64"); SaveIcon(Resources.Output64, "Output64"); SaveIcon(Resources.Scalar64, "Scalar64"); SaveIcon(Resources.Structure64, "Structure64"); SaveIcon(Resources.Subspace64, "Subspace64"); SaveIcon(Resources.Transform64, "Transform64"); log.AppendLine("Done").AppendLine(); log.Append("Initializing Symbolic Engine..."); MathematicaScalar.Create(SymbolicUtils.Cas, "0"); log.AppendLine("Done").AppendLine(); } catch (Exception e) { log.AppendLine("Failed").AppendLine(e.Message).AppendLine(); } return(log.ToString()); }