DisplayMagician/HeliosPlus.ShellExtension/Helios.cs

46 lines
1.5 KiB
C#
Raw Normal View History

2017-02-26 19:23:31 +00:00
using System;
using System.IO;
2017-02-26 19:23:31 +00:00
using System.Windows.Forms;
using HeliosPlus.Shared;
using HeliosPlus.ShellExtension.Resources;
2017-02-26 19:23:31 +00:00
namespace HeliosPlus.ShellExtension
2017-02-26 19:23:31 +00:00
{
internal class HeliosPlus
2017-02-26 19:23:31 +00:00
{
internal static string AppDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "HeliosPlus");
2017-02-26 19:23:31 +00:00
public static void Open(
HeliosStartupAction action = HeliosStartupAction.StartUpNormally,
ProfileItem profile = null,
2017-02-26 19:23:31 +00:00
string programAddress = null,
bool asAdmin = false)
{
try
{
2017-08-10 14:21:45 +00:00
Helios.Open(action, profile, programAddress, asAdmin);
2017-02-26 19:23:31 +00:00
}
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.StartUpNormally,
ProfileItem profile = null,
2017-02-26 19:23:31 +00:00
uint steamAppId = 0)
{
try
{
2017-08-10 14:21:45 +00:00
Helios.OpenSteamGame(action, profile, steamAppId);
2017-02-26 19:23:31 +00:00
}
catch (Exception e)
{
MessageBox.Show(e.ToString(), string.Format(Language.Failed_to_execute_action_Error_Message, e.Message),
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
}