1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-06-13 14:29:30 +00:00

Rough prototype of split-address table formatter

This commit is contained in:
Andy McFadden 2018-10-05 22:14:38 -07:00
parent 3c4e6cfe7a
commit d4726dac7e
7 changed files with 666 additions and 1 deletions

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System;
using System.Diagnostics;
namespace Asm65 {

View File

@ -0,0 +1,422 @@
namespace SourceGen.AppForms {
partial class FormatSplitAddress {
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing) {
if (disposing && (components != null)) {
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem(new string[] {
"123456",
"(+) T_123456"}, -1);
this.cancelButton = new System.Windows.Forms.Button();
this.okButton = new System.Windows.Forms.Button();
this.selectionInfoLabel = new System.Windows.Forms.Label();
this.addressCharacteristicsGroup = new System.Windows.Forms.GroupBox();
this.returnAddrCheckBox = new System.Windows.Forms.CheckBox();
this.width24Button = new System.Windows.Forms.RadioButton();
this.width16Radio = new System.Windows.Forms.RadioButton();
this.lowByteGroupBox = new System.Windows.Forms.GroupBox();
this.lowThirdPartRadio = new System.Windows.Forms.RadioButton();
this.lowSecondPartRadio = new System.Windows.Forms.RadioButton();
this.lowFirstPartRadio = new System.Windows.Forms.RadioButton();
this.highByteGroupBox = new System.Windows.Forms.GroupBox();
this.highConstantTextBox = new System.Windows.Forms.TextBox();
this.highConstantRadio = new System.Windows.Forms.RadioButton();
this.highThirdPartRadio = new System.Windows.Forms.RadioButton();
this.highSecondPartRadio = new System.Windows.Forms.RadioButton();
this.highFirstPartRadio = new System.Windows.Forms.RadioButton();
this.bankByteGroupBox = new System.Windows.Forms.GroupBox();
this.bankConstantTextBox = new System.Windows.Forms.TextBox();
this.bankNthPartRadio = new System.Windows.Forms.RadioButton();
this.bankConstantRadio = new System.Windows.Forms.RadioButton();
this.outputPreviewListView = new System.Windows.Forms.ListView();
this.addrColumnHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.symbolColumnHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.outputPreviewGroupBox = new System.Windows.Forms.GroupBox();
this.addCodeHintCheckBox = new System.Windows.Forms.CheckBox();
this.optionsGroupBox = new System.Windows.Forms.GroupBox();
this.addressCharacteristicsGroup.SuspendLayout();
this.lowByteGroupBox.SuspendLayout();
this.highByteGroupBox.SuspendLayout();
this.bankByteGroupBox.SuspendLayout();
this.outputPreviewGroupBox.SuspendLayout();
this.optionsGroupBox.SuspendLayout();
this.SuspendLayout();
//
// cancelButton
//
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancelButton.Location = new System.Drawing.Point(479, 465);
this.cancelButton.Name = "cancelButton";
this.cancelButton.Size = new System.Drawing.Size(75, 23);
this.cancelButton.TabIndex = 0;
this.cancelButton.Text = "Cancel";
this.cancelButton.UseVisualStyleBackColor = true;
//
// okButton
//
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
this.okButton.Location = new System.Drawing.Point(398, 465);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(75, 23);
this.okButton.TabIndex = 1;
this.okButton.Text = "OK";
this.okButton.UseVisualStyleBackColor = true;
this.okButton.Click += new System.EventHandler(this.okButton_Click);
//
// selectionInfoLabel
//
this.selectionInfoLabel.AutoSize = true;
this.selectionInfoLabel.Location = new System.Drawing.Point(13, 13);
this.selectionInfoLabel.Name = "selectionInfoLabel";
this.selectionInfoLabel.Size = new System.Drawing.Size(207, 13);
this.selectionInfoLabel.TabIndex = 2;
this.selectionInfoLabel.Text = "There are {0} bytes selected in {1} groups.";
//
// addressCharacteristicsGroup
//
this.addressCharacteristicsGroup.Controls.Add(this.returnAddrCheckBox);
this.addressCharacteristicsGroup.Controls.Add(this.width24Button);
this.addressCharacteristicsGroup.Controls.Add(this.width16Radio);
this.addressCharacteristicsGroup.Location = new System.Drawing.Point(16, 44);
this.addressCharacteristicsGroup.Name = "addressCharacteristicsGroup";
this.addressCharacteristicsGroup.Size = new System.Drawing.Size(222, 90);
this.addressCharacteristicsGroup.TabIndex = 3;
this.addressCharacteristicsGroup.TabStop = false;
this.addressCharacteristicsGroup.Text = "Address Characteristics";
//
// returnAddrCheckBox
//
this.returnAddrCheckBox.AutoSize = true;
this.returnAddrCheckBox.Location = new System.Drawing.Point(7, 68);
this.returnAddrCheckBox.Name = "returnAddrCheckBox";
this.returnAddrCheckBox.Size = new System.Drawing.Size(170, 17);
this.returnAddrCheckBox.TabIndex = 2;
this.returnAddrCheckBox.Text = "Return addresses (address - 1)";
this.returnAddrCheckBox.UseVisualStyleBackColor = true;
//
// width24Button
//
this.width24Button.AutoSize = true;
this.width24Button.Location = new System.Drawing.Point(7, 44);
this.width24Button.Name = "width24Button";
this.width24Button.Size = new System.Drawing.Size(51, 17);
this.width24Button.TabIndex = 1;
this.width24Button.TabStop = true;
this.width24Button.Text = "24-bit";
this.width24Button.UseVisualStyleBackColor = true;
//
// width16Radio
//
this.width16Radio.AutoSize = true;
this.width16Radio.Location = new System.Drawing.Point(7, 20);
this.width16Radio.Name = "width16Radio";
this.width16Radio.Size = new System.Drawing.Size(51, 17);
this.width16Radio.TabIndex = 0;
this.width16Radio.TabStop = true;
this.width16Radio.Text = "16-bit";
this.width16Radio.UseVisualStyleBackColor = true;
//
// lowByteGroupBox
//
this.lowByteGroupBox.Controls.Add(this.lowThirdPartRadio);
this.lowByteGroupBox.Controls.Add(this.lowSecondPartRadio);
this.lowByteGroupBox.Controls.Add(this.lowFirstPartRadio);
this.lowByteGroupBox.Location = new System.Drawing.Point(13, 140);
this.lowByteGroupBox.Name = "lowByteGroupBox";
this.lowByteGroupBox.Size = new System.Drawing.Size(225, 94);
this.lowByteGroupBox.TabIndex = 4;
this.lowByteGroupBox.TabStop = false;
this.lowByteGroupBox.Text = "Low Byte";
//
// lowThirdPartRadio
//
this.lowThirdPartRadio.AutoSize = true;
this.lowThirdPartRadio.Location = new System.Drawing.Point(10, 68);
this.lowThirdPartRadio.Name = "lowThirdPartRadio";
this.lowThirdPartRadio.Size = new System.Drawing.Size(127, 17);
this.lowThirdPartRadio.TabIndex = 2;
this.lowThirdPartRadio.TabStop = true;
this.lowThirdPartRadio.Text = "Third part of selection";
this.lowThirdPartRadio.UseVisualStyleBackColor = true;
//
// lowSecondPartRadio
//
this.lowSecondPartRadio.AutoSize = true;
this.lowSecondPartRadio.Location = new System.Drawing.Point(10, 44);
this.lowSecondPartRadio.Name = "lowSecondPartRadio";
this.lowSecondPartRadio.Size = new System.Drawing.Size(140, 17);
this.lowSecondPartRadio.TabIndex = 1;
this.lowSecondPartRadio.TabStop = true;
this.lowSecondPartRadio.Text = "Second part of selection";
this.lowSecondPartRadio.UseVisualStyleBackColor = true;
//
// lowFirstPartRadio
//
this.lowFirstPartRadio.AutoSize = true;
this.lowFirstPartRadio.Location = new System.Drawing.Point(10, 20);
this.lowFirstPartRadio.Name = "lowFirstPartRadio";
this.lowFirstPartRadio.Size = new System.Drawing.Size(122, 17);
this.lowFirstPartRadio.TabIndex = 0;
this.lowFirstPartRadio.TabStop = true;
this.lowFirstPartRadio.Text = "First part of selection";
this.lowFirstPartRadio.UseVisualStyleBackColor = true;
//
// highByteGroupBox
//
this.highByteGroupBox.Controls.Add(this.highConstantTextBox);
this.highByteGroupBox.Controls.Add(this.highConstantRadio);
this.highByteGroupBox.Controls.Add(this.highThirdPartRadio);
this.highByteGroupBox.Controls.Add(this.highSecondPartRadio);
this.highByteGroupBox.Controls.Add(this.highFirstPartRadio);
this.highByteGroupBox.Location = new System.Drawing.Point(13, 240);
this.highByteGroupBox.Name = "highByteGroupBox";
this.highByteGroupBox.Size = new System.Drawing.Size(225, 120);
this.highByteGroupBox.TabIndex = 5;
this.highByteGroupBox.TabStop = false;
this.highByteGroupBox.Text = "High Byte";
//
// highConstantTextBox
//
this.highConstantTextBox.Location = new System.Drawing.Point(87, 91);
this.highConstantTextBox.MaxLength = 10;
this.highConstantTextBox.Name = "highConstantTextBox";
this.highConstantTextBox.Size = new System.Drawing.Size(93, 20);
this.highConstantTextBox.TabIndex = 4;
//
// highConstantRadio
//
this.highConstantRadio.AutoSize = true;
this.highConstantRadio.Location = new System.Drawing.Point(10, 92);
this.highConstantRadio.Name = "highConstantRadio";
this.highConstantRadio.Size = new System.Drawing.Size(70, 17);
this.highConstantRadio.TabIndex = 3;
this.highConstantRadio.TabStop = true;
this.highConstantRadio.Text = "Constant:";
this.highConstantRadio.UseVisualStyleBackColor = true;
//
// highThirdPartRadio
//
this.highThirdPartRadio.AutoSize = true;
this.highThirdPartRadio.Location = new System.Drawing.Point(10, 68);
this.highThirdPartRadio.Name = "highThirdPartRadio";
this.highThirdPartRadio.Size = new System.Drawing.Size(127, 17);
this.highThirdPartRadio.TabIndex = 2;
this.highThirdPartRadio.TabStop = true;
this.highThirdPartRadio.Text = "Third part of selection";
this.highThirdPartRadio.UseVisualStyleBackColor = true;
//
// highSecondPartRadio
//
this.highSecondPartRadio.AutoSize = true;
this.highSecondPartRadio.Location = new System.Drawing.Point(10, 44);
this.highSecondPartRadio.Name = "highSecondPartRadio";
this.highSecondPartRadio.Size = new System.Drawing.Size(140, 17);
this.highSecondPartRadio.TabIndex = 1;
this.highSecondPartRadio.TabStop = true;
this.highSecondPartRadio.Text = "Second part of selection";
this.highSecondPartRadio.UseVisualStyleBackColor = true;
//
// highFirstPartRadio
//
this.highFirstPartRadio.AutoSize = true;
this.highFirstPartRadio.Location = new System.Drawing.Point(10, 20);
this.highFirstPartRadio.Name = "highFirstPartRadio";
this.highFirstPartRadio.Size = new System.Drawing.Size(122, 17);
this.highFirstPartRadio.TabIndex = 0;
this.highFirstPartRadio.TabStop = true;
this.highFirstPartRadio.Text = "First part of selection";
this.highFirstPartRadio.UseVisualStyleBackColor = true;
//
// bankByteGroupBox
//
this.bankByteGroupBox.Controls.Add(this.bankConstantTextBox);
this.bankByteGroupBox.Controls.Add(this.bankNthPartRadio);
this.bankByteGroupBox.Controls.Add(this.bankConstantRadio);
this.bankByteGroupBox.Location = new System.Drawing.Point(13, 367);
this.bankByteGroupBox.Name = "bankByteGroupBox";
this.bankByteGroupBox.Size = new System.Drawing.Size(225, 70);
this.bankByteGroupBox.TabIndex = 6;
this.bankByteGroupBox.TabStop = false;
this.bankByteGroupBox.Text = "Bank Byte";
//
// bankConstantTextBox
//
this.bankConstantTextBox.Location = new System.Drawing.Point(87, 41);
this.bankConstantTextBox.MaxLength = 10;
this.bankConstantTextBox.Name = "bankConstantTextBox";
this.bankConstantTextBox.Size = new System.Drawing.Size(93, 20);
this.bankConstantTextBox.TabIndex = 5;
//
// bankNthPartRadio
//
this.bankNthPartRadio.AutoSize = true;
this.bankNthPartRadio.Location = new System.Drawing.Point(10, 19);
this.bankNthPartRadio.Name = "bankNthPartRadio";
this.bankNthPartRadio.Size = new System.Drawing.Size(120, 17);
this.bankNthPartRadio.TabIndex = 2;
this.bankNthPartRadio.TabStop = true;
this.bankNthPartRadio.Text = "Nth part of selection";
this.bankNthPartRadio.UseVisualStyleBackColor = true;
//
// bankConstantRadio
//
this.bankConstantRadio.AutoSize = true;
this.bankConstantRadio.Location = new System.Drawing.Point(10, 42);
this.bankConstantRadio.Name = "bankConstantRadio";
this.bankConstantRadio.Size = new System.Drawing.Size(70, 17);
this.bankConstantRadio.TabIndex = 1;
this.bankConstantRadio.TabStop = true;
this.bankConstantRadio.Text = "Constant:";
this.bankConstantRadio.UseVisualStyleBackColor = true;
//
// outputPreviewListView
//
this.outputPreviewListView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.outputPreviewListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.addrColumnHeader,
this.symbolColumnHeader});
this.outputPreviewListView.FullRowSelect = true;
this.outputPreviewListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.outputPreviewListView.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
listViewItem2});
this.outputPreviewListView.Location = new System.Drawing.Point(6, 19);
this.outputPreviewListView.MultiSelect = false;
this.outputPreviewListView.Name = "outputPreviewListView";
this.outputPreviewListView.Size = new System.Drawing.Size(290, 369);
this.outputPreviewListView.TabIndex = 7;
this.outputPreviewListView.UseCompatibleStateImageBehavior = false;
this.outputPreviewListView.View = System.Windows.Forms.View.Details;
//
// addrColumnHeader
//
this.addrColumnHeader.Text = "Addr";
//
// symbolColumnHeader
//
this.symbolColumnHeader.Text = "Symbol";
this.symbolColumnHeader.Width = 200;
//
// outputPreviewGroupBox
//
this.outputPreviewGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.outputPreviewGroupBox.Controls.Add(this.outputPreviewListView);
this.outputPreviewGroupBox.Location = new System.Drawing.Point(252, 44);
this.outputPreviewGroupBox.Name = "outputPreviewGroupBox";
this.outputPreviewGroupBox.Size = new System.Drawing.Size(302, 394);
this.outputPreviewGroupBox.TabIndex = 8;
this.outputPreviewGroupBox.TabStop = false;
this.outputPreviewGroupBox.Text = "Output Preview";
//
// addCodeHintCheckBox
//
this.addCodeHintCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.addCodeHintCheckBox.AutoSize = true;
this.addCodeHintCheckBox.Location = new System.Drawing.Point(10, 19);
this.addCodeHintCheckBox.Name = "addCodeHintCheckBox";
this.addCodeHintCheckBox.Size = new System.Drawing.Size(123, 17);
this.addCodeHintCheckBox.TabIndex = 8;
this.addCodeHintCheckBox.Text = "Add code entry hints";
this.addCodeHintCheckBox.UseVisualStyleBackColor = true;
//
// optionsGroupBox
//
this.optionsGroupBox.Controls.Add(this.addCodeHintCheckBox);
this.optionsGroupBox.Location = new System.Drawing.Point(13, 444);
this.optionsGroupBox.Name = "optionsGroupBox";
this.optionsGroupBox.Size = new System.Drawing.Size(225, 43);
this.optionsGroupBox.TabIndex = 9;
this.optionsGroupBox.TabStop = false;
this.optionsGroupBox.Text = "Options";
//
// FormatSplitAddress
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(566, 500);
this.Controls.Add(this.optionsGroupBox);
this.Controls.Add(this.outputPreviewGroupBox);
this.Controls.Add(this.bankByteGroupBox);
this.Controls.Add(this.highByteGroupBox);
this.Controls.Add(this.lowByteGroupBox);
this.Controls.Add(this.addressCharacteristicsGroup);
this.Controls.Add(this.selectionInfoLabel);
this.Controls.Add(this.okButton);
this.Controls.Add(this.cancelButton);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FormatSplitAddress";
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Format Split-Address Table";
this.Load += new System.EventHandler(this.FormatSplitAddress_Load);
this.addressCharacteristicsGroup.ResumeLayout(false);
this.addressCharacteristicsGroup.PerformLayout();
this.lowByteGroupBox.ResumeLayout(false);
this.lowByteGroupBox.PerformLayout();
this.highByteGroupBox.ResumeLayout(false);
this.highByteGroupBox.PerformLayout();
this.bankByteGroupBox.ResumeLayout(false);
this.bankByteGroupBox.PerformLayout();
this.outputPreviewGroupBox.ResumeLayout(false);
this.optionsGroupBox.ResumeLayout(false);
this.optionsGroupBox.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button cancelButton;
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.Label selectionInfoLabel;
private System.Windows.Forms.GroupBox addressCharacteristicsGroup;
private System.Windows.Forms.RadioButton width16Radio;
private System.Windows.Forms.RadioButton width24Button;
private System.Windows.Forms.CheckBox returnAddrCheckBox;
private System.Windows.Forms.GroupBox lowByteGroupBox;
private System.Windows.Forms.RadioButton lowFirstPartRadio;
private System.Windows.Forms.RadioButton lowSecondPartRadio;
private System.Windows.Forms.RadioButton lowThirdPartRadio;
private System.Windows.Forms.GroupBox highByteGroupBox;
private System.Windows.Forms.RadioButton highFirstPartRadio;
private System.Windows.Forms.RadioButton highSecondPartRadio;
private System.Windows.Forms.RadioButton highThirdPartRadio;
private System.Windows.Forms.RadioButton highConstantRadio;
private System.Windows.Forms.TextBox highConstantTextBox;
private System.Windows.Forms.GroupBox bankByteGroupBox;
private System.Windows.Forms.ListView outputPreviewListView;
private System.Windows.Forms.ColumnHeader addrColumnHeader;
private System.Windows.Forms.ColumnHeader symbolColumnHeader;
private System.Windows.Forms.RadioButton bankConstantRadio;
private System.Windows.Forms.RadioButton bankNthPartRadio;
private System.Windows.Forms.TextBox bankConstantTextBox;
private System.Windows.Forms.GroupBox outputPreviewGroupBox;
private System.Windows.Forms.CheckBox addCodeHintCheckBox;
private System.Windows.Forms.GroupBox optionsGroupBox;
}
}

