Esempio n. 1
0
        public override void OnSectionActivated()
        {
            //
            // Clear any existing entries
            //
            sharesListBox.Items.Clear();

            //
            // Load picture shares
            //
            SectionSettings section = GetSection("Picture Folders");

            if (section != null)
            {
                ArrayList shares = (ArrayList)section.GetSetting("shares");

                foreach (string share in shares)
                {
                    //
                    // Add to share to list box and default to selected
                    //
                    sharesListBox.Items.Add(share, CheckState.Checked);
                }
            }

            UpdateControlStatus();
        }
        public override void OnSectionActivated()
        {
            //
            // Clear any existing entries
            //
            sharesListBox.Items.Clear();

            //
            // Load selected shares
            //
            SectionSettings section = GetSection("Music Folders");

            if (section != null)
            {
                sharesData = (List <BaseShares.ShareData>)section.GetSetting("sharesdata");

                foreach (BaseShares.ShareData share in sharesData)
                {
                    //
                    // Add to share to list box and select them based on the settings
                    //
                    sharesListBox.Items.Add(share.Folder, share.ScanShare);
                }
            }

            //
            // Fetch extensions
            //
            section = GetSection("Music Extensions");

            if (section != null)
            {
                string extensions = (string)section.GetSetting("extensions");
                Extensions = extensions.Split(new char[] { ',' });
            }

            UpdateControlStatus();
        }
Esempio n. 3
0
        public override void OnSectionActivated()
        {
            //
            // Disable the complete Page, when the Music Player is not the BASS engine
            //
            SectionSettings section = GetSection("Music");

            if (section != null)
            {
                string player = (string)section.GetSetting("audioPlayer");
                if (player.IndexOf("BASS") == -1)
                {
                    this.Enabled = false;
                    MessageBox.Show(this, "ASIO is only available with the BASS music player selected.",
                                    "MediaPortal - Setup", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                }
                else
                {
                    this.Enabled = true;
                }
            }
        }
        public override void OnSectionActivated()
        {
            //
            // Disable the complete Tab Page, when the Music Player is not the BASS engine
            //
            SectionSettings section = GetSection("Music");

            if (section != null)
            {
                string player = (string)section.GetSetting("audioPlayer");
                if (player.ToLowerInvariant().IndexOf("internal dshow player") > -1)
                {
                    MusicDSPTabCtl.Enabled = false;
                    MessageBox.Show(this, "DSP effects are only available with the BASS music player selected.",
                                    "MediaPortal - Setup", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                }
                else
                {
                    MusicDSPTabCtl.Enabled = true;
                }
            }
        }
Esempio n. 5
0
        private void useASIOCheckBox_CheckedChanged(object sender, EventArgs e)
        {
            asioDeviceComboBox.Items.Clear();
            asioDeviceComboBox.Enabled = useASIOCheckBox.Checked;
            if (useASIOCheckBox.Checked)
            {
                // We must not have checked the "Upmixing" checkbox in the Music setting the same time
                SectionSettings section = GetSection("Music");

                if (section != null)
                {
                    bool mixing = (bool)section.GetSetting("mixing");
                    if (mixing)
                    {
                        useASIOCheckBox.Checked = false;
                        MessageBox.Show(this, "ASIO and Upmixing (in the Music Tab) must not be used at the same time",
                                        "MediaPortal - Setup", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    }
                }

                // Get all available ASIO devices and add them to the combo box
                BASS_ASIO_DEVICEINFO[] asioDevices = BassAsio.BASS_ASIO_GetDeviceInfos();
                if (asioDevices.Length == 0)
                {
                    MessageBox.Show(this, "No ASIO Devices available in the system.",
                                    "MediaPortal - Setup", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    asioDeviceComboBox.Enabled = false;
                    btSettings.Enabled         = false;
                    useASIOCheckBox.Checked    = false;
                }
                else
                {
                    asioDeviceComboBox.Items.AddRange(asioDevices);
                    asioDeviceComboBox.SelectedIndex = 0;
                    btSettings.Enabled = true;
                }
            }
        }