コード例 #1
0
        private void cB_Clone_DropDownClosed(object sender, EventArgs e)
        {
            if (!cB_Clone.Items.Contains("Clone..."))
            {
                cB_Clone.Items.Add("Clone...");
            }

            if (cB_Clone.Items.Count > 0 && cB_Clone.SelectedIndex >= 0 && cB_Clone.Items[cB_Clone.SelectedIndex].ToString() != "Clone...")
            {
                OpenPreset(RTSPPresets.GetPreset(cB_Clone.Text));
                editIndex = -1;
            }

            cB_Clone.SelectedIndex = cB_Clone.FindStringExact("Clone...");
        }
コード例 #2
0
        private void check_Manual_CheckedChanged(object sender, EventArgs e)
        {
            bool enabled = check_Manual.Checked;

            l_PelcoID.Enabled = enabled;
            cB_ID.Enabled     = enabled;

            l_IP.Enabled  = enabled;
            tB_IP.Enabled = enabled;

            l_Port.Enabled  = enabled;
            cB_Port.Enabled = enabled;

            MainForm.m.setPage.ToggleOverridePreset(enabled);

            if (!enabled)
            {
                string[] preset = RTSPPresets.GetPreset(ConfigControl.mainPlayerPreset.stringVal);

                tB_IP.Text   = preset[TableValue(PresetColumn.ControlIP)];
                cB_Port.Text = preset[TableValue(PresetColumn.ControlPort)];
                cB_ID.Text   = preset[TableValue(PresetColumn.PelcoID)];
            }
        }