void GotoEvent() { if (this.EventList.SelectedIndex < 0 || this.EventList.SelectedIndex >= this.ErrorList.Count) { return; } FELint.ErrorSt est = this.ErrorList[this.EventList.SelectedIndex]; GotoEvent(est.DataType, est.Addr, est.Tag, this.MapID); }
private Size DrawEventList(ListBox lb, int index, Graphics g, Rectangle listbounds, bool isWithDraw) { if (index < 0 || index >= this.ErrorList.Count || this.MapID == U.NOT_FOUND) { return(new Size(listbounds.X, listbounds.Y)); } FELint.ErrorSt est = this.ErrorList[index]; SolidBrush brush = new SolidBrush(lb.ForeColor); SolidBrush errorBrush = new SolidBrush(OptionForm.Color_Error_ForeColor()); Font normalFont = lb.Font; Font boldFont = new Font(lb.Font, FontStyle.Bold); Rectangle bounds = listbounds; int lineHeight = (int)lb.Font.Height; int maxWidth = 0; string text = TypeToString(est.DataType, est.Addr, est.Tag); U.DrawText(text, g, boldFont, errorBrush, isWithDraw, bounds); if (Program.LintCache.CheckFast(est.Addr)) { string comment = "//" + R._("このエラーは非表示になっています。理由:「{0}」", Program.LintCache.At(est.Addr)); bounds.X = listbounds.X + (lineHeight * 25); SolidBrush commentBrush = new SolidBrush(OptionForm.Color_Comment_ForeColor()); bounds.X += U.DrawText(comment, g, normalFont, commentBrush, isWithDraw, bounds); commentBrush.Dispose(); maxWidth = Math.Max(maxWidth, bounds.X); } bounds.Y += lineHeight; text = est.ErrorMessage; bounds.X = listbounds.X; Size size = U.DrawTextMulti(text, g, normalFont, brush, isWithDraw, bounds); bounds.X += size.Width; maxWidth = Math.Max(maxWidth, bounds.X); brush.Dispose(); boldFont.Dispose(); bounds.X = maxWidth; bounds.Y += size.Height + lineHeight; return(new Size(bounds.X, bounds.Y)); }
private void ShowErrorButton_Click(object sender, EventArgs e) { if (this.EventList.SelectedIndex < 0 || this.EventList.SelectedIndex >= this.ErrorList.Count) { return; } FELint.ErrorSt est = this.ErrorList[this.EventList.SelectedIndex]; Program.LintCache.Update(est.Addr, ""); Scan(); //EVENTとASMのキャッシュをクリア FELintの再生成を指示する Program.AsmMapFileAsmCache.ClearCache(); }
private void IgnoreErrorButton_Click(object sender, EventArgs e) { if (this.EventList.SelectedIndex < 0 || this.EventList.SelectedIndex >= this.ErrorList.Count) { return; } FELint.ErrorSt est = this.ErrorList[this.EventList.SelectedIndex]; MainSimpleMenuEventErrorIgnoreErrorForm f = (MainSimpleMenuEventErrorIgnoreErrorForm)InputFormRef.JumpFormLow<MainSimpleMenuEventErrorIgnoreErrorForm>(); f.Init(est); DialogResult dr = f.ShowDialog(); if (dr != System.Windows.Forms.DialogResult.OK) { return; } Program.LintCache.Update(est.Addr, f.GetComment()); Scan(); //EVENTとASMのキャッシュをクリア FELintの再生成を指示する Program.AsmMapFileAsmCache.ClearCache(); }
public void Init(FELint.ErrorSt error) { ErrorTextBox.Text = U.ToHexString(error.Addr) + "\r\n" + error.ErrorMessage; CommentTextBox.Focus(); }