Jump to content

McNotificator. Сообщение с гиперлинком


Recommended Posts

Собственно пытаюсь повторить такое:

image.png.35b4d9fc0448ecf4149bf8d7fcdd7540.png

 

само сообщение нотифай со значком

UIntPtr notifi = McNotificator.CreateMessage("Не найдена лицензия", NotificationEnumMgd.neHint);

а вот как подсунуть гиперссылку...

нашел такое, но куда это????

 IMcNotificatorSysLinkWindow link = McNotificator.CreateSysLink("https://forum.nanocad.ru/index.php?/discover/unread/&stream_date_type=relative&before", MainCommand);

но как скрестить коня и трепетную лань пока не понял...

------

еще в нано есть и такое

image.png.fa7aacf2731f8261e1e1ab449205bd5a.png

но этот вариант совсем не вариант

-------------------

собственно вопрос, как повторить первую картинку поста? Как расширенно управлять нотифай?

добавлено через 2 минуты

мой левел слишком низок, и я недостаточно копал..

Кто умеет, задайте пожалуйста направление, куда копать

Edited by doctorraz
Link to comment
Share on other sites

			IMcNotificatorSysLinkWindow link = McNotificator.CreateSysLink("Text <A>https://forum.nanocad.ru/index.php?/discover/unread/&stream_date_type=relative&before</A> text", OnLink);
			McNotificator.CreateMessage("Tip", NotificationEnumMgd.neHint, UIntPtr.Zero, link, link);

 

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

  • doctorraz changed the title to [Решено] McNotificator. Сообщение с гиперлинком

@sea спасибо!

-----------------

коль в Action ничего передать нельзя

Спойлер
using System;
using System.Diagnostics;

using Multicad.AplicationServices;

using Rtm = Teigha.Runtime;

namespace drz.Test
{
    class NotifaiMessag
    {
        private string sURL { get; set; }

        public NotifaiMessag(string sTextMsg, string sTextURL, NotificationEnumMgd nfe, string _sURL)
        {
            sURL = _sURL;
            string sURLcomplit = sTextURL
                                        + " "
                                        + "<A>"
                                        + _sURL
                                        + "</A>";

            IMcNotificatorSysLinkWindow link = McNotificator.CreateSysLink
                (
                sURLcomplit,
                OnLink
                );
             var noti = McNotificator.CreateMessage(sTextMsg, nfe, UIntPtr.Zero, link, link);
             //noti = McNotificator.CreateMessage(sTextMsg, nfe, UIntPtr.Zero, link,link);
        }

        public void OnLink()
        {
            Process.Start(sURL);
        }
    }
    class CMD
    {
        [Rtm.CommandMethod("нотифай", Rtm.CommandFlags.Session)]
        public void Noti()
        {
            Action aCom;//КАК ПЕРЕДАТЬ???

            string sTextMsg = "Text";

            string sTextURL = "URL";

            NotificationEnumMgd nfe = NotificationEnumMgd.neSimple;

            string sURL = @"https://forum.nanocad.ru/index.php?/discover/unread/&stream_date_type=relative&before";

            NotifaiMessag noti = new NotifaiMessag(sTextMsg, sTextURL, nfe, sURL);
        }
    }
}

 

 

в принципе разные OnClick можно реализовать перегрузками класса, но 

всежэж интересует вопрос... можно ли передать имя Action(метода) в класс?

  • Like 1
Link to comment
Share on other sites

  • doctorraz changed the title to McNotificator. Сообщение с гиперлинком

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Tell a friend

    Love Официальный форум компании Нанософт? Tell a friend!
×
×
  • Create New...