@@ -170,7 +170,7 @@ void UpdateClockDisplay(string stmp)
170
170
if ( startingLoc > 0 )
171
171
{
172
172
int closingLoc = stmp . IndexOf ( '\n ' , startingLoc ) ;
173
- clockLabel . Text = stmp . Substring ( startingLoc + 6 , closingLoc - startingLoc - 7 ) + "Hz" ;
173
+ clockLabel . Text = stmp . Substring ( startingLoc + 6 , closingLoc - startingLoc - 7 ) + "Hz" ;
174
174
}
175
175
}
176
176
catch
@@ -188,7 +188,7 @@ void UpdateOutputDisplay(string stmp)
188
188
int closingLoc = stmp . IndexOf ( "]" ) ;
189
189
if ( startingLoc > 0 && closingLoc > 0 )
190
190
{
191
- OutputLabel . Text = stmp . Substring ( startingLoc + 1 , closingLoc - startingLoc - 1 ) ;
191
+ OutputLabel . Text = stmp . Substring ( startingLoc + 1 , closingLoc - startingLoc - 1 ) ;
192
192
}
193
193
}
194
194
catch
@@ -327,7 +327,7 @@ private void UpdateControlDisplay(string stmp)
327
327
{
328
328
ControlJump . BackColor = Color . LightGray ;
329
329
}
330
- if ( stmp . Substring ( 37 , 1 ) == "1" )
330
+ if ( stmp . Substring ( 37 , 1 ) == "1" )
331
331
{
332
332
ControlFlags . BackColor = setColor ;
333
333
}
@@ -443,7 +443,7 @@ private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
443
443
{
444
444
try
445
445
{
446
- if ( StartMonitorButton . Text == "Stop &Monitor" )
446
+ if ( StartMonitorButton . Text == "Stop &Monitor" )
447
447
{
448
448
myPort . Write ( "X" ) ;
449
449
StartMonitorButton . Text = "Start &Monitor" ;
@@ -530,6 +530,8 @@ private static void UpdateOpCodeLabel(TextBox t, Label opCodeLabel)
530
530
}
531
531
}
532
532
533
+ #region MemXXXX_TextChanged event handlers
534
+
533
535
private void Mem0000_TextChanged ( object sender , EventArgs e )
534
536
{
535
537
UpdateOpCodeLabel ( ( TextBox ) sender , code0000 ) ;
@@ -623,6 +625,8 @@ private void Mem1111_TextChanged(object sender, EventArgs e)
623
625
UpdateOpCodeLabel ( ( TextBox ) sender , code1111 ) ;
624
626
625
627
}
628
+ #endregion
629
+
626
630
627
631
private void StartMonitorButton_Click ( object sender , EventArgs e )
628
632
{
@@ -683,6 +687,8 @@ private void ProgramRAMButton_Click(object sender, EventArgs e)
683
687
684
688
}
685
689
690
+ #region codeXXXX_Click event handlers:
691
+
686
692
//TODO Consolidate the following Click event handlers...
687
693
private void code0000_Click ( object sender , EventArgs e )
688
694
{
@@ -877,6 +883,8 @@ private void code1111_Click(object sender, EventArgs e)
877
883
}
878
884
}
879
885
886
+ #endregion
887
+
880
888
private void MemXXXX_KeyPress ( object sender , KeyPressEventArgs e )
881
889
{
882
890
if ( e . KeyChar != '1' && e . KeyChar != '0' && e . KeyChar != ( ( char ) Keys . Back ) )
@@ -912,24 +920,31 @@ private void AboutButton_Click(object sender, EventArgs e)
912
920
913
921
private void loadSetCombo_SelectedIndexChanged ( object sender , EventArgs e )
914
922
{
915
- string vals = ConfigurationManager . AppSettings [ loadSetCombo . Text ] ;
916
- string [ ] valArray = vals . Split ( ":" ) ;
917
- Mem0000 . Text = valArray [ 0 ] ;
918
- Mem0001 . Text = valArray [ 1 ] ;
919
- Mem0010 . Text = valArray [ 2 ] ;
920
- Mem0011 . Text = valArray [ 3 ] ;
921
- Mem0100 . Text = valArray [ 4 ] ;
922
- Mem0101 . Text = valArray [ 5 ] ;
923
- Mem0110 . Text = valArray [ 6 ] ;
924
- Mem0111 . Text = valArray [ 7 ] ;
925
- Mem1000 . Text = valArray [ 8 ] ;
926
- Mem1001 . Text = valArray [ 9 ] ;
927
- Mem1010 . Text = valArray [ 10 ] ;
928
- Mem1011 . Text = valArray [ 11 ] ;
929
- Mem1100 . Text = valArray [ 12 ] ;
930
- Mem1101 . Text = valArray [ 13 ] ;
931
- Mem1110 . Text = valArray [ 14 ] ;
932
- Mem1111 . Text = valArray [ 15 ] ;
923
+ try
924
+ {
925
+ string vals = ConfigurationManager . AppSettings [ loadSetCombo . Text ] ;
926
+ string [ ] valArray = vals . Split ( ":" ) ;
927
+ Mem0000 . Text = valArray [ 0 ] ;
928
+ Mem0001 . Text = valArray [ 1 ] ;
929
+ Mem0010 . Text = valArray [ 2 ] ;
930
+ Mem0011 . Text = valArray [ 3 ] ;
931
+ Mem0100 . Text = valArray [ 4 ] ;
932
+ Mem0101 . Text = valArray [ 5 ] ;
933
+ Mem0110 . Text = valArray [ 6 ] ;
934
+ Mem0111 . Text = valArray [ 7 ] ;
935
+ Mem1000 . Text = valArray [ 8 ] ;
936
+ Mem1001 . Text = valArray [ 9 ] ;
937
+ Mem1010 . Text = valArray [ 10 ] ;
938
+ Mem1011 . Text = valArray [ 11 ] ;
939
+ Mem1100 . Text = valArray [ 12 ] ;
940
+ Mem1101 . Text = valArray [ 13 ] ;
941
+ Mem1110 . Text = valArray [ 14 ] ;
942
+ Mem1111 . Text = valArray [ 15 ] ;
943
+ }
944
+ catch ( Exception xcp )
945
+ {
946
+ MessageBox . Show ( xcp . Message , "Ya'...., something failed..." ) ;
947
+ }
933
948
}
934
949
935
950
0 commit comments