@@ -18,8 +18,6 @@ right click -> outlining -> collapse to definitions */
1818 public partial class Form1 : Form
1919 {
2020 private const int DelayRedrawMs = 1000 ; // a whole second
21- private const string ErrNotRunning = "Started, but not running." ;
22- private const string ErrPresetButtonStatus = "Error toggling preset button selected status." ;
2321 private const string ErrUpdatingMaps = "Error updating maps!" ;
2422 private const string MsgStartMouse = "Start Mouse Processing" ;
2523 private const string MsgStopMouse = "Stop Mouse Processing" ;
@@ -82,7 +80,7 @@ private void InitDataGridView()
8280 dataGridView1 . Columns . Add ( col5 ) ;
8381 this . dataGridView1 . DataSource = _currentKeymaps ;
8482 }
85-
83+ /// <summary>Init preset buttons and add to the GUI</summary>
8684 private void InitPresetButtons ( )
8785 {
8886 _presets = KeymapPresetOperations . BuildPresetButtons ( ) ;
@@ -102,30 +100,36 @@ private void InitPresetButtons()
102100 KeymapPresetOperations . ChangeButtonTextForSelected ( btn , true ) ;
103101 }
104102 }
103+ /// <summary>Starts running the background thread that updates the GUI elements.</summary>
105104 private void InitBackgroundWorker ( )
106105 {
107106 bgWorkThread . RunWorkerAsync ( SynchronizationContext . Current ) ;
108107 }
108+ /// <summary>Helper to update the datagridview to a new List of keymaps.</summary>
109109 private void UpdateKeymapDatagrid ( List < XMapLibKeymap > newMaps )
110110 {
111111 dataGridView1 . AutoGenerateColumns = false ;
112112 _currentKeymaps = newMaps ;
113113 dataGridView1 . DataSource = newMaps ;
114114 }
115+ /// <summary>Updates mouse sensitivity trackbar value based on mapper's internal reported value.</summary>
115116 private void UpdateMouseSensitivityTrackbar ( )
116117 {
117118 trackBar1 . Value = _mapper . GetMouseSensitivity ( ) ;
118119 }
120+ /// <summary>Helper to update the status of the controller being connected.</summary>
119121 private void UpdateControllerConnectedButton ( )
120122 {
121123 bool isConnected = _mapper . IsControllerConnected ( ) ;
122124 button2 . Text = isConnected ? MsgController : MsgNocontroller ;
123125 button2 . BackColor = isConnected ? _clrNormal : _clrInfo ;
124126 }
127+ /// <summary>Helper to update the sensitivity value displayed on the button.</summary>
125128 private void UpdateMouseSensitivityButton ( )
126129 {
127130 btnSensitivityIndicator . Text = MsgSensbegin + " " + _mapper . GetMouseSensitivity ( ) . ToString ( ) + MsgSensmax ;
128131 }
132+ /// <summary>Helper to update the status of the mouse movement processing based on the mapper's internal status and update the button text.</summary>
129133 private void UpdateIsMouseRunning ( )
130134 {
131135 bool isRunning = _mapper . IsMouseRunning ( ) ;
0 commit comments