mirror of
https://github.com/Hofknecht/SystemTrayMenu.git
synced 2024-05-15 18:03:01 +12:00
[BUG] Fix a rare exception when moving trough menu by keyboard and execute file (#240), version 1.0.27.3
This commit is contained in:
parent
7f4266fffb
commit
69e8cf4e6b
|
@ -76,7 +76,7 @@ namespace SystemTrayMenu.Handler
|
|||
{
|
||||
case Keys.Enter:
|
||||
SelectByKey(keys);
|
||||
menus[iMenuKey].FocusTextBox();
|
||||
menus[iMenuKey]?.FocusTextBox();
|
||||
break;
|
||||
case Keys.Left:
|
||||
if (Properties.Settings.Default.AppearAtTheBottomLeft)
|
||||
|
@ -106,7 +106,7 @@ namespace SystemTrayMenu.Handler
|
|||
SelectByKey(keys);
|
||||
break;
|
||||
case Keys.Control | Keys.F:
|
||||
menus[iMenuKey].FocusTextBox();
|
||||
menus[iMenuKey]?.FocusTextBox();
|
||||
break;
|
||||
case Keys.Tab:
|
||||
{
|
||||
|
@ -123,7 +123,7 @@ namespace SystemTrayMenu.Handler
|
|||
indexNew = indexMax;
|
||||
}
|
||||
|
||||
menus[indexNew].FocusTextBox();
|
||||
menus[indexNew]?.FocusTextBox();
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -142,13 +142,13 @@ namespace SystemTrayMenu.Handler
|
|||
indexNew = 0;
|
||||
}
|
||||
|
||||
menus[indexNew].FocusTextBox();
|
||||
menus[indexNew]?.FocusTextBox();
|
||||
}
|
||||
|
||||
break;
|
||||
case Keys.Apps:
|
||||
{
|
||||
DataGridView dgv = menus[iMenuKey].GetDataGridView();
|
||||
DataGridView dgv = menus[iMenuKey]?.GetDataGridView();
|
||||
|
||||
if (iRowKey > -1 &&
|
||||
dgv.Rows.Count > iRowKey)
|
||||
|
@ -331,8 +331,15 @@ namespace SystemTrayMenu.Handler
|
|||
ClosePressed?.Invoke();
|
||||
}
|
||||
|
||||
// Raise Dgv_RowPostPaint to show ProcessStarted
|
||||
dgv.InvalidateRow(iRowKey);
|
||||
try
|
||||
{
|
||||
// Raise Dgv_RowPostPaint to show ProcessStarted
|
||||
dgv.InvalidateRow(iRowKey);
|
||||
}
|
||||
catch (ArgumentOutOfRangeException ex)
|
||||
{
|
||||
Log.Warn("InvalidateRow failed", ex);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace SystemTrayMenu
|
|||
AppColors.BitmapFilesCount.Dispose();
|
||||
}
|
||||
|
||||
internal static Icon GetAppIcon()
|
||||
public static Icon GetAppIcon()
|
||||
{
|
||||
if (Settings.Default.UseIconFromRootFolder)
|
||||
{
|
||||
|
|
|
@ -39,5 +39,5 @@ using System.Runtime.InteropServices;
|
|||
// 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.0.27.2")]
|
||||
[assembly: AssemblyFileVersion("1.0.27.2")]
|
||||
[assembly: AssemblyVersion("1.0.27.3")]
|
||||
[assembly: AssemblyFileVersion("1.0.27.3")]
|
||||
|
|
Loading…
Reference in a new issue