Esempio n. 1
0
        public virtual IDisposable ShowDialog()
        {
            var        disabled  = s_instances.Where(x => x != this && x.IsEnabled).ToList();
            WindowImpl activated = null;

            foreach (var window in disabled)
            {
                if (window._isActive)
                {
                    activated = window;
                }

                window.IsEnabled = false;
            }

            Show();

            return(Disposable.Create(() =>
            {
                foreach (var window in disabled)
                {
                    window.IsEnabled = true;
                }

                activated?.Activate();
            }));
        }
Esempio n. 2
0
 public void ShowDialog(IWindowImpl parent)
 {
     _parent = (WindowImpl)parent;
     _parent._disabledBy.Add(this);
     _parent.UpdateEnabled();
     SetWindowLongPtr(_hwnd, (int)WindowLongParam.GWL_HWNDPARENT, ((WindowImpl)parent)._hwnd);
     ShowWindow(_showWindowState);
 }
Esempio n. 3
0
 public void Hide()
 {
     if (_parent != null)
     {
         _parent._disabledBy.Remove(this);
         _parent.UpdateEnabled();
         _parent = null;
     }
     UnmanagedMethods.ShowWindow(_hwnd, UnmanagedMethods.ShowWindowCommand.Hide);
 }
Esempio n. 4
0
 public Win32StorageProvider(WindowImpl windowImpl)
 {
     _windowImpl = windowImpl;
 }
Esempio n. 5
0
 public Win32NativeControlHost(WindowImpl window)
 {
     Window = window;
 }
 public Win32NativeControlHost(WindowImpl window, bool useLayeredWindow)
 {
     _useLayeredWindow = useLayeredWindow;
     Window            = window;
 }