Example #1
0
 public void Run(CurrentPlatform Platform)
 {
     if (!Installed)
     {
         throw new FileNotFoundException(DebugStrings.AppDbgExCorePluginNotFound, Executable);
     }
     Platform.StartExternalHelper(Executable, ElevationRequired);
 }
Example #2
0
        /// <summary>
        /// CurrentApp class constructor.
        /// </summary>
        /// <param name="IsPortable">Enable portable mode (with settings in the same directory as executable).</param>
        /// <param name="AppName">Application name.</param>
        public CurrentApp(bool IsPortable, string AppName)
        {
            // Getting information about operating system and platform...
            Platform = CurrentPlatform.Create();

            // Getting full path to application installation directory...
            FullAppPath = Path.GetDirectoryName(Assembly.GetCallingAssembly().Location);

            // Getting full to application user directory...
            AppUserDir = IsPortable ? Path.Combine(Path.GetDirectoryName(Assembly.GetCallingAssembly().Location), "portable") : Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), AppName);

            // Getting full path to application local updates directory...
            AppUpdateDir = Path.Combine(AppUserDir, StringsManager.UpdateLocalDirectoryName);

            // Checking if user directory exists. If not - creating it...
            if (!Directory.Exists(AppUserDir))
            {
                Directory.CreateDirectory(AppUserDir);
            }

            // Generating User-Agent header for outgoing HTTP queries...
            UserAgent = String.Format(StringsManager.HTTPUserAgentTemplate, Platform.OSFriendlyName, Platform.UASuffix, Environment.OSVersion.Version.Major, Environment.OSVersion.Version.Minor, CultureInfo.CurrentCulture.Name, AppVersion, AppName, SystemArch);
        }
Example #3
0
 /// <summary>
 /// SteamManager class constructor.
 /// </summary>
 /// <param name="LastSteamID">Last used UserID.</param>
 /// <param name="Platform">Instance of the CurrentPlatform class.</param>
 public SteamManager(string LastSteamID, CurrentPlatform Platform)
 {
     FullSteamPath = TrySteamPath(Platform.SteamInstallPath);
     SetValues(LastSteamID);
 }