private void button2_Click(object sender, EventArgs e)
 {
     //ストリーミング開始
     if (tokens != null)
     {
         if (radioButton1.Checked)
         {
             streamingMng = new StreamingManager(tokens.Streaming.UserAsObservable(),
                 MessageType.Create, 0, WriteLine);
         }
         else if (radioButton2.Checked)
         {
             streamingMng = new StreamingManager(tokens.Streaming.UserAsObservable(),
                 MessageType.DirectMesssage, 0, WriteLine);
         }
         else if (radioButton3.Checked)
         {
             streamingMng = new StreamingManager(tokens.Streaming.FilterAsObservable(track: textBox2.Text),
                 MessageType.Create, 10, WriteLine);
         }
         else
         {
             streamingMng = new StreamingManager(tokens.Streaming.SampleAsObservable(),
                 MessageType.Create, 10, WriteLine);
         }
         streamingMng.ConnectStreaming();
         WriteLine("Connect Streaming");
     }
 }
 private void button3_Click(object sender, EventArgs e)
 {
     //ストリーミング終了
     if (streamingMng != null)
     {
         streamingMng.Dispose();
         streamingMng = null;
         WriteLine("Close Connection");
     }
 }