mirror of
https://github.com/openbullet/openbullet.git
synced 2023-10-21 07:33:42 -05:00
Added button to start all Runners.
This commit is contained in:
@@ -26,6 +26,12 @@
|
||||
<TextBlock VerticalAlignment="Center" Margin="5 0">New</TextBlock>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button x:Name="startAllRunnersButton" Click="startAllRunnersButton_Click">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Source="/Images/Icons/play.png" Width="20" />
|
||||
<TextBlock VerticalAlignment="Center" Margin="5 0">Start All</TextBlock>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button x:Name="stopAllRunnersButton" Click="stopAllRunnersButton_Click">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Source="/Images/Icons/stop.png" Width="20" />
|
||||
|
||||
@@ -156,5 +156,15 @@ namespace OpenBullet
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void startAllRunnersButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
foreach (var runner in vm.Runners.Where(r => !r.Runner.Busy))
|
||||
{
|
||||
StartRunner += runner.Page.OnStartRunner;
|
||||
OnStartRunner();
|
||||
StartRunner -= runner.Page.OnStartRunner;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user