Exemplo n.º 1
0
 private void _003CInitUI_003Eb__6()
 {
     try
     {
         _003C_003Ec__DisplayClass9 _003C_003Ec__DisplayClass = new _003C_003Ec__DisplayClass9();
         _003C_003Ec__DisplayClass._003C_003E4__this = this;
         WebClient webClient = new WebClient();
         webClient.CachePolicy = new RequestCachePolicy(RequestCacheLevel.Revalidate);
         byte[] buffer = webClient.DownloadData(new Uri(signinDataUser.SignedPic, UriKind.Absolute));
         _003C_003Ec__DisplayClass.bitmapImage = new BitmapImage();
         using (MemoryStream streamSource = new MemoryStream(buffer))
         {
             _003C_003Ec__DisplayClass.bitmapImage.BeginInit();
             _003C_003Ec__DisplayClass.bitmapImage.CacheOption  = BitmapCacheOption.OnLoad;
             _003C_003Ec__DisplayClass.bitmapImage.StreamSource = streamSource;
             _003C_003Ec__DisplayClass.bitmapImage.EndInit();
             _003C_003Ec__DisplayClass.bitmapImage.Freeze();
         }
         base.Dispatcher.BeginInvoke(new Action(_003C_003Ec__DisplayClass._003CInitUI_003Eb__7));
     }
     catch (Exception ex)
     {
         LogTool.Debug(ex);
     }
 }
Exemplo n.º 2
0
 private void _003Crun_003Eb__1()
 {
     while (true)
     {
         try
         {
             _out.WriteLine("_chk");
             _out.Flush();
             Console.WriteLine("_out => _chk");
         }
         catch
         {
             if (_closeEventManagerList != null)
             {
                 using (List <IEventManager> .Enumerator enumerator = _closeEventManagerList.GetEnumerator())
                 {
                     while (enumerator.MoveNext())
                     {
                         ThreadStart threadStart = null;
                         _003C_003Ec__DisplayClass9 _003C_003Ec__DisplayClass = new _003C_003Ec__DisplayClass9();
                         _003C_003Ec__DisplayClass.mgr = enumerator.Current;
                         if (threadStart == null)
                         {
                             threadStart = new ThreadStart(_003C_003Ec__DisplayClass._003Crun_003Eb__2);
                         }
                         Thread thread = new Thread(threadStart);
                         thread.Start();
                     }
                 }
             }
             try
             {
                 _out    = null;
                 _in     = null;
                 _socket = null;
             }
             catch (Exception ex)
             {
                 logger.Debug("socket close: {0}", ex.ToString());
             }
             return;
         }
         Thread.Sleep(5000);
     }
 }