Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lpeyr committed Aug 30, 2023
1 parent 05b99ee commit 3324074
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
1 change: 0 additions & 1 deletion PeyrSharp.Env/Sys.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
using System.Runtime.Versioning;
using System.Text.Json;
using System.Threading.Tasks;
using static System.Net.Mime.MediaTypeNames;

namespace PeyrSharp.Env
{
Expand Down
8 changes: 3 additions & 5 deletions PeyrSharp.UiHelpers/WindowHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace PeyrSharp.UiHelpers
{
Expand All @@ -41,13 +39,13 @@ public static class WindowHelpers
/// <returns>A list of <see cref="WindowInfo"/> objects representing the visible windows.</returns>
public static List<WindowInfo> GetWindows()
{
List<WindowInfo> windowList = new List<WindowInfo>();
List<WindowInfo> windowList = new();
EnumWindows((hWnd, lParam) =>
{
if (IsWindowVisible(hWnd))
{
StringBuilder titleBuilder = new StringBuilder(256);
StringBuilder classNameBuilder = new StringBuilder(256);
StringBuilder titleBuilder = new(256);
StringBuilder classNameBuilder = new(256);
GetWindowText(hWnd, titleBuilder, titleBuilder.Capacity);
GetClassName(hWnd, classNameBuilder, classNameBuilder.Capacity);
Expand Down
4 changes: 0 additions & 4 deletions PeyrSharp.UiHelpers/WindowInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PeyrSharp.UiHelpers
{
Expand Down

0 comments on commit 3324074

Please sign in to comment.