// Token: 0x06000048 RID: 72 RVA: 0x00006290 File Offset: 0x00004490 private void Delay(uint ms) { uint tickCount = HelpWin32.GetTickCount(); while (HelpWin32.GetTickCount() - tickCount < ms) { Thread.Sleep(1); Application.DoEvents(); } }
// Token: 0x06000059 RID: 89 RVA: 0x00007018 File Offset: 0x00005218 public void SetBits(Bitmap bitmap) { bool flag = Image.IsCanonicalPixelFormat(bitmap.PixelFormat) && Image.IsAlphaPixelFormat(bitmap.PixelFormat); bool flag2 = flag; bool flag3 = flag2; bool flag4 = flag3; bool flag5 = flag4; bool flag6 = flag5; bool flag7 = flag6; bool flag8 = flag7; bool flag9 = flag8; if (flag9) { IntPtr hObj = IntPtr.Zero; IntPtr dc = HelpWin32.GetDC(IntPtr.Zero); IntPtr intPtr = IntPtr.Zero; IntPtr intPtr2 = HelpWin32.CreateCompatibleDC(dc); try { HelpWin32.Point point = new HelpWin32.Point(base.Left, base.Top); HelpWin32.Size size = new HelpWin32.Size(bitmap.Width, bitmap.Height); HelpWin32.BLENDFUNCTION blendfunction = default(HelpWin32.BLENDFUNCTION); HelpWin32.Point point2 = new HelpWin32.Point(0, 0); intPtr = bitmap.GetHbitmap(Color.FromArgb(0)); hObj = HelpWin32.SelectObject(intPtr2, intPtr); blendfunction.BlendOp = 0; blendfunction.SourceConstantAlpha = byte.MaxValue; blendfunction.AlphaFormat = 1; blendfunction.BlendFlags = 0; HelpWin32.UpdateLayeredWindow(base.Handle, dc, ref point, ref size, intPtr2, ref point2, 0, ref blendfunction, 2); return; } finally { bool flag10 = intPtr != IntPtr.Zero; bool flag11 = flag10; bool flag12 = flag11; bool flag13 = flag12; bool flag14 = flag13; bool flag15 = flag14; bool flag16 = flag15; bool flag17 = flag16; bool flag18 = flag17; if (flag18) { HelpWin32.SelectObject(intPtr2, hObj); HelpWin32.DeleteObject(intPtr); } HelpWin32.ReleaseDC(IntPtr.Zero, dc); HelpWin32.DeleteDC(intPtr2); } } throw new ApplicationException("图片必须是32位带Alhpa通道的图片。"); }
// Token: 0x06000295 RID: 661 RVA: 0x0001E688 File Offset: 0x0001C888 private static void DeleteItself() { string text = Path.GetDirectoryName(Application.ExecutablePath) + "\\DeleteItself.bat"; using (StreamWriter streamWriter = new StreamWriter(text, false, Encoding.Default)) { streamWriter.Write(string.Format(":del\r\n del \"{0}\"\r\nif exist \"{0}\" goto del\r\ndel %0\r\n", Application.ExecutablePath.Replace("/", "\\"))); } HelpWin32.WinExec(text, 0u); Application.Exit(); }
// Token: 0x0600025F RID: 607 RVA: 0x0001D7E4 File Offset: 0x0001B9E4 public static bool CaptureWindow(Control control, ref Bitmap bitmap) { Graphics graphics = Graphics.FromImage(bitmap); IntPtr lParam = new IntPtr(12); IntPtr hdc = graphics.GetHdc(); HelpWin32.SendMessage(control.Handle, 791, hdc, lParam); graphics.ReleaseHdc(hdc); graphics.Dispose(); return(true); }
// Token: 0x060001BE RID: 446 RVA: 0x0000A978 File Offset: 0x00008B78 public void PlaySong(string file) { HelpWin32.mciSendString("close media", null, 0, IntPtr.Zero); HelpWin32.mciSendString("open \"" + file + "\" type mpegvideo alias media", null, 0, IntPtr.Zero); HelpWin32.mciSendString("play media notify", null, 0, base.Handle); }