Ejemplo n.º 1
0
        static void UpdateSinglePresetBox(ComboBox box, VideoSettings refreshSettings = null)
        {
            if (refreshSettings != null)
            {
                refreshSettings.refreshBox = false;
            }

            int oldVal = box.SelectedIndex;

            box.Items.Clear();
            foreach (string s in RTSPPresets.GetPresetList())
            {
                box.Items.Add(s);
            }

            box.Items.Add("Add New...");

            if (oldVal <= box.Items.Count - 2)
            {
                box.SelectedIndex = oldVal;
            }

            if (refreshSettings != null)
            {
                refreshSettings.refreshBox = true;
            }
        }
Ejemplo n.º 2
0
        void UpdateAll()
        {
            if (RTSPPresets.currentPresetCount == 0)
            {
                cB_Clone.Hide();
            }
            else
            {
                cB_Clone.Show();
            }

            cB_Clone.Items.Clear();

            cB_Clone.Items.Clear();
            foreach (string s in RTSPPresets.GetPresetList())
            {
                cB_Clone.Items.Add(s);
            }

            if (!cB_Clone.Items.Contains("Clone...") && !refresh)
            {
                cB_Clone.Items.Add("Clone...");
            }

            cB_Clone.Text = "Clone...";
        }