Skip to content

Commit

Permalink
Fiexed configuration loading and application, cleanup of files
Browse files Browse the repository at this point in the history
  • Loading branch information
rbergen committed Mar 26, 2021
1 parent 5e818bd commit 293d936
Show file tree
Hide file tree
Showing 26 changed files with 227 additions and 405 deletions.
20 changes: 0 additions & 20 deletions MixAssembler/Properties/launchSettings.json

This file was deleted.

Binary file removed MixAssembler/Thumbs.db
Binary file not shown.
2 changes: 1 addition & 1 deletion MixEmul/Components/AboutForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private void FullVersionLabel_Click(object sender, EventArgs e)
=> Clipboard.SetText(_versionString);

private void FullVersionLabel_DoubleClick(object sender, EventArgs e)
=> Clipboard.SetText(_versionString.Replace('.', '_'));
=> Clipboard.SetText(_versionString);

private void InitializeComponent()
{
Expand Down
2 changes: 1 addition & 1 deletion MixEmul/Components/InstructionInstanceTextBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ private static string GetAddressErrorsCaption(InstanceValidationError[] errors)
captionBuilder.Insert(0, "Instruction error: ");

else
captionBuilder.Insert(0, String.Format("Instruction errors:{0}", Environment.NewLine));
captionBuilder.Insert(0, $"Instruction errors:{Environment.NewLine}");

return captionBuilder.ToString();
}
Expand Down
2 changes: 1 addition & 1 deletion MixEmul/Components/MemoryEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ public void FindMatch(SearchParameters options)

