Skip to content

Commit

Permalink
Added view all menu
Browse files Browse the repository at this point in the history
  • Loading branch information
alfeg committed Aug 6, 2019
1 parent 8747d83 commit e23e53d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions DeviceManager/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ static void Main()

menu.Popup += (sender, args) =>
{
//var client = new AdbClient();
var client = new AdbManager(Settings.Default.ScrCpyPath);

menu.MenuItems.Clear();
Expand All @@ -41,10 +40,17 @@ static void Main()
if (CanViewDevices())
{
var viewMenu = devices.Select(device =>
new MenuItem(device.Model, (o, eventArgs) => { ViewDevice(device); }))
new MenuItem(device.Model, (o, _) => { ViewDevice(device); }))
.ToArray();

menu.MenuItems.Add(new MenuItem("View", viewMenu));
menu.MenuItems.Add(new MenuItem("View all", (o, _) =>
{
foreach (var deviceData in devices)
{
ViewDevice(deviceData);
}
}));
}

var restartMenu = devices.Select(device => new MenuItem(device.Model,
Expand Down

0 comments on commit e23e53d

Please sign in to comment.