Esempio n. 1
0
        static void _desktopAlert_DesktopAlertLinkClicked(object sender, DesktopAlertLinkClickedEventArgs e)
        {
            DataTable lDataTable = new TaskSchedulesDAO().GetAppointmentById((int)e.WindowInfo.Data);

            object rawAppointmentData = lDataTable.Rows[0][1];

            if (rawAppointmentData is byte[] == false)
            {
                return;
            }

            byte[]      appointmentBytes = rawAppointmentData as byte[];
            Appointment appointment      = Appointment.FromBytes(appointmentBytes);

            MessageBox.Show(
                appointment.StartDateTime.AddMinutes(1).ToString() + Environment.NewLine + Environment.NewLine + appointment.Description,
                appointment.Subject,
                MessageBoxButtons.OK,
                MessageBoxIcon.Information);
        }
Esempio n. 2
0
        private void OnDesktopAlertLinkClicked(object sender, DesktopAlertLinkClickedEventArgs e)
        {
            e.LinkClickedArgs.OpenLink = false;
            object alertItem = null;

            if (e.WindowInfo != null)
            {
                alertItem = e.WindowInfo.Data;
            }

            var newsItem = alertItem as INewsItem;
            var dwldItem = alertItem as DownloadItem;

            switch (e.LinkType)
            {
            case DesktopAlertLinkType.Footer:
                // navigate to feed options dialog
                if (newsItem != null || dwldItem != null)
                {
                    try
                    {
                        RaiseNotificationAction(new NotifierActionEventArgs(NotifierAction.ShowFeedProperties)
                        {
                            NewsFeed = newsItem != null ? newsItem.Feed : dwldItem.OwnerFeed
                        });
                    }
                    catch { }
                }
                break;

            case DesktopAlertLinkType.Caption:
                // navigate to feed
                if (newsItem != null || dwldItem != null)
                {
                    try
                    {
                        RaiseNotificationAction(new NotifierActionEventArgs(NotifierAction.ActivateFeed)
                        {
                            NewsFeed = newsItem != null ? newsItem.Feed : dwldItem.OwnerFeed
                        });
                    }
                    catch { }
                }
                break;

            case DesktopAlertLinkType.Text:
                // navigate to feed item
                if (newsItem != null)
                {
                    try
                    {
                        RaiseNotificationAction(new NotifierActionEventArgs(NotifierAction.ActivateItem)
                        {
                            NewsItem = newsItem
                        });
                    }
                    catch { }
                }
                else if (dwldItem != null)
                {
                    try
                    {
                        RaiseNotificationAction(new NotifierActionEventArgs(NotifierAction.ActivateItem)
                        {
                            DownloadItem = dwldItem
                        });
                    }
                    catch { }
                }
                break;
            }
        }
Esempio n. 3
0
 static void _desktopAlert_SupportDesktopAlertLinkClicked(object sender, DesktopAlertLinkClickedEventArgs e)
 {
     System.Diagnostics.Process.Start("http://www.laytontechnology.com/index.php?Itemid=94");
 }
Esempio n. 4
0
 void desktopAlertDesktopAlertLinkClicked(object sender, DesktopAlertLinkClickedEventArgs e)
 {
     var dto = e.WindowInfo.Data as StampaBatchDTO;
     if (dto != null)
         getStampeBatchUIService().ShowElaborazione(dto.Key, dto.IdEsercizio, dto.DataSource, dto.Parameters);
 }