-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: Supported files can now be opened using drag and drop into t…
…he app window. Issue #17
- Loading branch information
1 parent
030bc50
commit 7f027d5
Showing
5 changed files
with
45 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
Speculator/CSharp.Utils/Extensions/IStorageItemExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Code authored by Dean Edis (DeanTheCoder). | ||
// Anyone is free to copy, modify, use, compile, or distribute this software, | ||
// either in source code form or as a compiled binary, for any non-commercial | ||
// purpose. | ||
// | ||
// If you modify the code, please retain this copyright header, | ||
// and consider contributing back to the repository or letting us know | ||
// about your modifications. Your contributions are valued! | ||
// | ||
// THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND. | ||
|
||
using Avalonia.Platform.Storage; | ||
|
||
namespace CSharp.Utils.Extensions; | ||
|
||
public static class IStorageItemExtensions | ||
{ | ||
public static FileInfo ToFileInfo(this IStorageFile storageFile) => | ||
storageFile != null ? new FileInfo(storageFile.Path.LocalPath) : null; | ||
|
||
public static DirectoryInfo ToDirectoryInfo(this IStorageFolder storageFolder) => | ||
storageFolder != null ? new DirectoryInfo(storageFolder.Path.LocalPath) : null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters