2017-02-26 19:23:31 +00:00
|
|
|
|
using System;
|
2020-05-10 10:47:18 +00:00
|
|
|
|
using System.IO;
|
2017-02-26 19:23:31 +00:00
|
|
|
|
using System.Windows.Forms;
|
2020-04-23 08:16:16 +00:00
|
|
|
|
using HeliosPlus.Shared;
|
|
|
|
|
using HeliosPlus.ShellExtension.Resources;
|
2017-02-26 19:23:31 +00:00
|
|
|
|
|
2020-04-23 08:16:16 +00:00
|
|
|
|
namespace HeliosPlus.ShellExtension
|
2017-02-26 19:23:31 +00:00
|
|
|
|
{
|
2020-04-29 10:29:43 +00:00
|
|
|
|
internal class HeliosPlus
|
2017-02-26 19:23:31 +00:00
|
|
|
|
{
|
2020-05-10 10:47:18 +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.None,
|
|
|
|
|
Profile profile = null,
|
|
|
|
|
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.None,
|
|
|
|
|
Profile profile = null,
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|