DisplayMagician/HeliosDisplayManagement.ShellExtension/Helios.cs
temacdonald 861f1585b2 [WIP] Nearly completed refactor of DisplayProfileForm
Nearly have it working. It now saves, loads and renames
the display profiles. Need to fix up the delete, apply buttons
and make it remove the old ilv images when we rename
profiles.
2020-05-10 22:47:18 +12:00

46 lines
1.5 KiB
C#

using System;
using System.IO;
using System.Windows.Forms;
using HeliosPlus.Shared;
using HeliosPlus.ShellExtension.Resources;
namespace HeliosPlus.ShellExtension
{
internal class HeliosPlus
{
internal static string AppDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "HeliosPlus");
public static void Open(
HeliosStartupAction action = HeliosStartupAction.None,
Profile profile = null,
string programAddress = null,
bool asAdmin = false)
{
try
{
Helios.Open(action, profile, programAddress, asAdmin);
}
catch (Exception e)
{
MessageBox.Show(e.ToString(), string.Format(Language.Failed_to_execute_action_Error_Message, e.Message),
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
public static void OpenSteamGame(
HeliosStartupAction action = HeliosStartupAction.None,
Profile profile = null,
uint steamAppId = 0)
{
try
{
Helios.OpenSteamGame(action, profile, steamAppId);
}
catch (Exception e)
{
MessageBox.Show(e.ToString(), string.Format(Language.Failed_to_execute_action_Error_Message, e.Message),
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
}