Exemple #1
0
        /// <summary> Handle the ButtonPress event. </summary>
        /// <param name="source"> The widget, the ButtonPress event is assigned to. <see cref="XrwRectObj"/> </param>
        /// <param name="e"> The event data. <see cref="XawButtonEvent"/> </param>
        /// <remarks> Set XawButtonEvent. Set result to nonzero to stop further event processing. </remarks>
        void HandleMessageBoxButtonRelease(XrwRectObj source, XrwButtonEvent e)
        {
            if ((source is XrwCommand) && !(source as XrwCommand).Focused)
            {
                return;
            }

            XrwMessageBox messageBox = new XrwMessageBox(this, "Hallo an alle X11\nund Mono Develop\nFans da draußen!", "Mono Develop", X11Graphic.StockIcon.Information48TrueColor);

            ApplicationFramework.SetWmShellIcon(messageBox, APPICON_FILEPATH);

            this.AddTransientShell(messageBox);
            XrwDialogShell.Result result = messageBox.Run();

            if (result == XrwDialogShell.Result.OK)
            {
                Console.WriteLine(CLASS_NAME + "::HandleMessageBoxButtonRelease () Message box closed with: OK");
                ApplicationFramework.WriteStatus("Message box closed with: OK");
            }
            else
            {
                Console.WriteLine(CLASS_NAME + "::HandleMessageBoxButtonRelease () Message box closed with: Cancel");
                ApplicationFramework.WriteStatus("Message box closed with: Cancel");
            }

            e.Result = 1;
        }
Exemple #2
0
        /// <summary> Handle the ButtonPress event. </summary>
        /// <param name="source"> The widget, the ButtonPress event is assigned to. <see cref="XrwRectObj"/> </param>
        /// <param name="e"> The event data. <see cref="XawButtonEvent"/> </param>
        /// <remarks> Set XawButtonEvent. Set result to nonzero to stop further event processing. </remarks>
        void HandleCbCancelButtonRelease(XrwRectObj source, XrwButtonEvent e)
        {
            this.DefaultClose();

            // Stop event processing here!
            e.Result = 1;

            _result = XrwDialogShell.Result.Cancel;
            this.OnEnd(_result);
        }
Exemple #3
0
        /// <summary> Handle the ClientMessage event. </summary>
        /// <param name="e"> The event data. <see cref="XrwClientMessageEvent"/> </param>
        /// <remarks> Set XawClientMessageEvent. Set result to nonzero to stop further event processing. </remarks>
        public override void OnWmClose(XrwClientMessageEvent e)
        {
            base.OnWmClose(e);
            this.DefaultClose();

            // Stop event processing here!
            e.Result = 1;

            _result = XrwDialogShell.Result.Cancel;
            this.OnEnd(_result);
        }