void DrawBackground(int index, Graphics g, Rectangle listbounds, DrawItemState state, bool isWithDraw) { if (!isWithDraw) { return; } if ((state & DrawItemState.Selected) > 0) {//選択色 Brush brush = new SolidBrush(OptionForm.Color_List_SelectedColor()); g.FillRectangle(brush, listbounds); brush.Dispose(); return; } if (index != this.LastHoverIndex) {//通常 Brush brush = new SolidBrush(OptionForm.Color_Input_BackColor()); g.FillRectangle(brush, listbounds); brush.Dispose(); } else {//hover Brush brush = new SolidBrush(OptionForm.Color_List_HoverColor()); g.FillRectangle(brush, listbounds); brush.Dispose(); } }
private void HexBox_Load(object sender, EventArgs e) { if (this.DesignMode) { return; } SetData(Program.ROM.Data); PanelForeBrush = new SolidBrush(OptionForm.Color_Control_ForeColor()); PanelBackBrush = new SolidBrush(OptionForm.Color_Control_BackColor()); ControlForeBrush = new SolidBrush(OptionForm.Color_Input_ForeColor()); ControlBackBrush = new SolidBrush(OptionForm.Color_Input_BackColor()); ControlSelectedBrush = new SolidBrush(OptionForm.Color_List_SelectedColor()); RefColorBrush = new SolidBrush(OptionForm.Color_NotifyWrite_BackColor()); MarkColorBrush = new SolidBrush(OptionForm.Color_Error_ForeColor()); this.OneWidth = (uint)(this.Font.SizeInPoints * 2); this.OneHeight = (uint)(this.Font.Height + 2); ClearUndoBuffer(); }