public static int ConnectToMPD() { try { mpcconn = new MpcConnection(mpdip); //mpcconn.Connect(); } catch (Exception e) { error = e.Message; return 1; } if (mpcconn.Connected) { serverVersion = mpcconn.Version; mpc.Connection = mpcconn; return 0; } return 2; }
private void OnSubsystemsChangedHandler(MpcConnection connection, Mpc.Subsystems subsystems) { if (this.OnSubsystemsChanged != null) this.OnSubsystemsChanged(this, subsystems); }
private void onMpcConnectionDisconnected(MpcConnection connection) { if (this.OnDisconnected != null) this.OnDisconnected.Invoke(this); }