private void runNotification(string msg, NotificationType type) { if (_growl_executable == null) locateGrowlExecutable(); var bleh = Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).AbsolutePath); string icon = bleh; switch (type) { case NotificationType.Green: icon += "/Icons/circleWIN.png"; break; case NotificationType.Yellow: icon += "/Icons/circleWAIL.png"; break; case NotificationType.Red: icon += "/Icons/circleFAIL.png"; break; } string args; if (Environment.OSVersion.Platform == PlatformID.MacOSX) args = string.Format("--image \"{0}\" --title \"AutoTest.NET\" --message \"{1}\"", icon, msg); else args = string.Format("/t:\"AutoTest.NET\" /i:\"{0}\" \"{1}\"", icon, msg); var process = new Process(); process.StartInfo = new ProcessStartInfo(_growl_executable, args); process.StartInfo.CreateNoWindow = true; process.Start(); process.WaitForExit(); }
public void Notify(string title, string message = "", NotificationType notificationType = NotificationType.None) { Parallel.ForEach(notificationPlugins, (notificationPlugin) => { notificationPlugin.Notify(title, message, notificationType); }); }
/// <summary> /// Notify immediately using the type of notification /// </summary> /// <param name="noticeText"></param> /// <param name="notificationType"></param> public static void NotifyNow(string noticeText, NotificationType notificationType) { switch (notificationType) { case NotificationType.Toast: //TODO: Make this hit and deserialize a real XML file string toast = string.Format("<toast>" + "<visual>" + "<binding template = \"ToastGeneric\" >" + "<image placement=\"appLogoOverride\" src=\"Assets\\CompanionAppIcon44x44.png\" />" + "<text>{0}</text>" + "</binding>" + "</visual>" + "</toast>", noticeText); XmlDocument toastDOM = new XmlDocument(); toastDOM.LoadXml(toast); ToastNotificationManager.CreateToastNotifier().Show( new ToastNotification(toastDOM)); break; case NotificationType.Tile: break; default: break; } }
private string buildNoticeLink(NotificationType noticeType, int entityId, EntityType entityType) { string result = ""; switch (entityType) { case EntityType.Project: switch (noticeType) { case NotificationType.BidSubmitted: result = string.Format("/Project/{0}/Bid/Received", entityId); break; case NotificationType.InvitationRequest: result = string.Format("/Project/{0}/Invitation/Requests", entityId); break; case NotificationType.InvitationResponse: case NotificationType.InvitationToBid: case NotificationType.ProjectChange: result = string.Format("/Project/Details/{0}", entityId); break; } break; case EntityType.Company: switch (noticeType) { case NotificationType.ConnectionAccepted: case NotificationType.RequestToConnect: result = string.Format("/Company/Profile/{0}", entityId); break; } break; } return result; }
/// <summary> /// Schedule a notification of the specified date and type. /// </summary> /// <param name="noticeText"></param> /// <param name="dueTime"></param> /// <param name="notificationType"></param> public static void ScheduleNotification(string noticeText, DateTime dueTime, NotificationType notificationType) { switch (notificationType) { case NotificationType.Toast: string toast = string.Format("<toast>" + "<visual>" + "<binding template = \"ToastGeneric\" >" + "<image placement=\"appLogoOverride\" src=\"Assets\\CompanionAppIcon44x44.png\" />" + "<text>{0}</text>" + "</binding>" + "</visual>" + "</toast>", noticeText); XmlDocument toastDOM = new XmlDocument(); toastDOM.LoadXml(toast); ScheduledToastNotification toastNotification = new ScheduledToastNotification(toastDOM, dueTime) { Id = "Note_Reminder" }; ToastNotificationManager.CreateToastNotifier().AddToSchedule(toastNotification); break; case NotificationType.Tile: //TODO: Tile updates throw new NotImplementedException(); default: break; } }
/// <summary> /// Constructor with message and type /// </summary> /// <param name="msg"></param> /// <param name="title"></param> /// <param name="type"></param> public NotificationMessage(string msg, string title, NotificationType type) : this() { Message = msg; Type = type; Title = title; }
public NotificationModel(GemManager gemManager, GemRuleViewModel item, NotifierRule rule, String message, DateTime timeStamp, NotificationType notificationType) { this.DataId = 0; this.IsGemNotification = true; this.NotificationType = notificationType; this.TimeStamp = timeStamp; this.Message = message; if (gemManager != null) { this.BuyMoney = gemManager.BuyGemPriceMoney; this.SellMoney = gemManager.BuyGoldPriceMoney; } this.Rule = rule; if (NotificationType == NotificationType.BuyGems) { } else if (NotificationType == NotificationType.BuyGold) { this.DataId = -1; } Name = message; }
private void runNotification(string msg, NotificationType type) { if (_growl_executable == null) locateGrowlExecutable(); var bleh = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); string icon = bleh; switch (type) { case NotificationType.Green: icon = Path.Combine(icon, Path.Combine("Icons", "circleWIN.png")); break; case NotificationType.Yellow: icon = Path.Combine(icon, Path.Combine("Icons", "circleWAIL.png")); break; case NotificationType.Red: icon = Path.Combine(icon, Path.Combine("Icons", "circleFAIL.png")); break; } //icon = icon.Replace(" ", "%20"); string args; if (OS.IsOSX) args = string.Format("--image \"{0}\" --title \"AutoTest.Net\" --message \"{1}\"", icon, msg); else args = string.Format("/t:\"AutoTest.Net\" /i:\"{0}\" \"{1}\"", icon, msg); DebugLog.Debug.WriteDebug("Sending Growl notification: {0} {1}", _growl_executable, args); var process = new Process(); process.StartInfo = new ProcessStartInfo(_growl_executable, args); process.StartInfo.CreateNoWindow = true; process.Start(); }
public override void RegisterNotificationTypes (NotificationType _notificationTypes) { base.RegisterNotificationTypes(_notificationTypes); // Native call registerNotificationTypes((int)_notificationTypes); }
public DefaultNotification(NotificationType type, string title, string text) { _type = type; _title = title; _text = text; _timeout = DateTime.Now + DEFAULT_NOTIFICATIONS_TIMEOUT; }
public EventNotificationStatus ProcessEvent(TeamFoundationRequestContext requestContext, NotificationType notificationType, object notificationEventArgs, out int statusCode, out string statusMessage, out ExceptionPropertyCollection properties) { statusCode = 0; properties = null; statusMessage = string.Empty; try { if (notificationType == NotificationType.DecisionPoint && notificationEventArgs is CheckinNotification) { var args = notificationEventArgs as CheckinNotification; if (args.PolicyOverrideInfo.PolicyFailures.Length > 0) { statusMessage = "Policy Overriding is not allowed."; return EventNotificationStatus.ActionDenied; } } return EventNotificationStatus.ActionPermitted; } catch (Exception ex) { // log the error and fail the check in statusMessage = "Error in plugin '" + this.Name + "', error details: " + ex; EventLog.WriteEntry("TFS Service", statusMessage, EventLogEntryType.Error); return EventNotificationStatus.ActionDenied; } }
public PushNotificationSender(string chanellURI, NotificationType type) { _channelURI = chanellURI; _notificationType = type; listOfNotificationsForSending = new List<Dictionary<string, string>>(); WNSAuthentication.Instance.OnAuthenticated += OnAuthenticated; }
public async void SendNotification(string channelURI, string payload, NotificationType type = NotificationType.Raw) { if (WNSAuthentication.Instance.oAuthToken.AccessToken != null && !WNSAuthentication.Instance.IsRefreshInProgress) { using (var client = new WebClient()) { SetHeaders(type, client); try { await client.UploadStringTaskAsync(new Uri(channelURI), payload); } catch (WebException webException) { if (webException?.Response != null) HandleError(((HttpWebResponse)webException.Response).StatusCode, channelURI, payload); Debug.WriteLine(String.Format("Failed WNS authentication. Error: {0}", webException.Message)); } catch (Exception) { HandleError(HttpStatusCode.Unauthorized, channelURI, payload); } } } else { StoreNotificationForSending(channelURI, payload); } }
public void Notify(string title, string message = "", NotificationType notificationType = NotificationType.None) { switch (notificationType) { case NotificationType.Information: System.Console.ForegroundColor = ConsoleColor.Cyan; break; case NotificationType.Success: System.Console.ForegroundColor = ConsoleColor.Green; break; case NotificationType.Error: System.Console.ForegroundColor = ConsoleColor.Red; break; case NotificationType.Warning: System.Console.ForegroundColor = ConsoleColor.DarkMagenta; break; default: System.Console.ForegroundColor = ConsoleColor.White; break; } Console.WriteLine(title); System.Console.ForegroundColor = ConsoleColor.White; Console.WriteLine(message); Console.WriteLine(); Console.ResetColor(); }
public async Task CanOnlyEnterNumbersLessThanSystemStart(NotificationType notificationType, UKCompetentAuthority competentAuthority, int number) { var notification = await factory.CreateLegacy(notificationType, competentAuthority, number); Assert.IsType<NotificationApplication>(notification); }
public NotificationItem(NotificationType notificationType, string customMessage) { if (string.IsNullOrWhiteSpace(customMessage)) throw new ArgumentException(); Type = notificationType; _customMessage = customMessage; }
public static void ShowMessageNotification(string header, string body, int timeout, int width, int height, NotificationType type, TimerEndedHandler thandler) { ShowSvgNotification (null, NotificationSource.Text, header, body, timeout, width, height, type, thandler); }
public async Task<WnsPushResult> PushAsync(WnsAuthentication authentication, string uri, XmlDocument doc, NotificationType type) { // create... var content = new StringContent(doc.OuterXml); content.Headers.ContentType.MediaType = "text/xml"; // if... if(type == NotificationType.Toast) content.Headers.Add("X-WNS-Type", "wns/toast"); else if (type == NotificationType.Tile) content.Headers.Add("X-WNS-Type", "wns/tile"); else if (type == NotificationType.Badge) content.Headers.Add("X-WNS-Type", "wns/badge"); else if (type == NotificationType.Raw) content.Headers.Add("X-WNS-Type", "wns/badge"); else throw new NotSupportedException(string.Format("Cannot handle '{0}'.", type)); // ok... var client = authentication.GetHttpClient(); var response = await client.PostAsync(uri, content); // what happened? if (response.StatusCode == HttpStatusCode.OK) { // what happened? var all = response.Headers.Where(v => v.Key == "X-WNS-NOTIFICATIONSTATUS").FirstOrDefault(); if(string.IsNullOrEmpty(all.Key)) throw new InvalidOperationException("'X-WNS-NOTIFICATIONSTATUS' header not returned."); return (WnsPushResult)Enum.Parse(typeof(WnsPushResult), all.Value.First(), true); } else throw await WnsAuthenticator.CreateRequestException("Failed to post notification.", response); }
/// <summary> /// Constructs a new instance of Notification. /// </summary> /// <param name="type">Notification type.</param> /// <param name="title">Title.</param> /// <param name="message">Message.</param> public Notification( NotificationType type, string title, string message ) { _Type = type; _Title = title; _Message = message; _DateTime = DateTime.Now; }
public EventNotificationStatus ProcessEvent(TeamFoundationRequestContext requestContext, NotificationType notificationType, object notificationEventArgs, out int statusCode, out string statusMessage, out ExceptionPropertyCollection properties) { statusCode = 0; properties = null; statusMessage = string.Empty; try { if (notificationType == NotificationType.Notification && notificationEventArgs is CheckinNotification) { var checkinNotification = notificationEventArgs as CheckinNotification; if (ShouldMergeItemsIfNecessary(requestContext, checkinNotification)) { var changeset = requestContext.GetChangeset(checkinNotification.Changeset); if (changeset != null) { TfsTeamProjectCollection impersonatedCollection = requestContext.GetImpersonatedCollection(changeset.Committer); MergeWorkItems(impersonatedCollection, changeset.ChangesetId); } } } } catch (Exception ex) { TeamFoundationApplicationCore.LogException("Inmeta.TFS.MergeWorkItemEventHandler encountered an exception", ex); } return EventNotificationStatus.ActionPermitted; }
/// <summary> /// Adds a notification to the container. /// </summary> /// <param name="notificationType">The notification type</param> /// <param name="header">The header text of the notification</param> /// <param name="message">The message text of the notification</param> public void AddNotification(NotificationType notificationType, string header, string message) { var notification = new Notification(header, message); NotificationList.Visibility = Visibility.Visible; if (NotificationList.Children.Count == MaxNotifications) { RemoveNotification((Notification)NotificationList.Children[0]); } switch (notificationType) { case NotificationType.Info: notification.Color = _informationColor; break; case NotificationType.Warning: notification.Color = _warningColor; break; case NotificationType.Error: notification.Color = _errorColor; break; default: throw new ArgumentOutOfRangeException("notificationType"); } NotificationList.Children.Add(notification); notification.Completed += OnNotificationCompleted; }
public override void RegisterNotificationTypes (NotificationType _notificationTypes) { base.RegisterNotificationTypes(_notificationTypes); // Registering m_notificationCenter.RegisterNotificationTypes(_notificationTypes); }
protected Notification(int accountID, NotificationType type) { AccountID = accountID; TimeStamp = DateTime.Now; Type = type; Status = ReadStatus.Unread; }
public ScreenNotification(NotificationType type, string txt, DateTime dateTime, object obj) { _type = type; _txt = txt; _dateTime = dateTime; _obj = obj; }
public NotificationEventArgs(int id, HotItem item, NotifierRule rule, NotificationType type) { this.Id = id; this.Item = item; this.Rule = rule; this.NotificationType = type; }
public async Task CreateNewNotification(ObjectId notifiedUserId, NotificationType type, ObjectId userId, ObjectId? tweetId) { var existingUserNotification = await _repository.UserNotifications.Find(n => n.UserId == notifiedUserId).FirstOrDefaultAsync(); var newNotification = new Notification(); newNotification.Type = (int)type; newNotification.UserId = userId; newNotification.CreatedOn = DateTime.Now; if (tweetId.HasValue) newNotification.TweetId = tweetId.Value; if (existingUserNotification == null) { var userNotification = new UserNotifications(); userNotification.UserId = notifiedUserId; userNotification.Notifications = new List<Notification>() { newNotification }; await _repository.UserNotifications.InsertOneAsync(userNotification); } else { existingUserNotification.Notifications.Add(newNotification); await _repository.UserNotifications.ReplaceOneAsync(n => n.Id == existingUserNotification.Id, existingUserNotification); } }
public NotificationMessage(NotificationType type, params String[] parts) : base(P3bbleEndpoint.Notification) { _type = type; _parts = parts.ToList(); _length = 0; }
public void NotifyNewArrival(TwitterStatus status, NotificationType type, string explicitSoundSource) { if (!_proxy.NotifyNewArrival(status, type, explicitSoundSource) && this.Next != null) { this.Next.NotifyNewArrival(status, type, explicitSoundSource); } }
public static void ShowNotification( [NotNull] this IServiceProvider provider, [NotNull] string text, NotificationType notificationType) { provider.ShowNotification(null, text, notificationType); }
public void NotifyNewArrival(TwitterStatus status, NotificationType type, string explicitSoundSource) { if (!_proxy.NotifyNewArrival(status, type, explicitSoundSource)) { Next?.NotifyNewArrival(status, type, explicitSoundSource); } }
internal static void CreateAndSave(string contentPath, int creatorId, int lastModifierId, NotificationType type, string who, DateTime?when) { if (type != NotificationType.MovedFrom && type != NotificationType.MovedTo) { if (!IsSubscriptionExist(contentPath)) { return; } } var @event = new Event { ContentPath = contentPath, NotificationType = type, Who = who, CreatorId = creatorId, LastModifierId = lastModifierId, }; if (when.HasValue) { @event.When = when.Value; } @event.Save(); }
private void ShowNotification(string title, string msg, NotificationType nt) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Alert", "pnotifySuccess('" + title + "','" + msg + "','" + nt.ToString() + "');", true); }
protected override void NotifyUser(string title, string message, NotificationType type) { m_toRumps.WriteNoWait(JsonConvert.SerializeObject(new { Action = "notification", Title = title, Message = message })); }
/// <summary> /// Remove all notifications for the specified notification type. /// </summary> /// <param name="notificationType">The notification type</param> public void ClearNotifications(NotificationType notificationType) { Notifications[notificationType].Clear(); }
/// <summary> /// Validate notification type. /// </summary> /// <param name="providedNotificationType">Provided notification type</param> /// <param name="expectedNotificationType">expected notification type</param> /// <returns>true if notification type is valid, false otherwise</returns> private bool IsNotificationTypeValid(NotificationType providedNotificationType, NotificationType expectedNotificationType) { if (providedNotificationType != expectedNotificationType) { Logger.Log(LogLevel.ERROR, $@"Invalid notification type provided for ""{expectedNotificationType}"" callback."); return(false); } return(true); }
public int GetNotificationCount(NotificationType notificationType) { return(Notifications.ContainsKey(notificationType) ? Notifications[notificationType].Count : 0); }
public States(NotificationType context, FeatureSet supportedFeatures) : base(context, supportedFeatures) { }
public GetTemplateByNotificationTypeQuery(NotificationType notificationType) { NotificationType = notificationType; }
/// <summary> /// Initializes a new instance of the <see cref="ToastPopUp" /> class. /// </summary> /// <param name="title">The title.</param> /// <param name="textInlines">The text inlines.</param> /// <param name="hyperlinkText">The hyperlink text.</param> /// <param name="notificationType">Type of the notification.</param> /// <param name="hyperlinkObjectForRaisedEvent">The hyperlink object for raised event.</param> public ToastPopUp(string title, List <Inline> textInlines, string hyperlinkText, NotificationType notificationType, object hyperlinkObjectForRaisedEvent = null) : this(title, notificationType) { this.HyperlinkObjectForRaisedEvent = hyperlinkObjectForRaisedEvent; this.TextBoxShortDescription.Inlines.AddRange(textInlines); this.SetHyperLinkButton(hyperlinkText); }
public static void CreateAndSave(string contentPath, int creatorId, int lastModifierId, NotificationType type, string who) { CreateAndSave(contentPath, creatorId, lastModifierId, type, who, null); }
/// <summary> /// Initializes a new instance of the <see cref="ToastPopUp" /> class. /// </summary> /// <param name="title">The title.</param> /// <param name="text">The text.</param> /// <param name="notificationType">Type of the notification.</param> public ToastPopUp(string title, string text, NotificationType notificationType) : this(title, notificationType) { this.TextBoxShortDescription.Text = text; }
public BaseAdaptiveElement(NotificationType context, FeatureSet supportedFeatures) { Context = context; SupportedFeatures = supportedFeatures; }
/// <summary> /// Initializes a new instance of the <see cref="PagingPolicyStepRule" /> class. /// </summary> /// <param name="index">index.</param> /// <param name="type">type.</param> /// <param name="contact">contact.</param> public PagingPolicyStepRule(decimal index = default(decimal), NotificationType type = default(NotificationType), Contact contact = default(Contact)) { this.Index = index; this.Type = type; this.Contact = contact; }
/// <summary> /// Initializes a new instance of the <see cref="ToastPopUp" /> class. /// </summary> /// <param name="title">The title.</param> /// <param name="text">The text.</param> /// <param name="hyperlinkText">The hyperlink text.</param> /// <param name="notificationType">Type of the notification.</param> /// <param name="hyperlinkObjectForRaisedEvent">The hyperlink object for raised event.</param> public ToastPopUp(string title, string text, string hyperlinkText, NotificationType notificationType, object hyperlinkObjectForRaisedEvent = null) : this(title, text, notificationType) { this.HyperlinkObjectForRaisedEvent = hyperlinkObjectForRaisedEvent; this.SetHyperLinkButton(hyperlinkText); }
private void Notify(string message, NotificationType type) => _notifications.Add(new Notification(type, message));
public ToastNotificationLaunchArguments(NotificationType type) { Type = type; Arguments = new Dictionary <ArgumentType, object>(); }
/// <summary> /// <para>Register to receive local and remote notifications of the specified types from a provider via Apple Push Service.</para> /// </summary> /// <param name="notificationTypes">Notification types to register for.</param> /// <param name="registerForRemote">Specify true to also register for remote notifications.</param> public static void RegisterForNotifications(NotificationType notificationTypes) { NotificationServices.RegisterForNotifications(notificationTypes, true); }
public static void ShowToast(this IDialogService dialogService, string message, NotificationType notificationType) { var parameters = new DialogParameters { { "message", message }, { "notificationType", notificationType } }; dialogService.Show("ToastDialog", parameters, null, "ToastDialogWindow"); }
protected abstract void NotifyUser(string title, string message, NotificationType type);
public static extern void RegisterForNotifications(NotificationType notificationTypes, bool registerForRemote);
private AddNotificationRequest BuildNewUserNotificationRequest(MessageType messageType, NotificationType notificationType) { var parameters = new Dictionary <string, string> { { "name", $"{Faker.Name.FullName()}" }, { "username", $"{Guid.NewGuid()}@intautomation.com" }, { "random password", "inttestpassword!" } }; return(AddNotificationRequestBuilder.BuildRequest(messageType, notificationType, parameters)); }
private Notification(NotificationType type, Gig gig) { Type = type; Gig = gig ?? throw new ArgumentNullException("gig"); DateTime = DateTime.Now; }
public abstract void OnNotify(object o, NotificationType n);
/// <summary> /// Filters a <see cref="ReadOnlyNotificationCollection"/> for a given <see cref="NotificationType"/>. /// </summary> /// <param name="notifications">The <see cref="ReadOnlyNotificationCollection"/></param> /// <param name="filter">The new <see cref="NotificationType"/> by which to filter. Can be combined using the bitwise OR operator.</param> /// <returns>The filtered collection.</returns> /// <remarks>The new filter parameter will function as an OR parameter.</remarks> public static ReadOnlyNotificationCollection Filter(this ReadOnlyNotificationCollection notifications, NotificationType filter) { var collection = new ReadOnlyNotificationCollection(notifications, notifications.Auth); collection.AddFilter(new[] { filter }); return(collection); }
public override R <T[], CommandError> SendHybrid <T>(Ts3Command com, NotificationType type) => SendNotifyCommand(com, type).UnwrapNotification <T>();
private void AddNotificationTypes() { var actions = new List <NotificationTypeAction>(); // DesktopModule should not be null var deskModuleId = DesktopModuleController.GetDesktopModuleByFriendlyName("Social Groups").DesktopModuleID; // GroupPendingNotification var type = new NotificationType { Name = "GroupPendingNotification", Description = "Group Pending Notification", DesktopModuleId = deskModuleId }; if (NotificationsController.Instance.GetNotificationType(type.Name) == null) { actions.Add(new NotificationTypeAction { NameResourceKey = "Approve", DescriptionResourceKey = "ApproveGroup", APICall = "API/SocialGroups/ModerationService/ApproveGroup", }); actions.Add(new NotificationTypeAction { NameResourceKey = "RejectGroup", DescriptionResourceKey = "RejectGroup", APICall = "API/SocialGroups/ModerationService/RejectGroup", }); NotificationsController.Instance.CreateNotificationType(type); NotificationsController.Instance.SetNotificationTypeActions(actions, type.NotificationTypeId); } // GroupApprovedNotification type = new NotificationType { Name = "GroupApprovedNotification", Description = "Group Approved Notification", DesktopModuleId = deskModuleId }; if (NotificationsController.Instance.GetNotificationType(type.Name) == null) { NotificationsController.Instance.CreateNotificationType(type); } // GroupCreatedNotification type = new NotificationType { Name = "GroupCreatedNotification", Description = "Group Created Notification", DesktopModuleId = deskModuleId }; if (NotificationsController.Instance.GetNotificationType(type.Name) == null) { actions.Clear(); actions.Add(new NotificationTypeAction { NameResourceKey = "RejectGroup", DescriptionResourceKey = "RejectGroup", ConfirmResourceKey = "DeleteItem", APICall = "API/SocialGroups/ModerationService/RejectGroup", }); NotificationsController.Instance.CreateNotificationType(type); NotificationsController.Instance.SetNotificationTypeActions(actions, type.NotificationTypeId); } // GroupRejectedNotification type = new NotificationType { Name = "GroupRejectedNotification", Description = "Group Rejected Notification", DesktopModuleId = deskModuleId }; if (NotificationsController.Instance.GetNotificationType(type.Name) == null) { NotificationsController.Instance.CreateNotificationType(type); } // GroupMemberPendingNotification type = new NotificationType { Name = "GroupMemberPendingNotification", Description = "Group Member Pending Notification", DesktopModuleId = deskModuleId }; if (NotificationsController.Instance.GetNotificationType(type.Name) == null) { actions.Clear(); actions.Add(new NotificationTypeAction { NameResourceKey = "Approve", DescriptionResourceKey = "ApproveGroupMember", ConfirmResourceKey = string.Empty, APICall = "API/SocialGroups/ModerationService/ApproveMember", }); actions.Add(new NotificationTypeAction { NameResourceKey = "RejectMember", DescriptionResourceKey = "RejectGroupMember", APICall = "API/SocialGroups/ModerationService/RejectMember", }); NotificationsController.Instance.CreateNotificationType(type); NotificationsController.Instance.SetNotificationTypeActions(actions, type.NotificationTypeId); } // GroupMemberApprovedNotification type = new NotificationType { Name = "GroupMemberApprovedNotification", Description = "Group Member Notification", DesktopModuleId = deskModuleId }; if (NotificationsController.Instance.GetNotificationType(type.Name) == null) { NotificationsController.Instance.CreateNotificationType(type); } // GroupMemberRejectedNotification type = new NotificationType { Name = "GroupMemberRejectedNotification", Description = "Group Rejected Notification", DesktopModuleId = deskModuleId }; if (NotificationsController.Instance.GetNotificationType(type.Name) == null) { NotificationsController.Instance.CreateNotificationType(type); } }
public AdaptiveSetter(NotificationType context, FeatureSet supportedFeatures) : base(context, supportedFeatures) { }
public void Add(string id, string text, NotificationType type) { Messages.Add(new NotificationMessage(id, text, type)); }
internal static async Task <HttpResponseMessage> SendMessageAsync(string apiEndpoint, string serviceUrl, string messageBody, string messageTitle, NotificationType notificationType) { //serviceUrl = HttpUtility.UrlEncode(serviceUrl); var message = new Dictionary <string, string> { { "urls", serviceUrl }, { "title", messageTitle }, { "body", messageBody }, { "type", notificationType.ToString().ToLower() } }; return(await SendData(apiEndpoint, message)); }
public void AddNotification(string caption, string message, NotificationType type) { Notifications.Add(new NotificationModel(caption, message)); RaisePropertyChanged(nameof(NewNotifications)); }