Exemple #1
0
 private void Form1_Load(object sender, EventArgs e)
 {
     client = CRPClient.defaultClient;
     client.setLoginHandler(delegate(bool isSuccess, string info) {
         enableButton1();
         if (isSuccess)
         {
             goForm2();
         }
         else
         {
             MessageBox.Show(info, "51213");
         }
     });
 }
Exemple #2
0
 private void Form2_Load(object sender, EventArgs e)
 {
     client = CRPClient.defaultClient;
     client.setMessageHandler(delegate(string message) {
         showMessage(message);
     });
     client.setStartVideoHandler(delegate(bool isSuccess, string info)
     {
         if (isSuccess)
         {
             startLiveVideo();
         }
         else
         {
             MessageBox.Show(info);
         }
     });
     client.setVideoFrameHandler(delegate(Bitmap image)
     {
         showFrame(image);
     });
 }