Exemple #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();
            }));
        }
Exemple #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);
 }
Exemple #3
0
 public void Hide()
 {
     if (_parent != null)
     {
         _parent._disabledBy.Remove(this);
         _parent.UpdateEnabled();
         _parent = null;
     }
     UnmanagedMethods.ShowWindow(_hwnd, UnmanagedMethods.ShowWindowCommand.Hide);
 }
Exemple #4
0
 public Win32StorageProvider(WindowImpl windowImpl)
 {
     _windowImpl = windowImpl;
 }
 public Win32NativeControlHost(WindowImpl window)
 {
     Window = window;
 }
 public Win32NativeControlHost(WindowImpl window, bool useLayeredWindow)
 {
     _useLayeredWindow = useLayeredWindow;
     Window            = window;
 }