if (result == null)
{
MessageBox.Show(this, string.Format("Search text \"{0}\" could not be found.", options.SearchText), "Text not found", MessageBoxButtons.OK, MessageBoxIcon.Information);
MessageBox.Show(this, $"Search text \"{options.SearchText}\" could not be found.", "Text not found", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}

Expand Down
251 changes: 124 additions & 127 deletions MixEmul/Components/SourceAndFindingsForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,136 +34,133 @@ public void UpdateLayout()
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SourceAndFindingsForm));
_statusStrip = new System.Windows.Forms.StatusStrip();
_toolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();
_listPanel = new System.Windows.Forms.Panel();
_closeButton = new System.Windows.Forms.Button();
_exportButton = new System.Windows.Forms.Button();
_loadButton = new System.Windows.Forms.Button();
_findingListView = new MixGui.Components.AssemblyFindingListView();
_splitter = new System.Windows.Forms.Splitter();
_saveExportFileDialog = new System.Windows.Forms.SaveFileDialog();
_sourceControl = new MixGui.Components.SourceCodeControl();
_statusStrip.SuspendLayout();
_listPanel.SuspendLayout();
SuspendLayout();
//
// mStatusStrip
//
_statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
_toolStripStatusLabel});
_statusStrip.Location = new System.Drawing.Point(0, 383);
_statusStrip.Name = "mStatusStrip";
_statusStrip.Size = new System.Drawing.Size(568, 22);
_statusStrip.TabIndex = 3;
//
// mToolStripStatusLabel
//
_toolStripStatusLabel.Name = "mToolStripStatusLabel";
_toolStripStatusLabel.Size = new System.Drawing.Size(0, 17);
//
// mListPanel
//
_listPanel.Controls.Add(_closeButton);
_listPanel.Controls.Add(_exportButton);
_listPanel.Controls.Add(_loadButton);
_listPanel.Controls.Add(_findingListView);
_listPanel.Dock = System.Windows.Forms.DockStyle.Bottom;
_listPanel.Location = new System.Drawing.Point(0, 303);
_listPanel.Name = "mListPanel";
_listPanel.Size = new System.Drawing.Size(568, 80);
_listPanel.TabIndex = 2;
//
// mCloseButton
//
_closeButton.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right);
_closeButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
_closeButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
_closeButton.Location = new System.Drawing.Point(498, 56);
_closeButton.Name = "mCloseButton";
_closeButton.Size = new System.Drawing.Size(62, 23);
_closeButton.TabIndex = 3;
_closeButton.Text = "&Close";
//
// mExportButton
//
_exportButton.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right);
_exportButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
_exportButton.Location = new System.Drawing.Point(498, 28);
_exportButton.Name = "mExportButton";
_exportButton.Size = new System.Drawing.Size(62, 23);
_exportButton.TabIndex = 2;
_exportButton.Text = "&Export...";
//
// mLoadButton
//
_loadButton.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right);
_loadButton.DialogResult = System.Windows.Forms.DialogResult.OK;
_loadButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
_loadButton.Location = new System.Drawing.Point(498, 0);
_loadButton.Name = "mLoadButton";
_loadButton.Size = new System.Drawing.Size(62, 23);
_loadButton.TabIndex = 1;
_loadButton.Text = "&Load";
//
// mFindingListView
//
_findingListView.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right);
_findingListView.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
_findingListView.Location = new System.Drawing.Point(0, 0);
_findingListView.Name = "mFindingListView";
_findingListView.SeverityImageList = null;
_findingListView.Size = new System.Drawing.Size(492, 80);
_findingListView.TabIndex = 0;
//
// mSplitter
//
_splitter.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
_splitter.Dock = System.Windows.Forms.DockStyle.Bottom;
_splitter.Location = new System.Drawing.Point(0, 295);
_splitter.MinExtra = 100;
_splitter.MinSize = 80;
_splitter.Name = "mSplitter";
_splitter.Size = new System.Drawing.Size(568, 8);
_splitter.TabIndex = 1;
_splitter.TabStop = false;
//
// mSaveExportFileDialog
//
_saveExportFileDialog.DefaultExt = "mixdeck";
_saveExportFileDialog.Filter = "MixEmul card deck files|*.mixdeck|All files|*.*";
_saveExportFileDialog.Title = "Specify export file name";
//
// mSourceControl
//
_sourceControl.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
_sourceControl.Dock = System.Windows.Forms.DockStyle.Fill;
_sourceControl.Location = new System.Drawing.Point(0, 0);
_sourceControl.MarkedFinding = null;
_sourceControl.Name = "mSourceControl";
_sourceControl.Size = new System.Drawing.Size(568, 295);
_sourceControl.TabIndex = 0;
this._statusStrip = new System.Windows.Forms.StatusStrip();
this._toolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();
this._listPanel = new System.Windows.Forms.Panel();
this._closeButton = new System.Windows.Forms.Button();
this._exportButton = new System.Windows.Forms.Button();
this._loadButton = new System.Windows.Forms.Button();
this._findingListView = new MixGui.Components.AssemblyFindingListView();
this._splitter = new System.Windows.Forms.Splitter();
this._saveExportFileDialog = new System.Windows.Forms.SaveFileDialog();
this._sourceControl = new MixGui.Components.SourceCodeControl();
this._statusStrip.SuspendLayout();
this._listPanel.SuspendLayout();
this.SuspendLayout();
//
// _statusStrip
//
this._statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this._toolStripStatusLabel});
this._statusStrip.Location = new System.Drawing.Point(0, 383);
this._statusStrip.Name = "_statusStrip";
this._statusStrip.Size = new System.Drawing.Size(568, 22);
this._statusStrip.TabIndex = 3;
//
// _toolStripStatusLabel
//
this._toolStripStatusLabel.Name = "_toolStripStatusLabel";
this._toolStripStatusLabel.Size = new System.Drawing.Size(0, 17);
//
// _listPanel
//
this._listPanel.Controls.Add(this._closeButton);
this._listPanel.Controls.Add(this._exportButton);
this._listPanel.Controls.Add(this._loadButton);
this._listPanel.Controls.Add(this._findingListView);
this._listPanel.Dock = System.Windows.Forms.DockStyle.Bottom;
this._listPanel.Location = new System.Drawing.Point(0, 303);
this._listPanel.Name = "_listPanel";
this._listPanel.Size = new System.Drawing.Size(568, 80);
this._listPanel.TabIndex = 2;
//
// _closeButton
//
this._closeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this._closeButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this._closeButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this._closeButton.Location = new System.Drawing.Point(498, 56);
this._closeButton.Name = "_closeButton";
this._closeButton.Size = new System.Drawing.Size(62, 23);
this._closeButton.TabIndex = 3;
this._closeButton.Text = "&Close";
//
// _exportButton
//
this._exportButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this._exportButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this._exportButton.Location = new System.Drawing.Point(498, 28);
this._exportButton.Name = "_exportButton";
this._exportButton.Size = new System.Drawing.Size(62, 23);
this._exportButton.TabIndex = 2;
this._exportButton.Text = "&Export...";
//
// _loadButton
//
this._loadButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this._loadButton.DialogResult = System.Windows.Forms.DialogResult.OK;
this._loadButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this._loadButton.Location = new System.Drawing.Point(498, 0);
this._loadButton.Name = "_loadButton";
this._loadButton.Size = new System.Drawing.Size(62, 23);
this._loadButton.TabIndex = 1;
this._loadButton.Text = "&Load";
//
// _findingListView
//
this._findingListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this._findingListView.Location = new System.Drawing.Point(0, 0);
this._findingListView.Name = "_findingListView";
this._findingListView.SeverityImageList = null;
this._findingListView.Size = new System.Drawing.Size(492, 80);
this._findingListView.TabIndex = 0;
//
// _splitter
//
this._splitter.Dock = System.Windows.Forms.DockStyle.Bottom;
this._splitter.Location = new System.Drawing.Point(0, 295);
this._splitter.MinExtra = 100;
this._splitter.MinSize = 80;
this._splitter.Name = "_splitter";
this._splitter.Size = new System.Drawing.Size(568, 8);
this._splitter.TabIndex = 1;
this._splitter.TabStop = false;
//
// _saveExportFileDialog
//
this._saveExportFileDialog.DefaultExt = "mixdeck";
this._saveExportFileDialog.Filter = "MixEmul card deck files|*.mixdeck|All files|*.*";
this._saveExportFileDialog.Title = "Specify export file name";
//
// _sourceControl
//
this._sourceControl.Dock = System.Windows.Forms.DockStyle.Fill;
this._sourceControl.Location = new System.Drawing.Point(0, 0);
this._sourceControl.MarkedFinding = null;
this._sourceControl.Name = "_sourceControl";
this._sourceControl.Size = new System.Drawing.Size(568, 295);
this._sourceControl.TabIndex = 0;
//
// SourceAndFindingsForm
//
ClientSize = new System.Drawing.Size(568, 405);
Controls.Add(_sourceControl);
Controls.Add(_splitter);
Controls.Add(_listPanel);
Controls.Add(_statusStrip);
Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon");
MinimizeBox = false;
MinimumSize = new System.Drawing.Size(400, 224);
Name = "SourceAndFindingsForm";
ShowInTaskbar = false;
Text = "Assembly result";
_statusStrip.ResumeLayout(false);
_statusStrip.PerformLayout();
_listPanel.ResumeLayout(false);
ResumeLayout(false);
PerformLayout();
this.ClientSize = new System.Drawing.Size(568, 405);
this.Controls.Add(this._sourceControl);
this.Controls.Add(this._splitter);
this.Controls.Add(this._listPanel);
this.Controls.Add(this._statusStrip);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MinimizeBox = false;
this.MinimumSize = new System.Drawing.Size(400, 224);
this.Name = "SourceAndFindingsForm";
this.ShowInTaskbar = false;
this.Text = "Assembly result";
this._statusStrip.ResumeLayout(false);
this._statusStrip.PerformLayout();
this._listPanel.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();

}

