Skip to content

Commit

Permalink
Tabs -> Spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
davkean committed Aug 6, 2018
1 parent 69d9f29 commit 8ab4322
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions src/AudioSwitcher/Presentation/UI/AudioContextMenuStrip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
// Copyright (c) David Kean.
// -----------------------------------------------------------------------
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Windows.Forms;
Expand All @@ -31,14 +29,14 @@ public bool WorkingAreaConstrained
set;
}

public new void Show(Control control, Point controlLocation)
{
// Prevents the context menu from causing the app to show in the taskbar
DllImports.SetForegroundWindow(new HandleRef(this, Handle));
public new void Show(Control control, Point controlLocation)
{
// Prevents the context menu from causing the app to show in the taskbar
DllImports.SetForegroundWindow(new HandleRef(this, Handle));

Capture = true;
base.Show(control, controlLocation);
}
base.Show(control, controlLocation);
}

public void ShowInSystemTray(Point screenLocation)
{
Expand Down Expand Up @@ -87,11 +85,15 @@ protected override void OnClosing(ToolStripDropDownClosingEventArgs e)
protected override ToolStripItem CreateDefaultItem(string text, Image image, EventHandler onClick)
{
if (text == "-")
{
return new ToolStripSeparator();
}

AudioToolStripMenuItem item = new AudioToolStripMenuItem();
item.Text = text;
item.Image = image;
AudioToolStripMenuItem item = new AudioToolStripMenuItem
{
Text = text,
Image = image
};
item.Click += onClick;

return item;
Expand Down

0 comments on commit 8ab4322

Please sign in to comment.