Пример #1
0
        public static DialogResult Show(string title, string message, DialogBoxIcon icon, DialogBoxButtons buttons)
        {
            if (ThundershockPlatform.IsPlatform(Platform.Windows))
            {
                var mainWindow = Process.GetCurrentProcess().MainWindowHandle;

                var type = icon switch
                {
                    DialogBoxIcon.Information => MB_ICONINFORMATION,
                    DialogBoxIcon.Warning => MB_ICONWARNING,
                    DialogBoxIcon.Question => MB_ICONQUESTION,
                    DialogBoxIcon.Error => MB_ICONSTOP,
                    _ => MB_ICONINFORMATION
                } | buttons switch
Пример #2
0
        public static FileSystem FromHostOS()
        {
            var node = null as Node;

            if (ThundershockPlatform.IsPlatform(Platform.Windows))
            {
                node = new WindowsMasterNode();
            }
            else
            {
                node = new UnixMasterNode();
            }

            return(new FileSystem(node));
        }