View File

@ -0,0 +1,73 @@
/*
* Copyright 2018 faddenSoft
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Windows.Forms;
using Asm65;
using CommonUtil;
namespace SourceGen.AppForms {
public partial class FormatSplitAddress : Form {
/// <summary>
/// Result set that describes the formatting to perform. Not all regions will have
/// the same format, e.g. the "mixed ASCII" mode will alternate strings and bytes
/// (rather than a dedicated "mixed ASCII" format type).
/// </summary>
public SortedList<int, FormatDescriptor> Results { get; private set; }
/// <summary>
/// Selected offsets. An otherwise contiguous range of offsets can be broken up
/// by user-specified labels and address discontinuities, so this needs to be
/// processed by range.
/// </summary>
public TypedRangeSet Selection { private get; set; }
/// <summary>
/// Raw file data.
/// </summary>
private byte[] mFileData;
/// <summary>
/// Symbol table to use when resolving symbolic values.
/// </summary>
private SymbolTable mSymbolTable;
/// <summary>
/// Formatter to use when displaying addresses and hex values.
/// </summary>
private Asm65.Formatter mFormatter;
public FormatSplitAddress(byte[] fileData, SymbolTable symbolTable,
Formatter formatter) {
InitializeComponent();
mFileData = fileData;
mSymbolTable = symbolTable;
mFormatter = formatter;
}
private void FormatSplitAddress_Load(object sender, EventArgs e) {
}
private void okButton_Click(object sender, EventArgs e) {
Results = new SortedList<int, FormatDescriptor>();
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -174,6 +174,7 @@ namespace SourceGen.AppForms
this.symbolNameColumnHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.infoGroupBox = new System.Windows.Forms.GroupBox();
this.infoTextBox = new System.Windows.Forms.TextBox();
this.formatSplitAddressTableToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.mainMenuStrip.SuspendLayout();
this.mainStatusStrip.SuspendLayout();
this.mainToolStrip.SuspendLayout();
@ -463,6 +464,7 @@ namespace SourceGen.AppForms
this.hintAsInlineDataToolStripMenuItem,
this.removeHintToolStripMenuItem,
this.toolStripMenuItem11,
this.formatSplitAddressTableToolStripMenuItem,
this.toggleSingleBytesToolStripMenuItem,
this.deleteNoteCommentToolStripMenuItem,
this.toolStripMenuItem9,
@ -1433,6 +1435,13 @@ namespace SourceGen.AppForms
this.infoTextBox.Size = new System.Drawing.Size(177, 120);
this.infoTextBox.TabIndex = 0;
//
// formatSplitAddressTableToolStripMenuItem
//
this.formatSplitAddressTableToolStripMenuItem.Name = "formatSplitAddressTableToolStripMenuItem";
this.formatSplitAddressTableToolStripMenuItem.Size = new System.Drawing.Size(255, 22);
this.formatSplitAddressTableToolStripMenuItem.Text = "Format Split-Address Table";
this.formatSplitAddressTableToolStripMenuItem.Click += new System.EventHandler(this.FormatSplitAddressTable_Click);
//
// ProjectView
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -1617,6 +1626,7 @@ namespace SourceGen.AppForms
private System.Windows.Forms.ToolStripMenuItem toggleSingleBytesToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem editProjectSymbolToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem deleteNoteCommentToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem formatSplitAddressTableToolStripMenuItem;
}
}

View File

@ -2224,9 +2224,12 @@ namespace SourceGen.AppForms {
}
}
formatSplitAddressTableToolStripMenuItem.Enabled =
(entityCounts.mDataLines > 1 && entityCounts.mCodeLines == 0);
toggleSingleBytesToolStripMenuItem.Enabled =
(entityCounts.mDataLines > 0 && entityCounts.mCodeLines == 0);
// So long as some code or data is highlighted, allow these. Don't worry about
// control lines. Disable options that would have no effect.
bool enableHints = (entityCounts.mDataLines > 0 || entityCounts.mCodeLines > 0);
@ -2614,6 +2617,34 @@ namespace SourceGen.AppForms {
dlg.Dispose();
}
private void FormatSplitAddressTable_Click(object sender, EventArgs e) {
FormatSplitAddress dlg = new FormatSplitAddress(mProject.FileData,
mProject.SymbolTable, mOutputFormatter);
TypedRangeSet trs = dlg.Selection = GroupedOffsetSetFromSelected();
if (trs.Count == 0) {
// shouldn't happen
Debug.Assert(false, "FormatSplitAddressTable found nothing to edit");
dlg.Dispose();
return;
}
// TODO: check to see if the selection is eligible for treatment as a
// split-address table. If not, show a dialog explaining why.
dlg.ShowDialog();
if (dlg.DialogResult == DialogResult.OK) {
ChangeSet cs = mProject.GenerateFormatMergeSet(dlg.Results);
if (cs.Count != 0) {
ApplyUndoableChanges(cs);
} else {
Debug.WriteLine("No change to data formats");
}
}
dlg.Dispose();
}
private void ToggleSingleBytes_Click(object sender, EventArgs e) {
TypedRangeSet trs = GroupedOffsetSetFromSelected();
if (trs.Count == 0) {

View File

@ -83,6 +83,12 @@
<Compile Include="AppForms\FindBox.Designer.cs">
<DependentUpon>FindBox.cs</DependentUpon>
</Compile>
<Compile Include="AppForms\FormatSplitAddress.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="AppForms\FormatSplitAddress.Designer.cs">
<DependentUpon>FormatSplitAddress.cs</DependentUpon>
</Compile>
<Compile Include="AppForms\GotoBox.cs">
<SubType>Form</SubType>
</Compile>
@ -269,6 +275,9 @@
<EmbeddedResource Include="AppForms\FindBox.resx">
<DependentUpon>FindBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="AppForms\FormatSplitAddress.resx">
<DependentUpon>FormatSplitAddress.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="AppForms\GotoBox.resx">
<DependentUpon>GotoBox.cs</DependentUpon>
</EmbeddedResource>