예제 #1
0
 private void OnPremiumArrived(RisingMobilityEventArgs e)
 {
     if (PremiumArrived != null)
     {
         PremiumArrived(this, e);
     }
 }
예제 #2
0
 static void service_PremiumArrived(object sender, RisingMobilityEventArgs e)
 {
     if (e.Result == null)
     {
         isPremium = false;
     }
     else
     {
         string username = Token;
         string resultS  = "true||" + time + "||" + username;
         var    md5      = System.Security.Cryptography.MD5.Create();
         byte[] crypt    = md5.ComputeHash(System.Text.Encoding.ASCII.GetBytes(resultS));
         isPremium = crypt.SequenceEqual(e.Result);
     }
     aEvent.Set();
 }