Skip to content

Commit

Permalink
v1.3.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-heyns committed Jun 10, 2024
1 parent ae872d5 commit 1641d6c
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 11 deletions.
2 changes: 1 addition & 1 deletion HOWTO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
4. If all else fails, open the solution file in your Visual Studio IDE en build it manually

Michael Heyns
2022-2424
2022
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
![Letter-T-icon](https://user-images.githubusercontent.com/4144679/169688149-106da035-d4bd-4b1e-a290-c2a2885a9959.png)
# Terminal2 - v1.3.4.3 (June 2024)
# Terminal2 - v1.3.4.4 (June 2024)

Windows 10/11 executable can be found here: https://github.com/michael-heyns/Terminal2_bin

Expand Down
6 changes: 5 additions & 1 deletion Terminal2/FrmHelp.resx
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,11 @@ Source Code:
----</value>
</data>
<data name="textBox1.Text" xml:space="preserve">
<value>v1.3.4.3
<value>v1.3.4.4
* Pressing ESC when macro editor is open does not close the the dialog if changes were already made
* Added button to clear only the macros in a specific group

v1.3.4.3
* Bug fix in 'Send as I type'

v1.3.4.2
Expand Down
30 changes: 25 additions & 5 deletions Terminal2/FrmMacroOptions.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 22 additions & 1 deletion Terminal2/FrmMacroOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ namespace Terminal
public partial class FrmMacroOptions : Form
{
public bool Modified = false;
public char macroLabel = 'A';
public int macroGroupStart = 0;

private readonly Profile _activeProfile;
private int _id;
Expand Down Expand Up @@ -124,6 +126,7 @@ private void BtnClearAll_Click(object sender, EventArgs e)
_activeProfile.macros[m] = null;
ClearScreen();
SaveProfile();
Close();
}
}

Expand All @@ -146,6 +149,7 @@ private void ClearScreen()
private void FrmMacroOptions_Load(object sender, EventArgs e)
{
Modified = false;
btnClearGroup.Text = $"Clear group '{macroLabel}' macros";
}

private void MacroText_TextChanged(object sender, EventArgs e)
Expand Down Expand Up @@ -225,7 +229,7 @@ private void Common_TextChanged(object sender, EventArgs e)

protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (keyData == Keys.Escape)
if (keyData == Keys.Escape && !Modified)
{
this.Close();
return true;
Expand All @@ -242,5 +246,22 @@ private void textBox3_Click(object sender, EventArgs e)
{
localHelp.Visible = false;
}

private void btnClearGroup_Click(object sender, EventArgs e)
{
DialogResult yn = MessageBox.Show($"Macros {macroGroupStart + 1} - {macroGroupStart + 48} for this profile will be cleared. Are you sure?", "Clear all macros", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (yn != DialogResult.Yes)
return;

yn = MessageBox.Show("Are you really, really sure?", "Clear all macros", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (yn == DialogResult.Yes)
{
for (int m = macroGroupStart; m < macroGroupStart + 48; m++)
_activeProfile.macros[m] = null;
ClearScreen();
SaveProfile();
Close();
}
}
}
}
4 changes: 4 additions & 0 deletions Terminal2/FrmMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ private enum State { Changing, Disconnected, Connected, Listening };
private bool _macroIsMoving = false;
private int _macroBeingMoved;
private int _macroOffset = 0;
private char _macroLabel = 'A';

private volatile bool _tickBusy = false;
private static bool _terminateFlag = false;
Expand Down Expand Up @@ -1174,6 +1175,8 @@ private void DgMacroTable_CellMouseDown(object sender, DataGridViewCellMouseEven

FrmMacroOptions macros = new FrmMacroOptions(_activeProfile, m);
TopMost = false;
macros.macroLabel = _macroLabel;
macros.macroGroupStart = _macroOffset;
macros.ShowDialog();
if (macros.Modified)
SaveThisProfile();
Expand Down Expand Up @@ -2448,6 +2451,7 @@ private void cbSendAsIType_CheckedChanged(object sender, EventArgs e)

private void SetMacroOffset(int N)
{
_macroLabel = (char)('A' + N);
_macroOffset = N * 48;
int labelNumber = (N * 12) + 1;
for (int f = 1; f <= 12; f++)
Expand Down
4 changes: 2 additions & 2 deletions Terminal2/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.4.3")]
[assembly: AssemblyFileVersion("1.3.4.3")]
[assembly: AssemblyVersion("1.3.4.4")]
[assembly: AssemblyFileVersion("1.3.4.4")]

namespace Terminal
{
Expand Down

0 comments on commit 1641d6c

Please sign in to comment.