コード例 #1
0
ファイル: Die.cs プロジェクト: wcasanova/ElectronicDice
 public void Disconnect()
 {
     state = State.Disconnected;
     if (OnStateChanged != null)
     {
         OnStateChanged(this, State.Disconnected);
     }
     _sendBytes = null;
 }
コード例 #2
0
ファイル: Die.cs プロジェクト: wcasanova/ElectronicDice
    public void Connect(ISendBytes sb)
    {
        _sendBytes = sb;
        state      = State.Unknown;
        if (OnStateChanged != null)
        {
            OnStateChanged(this, State.Unknown);
        }

        // Ping the die so we know its initial state
        Ping();
    }