public int ReceiveData(object gameMemory) { try { _gameMemory = (IGameMemoryMGU)gameMemory; if (_isOverlayReady) { UpdateOverlay(); RenderOverlay(); } else { CreateOverlay(); } } catch (Exception ex) { _hostDelegates.ExceptionMessage(ex); } finally { if (_graphics != null && _graphics.IsInitialized) { _graphics.EndScene(); } } return(0); }
public MainWindow() { InitializeComponent(); DataContext = Plugin.Models.AppView; _gameMemory = Plugin.Models.AppView.GameMemory; _options = Plugin.Models.AppView.Options; ToggleAttachWindow(true); _options.PropertyChanged += Options_PropertyChanged; _gameMemory.Process.PropertyChanged += Process_PropertyChanged; }