コード例 #1
0
ファイル: Clipboard.cs プロジェクト: charlieschmidt/PSmacOS
        public static bool Set(string value)
        {
            var clipboardManagedString = MarshalExtensions.NativeUtf8FromString(value);
            var ret = setClipboard(clipboardManagedString);

            return(ret);
        }
コード例 #2
0
ファイル: MessageBox.cs プロジェクト: charlieschmidt/PSmacOS
        public static ulong Show(double timeoutSeconds, MessageBox.Type type, string title, string message, string buttonOneLabel, string buttonTwoLabel, string buttonThreeLabel)
        {
            var titleManagedString            = MarshalExtensions.NativeUtf8FromString(title);
            var messageManagedString          = MarshalExtensions.NativeUtf8FromString(message);
            var buttonOneLabelManagedString   = MarshalExtensions.NativeUtf8FromString(buttonOneLabel);
            var buttonTwoLabelManagedString   = MarshalExtensions.NativeUtf8FromString(buttonTwoLabel);
            var buttonThreeLabelManagedString = MarshalExtensions.NativeUtf8FromString(buttonThreeLabel);

            ulong response = showMessageBox(timeoutSeconds, Convert.ToUInt64(type), titleManagedString, messageManagedString, buttonOneLabelManagedString, buttonTwoLabelManagedString, buttonThreeLabelManagedString);

            return(response);
        }