protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
 {
     if (keyData == (Keys.Control | Keys.Shift | Keys.F))
     {
         var form = new AnalyzerSettingsForm();
         if (form.ShowDialog() == DialogResult.OK)
         {
             Z64ObjectAnalyzer.FindDlists(_obj, _data, _segment, form.Result);
             UpdateMap();
         }
         return(true);
     }
     else if (keyData == (Keys.Control | Keys.Shift | Keys.A))
     {
         var errors = Z64ObjectAnalyzer.AnalyzeDlists(_obj, _data, _segment);
         if (errors.Count > 0)
         {
             StringWriter sw = new StringWriter();
             errors.ForEach(error => sw.WriteLine(error));
             TextForm form = new TextForm(SystemIcons.Warning, "Warning", sw.ToString());
             form.ShowDialog();
         }
         UpdateMap();
         return(true);
     }
     return(base.ProcessCmdKey(ref msg, keyData));
 }
        private void analyzeDlistsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var errors = Z64ObjectAnalyzer.AnalyzeDlists(_obj, _data, _segment);

            if (errors.Count > 0)
            {
                StringWriter sw = new StringWriter();
                errors.ForEach(error => sw.WriteLine(error));
                TextForm form = new TextForm(SystemIcons.Warning, "Warning", sw.ToString());
                form.ShowDialog();
            }
            UpdateMap();
        }
        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            string text =
                @"Format : <id>: <token1>, <token2>, ...

id : the opcode that should follow the pattern
token : can be ""*"", ""?"" or an opcode id to check
""*"" means the current opcode (this can only be present once)
""?"" means any opcode
you can specify multiple valid opcode ids for a single token: e.g. ""G_NOOP|G_LOADTLUT"" means both G_NOOP and G_LOADTLUT are accepted

Example:
""G_NOOP: G_LOADTLUT, *, ?, ?, G_TEXRECT|G_TEXRECTFLIP""
means: When encountering a G_NOOP opcode, check if the last instruction is G_LOADTLUT, don't check the 2 following instructions and check if the 3rd instruction is either G_TEXRECT or G_TEXRECTFLIP";
            TextForm form = new TextForm(SystemIcons.Question, "Syntax Help", text);

            form.Show();
        }