Expand Down
1 change: 1 addition & 0 deletions MixEmul/Components/SourceCodeControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public SourceCodeControl()
SuspendLayout();

_sourceBox.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
_sourceBox.BorderStyle = BorderStyle.FixedSingle;
_sourceBox.Location = new Point(0, 0);
_sourceBox.Name = "mSourceBox";
_sourceBox.ReadOnly = true;
Expand Down
4 changes: 2 additions & 2 deletions MixEmul/Components/ToolStripCycleButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public void AddStep(Step step)
throw new ArgumentNullException(nameof(step), "step and its Value may not be null");

if (_steps.Any(s => s.Value is IComparable comparable ? comparable.CompareTo(step.Value) == 0 : s.Value.Equals(step.Value)))
throw new ArgumentException(string.Format("another step with Value {0} already exists", step.Value));
throw new ArgumentException($"another step with Value {step.Value} already exists");

_steps.Add(step);

Expand All @@ -115,7 +115,7 @@ public object Value
var step = _steps.FirstOrDefault(s => s.Value is IComparable comparable ? comparable.CompareTo(value) == 0 : s.Value.Equals(value));

if (step == null)
throw new ArgumentException(string.Format("no step with Value {0} exists", value));
throw new ArgumentException($"no step with Value {value} exists");

SetCurrentStep(step);
}
Expand Down
8 changes: 8 additions & 0 deletions MixEmul/Documentation/Changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ x: Bugfix

=========================================

0.4.7755.38010 (2021-03-26)
x Fixed regression in settings (de)serialisation, which made that colours weren't applied
x Fixed opening of device and teletype windows on saved screen location
! The settings file format changed, and its name changed from config.bin to config.json. This means that any saved settings in earlier versions will not be loaded when starting this version, the first time
* Cleaned up binary (de)serialization code leftovers
* Made the visual style of the "Assembly result" window more consistent
* Removed a number of unnecessary/outdated files from the solution folders

0.4.7752.30280 (2021-03-23)
* Migrated to .NET 5.0
* Applied visual changes, of which enabling visual styles is the most noticeable
Expand Down
Loading

0 comments on commit 293d936

Please sign in to comment.