internal WaitForStateChange(SrcpFeedback feedback, int address) { this.address = address; this.feedback = feedback; object oldRefCounter = this.feedback.waitObjects[address]; if (oldRefCounter == null) { this.feedback.waitObjects.Add(address, 1); } else { this.feedback.waitObjects[address] = (int)oldRefCounter + 1; } this.feedback.StateChanged += new FeedbackStateChanged(OnStateChanged); }
private void Initialize(ServerConnection connection, SrcpFeedback current) { this.current = current; serverConnection = connection; selectBus.SetServer(serverConnection); if (current != null) { selectBus.Bus = current.Bus; comboBoxType.Text = current.Type; comboBoxParameters.Text = current.Parameters; } else { selectBus.Bus = 8; } comboBoxType.SelectedIndex = 0; comboBoxParameters.SelectedIndex = 0; }
public SrcpFeedback GetSrcpFeedback() { if (srcpFeedback == null) { Control control = null; try { control = selectBus; int bus = selectBus.Bus; control = comboBoxType; string type = comboBoxType.Text; control = comboBoxParameters; string parameters = comboBoxParameters.Text; control = null; if (current == null) { current = new SrcpFeedback(serverConnection); } current.Init(bus, type, parameters); srcpFeedback = current; FindForm().DialogResult = DialogResult.OK; } catch (Exception) { if (control != null) { control.Focus(); } throw; } } return(srcpFeedback); }
public void Initialize(SrcpFeedback current) { Initialize(current.Connection, current); }
public NewAndUpdateFeedback(SrcpFeedback current) : this() { Initialize(current.Connection, current); }