Ejemplo n.º 1
0
        public SelectPackagesPage(Utilities.IniFile packagesIni, List <string> effectFiles)
        {
            InitializeComponent();
            DataContext = this;

            foreach (var package in packagesIni.GetSections())
            {
                bool required = packagesIni.GetString(package, "Required") == "1";
                bool?enabled  = required ? true : (packagesIni.GetString(package, "Enabled") == "1" && effectFiles.Count == 0 ? (bool?)null : false);

                if (packagesIni.GetValue(package, "EffectFiles", out string[] packageEffectFiles))
Ejemplo n.º 2
0
        public void Load()
        {
            RequestedLatency.Value = m_iniFile.GetInt32(RequestedLatency.Section, RequestedLatency.Key, RequestedLatency.DefaultValue);
            OutputDevice.Value     = m_iniFile.GetString(OutputDevice.Section, OutputDevice.Key, OutputDevice.DefaultValue);

            WaveOutCallback.Value = m_iniFile.GetString(WaveOutCallback.Section, WaveOutCallback.Key, WaveOutCallback.DefaultValue);
            WaveOutDevice.Value   = m_iniFile.GetInt32(WaveOutDevice.Section, WaveOutDevice.Key, WaveOutDevice.DefaultValue);

            DirectSoundDevice.Value = m_iniFile.GetString(DirectSoundDevice.Section, DirectSoundDevice.Key, DirectSoundDevice.DefaultValue);

            WasapiOutDevice.Value          = m_iniFile.GetInt32(WasapiOutDevice.Section, WasapiOutDevice.Key, WasapiOutDevice.DefaultValue);
            WasapiOutIsEventCallback.Value = m_iniFile.GetString(WasapiOutIsEventCallback.Section, WasapiOutIsEventCallback.Key, WasapiOutIsEventCallback.DefaultValue);
            WasapiOutExclusiveMode.Value   = m_iniFile.GetString(WasapiOutExclusiveMode.Section, WasapiOutExclusiveMode.Key, WasapiOutExclusiveMode.DefaultValue);

            VideoPlaybackDevice.Value = m_iniFile.GetInt32(VideoPlaybackDevice.Section, VideoPlaybackDevice.Key, VideoPlaybackDevice.DefaultValue);
        }
Ejemplo n.º 3
0
        public void Load()
        {
            AudioPlayer.Value   = m_iniFile.GetString(AudioPlayer.Section, AudioPlayer.Key, AudioPlayer.DefaultValue);
            VideoPlayer.Value   = m_iniFile.GetString(VideoPlayer.Section, VideoPlayer.Key, VideoPlayer.DefaultValue);
            ConfigPath.Value    = m_iniFile.GetString(ConfigPath.Section, ConfigPath.Key, ConfigPath.DefaultValue);
            KeyPressDelay.Value = m_iniFile.GetInt32(KeyPressDelay.Section, KeyPressDelay.Key, KeyPressDelay.DefaultValue);

            RequestedLatency.Value = m_iniFile.GetInt32(RequestedLatency.Section, RequestedLatency.Key, RequestedLatency.DefaultValue);
            OutputDevice.Value     = m_iniFile.GetString(OutputDevice.Section, OutputDevice.Key, OutputDevice.DefaultValue);

            WaveOutCallback.Value = m_iniFile.GetString(WaveOutCallback.Section, WaveOutCallback.Key, WaveOutCallback.DefaultValue);
            WaveOutDevice.Value   = m_iniFile.GetInt32(WaveOutDevice.Section, WaveOutDevice.Key, WaveOutDevice.DefaultValue);

            DirectSoundDevice.Value = m_iniFile.GetString(DirectSoundDevice.Section, DirectSoundDevice.Key, DirectSoundDevice.DefaultValue);

            WasapiOutDevice.Value          = m_iniFile.GetInt32(WasapiOutDevice.Section, WasapiOutDevice.Key, WasapiOutDevice.DefaultValue);
            WasapiOutIsEventCallback.Value = m_iniFile.GetString(WasapiOutIsEventCallback.Section, WasapiOutIsEventCallback.Key, WasapiOutIsEventCallback.DefaultValue);
            WasapiOutExclusiveMode.Value   = m_iniFile.GetString(WasapiOutExclusiveMode.Section, WasapiOutExclusiveMode.Key, WasapiOutExclusiveMode.DefaultValue);
        }
Ejemplo n.º 4
0
        public SelectPackagesDialog(Utilities.IniFile packagesIni)
        {
            InitializeComponent();
            DataContext = this;

            foreach (var package in packagesIni.GetSections())
            {
                Items.Add(new EffectPackage
                {
                    Enabled            = packagesIni.GetString(package, "Enabled") == "1",
                    Modifiable         = packagesIni.GetString(package, "Required") != "1",
                    PackageName        = packagesIni.GetString(package, "PackageName"),
                    PackageDescription = packagesIni.GetString(package, "PackageDescription"),
                    InstallPath        = packagesIni.GetString(package, "InstallPath"),
                    TextureInstallPath = packagesIni.GetString(package, "TextureInstallPath"),
                    DownloadUrl        = packagesIni.GetString(package, "DownloadUrl"),
                    RepositoryUrl      = packagesIni.GetString(package, "RepositoryUrl")
                });
            }
        }
Ejemplo n.º 5
0
        public SelectPackagesPage(Utilities.IniFile packagesIni)
        {
            InitializeComponent();
            DataContext = this;

            foreach (var package in packagesIni.GetSections())
            {
                bool enabled  = packagesIni.GetString(package, "Enabled") == "1";
                bool required = packagesIni.GetString(package, "Required") == "1";

                Items.Add(new EffectPackage
                {
                    Enabled            = required ? true : enabled ? (bool?)null : false,
                    Modifiable         = !required,
                    PackageName        = packagesIni.GetString(package, "PackageName"),
                    PackageDescription = packagesIni.GetString(package, "PackageDescription"),
                    InstallPath        = packagesIni.GetString(package, "InstallPath"),
                    TextureInstallPath = packagesIni.GetString(package, "TextureInstallPath"),
                    DownloadUrl        = packagesIni.GetString(package, "DownloadUrl"),
                    RepositoryUrl      = packagesIni.GetString(package, "RepositoryUrl")
                });
            }
        }