-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
41 changed files
with
785 additions
and
316 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
namespace ScreenToGif.Domain.Enums; | ||
|
||
public enum ApplicationTypes | ||
{ | ||
Unidentified = 0, | ||
|
||
/// <summary> | ||
/// Light package (.NET 6 desktop runtime download and installation required). | ||
/// Distributted as a single file, as an EXE. | ||
/// </summary> | ||
DependantSingle = 1, | ||
|
||
/// <summary> | ||
/// Full package (.NET 6 desktop runtime included). | ||
/// Distributted as a single file, as an EXE. | ||
/// </summary> | ||
FullSingle = 2, | ||
|
||
/// <summary> | ||
/// Full package (.NET 6 desktop runtime included). | ||
/// Distributted as multiple files, as a MSIX for the outside the Store. | ||
/// </summary> | ||
FullMultiMsix = 3, | ||
|
||
/// <summary> | ||
/// Full package (.NET 6 desktop runtime included). | ||
/// Distributted as multiple files, as a MSIX for the Store. | ||
/// </summary> | ||
FullMultiMsixStore = 4, | ||
} |
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,8 @@ | ||
namespace ScreenToGif.Domain.Enums; | ||
|
||
public enum OverwriteModes | ||
{ | ||
Allow, | ||
Warn, | ||
Prompt | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
using ScreenToGif.Domain.Enums; | ||
|
||
namespace ScreenToGif.Util; | ||
|
||
public static class IdentityHelper | ||
{ | ||
public static ApplicationTypes ApplicationType | ||
{ | ||
get | ||
{ | ||
#if DEPENDANT_SINGLE | ||
//Dependant, Single File | ||
return ApplicationTypes.DependantSingle; | ||
#elif FULL_SINGLE | ||
//Full, Single File | ||
return ApplicationTypes.FullSingle; | ||
#elif FULL_MULTI_MSIX | ||
//Full, Multiple Files, MSIX | ||
return ApplicationTypes.FullMultiMsix; | ||
#elif FULL_MULTI_MSIX_STORE | ||
//Full, Multiple Files, MSIX, Store | ||
return ApplicationTypes.FullMultiMsixStore; | ||
#endif | ||
|
||
return ApplicationTypes.Unidentified; | ||
} | ||
} | ||
|
||
public static string ApplicationTypeDescription | ||
{ | ||
get | ||
{ | ||
#if DEPENDANT_SINGLE | ||
return "Framework Dependant, Single File"; | ||
#elif FULL_SINGLE | ||
return "Full, Single File"; | ||
#elif FULL_MULTI_MSIX | ||
return "Full, Multiple Files, MSIX"; | ||
#elif FULL_MULTI_MSIX_STORE | ||
return "Full, Multiple Files, MSIX, Store"; | ||
#endif | ||
|
||
return "Unidentified"; | ||
} | ||
} | ||
} |
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
33 changes: 33 additions & 0 deletions
33
ScreenToGif.Util/Settings/Migrations/Migration2_35_0To2_36_0.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,33 @@ | ||
using ScreenToGif.Domain.Models; | ||
|
||
namespace ScreenToGif.Util.Settings.Migrations; | ||
|
||
internal class Migration2_35_0To2_36_0 | ||
{ | ||
internal static bool Up(List<Property> properties) | ||
{ | ||
//Rename a property. | ||
var presets = properties.FirstOrDefault(f => f.Key == "ExportPresets"); | ||
|
||
if (presets != null) | ||
{ | ||
foreach (var child in presets.Children) | ||
{ | ||
foreach (var attribute in child.Attributes) | ||
{ | ||
switch (attribute.Key) | ||
{ | ||
case "OverwriteOnSave": | ||
{ | ||
attribute.Key = "OverwriteMode"; | ||
attribute.Value = attribute.Value == "True" ? "Allow" : "Prompt"; | ||
break; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
return true; | ||
} | ||
} |
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
Oops, something went wrong.