コード例 #1
0
        /// <summary>
        /// Sets default values for this system.
        /// </summary>
        public static SettingsFile DefaultValues() {
            SettingsFile Result = new SettingsFile();
            string Root = Path.GetPathRoot(Environment.GetFolderPath(Environment.SpecialFolder.System));
            Result.NaturalGroundingFolder = Root + "Natural Grounding\\";

            // Auto-detect SVP path.
            string[] DefaultPaths = {
                @"SVP 4\SVPManager.exe",
                @"SVP 4 Free\SVPManager.exe",
                @"SVP 4 Dev\SVPManager.exe",
                @"SVP\SVPMgr.exe"
            };
            string ProgramFiles = Environment.GetFolderPath(Environment.Is64BitOperatingSystem ? Environment.SpecialFolder.ProgramFilesX86 : Environment.SpecialFolder.ProgramFiles);
            string ItemPath;
            foreach (string item in DefaultPaths) {
                ItemPath = Path.Combine(ProgramFiles, item);
                if (File.Exists(ItemPath)) {
                    Result.SvpPath = ItemPath;
                    break;
                }
            }
            if (string.IsNullOrEmpty(Result.SvpPath))
                Result.SvpPath = Path.Combine(ProgramFiles, DefaultPaths[0]);

            // Auto-detect MPC-HC path.
            Result.MpcPath = Registry.GetValue(@"HKEY_CURRENT_USER\Software\MPC-HC\MPC-HC\", "ExePath", "") as string;
            if ((string.IsNullOrEmpty(Result.MpcPath) || !File.Exists(Result.MpcPath)))
                Result.MpcPath = Path.Combine(ProgramFiles, @"MPC-HC\mpc-hc.exe");

            return Result;
        }
コード例 #2
0
 /// <summary>
 /// Sets default values for this system.
 /// </summary>
 public static SettingsFile DefaultValues() {
     SettingsFile Result = new SettingsFile();
     string Root = Path.GetPathRoot(Environment.GetFolderPath(Environment.SpecialFolder.System));
     Result.NaturalGroundingFolder = Root + "Natural Grounding\\";
     Result.SvpPath = Root + @"Program Files (x86)\SVP\SVPMgr.exe";
     if (!File.Exists(Result.SvpPath))
         Result.SvpPath = Root + @"Program Files\SVP\SVPMgr.exe";
         //Result.MpcPath = Root + @"Program Files (x86)\SVP\MPC-HC\mpc-hc.exe";
         //Result.MpcPath = Root + @"Program Files\SVP\MPC-HC\mpc-hc.exe";
     return Result;
 }
コード例 #3
0
 public SettingsFile Copy() {
     SettingsFile Result = new SettingsFile();
     Result.NaturalGroundingFolder = NaturalGroundingFolder;
     Result.SvpPath = SvpPath;
     Result.MpcPath = MpcPath;
     Result.AutoDownload = AutoDownload;
     Result.EnableSvp = EnableSvp;
     Result.EnableMadVR = EnableMadVR;
     Result.ChangeAudioPitch = ChangeAudioPitch;
     Result.Widescreen = Widescreen;
     Result.MediaPlayerApp = MediaPlayerApp;
     Result.MaxDownloadQuality = MaxDownloadQuality;
     Result.Zoom = Zoom;
     Result.GraphicDeviceId = GraphicDeviceId;
     return Result;
 }
コード例 #4
0
 public SettingsFile Copy() {
     SettingsFile Result = new SettingsFile();
     Result.NaturalGroundingFolder = NaturalGroundingFolder;
     Result.SvpPath = SvpPath;
     Result.AutoDownload = AutoDownload;
     Result.EnableSvp = EnableSvp;
     Result.EnableMadVR = EnableMadVR;
     Result.Widescreen = Widescreen;
     Result.MediaPlayerApp = MediaPlayerApp;
     Result.MaxDownloadQuality = MaxDownloadQuality;
     Result.Zoom = Zoom;
     return Result;
 }