コード例 #1
0
ファイル: Overlay.cs プロジェクト: RayRed93/GameOverlay.Net
        public static void Start()
        {
            Process[] processes = Process.GetProcessesByName(albionProcessName);//Albion-Online

            if (processes.Length > 0)
            {
                albionProcess         = processes[0];
                albionProcess.Exited += AlbionProcess_Exited;
                Console.WriteLine("\nAlbion process found! \nDrawing overlay :)");
                albionWindowRect = new Rect();
                IntPtr ptr = albionProcess.MainWindowHandle;
                albionScreen = Screen.FromHandle(ptr);
                GetWindowRect(ptr, ref albionWindowRect);
            }
            else
            {
                Console.WriteLine("Albion process not found!");
                System.Threading.Thread.Sleep(5000);
                return;
            }

            var gfx = new Graphics()
            {
                MeasureFPS = true,
                PerPrimitiveAntiAliasing = false,
                TextAntiAliasing         = false
            };

            overlayGraphics = gfx;



            window = new GraphicsWindow(albionScreen.Bounds.Left, albionScreen.Bounds.Top, albionScreen.Bounds.Width, albionScreen.Bounds.Height, gfx)
            {
                FPS       = 60,
                IsTopmost = true,
                IsVisible = true
            };

            window.DestroyGraphics += window_DestroyGraphics;
            window.DrawGraphics    += window_DrawGraphics;
            window.SetupGraphics   += window_SetupGraphics;


            window.Create();
            window.Join();

            //System.Threading.Thread.Sleep(5000);
        }
コード例 #2
0
 public void Run()
 {
     _window.Create();
     _window.Join();
 }
コード例 #3
0
ファイル: Overlay.cs プロジェクト: stubobis1/prank
 public void Run()
 {
     Window.Create();
     Window.Join();
 }
コード例 #4
0
 public void Join()
 {
     _window.Join();
 }
コード例 #5
0
ファイル: Overlay.cs プロジェクト: bennybroseph/Diablo-360
 public void Run()
 {
     m_GraphicsWindow.Create();
     m_GraphicsWindow.Join();
 }