protected void lblInput_MouseClick(object sender, MouseEventArgs e) { int ch_num = int.Parse(((Label)sender).Name.Substring(5, 1)); // Specific to FLX bool phantom_power = (ch_num <= num_phantom); InputConfig cached_input = (InputConfig)PROGRAMS[CURRENT_PROGRAM].inputs[ch_num - 1].Clone(); int cached_pregain = PROGRAMS[CURRENT_PROGRAM].pregains[ch_num - 1]; using (InputConfiguration inputForm = new InputConfiguration(this, ch_num, phantom_power)) { if (!LIVE_MODE) { inputForm.Width = 276; } else { inputForm.Width = 320; } inputForm.Height = 221; DialogResult showBlock = inputForm.ShowDialog(this); if(showBlock == DialogResult.Cancel) { if (!PROGRAMS[CURRENT_PROGRAM].inputs[ch_num - 1].Equals(cached_input)) { PROGRAMS[CURRENT_PROGRAM].inputs[ch_num - 1] = (InputConfig)cached_input.Clone(); PROGRAMS[CURRENT_PROGRAM].pregains[ch_num - 1] = cached_pregain; if (LIVE_MODE && FIRMWARE_VERSION > 2.5) { UInt32 new_input_gain = DSP_Math.double_to_MN(PROGRAMS[CURRENT_PROGRAM].pregains[ch_num - 1] + PROGRAMS[CURRENT_PROGRAM].gains[ch_num - 1][0].Gain, 9, 23); AddItemToQueue(new LiveQueueItem((0 + ch_num - 1), new_input_gain)); AddItemToQueue(new LiveQueueItem((412 + ch_num - 1), PROGRAMS[CURRENT_PROGRAM].inputs[ch_num - 1].TypeToValue())); AddItemToQueue(new LiveQueueItem(ch_num, PROGRAMS[CURRENT_PROGRAM].inputs[ch_num - 1].Name)); AddItemToQueue(new LiveQueueItem(1000 + (ch_num - 1), PROGRAMS[CURRENT_PROGRAM].inputs[ch_num-1].PhantomAsInt())); } } } else { if (LIVE_MODE && (PROGRAMS[CURRENT_PROGRAM].inputs[ch_num - 1].Name != cached_input.Name)) { // Check if this has changed // Don't update this until we hit save since it takes so long. AddItemToQueue(new LiveQueueItem(ch_num, PROGRAMS[CURRENT_PROGRAM].inputs[ch_num - 1].Name)); } UpdateTooltips(); } } }