public BoundJavascriptObject4(NotificationPopup _frm) { frm = _frm; }
public static void Popup(string jsonMsg, int duration, FormAnimator.AnimationMethod animationMethod, FormAnimator.AnimationDirection animationDirection) { if (formDummy.InvokeRequired) { NotificationPanel.PopupCallback d = new NotificationPanel.PopupCallback(Popup); formDummy.Invoke(d, new object[] { jsonMsg, duration, animationMethod, animationDirection }); } else { try { NotificationMessage dictMsg = new NotificationMessage(jsonMsg); if (dictMsg.level == "" || dictMsg.contentAsWhole == "true") { if (duration == -1) { dictMsg.duration = duration; } var frmLong = (FormNotificationPanel)getFormByName("FormNotificationPanel"); if (!frmLong.Visible) { NotificationPopup.Popup(dictMsg.title, dictMsg.body, dictMsg.duration, animationMethod, animationDirection); } object[] param = new object[1]; var dictMsgFormatted = dictMsg.GetDictionaryFormatted(); param[0] = Globals.functions.Json_toJsonObj(dictMsgFormatted); NotificationPanel.updateLongNotification(param); } else { var datetime = dictMsg.GetFormattedDateTime(); if (duration == -1) { dictMsg.duration = duration; } NotificationPopup.Popup(dictMsg.title, dictMsg.body, dictMsg.duration, animationMethod, animationDirection); object[] param = new object[1]; var dictMsgFormatted = dictMsg.GetDictionaryFormatted(); param[0] = Globals.functions.Json_toJsonObj(dictMsgFormatted); NotificationPanel.updateLongNotification(param); } Globals.notification_client_numberNow++; } catch (Exception e) { Globals.log.Debug(e.ToString()); } } }
public static void PopupOld(string title, string body, int duration, FormAnimator.AnimationMethod animationMethod, FormAnimator.AnimationDirection animationDirection) { NotificationPopup toastNotification = new NotificationPopup(title, body, duration, animationMethod, animationDirection); toastNotification.Show(); }