/// <summary>
        /// Aktualisiert die Anzeige nach einer Änderung.
        /// </summary>
        private void UpdateGUI()
        {
            // Assume not valid
            m_PlugIn.IsValid = false;

            // Always update
            try
            {
                // Get the selection
                HardwareTypeItem item = (HardwareTypeItem)selType.SelectedItem;
                if (null == item)
                {
                    return;
                }
                if (null == item.Type)
                {
                    return;
                }

                // No name at all
                if (string.IsNullOrEmpty(txName.Text))
                {
                    return;
                }

                // Check for invalid file name characters
                if (txName.Text.IndexOfAny(Path.GetInvalidFileNameChars()) >= 0)
                {
                    return;
                }

                // If name changes make sure that there is no other profile with the same name
                Profile other = JMS.DVB.ProfileManager.FindProfile(txName.Text);
                if (null != other)
                {
                    if (other != m_PlugIn.Profile)
                    {
                        return;
                    }
                }

                // We allow it if the source selection is valid
                m_PlugIn.IsValid = (null != selShare.SelectedItem);
            }
            finally
            {
                // Update GUI
                m_Site.UpdateGUI();
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Bereitet die Auswahl für eine bekannte Konfiguration vor.
        /// </summary>
        /// <param name="item">Die zugehörige Quelle.</param>
        /// <param name="pid">Die Datenstromkennung für den Datenstrom.</param>
        /// <param name="extended">Gesetzt, wenn erweiterte Tabellenkennungen verwendet werden.</param>
        private void SelectSpecial(SourceItem item, ushort pid, bool extended)
        {
            // Remember
            PlugIn.LastSource = item.Source;

            // Select all
            selSource.SelectedItem   = item;
            selPIDType.SelectedIndex = 0;
            selPid.Value             = pid;

            // Set option field
            if (extended)
            {
                optExtended.Checked = true;
            }
            else
            {
                optStandard.Checked = true;
            }

            // Refresh
            AdminSite.UpdateGUI();
        }
        /// <summary>
        /// Aktualisiert die Anzeige.
        /// </summary>
        private void UpdateGUI()
        {
            // Reset
            m_PlugIn.CanProcess = false;

            // Must have a unique name and at least one option selected
            if (!string.IsNullOrEmpty(txName.Text))
            {
                if (txName.Text.IndexOfAny(Path.GetInvalidFileNameChars()) < 0)
                {
                    if (null == JMS.DVB.ProfileManager.FindProfile(txName.Text))
                    {
                        if (optSatellite.Checked || optCable.Checked || optTerrestrial.Checked)
                        {
                            m_PlugIn.CanProcess = true;
                        }
                    }
                }
            }

            // Forward
            m_Site.UpdateGUI();
        }