public StateChangeEventArgs(ServerDetails server, RdpState rdpState, int index, int?reason = null) { Server = server; State = rdpState; ListIndex = index; Reason = reason; }
private void ChangeState(RdpState state, int?reason = null) { State = state; btnConnect.Enabled = state == RdpState.Disconnected; btnDisconnect.Enabled = state == RdpState.Connected; StateChange?.Invoke(this, new StateChangeEventArgs(CurrentServer, state, ListIndex, reason)); }
public RdpContext(ServerDetails server, RdpState state) { Server = server; State = state; }