コード例 #1
0
        public System.Windows.Forms.DialogResult ShowDialog()
        {
            Show();
#if FAMISTUDIO_MACOS
            MacUtils.SetNSWindowAlwayOnTop(MacUtils.NSWindowFromGdkWindow(GdkWindow.Handle));
#endif

            while (result == System.Windows.Forms.DialogResult.None)
            {
                Application.RunIteration();
            }

            Hide();
#if FAMISTUDIO_MACOS
            MacUtils.RestoreMainNSWindowFocus();
#else
            PlatformUtils.ProcessPendingEvents();
#endif

            return(result);
        }
コード例 #2
0
        public System.Windows.Forms.DialogResult ShowDialog()
        {
            Show();

            if (topAlign || leftAlign)
            {
                GetPosition(out var x, out var y);
                if (leftAlign)
                {
                    x -= Allocation.Width;
                }
                if (topAlign)
                {
                    y -= Allocation.Height;
                }
                Move(x, y);
            }

#if FAMISTUDIO_MACOS
            MacUtils.SetNSWindowAlwayOnTop(MacUtils.NSWindowFromGdkWindow(GdkWindow.Handle));
#endif

            while (result == System.Windows.Forms.DialogResult.None)
            {
                Application.RunIteration();
            }

            Hide();

#if FAMISTUDIO_MACOS
            MacUtils.RestoreMainNSWindowFocus();
#else
            PlatformUtils.ProcessPendingEvents();
#endif

            return(result);
        }