Exemplo n.º 1
0
        NotifyUser()
        {
            NotificationUserSettings oNotificationUserSettings =
                new NotificationUserSettings();

            if (!oNotificationUserSettings.TextWrapWillBeTurnedOff)
            {
                // The user doesn't want to be notified.

                return(true);
            }

            Boolean bReturn = true;

            const String Message =
                "To speed up the import, text wrapping will be turned off in most"
                + " of the NodeXL workbook.  Do you want to continue with the"
                + " import?"
            ;

            NotificationDialog oNotificationDialog = new NotificationDialog(
                "Text Wrapping", SystemIcons.Warning, Message);

            if (oNotificationDialog.ShowDialog() != DialogResult.Yes)
            {
                bReturn = false;
            }

            if (oNotificationDialog.DisableFutureNotifications)
            {
                oNotificationUserSettings.TextWrapWillBeTurnedOff = false;
                oNotificationUserSettings.Save();
            }

            return(bReturn);
        }
Exemplo n.º 2
0
    ShowLayoutTypeIsNullNotification()
    {
        AssertValid();

        NotificationUserSettings oNotificationUserSettings =
            new NotificationUserSettings();

        if (!oNotificationUserSettings.LayoutTypeIsNull)
        {
            // The user doesn't want to be notified.

            return (true);
        }

        Boolean bReturn = true;

        const String Message =
            "The Layout is set to None.  If the graph has never been laid"
            + " out, all the vertices will be placed at the upper-left corner"
            + " of the graph pane."
            + "\r\n\r\n"
            + "If you want to lay out the graph, click No and select a"
            + " different Layout.  "
            + HowToSetLayoutTypeMessage
            + "\r\n\r\n"
            + "Do you want to read the workbook?"
            ;

        NotificationDialog oNotificationDialog = new NotificationDialog(
            "Layout is None", SystemIcons.Warning, Message);

        if (oNotificationDialog.ShowDialog() != DialogResult.Yes)
        {
            bReturn = false;
        }

        if (oNotificationDialog.DisableFutureNotifications)
        {
            oNotificationUserSettings.LayoutTypeIsNull = false;
            oNotificationUserSettings.Save();
        }

        return (bReturn);
    }
    NotifyUser()
    {
        NotificationUserSettings oNotificationUserSettings =
            new NotificationUserSettings();

        if (!oNotificationUserSettings.TextWrapWillBeTurnedOff)
        {
            // The user doesn't want to be notified.

            return (true);
        }

        Boolean bReturn = true;

        const String Message =
            "To speed up the import, text wrapping will be turned off in most"
            + " of the NodeXL workbook.  Do you want to continue with the"
            + " import?"
            ;

        NotificationDialog oNotificationDialog = new NotificationDialog(
            "Text Wrapping", SystemIcons.Warning, Message);

        if (oNotificationDialog.ShowDialog() != DialogResult.Yes)
        {
            bReturn = false;
        }

        if (oNotificationDialog.DisableFutureNotifications)
        {
            oNotificationUserSettings.TextWrapWillBeTurnedOff = false;
            oNotificationUserSettings.Save();
        }

        return (bReturn);
    }