private void reloadStructsMenuItem_Click(object sender, EventArgs e) { try { Program.Structs.Clear(); Structs.StructParser parser = new ProcessHacker.Structs.StructParser(Program.Structs); parser.Parse(Application.StartupPath + "\\structs.txt"); } catch (Exception ex) { PhUtils.ShowException("Unable to load structs", ex); } }
private void LoadStructs() { WorkQueue.GlobalQueueWorkItemTag(new Action(() => { try { if (System.IO.File.Exists(Application.StartupPath + "\\structs.txt")) { Structs.StructParser parser = new ProcessHacker.Structs.StructParser(Program.Structs); parser.Parse(Application.StartupPath + "\\structs.txt"); } } catch (Exception ex) { QueueMessage("Error loading structure definitions: " + ex.Message); } }), "load-structs"); }