Exemple #1
0
        public void InvokeAction()
        {
            if (_overlay == null)
            {
                return;
            }

            _overlay.Show(_activatable);
        }
        public void Show <T>() where T : ComponentBase
        {
            if (_overlay == null)
            {
                throw new InvalidOperationException($"No {typeof(IOverlay).FullName} connected to {typeof(OverlayService).FullName}");
            }

            var content = new OverlayContent <T>(_overlay.Close);

            _overlay.Show(content);
        }
Exemple #3
0
        private void observedWindowEvent(int windowEvent)
        {
            switch (windowEvent)
            {
            case WindowEventTypes.EVENT_OBJECT_FOCUS:
            {
                _overlay.UpdateOverlay(GetWindowArea());
                _overlay.Show();
                //App.minimized = false;
            }
            break;

            case WindowEventTypes.EVENT_OBJECT_HIDE:
            {
                //App.minimized = true;
                _overlay.Hide();

                //ToasterThread.toaster.popToast("Info", "BDMT has been minimized!");
            }
            break;

            case WindowEventTypes.EVENT_OBJECT_LOCATIONCHANGE:
            {
                _overlay.UpdateOverlay(GetWindowArea());
            }
            break;

            case WindowEventTypes.EVENT_OBJECT_SHOW:
            {
            }
            break;

            case WindowEventTypes.EVENT_SYSTEM_FOREGROUND:
            {
            }
            break;

            case 0:
            {
                _overlay.Hide();
            }
            break;

            default:
                break;
            }
        }
Exemple #4
0
        private void ObservedWindowEvent(User32.WindowEventTypes windowEvent)
        {
            switch (windowEvent)
            {
            case User32.WindowEventTypes.EVENT_OBJECT_FOCUS: {
                _overlay.Update(GetWindowArea());
                _overlay.Show();
                MyApp.minimized = false;
            }
            break;

            case User32.WindowEventTypes.EVENT_OBJECT_HIDE: {
                MyApp.minimized = true;
                _overlay.Hide();
                _notifier.Notify("Info", "BDMT has been minimized!");
            }
            break;

            case User32.WindowEventTypes.EVENT_OBJECT_LOCATIONCHANGE: {
                _overlay.Update(GetWindowArea());
            }
            break;

            case User32.WindowEventTypes.EVENT_OBJECT_SHOW: {
            }
            break;

            case User32.WindowEventTypes.EVENT_SYSTEM_FOREGROUND: {
            }
            break;

            case 0: {
                _overlay.Hide();
            }
            break;

            default:
                break;
            }
        }