fix possible IndexOutOfRangeException
This commit is contained in:
parent
3ca514e653
commit
298e8f34f4
4 changed files with 24 additions and 12 deletions
|
@ -73,12 +73,15 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls.ActionCenter
|
|||
{
|
||||
Grid.Background = Brushes.Gray;
|
||||
Task.Delay(100).ContinueWith((task) => Dispatcher.Invoke(() =>
|
||||
{
|
||||
if (WirelessNetworksStackPanel.Children.Count > 0)
|
||||
{
|
||||
var btn = WirelessNetworksStackPanel.Children[0] as NetworkButton;
|
||||
if (btn != null)
|
||||
{
|
||||
btn.SetFocus();
|
||||
}
|
||||
}
|
||||
}));
|
||||
};
|
||||
Popup.Closed += (o, args) =>
|
||||
|
|
|
@ -78,12 +78,15 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls.Taskbar
|
|||
Background = Brushes.LightGray;
|
||||
Button.Background = Brushes.LightGray;
|
||||
Task.Delay(100).ContinueWith((task) => Dispatcher.Invoke(() =>
|
||||
{
|
||||
if (WirelessNetworksStackPanel.Children.Count > 0)
|
||||
{
|
||||
var btn = WirelessNetworksStackPanel.Children[0] as NetworkButton;
|
||||
if (btn != null)
|
||||
{
|
||||
btn.SetFocus();
|
||||
}
|
||||
}
|
||||
}));
|
||||
};
|
||||
|
||||
|
|
|
@ -73,12 +73,15 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls.ActionCenter
|
|||
{
|
||||
Grid.Background = Brushes.Gray;
|
||||
Task.Delay(100).ContinueWith((task) => Dispatcher.Invoke(() =>
|
||||
{
|
||||
if (WirelessNetworksStackPanel.Children.Count > 0)
|
||||
{
|
||||
var btn = WirelessNetworksStackPanel.Children[0] as NetworkButton;
|
||||
if (btn != null)
|
||||
{
|
||||
btn.SetFocus();
|
||||
}
|
||||
}
|
||||
}));
|
||||
};
|
||||
Popup.Closed += (o, args) =>
|
||||
|
|
|
@ -78,12 +78,15 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls.Taskbar
|
|||
Background = Brushes.LightGray;
|
||||
Button.Background = Brushes.LightGray;
|
||||
Task.Delay(100).ContinueWith((task) => Dispatcher.Invoke(() =>
|
||||
{
|
||||
if (WirelessNetworksStackPanel.Children.Count > 0)
|
||||
{
|
||||
var btn = WirelessNetworksStackPanel.Children[0] as NetworkButton;
|
||||
if (btn != null)
|
||||
{
|
||||
btn.SetFocus();
|
||||
}
|
||||
}
|
||||
}));
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue