Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public void Run()
 {
     _window.Create();
     _window.Join();
 }
Ejemplo n.º 3
0
 public void Run()
 {
     Window.Create();
     Window.Join();
 }
 public void Join()
 {
     _window.Join();
 }
Ejemplo n.º 5
0
 public void Run()
 {
     m_GraphicsWindow.Create();
     m_GraphicsWindow.Join();
 }