Exemplo n.º 1
0
        private void notifyMessange(string message, string hotennguoigui)
        {
            DevExpress.XtraBars.ToastNotifications.ToastNotification toastNotification1 = new DevExpress.XtraBars.ToastNotifications.ToastNotification();
            toastNotifiManager = new DevExpress.XtraBars.ToastNotifications.ToastNotificationsManager(this.components);
            toastNotifiManager.ApplicationId   = hotennguoigui;
            toastNotifiManager.ApplicationName = "CLB Tình nguyện Sinh viên Duy Tân";
            toastNotification1.Body            = message;
            toastNotification1.Header          = "Tin nhắn mới";
            toastNotification1.ID       = "faf7a0e2-d33b-46fb-8b40-6eb35e31192a";
            toastNotification1.Image    = global::CDIO_QLCLB.Properties.Resources.logo;
            toastNotification1.Template = DevExpress.XtraBars.ToastNotifications.ToastNotificationTemplate.ImageAndText03;
            toastNotification1.Body2    = "https://www.facebook.com/CLBTinhNguyenSinhVienDuyTan";
            toastNotifiManager.Notifications.AddRange(new DevExpress.XtraBars.ToastNotifications.IToastNotificationProperties[] { toastNotification1 });

            toastNotifiManager.ShowNotification(toastNotifiManager.Notifications[0]);
        }
Exemplo n.º 2
0
        public void toastnotifiManager()
        {
            caseData.txtRead        txtread = new caseData.txtRead();
            logical.GgSheetAPI      ggsheet = new logical.GgSheetAPI();
            string[]                idTable = txtread.readfile(0);
            IList <IList <Object> > values  = ggsheet.docfile(idTable[1], idTable[2]);

            for (int i = values.Count - 1; i >= 0; i--)
            {
                var row = values[i];
                if (row.Count < 13 && row.Count > 0)
                {
                    DateTime sigupTime = Convert.ToDateTime(row[0]);
                    DateTime datenow   = DateTime.Now;
                    TimeSpan timeSpan  = datenow - sigupTime;
                    if (timeSpan.TotalSeconds < 30)
                    {
                        DevExpress.XtraBars.ToastNotifications.ToastNotification toastNotification1 = new DevExpress.XtraBars.ToastNotifications.ToastNotification();
                        toastNotifiManager = new DevExpress.XtraBars.ToastNotifications.ToastNotificationsManager(this.components);
                        toastNotifiManager.ApplicationId   = row[0].ToString();
                        toastNotifiManager.ApplicationName = "CLB Tình nguyện Sinh viên Duy Tân";
                        toastNotification1.Body            = row[2].ToString() + " " + row[3].ToString();
                        toastNotification1.Header          = "Đăng ký thành viên mới";
                        toastNotification1.ID       = "faf7a0e2-d33b-46fb-8b40-6eb35e31192a";
                        toastNotification1.Image    = global::CDIO_QLCLB.Properties.Resources.logo;
                        toastNotification1.Template = DevExpress.XtraBars.ToastNotifications.ToastNotificationTemplate.ImageAndText03;
                        toastNotification1.Body2    = "https://www.facebook.com/CLBTinhNguyenSinhVienDuyTan";
                        toastNotifiManager.Notifications.AddRange(new DevExpress.XtraBars.ToastNotifications.IToastNotificationProperties[] { toastNotification1 });

                        toastNotifiManager.ShowNotification(toastNotifiManager.Notifications[0]);
                    }
                }
                else
                {
                    break;
                }
            }
        }