English 中文(简体)
法典冻结我的申请
原标题:Code freezes my application

该法典彻底冻结了妇女论坛的申请。

纽约市是否有机会确定这一点?

var getScreenshot = Task.Factory.StartNew(() => 
{                       
    Dispatcher.BeginInvoke(DispatcherPriority.ApplicationIdle, new ThreadStart(() => {                        
    #region Main
    try
    {
        Graphics gfx;
        Bitmap bmp = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
        gfx = Graphics.FromImage(bmp);
        WindowInteropHelper windowInteropHelper = new WindowInteropHelper(this);
        Screen screen = Screen.FromHandle(windowInteropHelper.Handle);
        gfx.CopyFromScreen(screen.Bounds.X, screen.Bounds.Y, 0, 0, screen.Bounds.Size, CopyPixelOperation.SourceCopy);
         MemoryStream ms = new MemoryStream();
        byte[] bitmapData = null;
        using (bmp)
        {
            bmp.SetResolution(72, 72);
            ImageCodecInfo myImageCodecInfo;
            myImageCodecInfo = GetEncoderInfo("image/jpeg");
            System.Drawing.Imaging.Encoder myEncoder;
            myEncoder = System.Drawing.Imaging.Encoder.Quality;
            EncoderParameters encoderParameters = new EncoderParameters();
            EncoderParameter encoderParameter = new EncoderParameter(myEncoder, 25L);
            encoderParameters.Param[0] = encoderParameter;
            bmp.Save(ms, myImageCodecInfo, encoderParameters);                               
            bitmapData = ms.ToArray();
        }
        if (bitmapData != null)
            DataProvider.UpdateScreen(((PlayerConfiguration)App.Current.Properties["PlayerConfig"]).InstallationKey, bitmapData);
    }
    catch (Exception ex)
    {
        #region Error
        LogEntry l = new LogEntry();
        l.Message = string.Format("{0}", ex.Message);
        l.Title = "GetScreen() Error";
        l.Categories.Add(Category.General);
        l.Priority = Priority.Highest;

        CustomLogger.WriteErrorLog(l, "GetScreen");

        #endregion
    }
    #endregion
  }));

}, TaskCreationOptions.LongRunning)
.ContinueWith(x => x.Dispose()); 
最佳回答

是的,只是不向全方位派遣国。 只有将最小的代码列入<代码>Invoke,才能要求你放弃。 这应该是你重新实际更新国际调查。 由于你们的法典中援引过全部要求,因此,在整件事情完结之前,调查股被阻断。

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签